Skip to content

Commit

Permalink
Implement code suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
j-wags authored Feb 27, 2025
1 parent d3f529e commit f918615
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openmmforcefields/generators/template_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1592,9 +1592,9 @@ def generate_residue_template(self, molecule, residue_atoms=None):

# Remove CMMotionRemover if present
# See https://github.com/openmm/openmmforcefields/issues/365
for f_idx in range(system.getNumForces()):
for f_idx in reversed(range(system.getNumForces())):
force = system.getForce(f_idx)
if "CMMotionRemover" in str(force):
if isinstance(force, CMMotionRemover):
system.removeForce(f_idx)

self.cache_system(smiles, system)
Expand Down

0 comments on commit f918615

Please sign in to comment.