forlilab / Meeko

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

RuntimeError when converting dlg to sdf using mk_export.py #152

Closed SejeongPark8354 closed 1 month ago

SejeongPark8354 commented 1 month ago

Hello,

I'm encountering an issue when trying to convert dlg files to sdf format using mk_export.py. This error has not occurred before, and I'm wondering if there might be a known cause. The error occurs during the conversion process:

Traceback (most recent call last):
File "/data/aigen/envs/autodock_result/bin/mk_export.py", line 78, in <module>
output_strings.failures = RDKitMOICreate.write_sd_string(pdbqt_mol)
File "/data/aigen/envs/autodock_result/lib/python3.10/site-packages/meeko/rdkit_mol_create.py", line 340, in write_sd_string
mol_list = RDKitMOICreate.from_pdbqt_mol(pdbqt_mol)
File "/data/aigen/envs/autodock_result/lib/python3.10/site-packages/meeko/rdkit_mol_create.py", line 191, in from_pdbqt_mol
mol = cls.add_pose_to_mol(mol, coordinates, index_map)
File "/data/aigen/envs/autodock_result/lib/python3.10/site-packages/meeko/rdkit_mol_create.py", line 269, in add_pose_to_mol
raise RuntimeError(
RuntimeError: ERROR! Given 36 atom coordinatesbut index_map is for 24.0 atoms.

It seems that there's a mismatch between the number of atom coordinates (36) and the index_map (24 atoms). Has there been any recent changes that might affect this conversion process? Or do you have any suggestions on how to troubleshoot this issue? Thank you for your help!

diogomart commented 1 month ago

Hello,

Not sure what it might be. If you can share the DLG we will take a look.

SejeongPark8354 commented 1 month ago

Hello,

My apologies for the confusion. The error was due to '.' in the SMILES string, not an issue with meeko. Thank you for your time.

diogomart commented 1 month ago

Ah yes, PR #120 prevents this. Thanks for reporting