mirror of
https://github.com/OpenFreeEnergy/openfe.git
synced 2026-06-04 14:14:22 +08:00
Switch repeat id assignment from leg to repeat in AFE Protocols (#1948)
* switch uuid from leg to repeat * Add news item --------- Co-authored-by: Alyssa Travitz <31974495+atravitz@users.noreply.github.com>
This commit is contained in:
25
news/afe-uuid.rst
Normal file
25
news/afe-uuid.rst
Normal file
@@ -0,0 +1,25 @@
|
||||
**Added:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Changed:**
|
||||
|
||||
* AFE Protocols (AbsoluteBindingProtocol and AbsoluteSolvationProtocol)
|
||||
now assign a single uuid for all ProtocolUnits in a repeat rather than
|
||||
separating the uuid by legs of the transformation. PR #1948
|
||||
|
||||
**Deprecated:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Removed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Security:**
|
||||
|
||||
* <news item>
|
||||
@@ -502,10 +502,9 @@ class AbsoluteBindingProtocol(gufe.Protocol):
|
||||
|
||||
protocol_units: dict[str, list[gufe.ProtocolUnit]] = {"solvent": [], "complex": []}
|
||||
|
||||
for phase in ["solvent", "complex"]:
|
||||
for i in range(self.settings.protocol_repeats):
|
||||
repeat_id = int(uuid.uuid4())
|
||||
|
||||
for i in range(self.settings.protocol_repeats):
|
||||
repeat_id = int(uuid.uuid4())
|
||||
for phase in ["solvent", "complex"]:
|
||||
setup = unit_classes[phase]["setup"](
|
||||
protocol=self,
|
||||
stateA=stateA,
|
||||
|
||||
@@ -466,10 +466,9 @@ class AbsoluteSolvationProtocol(gufe.Protocol):
|
||||
|
||||
protocol_units: dict[str, list[gufe.ProtocolUnit]] = {"solvent": [], "vacuum": []}
|
||||
|
||||
for phase in ["solvent", "vacuum"]:
|
||||
for i in range(self.settings.protocol_repeats):
|
||||
repeat_id = int(uuid.uuid4())
|
||||
|
||||
for i in range(self.settings.protocol_repeats):
|
||||
repeat_id = int(uuid.uuid4())
|
||||
for phase in ["solvent", "vacuum"]:
|
||||
setup = unit_classes[phase]["setup"](
|
||||
protocol=self,
|
||||
stateA=stateA,
|
||||
|
||||
@@ -158,8 +158,8 @@ def test_create_independent_repeat_ids(benzene_modifications, T4_protein_compone
|
||||
for u in dag.protocol_units:
|
||||
repeat_ids.add(u.inputs["repeat_id"])
|
||||
|
||||
# squashed by repeat_id, that's 2 sets of 6
|
||||
assert len(repeat_ids) == 12
|
||||
# squashed by repeat_id, that's 1 uuid per repeat
|
||||
assert len(repeat_ids) == 6
|
||||
|
||||
|
||||
def test_mda_universe_error():
|
||||
|
||||
@@ -142,8 +142,8 @@ def test_create_independent_repeat_ids(benzene_system):
|
||||
for u in dag.protocol_units:
|
||||
repeat_ids.add(u.inputs["repeat_id"])
|
||||
|
||||
# squashed by repeat_id, that's 2 sets of 6
|
||||
assert len(repeat_ids) == 12
|
||||
# squashed by repeat_id, that's 1 uuid by repeat
|
||||
assert len(repeat_ids) == 6
|
||||
|
||||
|
||||
def _assert_num_forces(system, forcetype, number):
|
||||
|
||||
Reference in New Issue
Block a user