Closed dinghezier closed 11 months ago
Hello, "not working" is insufficient information, you'd need to post the error. In any case check the README for examples; your code is for older versions.
Hi, Here are the details of the problem,
>>> pdbqt_mol = PDBQTMolecule.from_file("D:\PYTHON\Meeko\example\hydrated_docking\ligand.pdbqt", skip_typing=True)
>>> print(pdbqt_mol)
<Molecule named ligand containing 1 poses of 13 atoms>
>>> rdkitmol_list = RDKitMolCreate.from_pdbqt_mol(pdbqt_mol)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\PYTHON\Meeko\meeko\rdkit_mol_create.py", line 181, in from_pdbqt_mol
smiles, index_map, h_parent = cls.guess_flexres_smiles(resname, atom_names)
File "D:\PYTHON\Meeko\meeko\rdkit_mol_create.py", line 231, in guess_flexres_smiles
atom_names_in_smiles_order = cls.flexres[resname]["atom_names_in_smiles_order"]
KeyError: 'NCT'
Looks like there's a flexible residue named "NCT" for which there's no template. So it won't make an RDKit molecule for it. But this should be handled and None
should be produced in place of an RDKit molecule for that flexres. I think 5369c5239f1d8092cfec2cbd704aa78aa4eb2934 fixes it. Could you share your PDBQT?
Hi @dinghezier and @diogomart, the attempt to guess smiles was likely triggered because missing of smiles in the input pdbqt (ligand.pdbqt from the hydrated docking example in this repository) but I’m also not sure how to pass the smiles of the ligand. How will Meeko normally pick up ligand smiles, would you please advise? Many thanks
@rwxayheee good point. The smiles is in a PDBQT REMARK, for example, for water, smiles is just "O"
REMARK SMILES O
REMARK SMILES IDX 1 1
REMARK H PARENT 1 2 1 3
REMARK Flexibility Score: inf
ROOT
ATOM 1 O UNL 1 0.009 0.404 0.000 1.00 0.00 -0.412 OA
ATOM 2 H UNL 1 -0.787 -0.185 0.000 1.00 0.00 0.206 HD
ATOM 3 H UNL 1 0.778 -0.219 0.000 1.00 0.00 0.206 HD
ENDROOT
TORSDOF 0
Fixed the "fix"... 28c9fbfe3b778aa1bd5e8d7e4f3e6edf44633a0c
Closing, feel free to re-open if needed.
Hello, when I try to use Meeko convert .pdbqt file to .sdf file, I can not get the final result. Can you help me to resolve this problem?
Why doesn't export_rdkit_mol work?