forlilab / Meeko

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

mk_prepare_ligand.py fails with SDF downloaded from PDBE #94

Closed hrp1000 closed 6 months ago

hrp1000 commented 6 months ago

Just installed meeko using "conda install meeko" on MacOS High Sierra 10.13.6 - Mac Pro mid 2010, so cannot upgrade OS further.

Before I explain the issue, I'd actually prefer to put the code into my Python script and use python calls rather than run mk_prepare_ligand.py, so if that's the best way forward please advise!

Using Python 3.9.13 -

/Applications/miniconda3/bin/python --version Python 3.9.13

Downloaded .SDF file for FAD from PDBE -

wget https://www.ebi.ac.uk/pdbe/static/files/pdbechem_v2/FAD_model.sdf

mk_prepare_ligand.py -i FAD_model.sdf -o FAD_model.pdbqt --merge_these_atom_types

Traceback (most recent call last): File "/Applications/miniconda3/bin/mk_prepare_ligand.py", line 354, in molsetups = preparator.prepare(mol) File "/Applications/miniconda3/lib/python3.9/site-packages/meeko/preparation.py", line 139, in prepare setup = setup_class.from_mol(mol, File "/Applications/miniconda3/lib/python3.9/site-packages/meeko/molsetup.py", line 542, in from_mol molsetup.init_atom(assign_charges, coords) File "/Applications/miniconda3/lib/python3.9/site-packages/meeko/molsetup.py", line 675, in init_atom pdbinfo = rdkitutils.getPdbInfoNoNull(a), File "/Applications/miniconda3/lib/python3.9/site-packages/meeko/utils/rdkitutils.py", line 30, in getPdbInfoNoNull name = '%-2s' % mini_periodic_table[atomic_number] KeyError: 91

Any ideas?

hrp1000 commented 6 months ago

This is very odd - I just deleted the file FAD_model.sdf, downloaded it again with wget (as above) and mk_prepare_ligand.py works.

Many apologies - I must have screwed up the file.