wengong-jin / icml18-jtnn

Junction Tree Variational Autoencoder for Molecular Graph Generation (ICML 2018)
MIT License
509 stars 190 forks source link

preprocess.py error with custom data #58

Closed jenna1701 closed 4 years ago

jenna1701 commented 4 years ago

While running preprocess.py on custom data, I get valence errors when assm=True. The same error is not present when assm=False. I've double checked that the RDKit mol objects generated from the strings are valid and without error. Any help solving this issue would be much appreciated.

Example:

smile=CC(C)[C@H](NC(=O)N(C)CCc1ccccn1)C(=O)N[C@@H](Cc1ccccc1)[C@@H](O)[C@H](O)[C@H](Cc1ccccc1)NC(=O)[C@H](NC(=O)N(C)CCc1ccccn1)C(C)C

tensorize(smile, assm=True) # def from preprocess.py

[10:43:46] Explicit valence for atom # 2 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 4 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 3 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 3 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 2 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 3 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 3 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 2 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 4 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 3 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 3 C, 5, is greater than permitted [10:43:46] Explicit valence for atom # 2 C, 5, is greater than permitted