septop
#
Automated BFE calculations using the seperated topology method
Classes:
-
SepTopComplexRestraints
–Configure the restraints to apply in the complex phase.
-
SepTopConfig
–Configuration a separated topology FE calculation.
-
SepTopEquilibrateStage
–Configure how the system will be equilibrated prior to replica exchange.
-
SepTopPhaseConfig
–Configure one phase (i.e. complex or solution) of a separated topology
-
SepTopSamplingStage
–Configure how the system will be sampled using Hamiltonian replica exchange.
-
SepTopSetupStage
–Configure how the complex will be solvated and restrained prior to
-
SepTopSolutionRestraints
–Configure the restraints to apply in the solution phase.
-
SepTopStates
–Configure the lambda schedules.
Functions:
-
compute_ddg
–Computes the binding free energy from the complex and solution phase samples.
-
load_config
–Load a configuration from a YAML file.
-
equilibrate_states
–Equilibrate the system at each lambda window.
-
run_complex_phase
–Run the complex phase of the SepTop calculation.
-
run_solution_phase
–Run the solution phase of the SepTop calculation.
-
submit_network
–Submits a set of SepTop calculations to an HPC queueing manager.
-
run_hremd
–Perform replica exchange sampling for a system prepared for SepTop calculations.
-
setup_complex
–Prepares a system ready for running the SepTop method.
-
setup_solution
–Prepares a system ready for running the SepTop method.
-
create_state_dicts
–Map the lambda states specified in the configuration to a dictionary.
Attributes:
-
DEFAULT_BORESCH_K_DISTANCE
–The default force constant of the Boresch distance restraint.
-
DEFAULT_BORESCH_K_THETA
–The default force constant of the Boresch angle restraint.
-
DEFAULT_EQUILIBRATE_INTEGRATOR
–The default integrator to use during equilibration.
-
DEFAULT_EQUILIBRATE_RESTRAINTS
–The default position restraints to apply during equilibration.
-
DEFAULT_LAMBDA_BORESCH_LIGAND_1
–The default lambda schedule of the Boresch restraint on the first ligand in the
-
DEFAULT_LAMBDA_BORESCH_LIGAND_2
–The default lambda schedule of the Boresch restraint on the second ligand in the
-
DEFAULT_LAMBDA_CHARGES_1_COMPLEX
–The default charge lambda schedule of the first ligand in the complex phase.
-
DEFAULT_LAMBDA_CHARGES_1_SOLUTION
–The default charge lambda schedule of the first ligand in the solution phase.
-
DEFAULT_LAMBDA_CHARGES_2_COMPLEX
–The default charge lambda schedule of the second ligand in the complex phase.
-
DEFAULT_LAMBDA_CHARGES_2_SOLUTION
–The default charge lambda schedule of the second ligand in the solution phase.
-
DEFAULT_LAMBDA_VDW_1_COMPLEX
–The default vdW lambda schedule of the first ligand in the complex phase.
-
DEFAULT_LAMBDA_VDW_1_SOLUTION
–The default vdW lambda schedule of the first ligand in the solution phase.
-
DEFAULT_LAMBDA_VDW_2_COMPLEX
–The default vdW lambda schedule of the second ligand in the complex phase.
-
DEFAULT_LAMBDA_VDW_2_SOLUTION
–The default vdW lambda schedule of the second ligand in the solution phase.
-
DEFAULT_RESTRAINT_MASK
–The default Amber style selection mask to apply position restraints to.
-
LAMBDA_BORESCH_LIGAND_1
–The name of the context variable used to control the Boresch-style restraints on the
-
LAMBDA_BORESCH_LIGAND_2
–The name of the context variable used to control the Boresch-style restraints on the
DEFAULT_BORESCH_K_DISTANCE
module-attribute
#
The default force constant of the Boresch distance restraint.
DEFAULT_BORESCH_K_THETA
module-attribute
#
The default force constant of the Boresch angle restraint.
DEFAULT_EQUILIBRATE_INTEGRATOR
module-attribute
#
DEFAULT_EQUILIBRATE_INTEGRATOR = LangevinIntegrator(
timestep=2.0 * femtosecond, friction=1.0 / picosecond
)
The default integrator to use during equilibration.
DEFAULT_EQUILIBRATE_RESTRAINTS
module-attribute
#
DEFAULT_EQUILIBRATE_RESTRAINTS = {
DEFAULT_RESTRAINT_MASK: FlatBottomRestraint(
k=25.0 * _KCAL_PER_ANG_SQR, radius=1.5 * _ANGSTROM
)
}
The default position restraints to apply during equilibration.
DEFAULT_LAMBDA_BORESCH_LIGAND_1
module-attribute
#
DEFAULT_LAMBDA_BORESCH_LIGAND_1 = (
[0.0, 0.05, 0.1, 0.3, 0.5, 0.75, 1.0, 1.0]
+ [1.0] * 3
+ [1.0] * 8
)
The default lambda schedule of the Boresch restraint on the first ligand in the complex phase.
DEFAULT_LAMBDA_BORESCH_LIGAND_2
module-attribute
#
DEFAULT_LAMBDA_BORESCH_LIGAND_2 = (
[1.0] * 8
+ [1.0] * 3
+ [1.0, 0.95, 0.9, 0.7, 0.5, 0.25, 0.0, 0.0]
)
The default lambda schedule of the Boresch restraint on the second ligand in the complex phase.
DEFAULT_LAMBDA_CHARGES_1_COMPLEX
module-attribute
#
The default charge lambda schedule of the first ligand in the complex phase.
DEFAULT_LAMBDA_CHARGES_1_SOLUTION
module-attribute
#
DEFAULT_LAMBDA_CHARGES_1_SOLUTION = [
0.0,
0.125,
0.25,
0.375,
0.5,
0.625,
0.75,
0.875,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
]
The default charge lambda schedule of the first ligand in the solution phase.
DEFAULT_LAMBDA_CHARGES_2_COMPLEX
module-attribute
#
The default charge lambda schedule of the second ligand in the complex phase.
DEFAULT_LAMBDA_CHARGES_2_SOLUTION
module-attribute
#
DEFAULT_LAMBDA_CHARGES_2_SOLUTION = [
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
0.875,
0.75,
0.625,
0.5,
0.375,
0.25,
0.125,
0.0,
]
The default charge lambda schedule of the second ligand in the solution phase.
DEFAULT_LAMBDA_VDW_1_COMPLEX
module-attribute
#
The default vdW lambda schedule of the first ligand in the complex phase.
DEFAULT_LAMBDA_VDW_1_SOLUTION
module-attribute
#
DEFAULT_LAMBDA_VDW_1_SOLUTION = [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.12,
0.24,
0.36,
0.48,
0.6,
0.7,
0.77,
0.85,
1.0,
]
The default vdW lambda schedule of the first ligand in the solution phase.
DEFAULT_LAMBDA_VDW_2_COMPLEX
module-attribute
#
The default vdW lambda schedule of the second ligand in the complex phase.
DEFAULT_LAMBDA_VDW_2_SOLUTION
module-attribute
#
DEFAULT_LAMBDA_VDW_2_SOLUTION = [
1.0,
0.85,
0.77,
0.7,
0.6,
0.48,
0.36,
0.24,
0.12,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
]
The default vdW lambda schedule of the second ligand in the solution phase.
DEFAULT_RESTRAINT_MASK
module-attribute
#
The default Amber style selection mask to apply position restraints to.
LAMBDA_BORESCH_LIGAND_1
module-attribute
#
The name of the context variable used to control the Boresch-style restraints on the first ligand.
LAMBDA_BORESCH_LIGAND_2
module-attribute
#
The name of the context variable used to control the Boresch-style restraints on the second ligand.
SepTopComplexRestraints
pydantic-model
#
Bases: BoreschRestraint
Configure the restraints to apply in the complex phase.
Fields:
-
scale_k_angle_a
(bool
) -
scale_k_angle_b
(bool
)
k_distance
pydantic-field
#
Force constant [kcal/mol/Å^2] of the harmonic distance restraint between r3 and l1.
k_angle_a
pydantic-field
#
Force constant [kcal/mol/rad^2] of the harmonic angle restraint on the angle formed by r2, r3, and l1.
k_angle_b
pydantic-field
#
Force constant [kcal/mol/rad^2] of the harmonic angle restraint on the angle formed by r3, l1, and l2.
k_dihedral_a
pydantic-field
#
Force constant [kcal/mol/rad^2] of the harmonic dihedral restraint on the dihedral angle formed by r1, r2, r3, and l1.
k_dihedral_b
pydantic-field
#
Force constant [kcal/mol/rad^2] of the harmonic dihedral restraint on the dihedral angle formed by r2, r3, l1, and l2.
k_dihedral_c
pydantic-field
#
Force constant [kcal/mol/rad^2] of the harmonic dihedral restraint on the dihedral angle formed by r3, l1, l2, and l3.
scale_k_angle_a
pydantic-field
#
Whether to scale the force constant for the P2, P1, and L1 angle based on the initial distance between P1 and L1.
scale_k_angle_b
pydantic-field
#
Whether to scale the force constant for the P1, L1, and L2 angle based on the initial distance between P1 and L1.
model_dump_yaml
#
Dump the model to a YAML representation.
Parameters:
-
output_path
(Path | None
, default:None
) –The (optional) path to save the YAML representation to.
Returns:
-
str
–The YAML representation.
Source code in femto/md/utils/models.py
SepTopConfig
pydantic-model
#
Bases: BaseModel
Configuration a separated topology FE calculation.
Fields:
-
type
(Literal['septop']
) -
complex
(SepTopPhaseConfig
) -
solution
(SepTopPhaseConfig
)
complex
pydantic-field
#
complex: SepTopPhaseConfig = SepTopPhaseConfig(
setup=SepTopSetupStage(
restraints=DEFAULT_COMPLEX_RESTRAINTS
),
states=SepTopStates(
lambda_vdw_ligand_1=DEFAULT_LAMBDA_VDW_1_COMPLEX,
lambda_charges_ligand_1=DEFAULT_LAMBDA_CHARGES_1_COMPLEX,
lambda_boresch_ligand_1=DEFAULT_LAMBDA_BORESCH_LIGAND_1,
lambda_vdw_ligand_2=DEFAULT_LAMBDA_VDW_2_COMPLEX,
lambda_charges_ligand_2=DEFAULT_LAMBDA_CHARGES_2_COMPLEX,
lambda_boresch_ligand_2=DEFAULT_LAMBDA_BORESCH_LIGAND_2,
),
)
Configure the complex phase calculations.
solution
pydantic-field
#
solution: SepTopPhaseConfig = SepTopPhaseConfig(
setup=SepTopSetupStage(
box_shape="cube",
restraints=DEFAULT_SOLUTION_RESTRAINTS,
),
states=SepTopStates(
lambda_vdw_ligand_1=DEFAULT_LAMBDA_VDW_1_SOLUTION,
lambda_charges_ligand_1=DEFAULT_LAMBDA_CHARGES_1_SOLUTION,
lambda_vdw_ligand_2=DEFAULT_LAMBDA_VDW_2_SOLUTION,
lambda_charges_ligand_2=DEFAULT_LAMBDA_CHARGES_2_SOLUTION,
lambda_boresch_ligand_1=None,
lambda_boresch_ligand_2=None,
),
)
Configure the solution phase calculations.
model_dump_yaml
#
Dump the model to a YAML representation.
Parameters:
-
output_path
(Path | None
, default:None
) –The (optional) path to save the YAML representation to.
Returns:
-
str
–The YAML representation.
Source code in femto/md/utils/models.py
SepTopEquilibrateStage
pydantic-model
#
Bases: BaseModel
Configure how the system will be equilibrated prior to replica exchange.
Fields:
-
stages
(list[SimulationStage]
) -
report_interval
(int
)
report_interval
pydantic-field
#
The number of steps to report energy, volume, etc after.
model_dump_yaml
#
Dump the model to a YAML representation.
Parameters:
-
output_path
(Path | None
, default:None
) –The (optional) path to save the YAML representation to.
Returns:
-
str
–The YAML representation.
Source code in femto/md/utils/models.py
SepTopPhaseConfig
pydantic-model
#
Bases: BaseModel
Configure one phase (i.e. complex or solution) of a separated topology FE calculation.
Fields:
-
setup
(SepTopSetupStage
) -
states
(SepTopStates
) -
equilibrate
(SepTopEquilibrateStage
) -
sample
(SepTopSamplingStage
)
equilibrate
pydantic-field
#
equilibrate: SepTopEquilibrateStage = (
SepTopEquilibrateStage()
)
Equilibrate the system.
sample
pydantic-field
#
sample: SepTopSamplingStage = SepTopSamplingStage()
Sample the system across lambda windows using HREMD.
model_dump_yaml
#
Dump the model to a YAML representation.
Parameters:
-
output_path
(Path | None
, default:None
) –The (optional) path to save the YAML representation to.
Returns:
-
str
–The YAML representation.
Source code in femto/md/utils/models.py
SepTopSamplingStage
pydantic-model
#
Bases: HREMD
Configure how the system will be sampled using Hamiltonian replica exchange.
Fields:
-
integrator
(LangevinIntegrator
) -
pressure
(OpenMMQuantity[atmosphere] | None
) -
barostat_frequency
(int
) -
analysis_interval
(int | None
)
temperature
pydantic-field
#
temperature: OpenMMQuantity[kelvin] = DEFAULT_TEMPERATURE
The temperature to sample at.
n_warmup_steps
pydantic-field
#
The number of steps to run each replica for before starting hremd trials. All energies gathered during this period will be discarded.
n_steps_per_cycle
pydantic-field
#
The number of steps to propagate the system by before attempting an exchange.
n_cycles
pydantic-field
#
The number of cycles of 'propagate the system' -> 'exchange replicas' to run.
max_step_retries
pydantic-field
#
The maximum number of times to attempt to step if a NaN is encountered before raising an exception
swap_mode
pydantic-field
#
The mode in which to propose state swaps between replicas. This can either be: 'neighbours', only try and swap adjacent states or ii. 'all', try and swap all states stochastically. If None
, no replica exchanges will be attempted.
max_swaps
pydantic-field
#
The maximum number of swap proposals to make if running in 'all' mode. This variable does nothing when running in 'neighbours' mode.
trajectory_interval
pydantic-field
#
The number of cycles to run before saving the current replica states to DCD trajectory files. If None
, no trajectories will be saved.
trajectory_enforce_pbc
pydantic-field
#
Whether to apply periodic boundary conditions when retrieving coordinates for writing to trajectory files.
checkpoint_interval
pydantic-field
#
The number of cycles to run before saving the current replica states to checkpoint files. If None
, no checkpoints will be saved.
integrator
pydantic-field
#
integrator: LangevinIntegrator = LangevinIntegrator(
timestep=4.0 * femtosecond, friction=1.0 / picosecond
)
The MD integrator to use.
pressure
pydantic-field
#
pressure: OpenMMQuantity[atmosphere] | None = (
DEFAULT_PRESSURE
)
The pressure to simulate at, or None
to run in NVT.
barostat_frequency
pydantic-field
#
The frequency at which to apply the barostat. This is ignored if pressure
is None
.
analysis_interval
pydantic-field
#
The interval (in number of cycles) between estimating and reporting the free energy. If None
, no analysis will be performed.
model_dump_yaml
#
Dump the model to a YAML representation.
Parameters:
-
output_path
(Path | None
, default:None
) –The (optional) path to save the YAML representation to.
Returns:
-
str
–The YAML representation.
Source code in femto/md/utils/models.py
SepTopSetupStage
pydantic-model
#
Bases: Prepare
Configure how the complex will be solvated and restrained prior to equilibration
Fields:
-
restraints
(SepTopComplexRestraints | SepTopSolutionRestraints
) -
apply_hmr
(bool
) -
hydrogen_mass
(OpenMMQuantity[amu]
) -
apply_rest
(bool
) -
rest_config
(REST | None
) -
fep_config
(FEP
)
Validators:
-
_validate_rest_config
→rest_config
ionic_strength
pydantic-field
#
The total concentration of ions pairs (anion
and cation
) to add to approximate an ionic strength. This does not include ions that are added to neutralize the system.
neutralize
pydantic-field
#
Whether to add counter ions to neutralize the system.
cation
pydantic-field
#
The cation to use when neutralizing the system.
water_model
pydantic-field
#
The water model to use when generating solvent coordinates. The actual force field parameters used for the solvent are determined by the default_protein_ff
or any extra parameters provided while preparing the system.
default_protein_ff
pydantic-field
#
default_protein_ff: list[str] = [*DEFAULT_OPENMM_FF_SOURCES]
The default parameters to use when parameterizing the protein, solvent, and ions.
default_ligand_ff
pydantic-field
#
The default parameters to apply when parameterizing ligands, or None
otherwise. Currently, only the path to an OpenFF offxml
file can be specified.
box_padding
pydantic-field
#
The minimum distance between any complex atom (including any offset ligands) and the box wall. This option is mutually exclusive with n_waters
.
box_shape
pydantic-field
#
The shape of the box to use when solvating the complex, when box_padding
is specified.
n_waters
pydantic-field
#
The number of extra waters to solvate the complex using. This option is mutually exclusive with box_padding
.
restraints
pydantic-field
#
restraints: (
SepTopComplexRestraints | SepTopSolutionRestraints
)
Control how the system should be restrained.
apply_hmr
pydantic-field
#
Whether to aply hydrogen mass repartitioning to the system.
hydrogen_mass
pydantic-field
#
The mass to assign to hydrogen atoms when applying HMR.
apply_rest
pydantic-field
#
Whether to prepare the system for REST sampling.
rest_config
pydantic-field
#
rest_config: REST | None = REST(
scale_nonbonded=True,
scale_torsions=True,
scale_angles=False,
scale_bonds=False,
)
The REST configuration to use if apply_rest
is True.
fep_config
pydantic-field
#
Configure how to alchemically couple the ligands.
model_dump_yaml
#
Dump the model to a YAML representation.
Parameters:
-
output_path
(Path | None
, default:None
) –The (optional) path to save the YAML representation to.
Returns:
-
str
–The YAML representation.
Source code in femto/md/utils/models.py
SepTopSolutionRestraints
pydantic-model
#
Bases: BaseModel
Configure the restraints to apply in the solution phase.
Fields:
-
type
(Literal['harmonic']
) -
k_distance
(OpenMMQuantity[_KCAL_PER_ANG_SQR]
)
k_distance
pydantic-field
#
Force constant [kcal/mol/Å^2] of the distance restraint that will separate the ligands during an RBFE calculation.
model_dump_yaml
#
Dump the model to a YAML representation.
Parameters:
-
output_path
(Path | None
, default:None
) –The (optional) path to save the YAML representation to.
Returns:
-
str
–The YAML representation.
Source code in femto/md/utils/models.py
SepTopStates
pydantic-model
#
Bases: BaseModel
Configure the lambda schedules.
Fields:
-
lambda_vdw_ligand_1
(list[float]
) -
lambda_vdw_ligand_2
(list[float] | None
) -
lambda_charges_ligand_1
(list[float]
) -
lambda_charges_ligand_2
(list[float] | None
) -
lambda_boresch_ligand_1
(list[float] | None
) -
lambda_boresch_ligand_2
(list[float] | None
) -
bm_b0
(list[float] | None
)
Validators:
-
_validate_lambda_lengths
lambda_vdw_ligand_1
pydantic-field
#
The vdW lambda schedule of the first ligand.
lambda_vdw_ligand_2
pydantic-field
#
The vdW lambda schedule of the second ligand.
lambda_charges_ligand_1
pydantic-field
#
The charge lambda schedule of the first ligand.
lambda_charges_ligand_2
pydantic-field
#
The charge lambda schedule of the second ligand.
lambda_boresch_ligand_1
pydantic-field
#
The lambda schedule of the boresch restraint on the first ligand.
lambda_boresch_ligand_2
pydantic-field
#
The lambda schedule of the boresch restraint on the second ligand.
bm_b0
pydantic-field
#
The REST2 beta scaling factors (beta_m / beta_0) to use. Set this to None
to disable REST2 scaling.
model_dump_yaml
#
Dump the model to a YAML representation.
Parameters:
-
output_path
(Path | None
, default:None
) –The (optional) path to save the YAML representation to.
Returns:
-
str
–The YAML representation.
Source code in femto/md/utils/models.py
compute_ddg
#
compute_ddg(
config: SepTopConfig,
complex_u_kn: ndarray,
complex_n_k: ndarray,
complex_system: System,
solution_u_kn: ndarray,
solution_n_k: ndarray,
solution_system: System,
) -> DataFrame
Computes the binding free energy from the complex and solution phase samples.
Parameters:
-
config
(SepTopConfig
) –The configuration.
-
complex_u_kn
(ndarray
) –The complex phase samples.
-
complex_n_k
(ndarray
) –The complex phase sample counts.
-
complex_system
(System
) –The complex phase system.
-
solution_u_kn
(ndarray
) –The solution phase samples.
-
solution_n_k
(ndarray
) –The solution phase sample counts.
-
solution_system
(System
) –The solution phase system.
Returns:
-
DataFrame
–A pandas DataFrame containing the total binding free energy and its components.
Source code in femto/fe/septop/_analyze.py
load_config
#
load_config(path: Path) -> SepTopConfig
Load a configuration from a YAML file.
Parameters:
-
path
(Path
) –The path to the YAML configuration.
Returns:
-
SepTopConfig
–The loaded configuration.
Source code in femto/fe/septop/_config.py
equilibrate_states
#
equilibrate_states(
system: System,
topology: Topology,
states: SepTopStates,
config: SepTopEquilibrateStage,
platform: OpenMMPlatform,
reporter: Reporter | None = None,
) -> list[State]
Equilibrate the system at each lambda window.
Parameters:
-
system
(System
) –The system to simulate.
-
topology
(Topology
) –The topology of the system to simulate.
-
states
(SepTopStates
) –The states of the system to simulate.
-
config
(SepTopEquilibrateStage
) –Configuration settings.
-
platform
(OpenMMPlatform
) –The accelerator to use.
-
reporter
(Reporter | None
, default:None
) –The (optional) reporter to use to record system statistics such as volume and energy.
Returns:
-
list[State]
–The final equilibrated state.
Source code in femto/fe/septop/_equilibrate.py
run_complex_phase
#
run_complex_phase(
config: SepTopConfig,
ligand_1_path: Path,
ligand_2_path: Path | None,
receptor_path: Path,
cofactor_paths: list[Path] | None,
output_dir: Path,
report_dir: Path | None = None,
ligand_1_ref_atoms: tuple[str, str, str] | None = None,
ligand_2_ref_atoms: tuple[str, str, str] | None = None,
receptor_ref_atoms: tuple[str, str, str] | None = None,
extra_params: list[Path] | None = None,
)
Run the complex phase of the SepTop calculation.
Parameters:
-
config
(SepTopConfig
) –The configuration.
-
ligand_1_path
(Path
) –The path to the first ligand.
-
ligand_2_path
(Path | None
) –The path to the second ligand, if present.
-
receptor_path
(Path
) –The path to the receptor.
-
cofactor_paths
(list[Path] | None
) –The paths to any cofactors.
-
output_dir
(Path
) –The directory to store all outputs in.
-
report_dir
(Path | None
, default:None
) –The directory to store the logs / reports in.
-
ligand_1_ref_atoms
(tuple[str, str, str] | None
, default:None
) –The AMBER style query masks that select the first ligands reference atoms.
-
ligand_2_ref_atoms
(tuple[str, str, str] | None
, default:None
) –The AMBER style query masks that select the second ligands reference atoms.
-
receptor_ref_atoms
(tuple[str, str, str] | None
, default:None
) –The AMBER style query mask that selects the receptor atoms used to align the ligand.
-
extra_params
(list[Path] | None
, default:None
) –The paths to any extra parameter files (.xml, .parm) to use when parameterizing the system.
Source code in femto/fe/septop/_runner.py
run_solution_phase
#
run_solution_phase(
config: SepTopConfig,
ligand_1_path: Path,
ligand_2_path: Path | None,
output_dir: Path,
report_dir: Path | None = None,
ligand_1_ref_atoms: tuple[str, str, str] | None = None,
ligand_2_ref_atoms: tuple[str, str, str] | None = None,
extra_params: list[Path] | None = None,
)
Run the solution phase of the SepTop calculation.
Parameters:
-
config
(SepTopConfig
) –The configuration.
-
ligand_1_path
(Path
) –The path to the first ligand.
-
ligand_2_path
(Path | None
) –The path to the second ligand, if present.
-
output_dir
(Path
) –The directory to store all outputs in.
-
report_dir
(Path | None
, default:None
) –The directory to store the report in.
-
ligand_1_ref_atoms
(tuple[str, str, str] | None
, default:None
) –The AMBER style query masks that select the first ligands reference atoms.
-
ligand_2_ref_atoms
(tuple[str, str, str] | None
, default:None
) –The AMBER style query masks that select the second ligands reference atoms.
-
extra_params
(list[Path] | None
, default:None
) –The paths to any extra parameter files (.xml, .parm) to use when parameterizing the system.
Source code in femto/fe/septop/_runner.py
submit_network
#
submit_network(
config: SepTopConfig,
network: Network,
output_dir: Path,
queue_options: SLURMOptions,
mpi_command: list[str] | None = None,
) -> list[tuple[str, str, str]]
Submits a set of SepTop calculations to an HPC queueing manager.
Parameters:
-
config
(SepTopConfig
) –The configuration.
-
network
(Network
) –The network of edges to run.
-
output_dir
(Path
) –The directory to store any outputs in.
-
queue_options
(SLURMOptions
) –The options to use when submitting the jobs.
-
mpi_command
(list[str] | None
, default:None
) –The mpi runner command to use. The default is
"srun --mpi=pmix"
.
Returns:
-
list[tuple[str, str, str]]
–The ids of the submitted jobs.
Source code in femto/fe/septop/_runner.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
|
run_hremd
#
run_hremd(
system: System,
topology: Topology,
coords: list[State],
states: SepTopStates,
config: SepTopSamplingStage,
platform: OpenMMPlatform,
output_dir: Path,
reporter: Reporter | None = None,
)
Perform replica exchange sampling for a system prepared for SepTop calculations.
Parameters:
-
system
(System
) –The system.
-
topology
(Topology
) –The topology associated with the system.
-
coords
(list[State]
) –The starting coordinates for each state.
-
states
(SepTopStates
) –The lambda states to sample.
-
config
(SepTopSamplingStage
) –Configuration settings.
-
platform
(OpenMMPlatform
) –The platform to run on.
-
output_dir
(Path
) –The directory to store the sampled energies and statistics to, and any trajectory files if requested.
-
reporter
(Reporter | None
, default:None
) –The reporter to log statistics such as online estimates of the free energy to.
Source code in femto/fe/septop/_sample.py
setup_complex
#
setup_complex(
config: SepTopSetupStage,
receptor: Topology,
ligand_1: Topology,
ligand_2: Topology | None,
cofactors: list[Topology] | None,
receptor_ref_query: tuple[str, str, str] | None = None,
ligand_1_ref_query: tuple[str, str, str] | None = None,
ligand_2_ref_query: tuple[str, str, str] | None = None,
extra_params: list[Path] | None = None,
) -> tuple[Topology, System]
Prepares a system ready for running the SepTop method.
Parameters:
-
config
(SepTopSetupStage
) –The configuration for setting up the system.
-
receptor
(Topology
) –The receptor.
-
ligand_1
(Topology
) –The first ligand.
-
ligand_2
(Topology | None
) –The second ligand if one is present.
-
cofactors
(list[Topology] | None
) –Any cofactors.
-
receptor_ref_query
(tuple[str, str, str] | None
, default:None
) –The query to select the reference atoms of the receptor.
-
ligand_1_ref_query
(tuple[str, str, str] | None
, default:None
) –The query to select the reference atoms of the first ligand.
-
ligand_2_ref_query
(tuple[str, str, str] | None
, default:None
) –The query to select the reference atoms of the second ligand
-
extra_params
(list[Path] | None
, default:None
) –The paths to any extra parameter files (.xml, .parm) to use when parameterizing the system.
Returns:
-
tuple[Topology, System]
–The prepared topology and OpenMM system object.
Source code in femto/fe/septop/_setup.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
|
setup_solution
#
setup_solution(
config: SepTopSetupStage,
ligand_1: Topology,
ligand_2: Topology | None,
ligand_1_ref_query: tuple[str, str, str] | None = None,
ligand_2_ref_query: tuple[str, str, str] | None = None,
extra_params: list[Path] | None = None,
) -> tuple[Topology, System]
Prepares a system ready for running the SepTop method.
Parameters:
-
config
(SepTopSetupStage
) –The configuration for setting up the system.
-
ligand_1
(Topology
) –The first ligand.
-
ligand_2
(Topology | None
) –The second ligand if one is present.
-
ligand_1_ref_query
(tuple[str, str, str] | None
, default:None
) –The query to select the reference atoms of the first ligand.
-
ligand_2_ref_query
(tuple[str, str, str] | None
, default:None
) –The query to select the reference atoms of the second ligand
-
extra_params
(list[Path] | None
, default:None
) –The paths to any extra parameter files (.xml, .parm) to use when parameterizing the system.
Returns:
-
tuple[Topology, System]
–The prepared topology and OpenMM system object.
Source code in femto/fe/septop/_setup.py
create_state_dicts
#
create_state_dicts(
config: SepTopStates, system: System
) -> list[dict[str, float]]
Map the lambda states specified in the configuration to a dictionary.
Parameters:
-
config
(SepTopStates
) –The configuration.
-
system
(System
) –The system being simulated.
Returns:
-
list[dict[str, float]]
–The dictionary of lambda states.