forlilab / Meeko

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

`ValueError: Could not find atomic number for Hn Hn` #89

Closed eunos-1128 closed 7 months ago

eunos-1128 commented 7 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 hydrogen to the receptor of the DUD-E co-crystal structure with 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!

rwxayheee commented 7 months ago

Hi @eunos-1128

Have you already figured it out? If not can you post the PDB file you had this problem with? Sometimes atom names being too long for PDB format could be causing the problem, but I'm not 100% sure. It would be helpful if you can post the file

I just realized you reposted this at ccsb-scripps/AutoDock-Vina#283 It looks like a protein preparation issue with prepare_receptor

eunos-1128 commented 7 months ago

@rwxayheee

Thank you for your reply.

It looks like a protein preparation issue with prepare_receptor

I've known that but couldn't find out where prepare_receptor's repo is.

Have you already figured it out?

Yes, I figured out what caused this error and have fixed it already.

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.