Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
43d6007
Migrate validation to Protocol._validate
IAlibay Dec 5, 2025
2cd56ba
some fixes
IAlibay Dec 5, 2025
70e6d7a
Merge branch 'main' into validate-rfe
IAlibay Dec 5, 2025
f330562
move some things around
IAlibay Dec 8, 2025
95b92b3
Merge branch 'main' into validate-rfe
IAlibay Dec 15, 2025
1e0153e
add validate endstate tests
IAlibay Dec 15, 2025
fe2b879
Merge branch 'validate-rfe' of github.com:OpenFreeEnergy/openfe into …
IAlibay Dec 15, 2025
fbc4554
validate mapping tests
IAlibay Dec 15, 2025
c2f49d2
net charge validation tests
IAlibay Dec 15, 2025
c50f99c
more stuff
IAlibay Dec 22, 2025
9e0d29b
remove old tests
IAlibay Dec 24, 2025
2fe8ff9
make hybrid samplers not rely on htf
IAlibay Dec 24, 2025
4a0bd26
fix up test
IAlibay Dec 24, 2025
5848adc
fix up some slow tests
IAlibay Dec 24, 2025
1aaef87
Merge branch 'main' into multistate-nohtf
IAlibay Dec 24, 2025
b6d5ecd
Fix up the one test
IAlibay Dec 26, 2025
0605d11
fix a few things
IAlibay Dec 26, 2025
48106a2
fix the remaining tests
IAlibay Dec 26, 2025
5af66e8
cleanup imports
IAlibay Dec 26, 2025
ad0b5fb
Merge branch 'validate-rfe' into move-rfe-protocol
IAlibay Dec 26, 2025
45e004c
Merge branch 'multistate-nohtf' into move-rfe-protocol
IAlibay Dec 26, 2025
58dd71c
Migrate protocol, units, and results for the hybridtop protocol
IAlibay Dec 26, 2025
792996e
Add news item
IAlibay Dec 26, 2025
91f1788
Merge branch 'validate-rfe' into move-rfe-protocol
IAlibay Dec 26, 2025
527b870
Merge branch 'main' into validate-rfe
IAlibay Dec 26, 2025
7d17998
fix redefine
IAlibay Dec 27, 2025
43eb947
start modularising everything
IAlibay Dec 27, 2025
d1bd736
Add charge validation for smcs when dealing with ismorphic molecules
IAlibay Dec 27, 2025
51a6de1
break down the rfe units into bits
IAlibay Dec 29, 2025
6a5a76a
more broadly disallow oechem as a backend when creating systems
IAlibay Dec 29, 2025
cdd3da0
fix issue with nc being undefined
IAlibay Dec 29, 2025
b580de5
Make structural analysis not use the CLI anymore
IAlibay Dec 29, 2025
37cee84
Create two system generators to handle issue 1120
IAlibay Dec 29, 2025
35c19fd
Add news item
IAlibay Dec 29, 2025
7f9bf83
Add a test to check we can have the same mol but different charges
IAlibay Dec 29, 2025
e0a8e2a
Merge branch 'validate-rfe' into move-rfe-protocol
IAlibay Dec 29, 2025
a0ef737
Merge branch 'move-rfe-protocol' into breakdown-rfe-protocolunit
IAlibay Dec 29, 2025
0d02ba8
Merge branch 'breakdown-rfe-protocolunit' into non-cli-analysis
IAlibay Dec 29, 2025
d86638a
Merge branch 'breakdown-rfe-protocolunit' into issue-1120
IAlibay Dec 29, 2025
b826803
Fix missing import
IAlibay Dec 29, 2025
42ddbcf
Merge branch 'move-rfe-protocol' into breakdown-rfe-protocolunit
IAlibay Dec 29, 2025
e93b40e
Merge branch 'breakdown-rfe-protocolunit' into non-cli-analysis
IAlibay Dec 29, 2025
0402e15
Merge branch 'breakdown-rfe-protocolunit' into issue-1120
IAlibay Dec 29, 2025
63a2f8f
Fix smc checks
IAlibay Dec 29, 2025
063e8ce
Fix comp getter
IAlibay Dec 29, 2025
3844bb5
Merge branch 'move-rfe-protocol' into breakdown-rfe-protocolunit
IAlibay Dec 29, 2025
a9ca6c6
Merge branch 'breakdown-rfe-protocolunit' into non-cli-analysis
IAlibay Dec 29, 2025
e0da79c
Merge branch 'breakdown-rfe-protocolunit' into issue-1120
IAlibay Dec 29, 2025
f0c0c4a
Merge branch 'issue-1120' into multi-unit-rfe
IAlibay Dec 29, 2025
c514eab
Some progress towards a three unit split
IAlibay Dec 30, 2025
76000d1
Most of the multi-unit structure
IAlibay Dec 30, 2025
0a4e471
cleaning up some things
IAlibay Dec 30, 2025
d655eca
ammend unit creation for multi units
IAlibay Dec 30, 2025
0bf13e8
Switch gather to only use the analysis units
IAlibay Dec 30, 2025
92eca19
fix some imports
IAlibay Dec 30, 2025
a54f167
various fixes
IAlibay Dec 30, 2025
25a3c7f
Part migrate serialization utils
IAlibay Dec 30, 2025
2630f92
fix typo
IAlibay Dec 30, 2025
c493870
more typos
IAlibay Dec 30, 2025
a90e926
another typo
IAlibay Dec 30, 2025
a28c2b9
switch from npz to npy for positions
IAlibay Dec 30, 2025
3500f87
Fix some typos
IAlibay Dec 30, 2025
15d81e7
more typos
IAlibay Dec 30, 2025
bbe50b1
more fixes
IAlibay Dec 30, 2025
ab611e0
another typo in the analysis section
IAlibay Dec 30, 2025
7fa8e86
fix settings passing for energy analysis
IAlibay Dec 30, 2025
2acbc04
Fix incorrect self call
IAlibay Dec 30, 2025
a3f68f9
fix typo
IAlibay Dec 30, 2025
8723ed5
Add missing generation key
IAlibay Dec 30, 2025
dd8c078
fix tests a bit
IAlibay Dec 30, 2025
08db413
stick to analysis units only
IAlibay Dec 30, 2025
fe64820
Update results to have full path to checkpoint file
IAlibay Dec 30, 2025
a98c799
update module name
IAlibay Dec 30, 2025
5d0bc7e
Merge branch 'move-rfe-protocol' into breakdown-rfe-protocolunit
IAlibay Dec 30, 2025
870ee5b
Merge branch 'breakdown-rfe-protocolunit' into issue-1120
IAlibay Dec 30, 2025
3e201e1
fix slow tests
IAlibay Dec 30, 2025
935a24a
Merge branch 'breakdown-rfe-protocolunit' into multi-unit-rfe
IAlibay Dec 30, 2025
e0bac14
fix various tests
IAlibay Dec 30, 2025
1c47f32
fix slow tests
IAlibay Dec 30, 2025
fefbefd
fix serialized tests
IAlibay Dec 30, 2025
dfacc06
remove duplicate oechem block for system generator creation
IAlibay Jan 1, 2026
69499eb
Merge branch 'issue-1120' into multi-unit-rfe
IAlibay Jan 1, 2026
76cb934
Add an early optimisation for a no smc future
IAlibay Jan 1, 2026
3d3a446
Merge branch 'issue-1120' into multi-unit-rfe
IAlibay Jan 1, 2026
467848f
fix something
IAlibay Jan 1, 2026
fa108f2
Merge branch 'issue-1120' into multi-unit-rfe
IAlibay Jan 1, 2026
9d72f16
fix something
IAlibay Jan 2, 2026
b8f8bbd
remove typo
IAlibay Jan 2, 2026
5da052b
update final results dict
IAlibay Jan 2, 2026
7b8c945
move a few things around
IAlibay Jan 3, 2026
05bfbd1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 3, 2026
1588b53
remove redundant list declarations
IAlibay Jan 3, 2026
c15ba01
move integrator out of the try/except
IAlibay Jan 4, 2026
79551d7
Merge branch 'main' into multi-unit-rfe
IAlibay Jan 9, 2026
97b93fa
Update openfe/protocols/openmm_rfe/hybridtop_units.py
IAlibay Jan 9, 2026
7d8ff06
make mypy happy
IAlibay Jan 9, 2026
0b060be
Move serialization from septop to utils
IAlibay Jan 9, 2026
759ed6f
Merge branch 'main' into multi-unit-rfe
IAlibay Jan 15, 2026
607d752
[WIP] fixing cli test for protocol refactor (#1788)
atravitz Jan 15, 2026
51bd3bb
Update openfe/tests/protocols/openmm_rfe/test_hybrid_top_protocol.py
IAlibay Jan 15, 2026
4e5fa02
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 15, 2026
eba94fd
Merge branch 'main' into multi-unit-rfe
IAlibay Jan 15, 2026
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
6 changes: 5 additions & 1 deletion openfe/protocols/openmm_rfe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
from .equil_rfe_settings import RelativeHybridTopologyProtocolSettings
from .hybridtop_protocol_results import RelativeHybridTopologyProtocolResult
from .hybridtop_protocols import RelativeHybridTopologyProtocol
from .hybridtop_units import RelativeHybridTopologyProtocolUnit
from .hybridtop_units import (
HybridTopologyMultiStateAnalysisUnit,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re unit names, do we already know how we would name the simulation and analysis units if we had a nonequilibrium protocol and would that match well with these names?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just going to call them HybridTopologyNEQUnit. BUT these names are not set in stone, we can redo them later.

HybridTopologyMultiStateSimulationUnit,
HybridTopologySetupUnit,
)
6 changes: 5 additions & 1 deletion openfe/protocols/openmm_rfe/equil_rfe_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@
from .equil_rfe_settings import RelativeHybridTopologyProtocolSettings
from .hybridtop_protocol_results import RelativeHybridTopologyProtocolResult
from .hybridtop_protocols import RelativeHybridTopologyProtocol
from .hybridtop_units import RelativeHybridTopologyProtocolUnit
from .hybridtop_units import (
HybridTopologyMultiStateAnalysisUnit,
HybridTopologyMultiStateSimulationUnit,
HybridTopologySetupUnit,
)
6 changes: 3 additions & 3 deletions openfe/protocols/openmm_rfe/hybridtop_protocol_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, **data):
def compute_mean_estimate(dGs: list[Quantity]) -> Quantity:
u = dGs[0].u
# convert all values to units of the first value, then take average of magnitude
# this would avoid a screwy case where each value was in different units
# this would avoid an edge case where each value was in different units
vals = np.asarray([dG.to(u).m for dG in dGs])

