meld.runner.transform.rest2.REST2Transformer
- class meld.runner.transform.rest2.REST2Transformer(param_manager, mapper, density_manager, builder_info, options, always_active_restraints, selectively_active_restraints)[source]
Bases:
TransformerBase
An implementation of REST2
We use the updated version of Replica Exchange with Solute Scaling.
Warning
Currently, the REST2 implmentation in MELD has a limitation that any CMAP / AMAP potentials are not scaled.
References
L. Wang, R.A. Friesner, B.J. Berne, Replica exchange with solute scaling: a more efficient version of replica exchange with solute tempering.
- __init__(param_manager, mapper, density_manager, builder_info, options, always_active_restraints, selectively_active_restraints)[source]
Initialize a Transformer
- Parameters
param_manager (
ParameterManager
) – parameter manager to handle sampling of paramtersbuilder_info (
dict
) – information from the system builder / patcheroptions (
RunOptions
) – the options for the runneralways_active_restraints (
List
[Restraint
]) – these restraints are always activeselectively_active_collections – these restraints are selected by the MELD algorithm
Methods
__init__
(param_manager, mapper, ...)Initialize a Transformer
add_interactions
(state, system, topology)Add new interactions to the system.
finalize
(state, system, topology)Finalize the transformer.
update
(state, simulation, alpha, timestep)Update the system according to alpha and timestep.
Attributes
scaler
ramp
nb_force
dihedral_force
protein_nonbonded_params
protein_exception_params
protein_dihedrals
- finalize(state, system, topology)[source]
Finalize the transformer.
This method is guaranteed to be called after all forces are added to the system and provides an opportunity to do bookkeeping.
This method should not add any new forces.
- Parameters
state (
IState
) – the state of the systemsystem (
System
) – OpenMM system object to be modifiedtopology (
Topology
) – OpenMM topology object to be modified and/or used for indexing
- Return type
None
- update(state, simulation, alpha, timestep)[source]
Update the system according to alpha and timestep.
This method is called at the beginning of every stage. It should update forces and parameters as necessary.
- Parameters
state (
IState
) – the state of the systemsimulation (
Simulation
) – OpenMM simulation object to be modifiedalpha (
float
) – current value of alpha, ranges from 0 to 1stage – current stage of the simulation, starting from 0
- Return type
None