HannesStark / EquiBind

EquiBind: geometric deep learning for fast predictions of the 3D structure in which a small molecule binds to a protein
MIT License
482 stars 109 forks source link

Can't Kekulize mol #35

Closed jadolfbr closed 2 years ago

jadolfbr commented 2 years ago

Hello,

Really cool tool that I hope to be able to use! I'm getting this error for an SDF file that is hydrated and saved from PyMol. Any advice here?

[14:37:23] Can't kekulize mol.  Unkekulized atoms: 47 48 49 50 51 52 53 54 56
Traceback (most recent call last):
  File "/home/jadolfbr/EquiBind/inference.py", line 473, in <module>
    inference_from_files(args)
  File "/home/jadolfbr/EquiBind/inference.py", line 337, in inference_from_files
    if lig == None: raise ValueError(f'None of the ligand files could be read: {lig_names}')
ValueError: None of the ligand files could be read: ['215_ligand.sdf']
HannesStark commented 2 years ago

Hi! Thanks for the kind words! This is an error that occurs because RDKit returned None instead of a molecule object. It happened because RDKit was unable to read the molecule file. Maybe you can just try to load the molecule by itself with RDKit to debug why it was not able to load the molecule.

jadolfbr commented 2 years ago

Thanks! Will do! I saved the ligand from PyMol, and it looks like it doesn't deal with rings very well. I have now used open babel to convert to SDF and rerunning. This SDF looks better preserved, so hopefully RDKit will work OK.

yufengwhy commented 2 years ago

I use this code and dataset here, also meet the "Can't Kekulize mol", is this normal? @HannesStark

loading ligands: 0%| | 0/16379 [00:00<?, ?it/s][16:34:53] Can't kekulize mol. Unkekulized atoms: 14 15 16 17 18 [16:34:53] Can't kekulize mol. Unkekulized atoms: 8 9 10 11 12 13 14 15 16 [16:34:53] Can't kekulize mol. Unkekulized atoms: 40 41 42 43 44 [16:34:53] Explicit valence for atom # 1 C, 6, is greater than permitted [16:34:53] Can't kekulize mol. Unkekulized atoms: 0 1 3 4 5 6 9 10 11 [16:34:53] Can't kekulize mol. Unkekulized atoms: 5 6 7 8 9 10 11 12 13 [16:34:53] Can't kekulize mol. Unkekulized atoms: 25 26 27 28 29 [16:34:53] Can't kekulize mol. Unkekulized atoms: 1 4 5 8 9 10 [16:34:53] Can't kekulize mol. Unkekulized atoms: 0 1 2 3 4 5 6 7 8