return np.average(vals) * u
Expand Down Expand Up @@ -199,9 +199,9 @@ def is_file(filename: str):
replica_states = []

for pus in self.data.values():
nc = is_file(pus[0].outputs["nc"])
nc = is_file(pus[0].outputs["trajectory"])
dir_path = nc.parents[0]
chk = is_file(dir_path / pus[0].outputs["last_checkpoint"]).name
chk = is_file(pus[0].outputs["checkpoint"]).name
reporter = multistate.MultiStateReporter(
storage=nc, checkpoint_storage=chk, open_mode="r"
)
Expand Down
51 changes: 40 additions & 11 deletions openfe/protocols/openmm_rfe/hybridtop_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
RelativeHybridTopologyProtocolSettings,
)
from .hybridtop_protocol_results import RelativeHybridTopologyProtocolResult
from .hybridtop_units import RelativeHybridTopologyProtocolUnit
from .hybridtop_units import (
HybridTopologyMultiStateAnalysisUnit,
HybridTopologyMultiStateSimulationUnit,
HybridTopologySetupUnit,
)

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -593,23 +597,47 @@ def _create(
Anames = ",".join(c.name for c in alchem_comps["stateA"])
Bnames = ",".join(c.name for c in alchem_comps["stateB"])

# our DAG has no dependencies, so just list units
n_repeats = self.settings.protocol_repeats
# DAG dependency is setup -> simulation -> analysis
# |--------------------->
setup_units = []
simulation_units = []
analysis_units = []

for i in range(self.settings.protocol_repeats):
repeat_id = int(uuid.uuid4())

units = [
RelativeHybridTopologyProtocolUnit(
setup = HybridTopologySetupUnit(
protocol=self,
stateA=stateA,
stateB=stateB,
ligandmapping=ligandmapping,
alchemical_components=alchem_comps,
generation=0,
repeat_id=repeat_id,
name=(f"HybridTopology Setup: {Anames} to {Bnames} repeat {i} generation 0"),
)

simulation = HybridTopologyMultiStateSimulationUnit(
protocol=self,
setup_results=setup,
generation=0,
repeat_id=repeat_id,
name=(f"HybridTopology Simulation: {Anames} to {Bnames} repeat {i} generation 0"),
)

analysis = HybridTopologyMultiStateAnalysisUnit(
protocol=self,
setup_results=setup,
simulation_results=simulation,
generation=0,
repeat_id=int(uuid.uuid4()),
name=f"{Anames} to {Bnames} repeat {i} generation 0",
repeat_id=repeat_id,
name=(f"HybridTopology Analysis: {Anames} to {Bnames} repeat {i} generation 0"),
)
for i in range(n_repeats)
]
setup_units.append(setup)
simulation_units.append(simulation)
analysis_units.append(analysis)

return units
return [*setup_units, *simulation_units, *analysis_units]

def _gather(self, protocol_dag_results: Iterable[gufe.ProtocolDAGResult]) -> dict[str, Any]:
# result units will have a repeat_id and generations within this repeat_id
Expand All @@ -618,7 +646,8 @@ def _gather(self, protocol_dag_results: Iterable[gufe.ProtocolDAGResult]) -> dic
for d in protocol_dag_results:
pu: gufe.ProtocolUnitResult
for pu in d.protocol_unit_results:
if not pu.ok():
# We only need the analysis units that are ok
if ("Analysis" not in pu.name) or (not pu.ok()):
continue

unsorted_repeats[pu.outputs["repeat_id"]].append(pu)
Expand Down
Loading
Loading