ADL: ADT: Unable to add hydrogen atoms

Peter Mawanga peter.mawanga.lagos at gmail.com
Tue Nov 17 05:06:57 PST 2020


Hello everyone,

I have tried to add hydrogen atoms to my ligand but keep getting this error
when I try to save the modified PDB/PDBQT file with the added hydrogen
atoms:

=========================================

File "/home/peter/MGLTools-1.5.6/MGLToolsPckgs/ViewerFramework/VF.py", line
898, in tryto
    result = command( *args, **kw )
  File
"/home/peter/MGLTools-1.5.6/MGLToolsPckgs/AutoDockTools/autotorsCommands.py",
line 1374, in doit
    mol.LPO.write(filename)
  File
"/home/peter/MGLTools-1.5.6/MGLToolsPckgs/AutoDockTools/MoleculePreparation.py",
line 888, in write
    self.writer.write(mol, outputfilename)
  File
"/home/peter/MGLTools-1.5.6/MGLToolsPckgs/AutoDockTools/MoleculePreparation.py",
line 1073, in write
    ligand.torscount = len(ligand.allAtoms.bonds[0].get(lambda
x:x.activeTors))
  File "/home/peter/MGLTools-1.5.6/MGLToolsPckgs/MolKit/tree.py", line 622,
in get
    result = filter(selectionString, self.data)
  File
"/home/peter/MGLTools-1.5.6/MGLToolsPckgs/AutoDockTools/MoleculePreparation.py",
line 1073, in <lambda>
    ligand.torscount = len(ligand.allAtoms.bonds[0].get(lambda
x:x.activeTors))
AttributeError: Bond instance has no attribute 'activeTors'

=========================================

Although the python script below works on the command-line, it only adds
the polar hydrogen atoms to the ligand.

pythonsh prepare_ligand4.py -l lig.pdb -A 'hydrogens'


Please suggest how to add all hydrogen atoms to the ligand. Incidentally,
even though I could add the hydrogen atoms and observe them in the
graphical window, but I am unable to save the modified ligand as a PDB file.


--
Cheers
Peter


More information about the autodock mailing list