forlilab / Meeko

Interfacing RDKit and AutoDock
GNU Lesser General Public License v2.1
182 stars 43 forks source link

Rdkit kekulize error #36

Closed BJWiley233 closed 1 year ago

BJWiley233 commented 1 year ago

Was hoping you could test this molecule for me. I am getting this error from rdkit as Greg describes and the conversion fails. I also get it for MANY other molecules. I don't get issue with prepare_ligand from AD4 obviously cause it doesn't use rdkit. The input molecule is here: https://drive.google.com/file/d/1u4OcKT7b-ULPb09DEeArLb_J7VyzFw_I/view?usp=sharing

[07:14:52] Can't kekulize mol.  Unkekulized atoms: 11 12 13 14 17
[07:14:52] sanitise [07:14:52] *****

I created the molecule from the smiles like:

obabel -:"CCCN[C@H]1CCCN(C(=O)c2cnn(CC)c2C)C1" -omol2 --gen3D -O ZINC001000520650.mol2

The structure looks fine in PyMol and matches the structure here: https://zinc15.docking.org/substances/ZINC001000520650/ image

BJWiley233 commented 1 year ago

Ahh I bet it's because I am reading in mol2 files which was was AD4 took in but Rdkit does away with mol2 files as described by Greg (again :smile:) https://github.com/rdkit/rdkit/discussions/3647

Might want to add a note about this in the markdown if people are coming from the ADTools for AD4's prepare_ligand which I think only took mol2 files and didn't take sdf files.

diogomart commented 1 year ago

Yeah, even pyrazole (`"c2cn[nH]c2") would cause trouble. Related issues:

Interestingly, in this RDKit MOL2 test file, the atom types are aromatic for pyridine but not for pyrazole.

Will strengthen our SDF recommendation in the README.