Electrostatics / pdb2pqr

PDB2PQR - determining titration states, adding missing atoms, and assigning charges/radii to biomolecules.
http://www.poissonboltzmann.org/
Other
125 stars 34 forks source link

AttributeError: 'NoneType' object has no attribute 'group_type' #302

Closed Aunity closed 2 years ago

Aunity commented 2 years ago

Hi,

I'm running pdb2pqr with command

pdb2pqr30 --titration-state-method=propka --pdb-output protonized.pdb protein.pdb protonized.pqr --log-level=WARNING --with-ph=7.0

and I got some errors like this:

Traceback (most recent call last):
  File "/opt/anaconda3/envs/protprep/bin/pdb2pqr30", line 33, in <module>
    sys.exit(load_entry_point('pdb2pqr==3.4.1', 'console_scripts', 'pdb2pqr30')())
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/pdb2pqr/main.py", line 820, in main
    if main_driver(args) == 1:
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/pdb2pqr/main.py", line 783, in main_driver
    results = non_trivial(
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/pdb2pqr/main.py", line 635, in non_trivial
    pka_df, pka_str = run_propka(args, biomolecule)
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/pdb2pqr/main.py", line 522, in run_propka
    molecule.calculate_pka()
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/molecular_container.py", line 87, in calculate_pka
    self.conformations[name].calculate_pka(
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/conformation_container.py", line 208, in calculate_pka
    set_determinants(
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/determinants.py", line 60, in set_determinants
    add_determinants(group1, group2, distance, version)
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/determinants.py", line 75, in add_determinants
    add_sidechain_determinants(group1, group2, version)
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/determinants.py", line 90, in add_sidechain_determinants
    hbond_interaction = version.hydrogen_bond_interaction(group1, group2)
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/version.py", line 61, in hydrogen_bond_interaction
    return self.hydrogen_bond_interaction_model(group1, group2, self)
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/energy.py", line 261, in hydrogen_bond_interaction
    exception, value = version.check_exceptions(group1, group2)
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/version.py", line 91, in check_exceptions
    return self.exception_check_method(self, group1, group2)
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/energy.py", line 394, in check_exceptions
    exception, value = check_coo_arg_exception(group1, group2, version)
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/energy.py", line 444, in check_coo_arg_exception
    [dpka_max, cutoff] = version.get_hydrogen_bond_parameters(
  File "/opt/anaconda3/envs/protprep/lib/python3.8/site-packages/propka/version.py", line 134, in get_hydrogen_bond_parameters
    atom1.group_type, atom2.group_type)
AttributeError: 'NoneType' object has no attribute 'group_type'

And this is my environment information:

python: Python 3.8.12 | packaged by conda-forge
pdb2pqr: 3.4.1

my protein file is here: protein.zip

sobolevnrm commented 2 years ago

This appears to be a PROPKA problem; I can reproduce it with just propka3 protein.pdb using PROPKA 3.4.0.

sobolevnrm commented 2 years ago

Closing this in lieu of https://github.com/jensengroup/propka/issues/140

locitran commented 1 year ago

Has this issue been resolved yet? I also got this issue.

sobolevnrm commented 1 year ago

The associated issue https://github.com/jensengroup/propka/issues/140 is still open. We welcome community contributions to help fix issues like this.

Aunity commented 1 year ago

@trandinhquangloc I have modified the code like this and solved this problem, but i don't know whether it is right. https://github.com/Aunity/propka image

locitran commented 1 year ago

Thank you @Aunity, it does work. I found that propka3 can work without errors in a regular pdb structure (e.g. 1t64.pdb1), but after I use PDBFixer to fix small loops, non-standard residuals, then execute point mutation on this structure, things start to happen. It seems like the error usually comes from the custom structure.

Can you share your case that produced the error?