Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
4e6617e
Membrane support prototype start
hannahbaumann Oct 9, 2025
ac9862a
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 9, 2025
8ea145a
Point to corresponding branch in gufe
hannahbaumann Oct 10, 2025
587a1bf
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Oct 10, 2025
b7c63d6
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 13, 2025
24f3d58
Make plain md protocol membrane ready
hannahbaumann Oct 13, 2025
617ac8c
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Oct 13, 2025
7fd5ca9
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 15, 2025
18db828
Dry run for membrane system for debugging
hannahbaumann Oct 17, 2025
1ee6fd7
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Oct 17, 2025
238b36b
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 20, 2025
6945805
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 20, 2025
646ebbe
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Oct 20, 2025
abf0007
Add box vectors to modeller
hannahbaumann Oct 20, 2025
96fa49a
Adapt htf to allow for membrane barostat
hannahbaumann Oct 20, 2025
b70e5b2
Fix test
hannahbaumann Oct 20, 2025
481ff35
Add test files membrane
hannahbaumann Oct 20, 2025
4d28281
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 20, 2025
eff1958
Change test to cpu
hannahbaumann Oct 21, 2025
1456a99
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Oct 21, 2025
0cdde55
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 21, 2025
5bfd1c9
Prints for debugging
hannahbaumann Oct 23, 2025
ce29130
Some more debugginh stuff, remove later
hannahbaumann Oct 24, 2025
c53fd60
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 29, 2025
5c313b1
Small fix
hannahbaumann Oct 29, 2025
9dce0e0
Merge conflicts
hannahbaumann Oct 29, 2025
080d93e
Temporarily use branches for openmmtools and openmmforcefield
hannahbaumann Oct 29, 2025
48a7844
Small fixes
hannahbaumann Oct 29, 2025
b492de0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2025
2913994
support membrane in gather
hannahbaumann Oct 30, 2025
e654a4d
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 31, 2025
1e707ba
Merge branch 'main' into membrane_prototype
hannahbaumann Nov 4, 2025
bf51b0c
First pass membrane support for SepTop protocol
hannahbaumann Nov 6, 2025
872c914
Change validation solvent
hannahbaumann Nov 6, 2025
27d15f7
Move changes in solvent validation to validate_solvent
hannahbaumann Nov 6, 2025
508fa62
Some small fixes
hannahbaumann Nov 6, 2025
a33d882
Merge branch 'main' into membrane_prototype
hannahbaumann Nov 6, 2025
7a640ce
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 6, 2025
44e3545
Add membrane test septop
hannahbaumann Nov 6, 2025
6e4023d
Change box vector units for handling membrane barostat
hannahbaumann Nov 10, 2025
339a9ed
Test box vectors SepTop more
hannahbaumann Nov 10, 2025
741e44c
First pass at ABFE membrane prototype
hannahbaumann Nov 12, 2025
e53512b
Merge branch 'main' into membrane_prototype
hannahbaumann Nov 12, 2025
e67ecd2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 12, 2025
1f408fc
Remove some prints
hannahbaumann Nov 12, 2025
19761df
Revert box changes
hannahbaumann Nov 12, 2025
5d5bc8e
Some fixes in SepTop to fix tests
hannahbaumann Nov 12, 2025
3e6b063
Apply suggestion from @hannahbaumann
hannahbaumann Nov 12, 2025
4d7da11
Add tests for system creation
hannahbaumann Nov 12, 2025
4c7cdd4
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Nov 12, 2025
0962f3c
FIx test
hannahbaumann Nov 12, 2025
00c606e
Add ABFE membrane tests
hannahbaumann Nov 13, 2025
b317cab
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 13, 2025
d97de53
More tests membrane septop and more dry outputs in septop
hannahbaumann Nov 13, 2025
2145f37
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 13, 2025
fc61675
Add validation for box vector in ProteinMembraneComponent
hannahbaumann Nov 25, 2025
b132806
Merge branch 'main' into membrane_prototype
hannahbaumann Nov 25, 2025
88c9179
Adapt gather for membranes
hannahbaumann Nov 25, 2025
379cdf6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 25, 2025
d79eb36
Merge branch 'main' into membrane_prototype
hannahbaumann Nov 27, 2025
207fe3c
small changes
hannahbaumann Dec 2, 2025
3504100
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 2, 2025
af99e37
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 2, 2025
c309957
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 3, 2025
9ae0565
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 3, 2025
4156c55
Modify box vectors plain md
hannahbaumann Dec 4, 2025
4327ef1
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 5, 2025
ff06372
Address review comments
hannahbaumann Dec 5, 2025
3cd7793
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Dec 5, 2025
8c00e32
Remove unnecessary prints
hannahbaumann Dec 5, 2025
5dd1758
Subclass membrane test
hannahbaumann Dec 5, 2025
11602f5
Small fix
hannahbaumann Dec 11, 2025
7ac6d32
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 11, 2025
45c26de
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 11, 2025
7dc626c
remove unnecessary import
hannahbaumann Dec 11, 2025
621b0d7
Remove prints
hannahbaumann Dec 12, 2025
a42653e
Small fix
hannahbaumann Dec 12, 2025
825e8ae
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 12, 2025
919cacf
Small fix
hannahbaumann Dec 16, 2025
683b47d
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Dec 16, 2025
21615c8
Larger change to checks for BaseSolventComponent, SolvatedPDBComponen…
hannahbaumann Jan 9, 2026
45f48e0
Merge branch 'main' into membrane_prototype
hannahbaumann Jan 9, 2026
d3c4711
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 9, 2026
efdb5f1
Some more changes
hannahbaumann Jan 9, 2026
5f6816c
Merge
hannahbaumann Jan 9, 2026
b7f021d
Small fix
hannahbaumann Jan 9, 2026
cfdaf04
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 9, 2026
e35690c
ABFE enforce timestep complex solvent the same
hannahbaumann Jan 12, 2026
5a9f873
Merge branch 'main' into membrane_prototype
hannahbaumann Jan 12, 2026
31f9227
Update test files
hannahbaumann Jan 13, 2026
a2ab353
Update environment.yaml with new openmmtools and openmmforcefield ver…
hannahbaumann Jan 13, 2026
8ff8d45
Remove unnecessary checks for box_vectors which are handled in gufe
hannahbaumann Jan 13, 2026
39e62ca
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 13, 2026
71c8a99
Update openfe/protocols/openmm_afe/equil_binding_afe_method.py
hannahbaumann Jan 14, 2026
edd0e5d
Attempt at rewriting validate_solvent
hannahbaumann Jan 15, 2026
e23d2a2
Move get barostat to self
hannahbaumann Jan 15, 2026
1936b83
Simplify mapping in test
hannahbaumann Jan 15, 2026
cafa04a
Add validator for surface_tension and membrane barostat
hannahbaumann Jan 15, 2026
ec2beaa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 15, 2026
a0a2ad1
Add membrane barostat to adaptive settings rfe protocol
hannahbaumann Jan 15, 2026
6a3a5a3
Add validation/warning for barostat component mismatch
hannahbaumann Jan 15, 2026
0996c33
Fix tests (except CLI)
hannahbaumann Jan 15, 2026
df381f9
Address merge conflicts
hannahbaumann Jan 16, 2026
54986e8
More merge fixes
hannahbaumann Jan 16, 2026
14e162e
Remove unnecessary imports
hannahbaumann Jan 16, 2026
a0b3c91
Merge branch 'main' into membrane_prototype
hannahbaumann Jan 19, 2026
30218d2
Merge branch 'main' into membrane_prototype
hannahbaumann Jan 22, 2026
5273d43
Merge conflicts
hannahbaumann Jan 23, 2026
962dea5
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 4, 2026
c9b75b9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2026
5eebbbc
Add test files
hannahbaumann Feb 4, 2026
8b53130
Update tests
hannahbaumann Feb 4, 2026
93b4cb7
Add lipid ff in adaptive settings
hannahbaumann Feb 6, 2026
481c0e9
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 9, 2026
32c4a5e
remove commented out lines
hannahbaumann Feb 10, 2026
4586c5b
Update test abfe
hannahbaumann Feb 10, 2026
8b8529c
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 11, 2026
ede10d3
Update ABFE results with new settings
hannahbaumann Feb 11, 2026
69d0986
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 11, 2026
40b87ec
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 12, 2026
ff2fec9
Fix solvent validation
hannahbaumann Feb 13, 2026
d7e4255
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Feb 13, 2026
58a004d
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 13, 2026
0039bbe
change env to gufe main
hannahbaumann Feb 13, 2026
5cfbc61
Apply suggestion from @hannahbaumann
hannahbaumann Feb 13, 2026
02ce210
Remove files from before src layout change
hannahbaumann Feb 13, 2026
3450d2c
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Feb 13, 2026
78b266c
Update tests
hannahbaumann Feb 13, 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
1 change: 1 addition & 0 deletions src/openfe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
LigandAtomMapping,
NonTransformation,
ProteinComponent,
ProteinMembraneComponent,
SmallMoleculeComponent,
SolventComponent,
Transformation,
Expand Down
12 changes: 9 additions & 3 deletions src/openfe/protocols/openmm_afe/abfe_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from gufe import (
SolventComponent,
)
from gufe.components import Component
from gufe.components import Component, SolvatedPDBComponent
from openff.units import Quantity
from openff.units.openmm import to_openmm
from openmm import System
Expand Down Expand Up @@ -69,6 +69,12 @@ def _get_components(self):
# an error will have been raised when calling `validate_solvent`
# in the Protocol's `_create`.
# Similarly we don't need to check prot_comp

