Sorry to revive an old thread but I'm having this problem with a different ligand (hydroxytamoxifen OHT, extracted from the ERalpha/OHT complex structure on PDB). I am using pyMolMac (X11 hybrid) in combination with Daniel Seeliger's autodock/vina plugin for pyMol. As others have said, the pdbqt file is produced anyway (but the error message messes with the plugin which is very irritating -- it thinks the ligand hasn't been generated). The error is this:
File "/Users/x/y/z/Docking/mgltools-linuxdist/AutoDockTools/Utilities24/prepare_ligand4.py", line 207, in <module>
if a.coords!=coord_dict[a]: bad_list.append(a)
KeyError: <Atom instance> obj01.ligand:A:OHT600:H4Batch:
The relevant area of the script is this:
bad_list = 
#for a in mol.allAtoms:
#if a.coords!=coord_dict[a]: bad_list.append(a)
print len(bad_list), ' atom coordinates changed!'
for a in bad_list:
print a.name, ":", coord_dict[a], ' -> ', a.coords
if verbose: print "No change in atomic coordinates"
where I have commented the two offending lines. The weird thing is that there is no error message of the type "xxx atom coordinates changed!" as there should be if bad_list is nonzero length (I don't know Python but I'm pretty sure this is right).
I don't really have any idea other than that when those lines are removed it works fine. Can anyone help me out? Does removing the lines present any potential for erroneous ligands to be generated? Please let me know if I need to provide more info.