Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Aunity opened this issue Feb 16, 2022 · 6 comments
Closed

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

Aunity opened this issue Feb 16, 2022 · 6 comments

Comments

@Aunity
Copy link

Aunity commented Feb 16, 2022

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
Copy link
Member

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

@sobolevnrm
Copy link
Member

Closing this in lieu of jensengroup/propka#140

@locitran
Copy link

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

@sobolevnrm
Copy link
Member

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

@Aunity
Copy link
Author

Aunity commented Sep 21, 2023

@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
Copy link

locitran commented Sep 21, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants