Meeko

raw JSON →
0.7.1 verified Mon Apr 27 auth: no python

Meeko is a Python package for preparing small molecules for docking with AutoDock Vina and other docking programs. It converts RDKit mol objects to PDBQT format, handling protonation, tautomers, and flexible rotatable bonds. Current version is 0.7.1, with irregular release cadence.

pip install meeko
error ModuleNotFoundError: No module named 'meeko'
cause Meeko not installed or wrong Python environment.
fix
Run: pip install meeko
error AttributeError: 'list' object has no attribute 'write_pdbqt_string'
cause MoleculePreparation.prepare returns a list, not a single object.
fix
Use setup = preparator.prepare(mol)[0] before calling write_pdbqt_string().
error ImportError: cannot import name 'LinkedRDKitChorizo' from 'meeko'
cause Class renamed in v0.6.0.
fix
Use from meeko import Polymer instead.
error ValueError: Unknown atom type: C1
cause Atom type not recognized by Meeko's templates; often due to unusual valence or implicit hydrogens.
fix
Ensure RDKit mol has explicit hydrogens (Chem.AddHs(mol)).
breaking In v0.6.0, class LinkedRDKitChorizo was renamed to Polymer, and ChorizoResidue to Monomer. Old imports will break.
fix Use from meeko import Polymer, Monomer
deprecated OpenBabel support was dropped in v0.6.0. Templates based on OpenBabel no longer work.
fix Switch to RDKit-based methods. Remove openbabel dependency.
gotcha The MoleculePreparation.prepare() method returns a list of MoleculeSetup objects, not a single object. Iterate or index the list.
fix setup = preparator.prepare(mol)[0]
deprecated The mk_export.py script from older versions is removed. Use the Python API or CLI meeko_prepare.py.
fix Use meeko_prepare or the Python API directly.
conda install -c conda-forge meeko

Prepare a small molecule and output PDBQT string.

from rdkit import Chem
from meeko import MoleculePreparation, RDKitMoleculeCreate

mol = Chem.MolFromSmiles('Cc1ccccc1')
preparator = MoleculePreparation()
setup_list = preparator.prepare(mol)
pdbqt_string = setup_list[0].write_pdbqt_string()
print(pdbqt_string[:200])