Skip to content

Commit

Permalink
Merge pull request #251 from Electrostatics/nathan/issue_250
Browse files Browse the repository at this point in the history
Fixes #250
  • Loading branch information
Darren Curtis authored Nov 21, 2021
2 parents 6250bcf + 9088f14 commit da2ba88
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions docs/source/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
Release history
###############

***************
Current version
***************

Fixes
=====

* Fix bug for application of pKa predictions to proteins with more than 999 residues (`#250 <https://github.com/Electrostatics/pdb2pqr/issues/250>`_).

******************
3.3.1 (2021-11-13)
******************
Expand Down
2 changes: 1 addition & 1 deletion pdb2pqr/biomolecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ def apply_pka_values(self, force_field, ph, pkadic):
_LOGGER.warning(warn)
else:
self.apply_patch("NEUTRAL-CTERM", residue)
key = f"{resname:<3} {resnum:>3} {chain_id}"
key = f"{resname} {resnum} {chain_id}"
key = key.strip()
if key in pkadic:
value = pkadic[key]
Expand Down
2 changes: 1 addition & 1 deletion pdb2pqr/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ def non_trivial(args, biomolecule, ligand, definition, is_cif):
biomolecule.apply_pka_values(
forcefield_.name,
args.ph,
{row["group_label"]: row["pKa"] for row in pka_df},
{f"{row['res_name']} {row['res_num']} {row['chain_id']}": row["pKa"] for row in pka_df},
)

_LOGGER.info("Adding hydrogens to biomolecule.")
Expand Down

0 comments on commit da2ba88

Please sign in to comment.