Skip to content

Commit

Permalink
ENH: Error when 1-4 scaling factors don't match
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwthompson committed Jan 24, 2025
1 parent 1489f0f commit 49afeb6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions openff/interchange/operations/_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ def _check_nonbonded_compatibility(
f"{interchange1['vdW'].switch_width} and {interchange2['vdW'].switch_width}.",
)

if (interchange1["vdW"].scale_14 != interchange2["vdW"].scale_14) or (
interchange1["Electrostatics"].scale_14 != interchange2["Electrostatics"].scale_14
):
raise UnsupportedCombinationError(
"1-4 scaling factors in nonbonded handler(s) (vdW and/or Electrostatics do not match.",
)


def _combine(
input1: "Interchange",
Expand Down

0 comments on commit 49afeb6

Please sign in to comment.