forlilab / Meeko

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

mk_export fails though pdbqt file contains smiles #84

Closed TommyBiomodellingAU closed 4 months ago

TommyBiomodellingAU commented 6 months ago

hello meeko people

I am using mk_export.py to safely convert vina output pdbqt files to sdf format. The pdbqt does contain the "REMARK SMILES" line, but it fails anyways. mk_export.py test_ligand_1.pdbqt -o test_ligand_1.sdf gives output: Traceback (most recent call last): File "/home/user/anaconda3/envs/autogrow-env/bin/mk_export.py", line 103, in raise RuntimeError(msg) RuntimeError: Could not convert to RDKit. Maybe meeko was not used for preparing the input PDBQT for docking, and the SMILES string is missing? Except for standard protein sidechains, all ligands and flexible residues require a REMARK SMILES line in the PDBQT, which is added automatically by meeko.

what could be the issue here? I have RDKit v. 2022-03.5 installed

diogomart commented 6 months ago

Hello, can you share that PDBQT?

TommyBiomodellingAU commented 5 months ago

MODEL 1 REMARK VINA RESULT: -9.4 0.000 0.000 REMARK Small molecule (ligand) REMARK Compound: PV-002014091616_2_T7 REMARK SMILES: C[C@@H]1CN(CC@@HC1=CC=C(F)C=C1)C1=NN=C(C)N1CCNC(O)=C1N=CC=CC1=O REMARK The ligand was originally not a salt, therefore no desalting was carried out. REMARK The tautomeric state was generated by cxcalc version 18.20.0 of ChemAxons JChem Suite. REMARK Protonation state was generated at pH 7.4 by cxcalc version 18.20.0 of ChemAxons JChem Suite. REMARK Generation of the 3D conformation was carried out by molconvert version 18.20.0 of ChemAxons JChem Suite. REMARK Generation of the the target format file (pdbqt) was carried out by Open Babel version 2.4.1. REMARK Created on Sun Nov 18 21:16:38 EST 2018 REMARK 8 active torsions: REMARK status: ('A' for Active; 'I' for Inactive) REMARK 1 A between atoms: _1 and _2 REMARK 2 A between atoms: _6 and _8 REMARK 3 A between atoms: _18 and _19 REMARK 4 A between atoms: _20 and _21 REMARK 5 A between atoms: _21 and _22 REMARK 6 A between atoms: _22 and _23 REMARK 7 A between atoms: _23 and _24 REMARK 8 A between atoms: _24 and _25 REMARK x y z vdW Elec q Type REMARK __ _ __ ____ ROOT ATOM 1 C LIG 1 123.933 107.459 149.964 0.00 0.00 +0.039 C ATOM 2 C LIG 1 123.060 108.726 149.822 0.00 0.00 +0.133 C ATOM 3 O LIG 1 122.662 108.839 148.437 0.00 0.00 -0.366 OA ATOM 4 C LIG 1 121.749 109.925 148.161 0.00 0.00 +0.166 C ATOM 5 C LIG 1 120.492 109.779 149.067 0.00 0.00 +0.144 C ATOM 6 N LIG 1 120.937 109.814 150.447 0.00 0.00 -0.294 N

the top lines of the pdbqt file

diogomart commented 5 months ago

Looks like you added the REMARK SMILES manually, because RDKit can't parse that SMILES, and because the mapping of atom indices between the SMILES and the PDBQT is missing. The PDBQT needs to be written by meeko so that the index mapping is also there.