ccsb-scripps / AutoDock-Vina

AutoDock Vina
http://vina.scripps.edu
Apache License 2.0
561 stars 199 forks source link

prepare_receptor causes `ValueError: Could not find atomic number for Hn Hn` #283

Closed eunos-1128 closed 3 weeks ago

eunos-1128 commented 4 months ago

I tried to validate the accuracy of Vina on the DUD-E dataset according to the AutoDock Vina v1.2.0 paper and the supporting information description.

After adding hydrogens to the receptor of the DUD-E co-crystal structure using reduce (with the option to flip NQH groups), I tried to prepare PDBQT files with prepare_receptor in ADFRsuite as below.

for prot_name in *; do
    reduce -FLIP "./${prot_name}/receptor.pdb" > proteins/DUD-E/${prot_name}-FHs.pdb
done
for prot_name in *; do
    prepare_receptor \
    -r proteins/DUD-E/${prot_name}-FHs.pdb \
    -o dockings/vina/data/DUD-E/receptors/${prot_name}-FHs.pdbqt
done

In result the following error occurred.

adding gasteiger charges to peptide
Traceback (most recent call last):
  File "/home/uenom/data_ueno/dockings/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/Utilities24/prepare_receptor4.py", line 216, in <module>
    dict=dictionary)    
  File "/home/uenom/data_ueno/dockings/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 558, in __init__
    version=version, delete_single_nonstd_residues=delete_single_nonstd_residues)
  File "/home/uenom/data_ueno/dockings/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 141, in __init__
    self.addCharges(mol, charges_to_add)
  File "/home/uenom/data_ueno/dockings/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 227, in addCharges
    chargeCalculator.addCharges(mol.allAtoms)
  File "/home/uenom/data_ueno/dockings/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/MolKit/chargeCalculator.py", line 80, in addCharges
    babel.assignHybridization(atoms)
  File "/home/uenom/data_ueno/dockings/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/PyBabel/atomTypes.py", line 127, in assignHybridization
    a.babel_atomic_number = self.get_atomic_number(a.babel_type)
  File "/home/uenom/data_ueno/dockings/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/PyBabel/atomTypes.py", line 103, in get_atomic_number
    (name,_name) )
ValueError: Could not find atomic number for Hn Hn

Is this due to software bugs or incorrect tool usage?

Any advice would be appreciated!

eunos-1128 commented 4 months ago

No element information corresponding to each atom in cocrystal receptor's PDB data in DUD-E dataset was provided.

That caused this error. When running prepare_receptor, the program bundled in it seems not to work for PDB data which don't have each atom's element description.

I repaired PDB data and ran prepare_receptor successfully.