# If there is an SolvatedPDBComponent, we set the solv_comp
# in the complex to None, as it is only used in the solvent leg
if isinstance(prot_comp, SolvatedPDBComponent):
solv_comp = None
Copy link
Member

Choose a reason for hiding this comment

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

In terms of coherence later on, it would be better if this actually just returned the SolvatedPDBComponent.


return alchem_comps, solv_comp, prot_comp, off_comps


Expand Down Expand Up @@ -105,7 +111,7 @@ def _get_settings(self) -> dict[str, SettingsBaseModel]:
settings["alchemical_settings"] = prot_settings.alchemical_settings
settings["lambda_settings"] = prot_settings.complex_lambda_settings
settings["engine_settings"] = prot_settings.engine_settings
settings["integrator_settings"] = prot_settings.integrator_settings
settings["integrator_settings"] = prot_settings.complex_integrator_settings
settings["equil_simulation_settings"] = prot_settings.complex_equil_simulation_settings
settings["equil_output_settings"] = prot_settings.complex_equil_output_settings
settings["simulation_settings"] = prot_settings.complex_simulation_settings
Expand Down Expand Up @@ -474,7 +480,7 @@ def _get_settings(self) -> dict[str, SettingsBaseModel]:
settings["alchemical_settings"] = prot_settings.alchemical_settings
settings["lambda_settings"] = prot_settings.solvent_lambda_settings
settings["engine_settings"] = prot_settings.engine_settings
settings["integrator_settings"] = prot_settings.integrator_settings
settings["integrator_settings"] = prot_settings.solvent_integrator_settings
settings["equil_simulation_settings"] = prot_settings.solvent_equil_simulation_settings
settings["equil_output_settings"] = prot_settings.solvent_equil_output_settings
settings["simulation_settings"] = prot_settings.solvent_simulation_settings
Expand Down
9 changes: 7 additions & 2 deletions src/openfe/protocols/openmm_afe/equil_afe_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,15 @@ def must_be_positive(cls, v):
"""

# Sampling State defining things
integrator_settings: IntegratorSettings
solvent_integrator_settings: IntegratorSettings
"""
Settings for controlling the integrator, such as the timestep and
barostat settings.
barostat settings in the solvent.
"""
complex_integrator_settings: IntegratorSettings
"""
Settings for controlling the integrator, such as the timestep and
barostat settings in the complex.
"""

# Simulation run settings
Expand Down
15 changes: 13 additions & 2 deletions src/openfe/protocols/openmm_afe/equil_binding_afe_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import gufe
from gufe import (
BaseSolventComponent,
ChemicalSystem,
ProteinComponent,
SmallMoleculeComponent,
Expand Down Expand Up @@ -171,7 +172,8 @@ def _default_settings(cls):
),
solvent_solvation_settings=OpenMMSolvationSettings(),
engine_settings=OpenMMEngineSettings(),
integrator_settings=IntegratorSettings(),
solvent_integrator_settings=IntegratorSettings(),
complex_integrator_settings=IntegratorSettings(),
restraint_settings=BoreschRestraintSettings(),
solvent_equil_simulation_settings=MDSimulationSettings(
equilibration_length_nvt=0.1 * offunit.nanosecond,
Expand Down Expand Up @@ -400,6 +402,11 @@ def _validate(
# Use the more complete system validation solvent checks
system_validation.validate_solvent(stateA, nonbonded_method)

# Validate the barostat used in combination with the protein component
system_validation.validate_protein_barostat(
stateA, self.settings.complex_integrator_settings.barostat
)

# Validate solvation settings
settings_validation.validate_openmm_solvation_settings(
self.settings.solvent_solvation_settings
Expand All @@ -411,7 +418,11 @@ def _validate(
# Validate integrator things
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# Validate integrator things
# Validate integrator things
# We validate the timstep for both the complex & solvent settings

settings_validation.validate_timestep(
self.settings.forcefield_settings.hydrogen_mass,
self.settings.integrator_settings.timestep,
self.settings.complex_integrator_settings.timestep,
)
settings_validation.validate_timestep(
self.settings.forcefield_settings.hydrogen_mass,
self.settings.solvent_integrator_settings.timestep,
)

def _create(
Expand Down
28 changes: 20 additions & 8 deletions src/openfe/protocols/openmm_md/plain_md_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import openmm
import openmm.unit as omm_unit
from gufe import (
BaseSolventComponent,
ChemicalSystem,
SmallMoleculeComponent,
settings,
Expand All @@ -32,6 +33,7 @@
from openff.toolkit.topology import Molecule as OFFMolecule
from openff.units import Quantity, unit
from openff.units.openmm import from_openmm, to_openmm
from openmm import MonteCarloBarostat, MonteCarloMembraneBarostat

from openfe.protocols.openmm_md.plain_md_settings import (
IntegratorSettings,
Expand Down Expand Up @@ -180,14 +182,19 @@ def _create(
# Validate protein component
system_validation.validate_protein(stateA)

# Validate the barostat used in combination with the protein component
system_validation.validate_protein_barostat(
stateA, self.settings.integrator_settings.barostat
)

# Validate solvation settings
settings_validation.validate_openmm_solvation_settings(self.settings.solvation_settings)

# actually create and return Units
# TODO: Deal with multiple ProteinComponents
solvent_comp, protein_comp, small_mols = system_validation.get_components(stateA)

system_name = "Solvent MD" if solvent_comp is not None else "Vacuum MD"
system_name = "Solvent MD" if stateA.contains(BaseSolventComponent) else "Vacuum MD"

for comp in [protein_comp] + small_mols:
if comp is not None:
Expand Down Expand Up @@ -363,9 +370,9 @@ def _run_MD(
logger.info("Running NVT equilibration")

# Set barostat frequency to zero for NVT
for x in simulation.context.getSystem().getForces():
if x.getName() == "MonteCarloBarostat":
x.setFrequency(0)
for force in simulation.context.getSystem().getForces():
if isinstance(force, (MonteCarloBarostat, MonteCarloMembraneBarostat)):
force.setFrequency(0)

simulation.context.setVelocitiesToTemperature(to_openmm(temperature))

Expand Down Expand Up @@ -397,9 +404,9 @@ def _run_MD(
simulation.context.setVelocitiesToTemperature(to_openmm(temperature))

# Enable the barostat for NPT
for x in simulation.context.getSystem().getForces():
if x.getName() == "MonteCarloBarostat":
x.setFrequency(barostat_frequency.m)
for force in simulation.context.getSystem().getForces():
if isinstance(force, (MonteCarloBarostat, MonteCarloMembraneBarostat)):
force.setFrequency(barostat_frequency.m)

t0 = time.time()
simulation.step(equil_steps_npt)
Expand Down Expand Up @@ -585,7 +592,7 @@ def run(
solvent_comp, protein_comp, small_mols = system_validation.get_components(stateA)

# 1. Create stateA system
# Create a dictionary of OFFMol for each SMC for bookeeping
# Create a dictionary of OFFMol for each SMC for bookkeeping
smc_components: dict[SmallMoleculeComponent, OFFMolecule]

smc_components = {i: i.to_openff() for i in small_mols}
Expand Down Expand Up @@ -634,6 +641,11 @@ def run(
stateA_topology,
molecules=[s.to_openff() for s in small_mols],
)
box = [
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a comment explaining why this is necessary?

openmm.Vec3(*v.value_in_unit(omm_unit.nanometer))
for v in stateA_system.getDefaultPeriodicBoxVectors()
] * omm_unit.nanometer
stateA_topology.setPeriodicBoxVectors(box)

# f. Save pdb of entire system
if output_settings.preminimized_structure:
Expand Down
15 changes: 10 additions & 5 deletions src/openfe/protocols/openmm_rfe/_rfe_utils/relative.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,12 @@ def _check_and_store_system_forces(self):

def _check_unknown_forces(forces, system_name):
# TODO: double check that CMMotionRemover is ok being here
known_forces = {'HarmonicBondForce', 'HarmonicAngleForce',
'PeriodicTorsionForce', 'NonbondedForce',
'MonteCarloBarostat', 'CMMotionRemover', 'CMAPTorsionForce'}
known_forces = {
'HarmonicBondForce', 'HarmonicAngleForce',
'PeriodicTorsionForce', 'NonbondedForce',
'MonteCarloBarostat', 'CMMotionRemover',
'CMAPTorsionForce', 'MonteCarloMembraneBarostat',
}

force_names = forces.keys()
unknown_forces = set(force_names) - set(known_forces)
Expand Down Expand Up @@ -548,9 +551,11 @@ def _handle_box(self):
"""
# Check that if there is a barostat in the old system,
# it is added to the hybrid system
if "MonteCarloBarostat" in self._old_system_forces.keys():
known_barostats = ["MonteCarloBarostat", "MonteCarloMembraneBarostat"]
present_barostat = [i for i in self._old_system_forces.keys() if i in known_barostats]
Comment on lines +554 to +555
Copy link
Member

