Skip to content

Commit

Permalink
Included CMAPTorsionForce removal from ML Region (#68) (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
JMorado authored Feb 7, 2024
1 parent bc414b4 commit 09be77f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openmmml/mlpotential.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ def shouldRemove(termAtoms):
angles.remove(angle)
for torsions in root.findall('./Forces/Force/Torsions'):
for torsion in torsions.findall('Torsion'):
torsionAtoms = [int(torsion.attrib[p]) for p in ('p1', 'p2', 'p3', 'p4')]
torsionLabels = ('p1', 'p2', 'p3', 'p4') if 'p1' in torsion.attrib else ('a1', 'a2', 'a3', 'a4', 'b1', 'b2', 'b3', 'b4')
torsionAtoms = [int(torsion.attrib[p]) for p in torsionLabels]
if shouldRemove(torsionAtoms):
torsions.remove(torsion)

Expand Down

0 comments on commit 09be77f

Please sign in to comment.