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 24, 2024
1 parent 175ea94 commit cf9d449
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 cf9d449

Please sign in to comment.