Skip to content

Commit

Permalink
what if someone used a tuple of mappings?
Browse files Browse the repository at this point in the history
Just be safe and check against ComponentMapping

also guard against len 0 list case
  • Loading branch information
richardjgowers committed Jan 26, 2024
1 parent b224d71 commit 7a89fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openfe/protocols/openmm_rfe/equil_rfe_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def _validate_alchemical_components(
"""
# Check mapping
# For now we only allow for a single mapping, this will likely change
if mapping is None or (not isinstance(mapping, ComponentMapping) and len(mapping) > 1):
if mapping is None or (not isinstance(mapping, ComponentMapping) and len(mapping) != 1):
errmsg = "A single LigandAtomMapping is expected for this Protocol"
raise ValueError(errmsg)

Expand Down

0 comments on commit 7a89fb2

Please sign in to comment.