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

Error when converting molecules derived from multimolecular archives #118

Open
davidoskky opened this issue May 13, 2024 · 1 comment
Open

Comments

@davidoskky
Copy link

When providing more than one molecule, only one is converted to PDBQT but the smiles remark contains both molecules.
This could be considered incorrect input, however it does not raise an error when generating a PDBQT file but only when converting back to SDF.

I feel it would be better to immediately signal the input is not correct.

To Reproduce

cat "c1ccccc1.CCC(Cl)CCC" > test.smi
obabel test.smi -O test.sdf
mk_prepare_ligand.py test.sdf -o test.pdbqt
mk_export.py test.pdbqt -o output.sdf
Traceback (most recent call last):
  File "/bin/mk_export.py", line 93, in <module>
    output_string, failures = RDKitMolCreate.write_sd_string(
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/meeko/rdkit_mol_create.py", line 360, in write_sd_string
    mol_list = RDKitMolCreate.from_pdbqt_mol(pdbqt_mol, only_cluster_leads)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/meeko/rdkit_mol_create.py", line 196, in from_pdbqt_mol
    mol = cls.add_pose_to_mol(mol, coordinates, index_map) 
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/meeko/rdkit_mol_create.py", line 294, in add_pose_to_mol
    raise RuntimeError("Only H allowed to be in SMILES but not in PDBQT")
RuntimeError: Only H allowed to be in SMILES but not in PDBQT

@rwxayheee
Copy link

rwxayheee commented May 18, 2024

only one is converted to PDBQT but the smiles remark contains both molecules

Can confirm this, for smilar Smiles, obabel might generate a multi-fragment PDBQT file which is also not instantly ready for docking.
Smiles containing a dot isn't necessarily incorrect, though. It might be helpful for Meeko to be able to "desalt" Smiles that comes from some chemical libraries that have drugs in the pharmaceutical salt form. When the inputs are salts, obabel might neutralize (add additional hydrogens to, and create a new root for) anions like [Cl-]

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

2 participants