Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions news/afe-uuid.rst
Original file line number Diff line number Diff line change
@@ -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>
7 changes: 3 additions & 4 deletions src/openfe/protocols/openmm_afe/equil_binding_afe_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,9 @@ def _create(

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,
Expand Down
7 changes: 3 additions & 4 deletions src/openfe/protocols/openmm_afe/equil_solvation_afe_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,9 @@ def _create(

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,
Expand Down
4 changes: 2 additions & 2 deletions src/openfe/tests/protocols/openmm_abfe/test_abfe_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
4 changes: 2 additions & 2 deletions src/openfe/tests/protocols/openmm_ahfe/test_ahfe_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading