Comments (12)
I'm having the exact same issue - any idea why this is?
from hgraph2graph.
@wengong-jin Can you please suggest a solution for this ? Thanks
from hgraph2graph.
Anything that you could suggest - still hung up on it?
from hgraph2graph.
+1
from hgraph2graph.
Can you post a picture of your molecule / encoded graph? In my experience you get n-m > 1 when there's atoms that aren't connected to the rest of the molecule. This could be because the cluster generation process in find_clusters() wasn't built for a particular combination of rings / bonds
from hgraph2graph.
Hi, reopening this as I am currently experiencing the same problem.
It says the issue occurs in tree_decomp
line 82
Has anybody found a fix yet?
from hgraph2graph.
from hgraph2graph.
from hgraph2graph.
from hgraph2graph.
from hgraph2graph.
import sys
import argparse
from hgraph import *
from rdkit import Chem
from multiprocessing.dummy import Pool
def process(data):
vocab = set()
for line in data:
s = line.strip("\r\n ")
hmol = MolGraph(s)
for node,attr in hmol.mol_tree.nodes(data=True):
smiles = attr['smiles']
vocab.add( attr['label'] )
for i,s in attr['inter_label']:
vocab.add( (smiles, s) )
return vocab
if name == "main":
parser = argparse.ArgumentParser()
parser.add_argument('--ncpu', type=int, default=1)
args = parser.parse_args()
data = [mol for line in sys.stdin for mol in line.split()[:2]]
data = list(set(data))
batch_size = len(data) // args.ncpu + 1
batches = [data[i : i + batch_size] for i in range(0, len(data), batch_size)]
with Pool(args.ncpu) as pool:
vocab_list = pool.map(process, batches, chunksize=1)
vocab = [(x,y) for vocab in vocab_list for x,y in vocab]
from hgraph2graph.
Interestingly, I removed all contents from line 34 downwards (I don't know why that should solve the problem for me) and it ran well. sorry you couldn't get the img. I was responding within my mail. let's see if it works. btw, chatgpt was really helpful with the error clearings.
from hgraph2graph.
Related Issues (20)
- Question Polymer Data
- Question about constraint optimization
- All assm_labels are zero?
- how to convert the chembl checkpoint kept file to an binary format
- PicklingError("Can't pickle <class 'Boost.Python.ArgumentError'>: import of module 'Boost.Python failed")' HOT 7
- README error HOT 7
- Unrecognized arguments: --nsamples 1000 HOT 1
- IndexError: tuple index out of range HOT 12
- Getting error while running pip install . HOT 3
- TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first HOT 2
- TypeError: forward() missing 2 required positional arguments: 'y_orders' and 'beta' HOT 2
- Pretrained chembl model requires old rdkit HOT 2
- Some motifs in generated vocabulary are not parseable for rdkit
- Finetune result interpretation
- vocab size of data/chembl/vocab.txt: 5623, but when get_vocab.py the new vocab.txt is 5625 HOT 3
- ZeroDivisionError when size smaller than 1000 using single mode
- If anyone has done fine tuning, please share environment.yaml HOT 1
- Preprocess Error————————Broken pipe
- size mismatch when load chembl-pretrained ckpt
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hgraph2graph.