Choose a reason for hiding this comment

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

[nit] this may be a bit cleaner

Suggested change
known_barostats = ["MonteCarloBarostat", "MonteCarloMembraneBarostat"]
present_barostat = [i for i in self._old_system_forces.keys() if i in known_barostats]
present_barostat = [
i for i in self._old_system_forces.keys()
if i in ["MonteCarloBarostat", "MonteCarloMembraneBarostat"]
]

if len(present_barostat) == 1:
Copy link
Member

Choose a reason for hiding this comment

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

What happens otherwise? Throw an error?

barostat = copy.deepcopy(
self._old_system_forces["MonteCarloBarostat"])
self._old_system_forces[present_barostat[0]])
self._hybrid_system.addForce(barostat)

# Copy over the box vectors from the old system
Expand Down
17 changes: 17 additions & 0 deletions src/openfe/protocols/openmm_rfe/hybridtop_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
ComponentMapping,
LigandAtomMapping,
ProteinComponent,
ProteinMembraneComponent,
SmallMoleculeComponent,
SolventComponent,
settings,
Expand Down Expand Up @@ -199,6 +200,17 @@ def _adaptive_settings(
if stateA.contains(ProteinComponent) and stateB.contains(ProteinComponent):
protocol_settings.solvation_settings.solvent_padding = 1 * offunit.nanometer

# adapt the barostat based on the system components
if stateA.contains(ProteinMembraneComponent) and stateB.contains(ProteinMembraneComponent):
Copy link
Member

Choose a reason for hiding this comment

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

It comes to mind now that you don't need to assert that both the states contain the thing, just one.
Our validation ensures that you don't have a disappearing component in either states.

protocol_settings.integrator_settings.barostat = "MonteCarloMembraneBarostat"
Copy link
Member

Choose a reason for hiding this comment

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

Add an adpative settings entry for both ABFEs and SepTop?

protocol_settings.forcefield_settings.forcefields = [
"amber/ff14SB.xml",
"amber/tip3p_standard.xml",
"amber/tip3p_HFE_multivalent.xml",
"amber/lipid17_merged.xml",
"amber/phosaa10.xml",
]

return protocol_settings

@staticmethod
Expand Down Expand Up @@ -539,6 +551,11 @@ def _validate(
# Validate protein component
system_validation.validate_protein(stateA)

# Validate the barostat used in combination with the protein component
system_validation.validate_protein_barostat(
stateA, self.settings.integrator_settings.barostat
)

# Validate charge difference
# Note: validation depends on the mapping & solvent component checks
if stateA.contains(SolventComponent):
Expand Down
15 changes: 13 additions & 2 deletions src/openfe/protocols/openmm_septop/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ def _pre_equilibrate(

# Don't do anything if we're doing a dry run
if dry:
return positions, system.getDefaultPeriodicBoxVectors()
box = [
Copy link
Member

Choose a reason for hiding this comment

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

Why is this necessary? Why doesn't the ABFE unit need this fix too? (we use the make_vec3_box method there - should that be used instead?)

openmm.Vec3(*v.value_in_unit(omm_unit.nanometer))
for v in system.getDefaultPeriodicBoxVectors()
] * omm_unit.nanometer
return positions, box

# TODO: Refactor this part to live outside the method call
# We have to modify the output settings to have different output
Expand Down Expand Up @@ -1374,4 +1378,11 @@ def run(
**unit_result_dict,
}
else:
return {"debug": {"sampler": sampler}}
return {
"debug": {
"sampler": sampler,
"alchem_system": system,
"selection_indices": self.selection_indices,
"positions": equil_positions,
}
}
Loading
Loading