Commit f16e7e3c authored by Jason Swails's avatar Jason Swails
Browse files

Recognize more residue labels as water in the Amber file parser.

At some point, at least, TP4 was the residue label for water (I think tleap
currently translates most of the water residue labels to WAT, but there are at
least some -- like $AMBERHOME/test/tip4p/prmtop -- that use older labels).
parent 5cf2c3fd
...@@ -720,7 +720,7 @@ def readAmberSystem(prmtop_filename=None, prmtop_loader=None, shake=None, gbmode ...@@ -720,7 +720,7 @@ def readAmberSystem(prmtop_filename=None, prmtop_loader=None, shake=None, gbmode
system.addParticle(mass) system.addParticle(mass)
# Add constraints. # Add constraints.
isWater = [prmtop.getResidueLabel(i) == 'WAT' for i in range(prmtop.getNumAtoms())] isWater = [prmtop.getResidueLabel(i) == ('WAT', 'TP4', 'TP5', 'SPF', 'SPG') for i in range(prmtop.getNumAtoms())]
if shake in ('h-bonds', 'all-bonds', 'h-angles'): if shake in ('h-bonds', 'all-bonds', 'h-angles'):
for (iAtom, jAtom, k, rMin) in prmtop.getBondsWithH(): for (iAtom, jAtom, k, rMin) in prmtop.getBondsWithH():
system.addConstraint(iAtom, jAtom, rMin) system.addConstraint(iAtom, jAtom, rMin)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment