Skip to content

Commit

Permalink
Merge pull request #50 from OpenBioSim/fix_constraint_check
Browse files Browse the repository at this point in the history
Only print constraint warning once
  • Loading branch information
lohedges authored Jun 19, 2024
2 parents 2d9e1c8 + 5a131c1 commit f35fd29
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/somd2/runner/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,17 @@ def _check_end_state_constraints(self):
constraints1 = d.get_constraints()

# Check for equivalence.
for c0, c1 in zip(constraints0, constraints1):
if c0 != c1:
_logger.info(
f"Constraints are at not the same at {_lam_sym} = 0 and {_lam_sym} = 1."
)
if len(constraints0) != len(constraints1):
_logger.info(
f"Constraints are at not the same at {_lam_sym} = 0 and {_lam_sym} = 1."
)
else:
for c0, c1 in zip(constraints0, constraints1):
if c0 != c1:
_logger.info(
f"Constraints are at not the same at {_lam_sym} = 0 and {_lam_sym} = 1."
)
break

def _check_directory(self):
"""
Expand Down

0 comments on commit f35fd29

Please sign in to comment.