Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some motifs in generated vocabulary are not parseable for rdkit #45

Open
suyufeng opened this issue Nov 11, 2022 · 0 comments
Open

Some motifs in generated vocabulary are not parseable for rdkit #45

suyufeng opened this issue Nov 11, 2022 · 0 comments

Comments

@suyufeng
Copy link

I was trying to build our customized language models. I found the pattern "C1=CC=CCNCCcc[cH:1]CC=CCCCC=CCCC=CCCCCC=C1" generated by "get_vocab.py" are not parseable for rdkit.

So when I ran the "preprocess.py", it would report an error on hgraph2graph/hgraph/vocab.py line 65, in count_inters:
inters = [a for a in mol.GetAtoms() if a.GetAtomMapNum() > 0]
AttributeError: 'NoneType' object has no attribute 'GetAtoms'

It is because within the function vocab.py::count_inters, the code tried to covert smile to mol:
line 64: mol = Chem.MolFromSmiles(s)

I would appreciate someone can provide a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant