Skip to content

Commit

Permalink
fix considered_atoms_sel
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Sep 13, 2024
1 parent 053484e commit 15b01b4
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions prody/proteins/waterbridges.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,9 @@ def calcWaterBridges(atoms, **kwargs):
Default is **False**
:type expand_selection: bool
:arg considered_atoms: selection string for which atoms to consider
:arg considered_atoms_sel: selection string for which atoms to consider
Default is **"protein"**
:type considered_atoms: str
:type considered_atoms_sel: str
"""

method = kwargs.pop('method', 'chain')
Expand All @@ -414,7 +414,7 @@ def calcWaterBridges(atoms, **kwargs):
isInfoLog = kwargs.pop('isInfoLog', True)
DIST_COVALENT_H = 1.4
prefix = kwargs.pop('prefix', '')
considered_atoms_sel = kwargs.pop('considered_atoms', "protein")
considered_atoms_sel = kwargs.pop('considered_atoms_sel', "protein")

if method not in ['chain', 'cluster']:
raise TypeError('Method should be chain or cluster.')
Expand Down Expand Up @@ -454,8 +454,8 @@ def calcWaterBridges(atoms, **kwargs):
relations[oxygen].hydrogens.append(hydrogen)

proteinHydrophilic = consideredAtoms.select(
'{0} and name "{1}" and within {2} of water'.format(
getElementsRegex(considered_atoms_sel, set(donors+acceptors)), distWR))
'{0} and name "{1}" and within {2} of water'.format(considered_atoms_sel,
getElementsRegex(set(donors+acceptors)), distWR))

proteinHydrogens = consideredAtoms.select('{0} and hydrogen').format(considered_atoms_sel) or []
proteinHydroPairs = findNeighbors(
Expand Down Expand Up @@ -554,7 +554,11 @@ def calcWaterBridgesTrajectory(atoms, trajectory, **kwargs):
:arg return_selection: whether to return the combined common selection
Default is **False** to keep expected behaviour.
However, this output is required when using selstr.
:type return_selection: bool
:type return_selection: bool
:arg considered_atoms_sel: selection string for which atoms to consider
Default is **"protein"**
:type considered_atoms_sel: str
"""
start_frame = kwargs.pop('start_frame', 0)
stop_frame = kwargs.pop('stop_frame', -1)
Expand Down

0 comments on commit 15b01b4

Please sign in to comment.