meld.runner.transform.restraints.com.AbsoluteCOMRestraintTransformer
- class meld.runner.transform.restraints.com.AbsoluteCOMRestraintTransformer(param_manager, mapper, density_manager, builder_info, options, always_active_restraints, selectively_active_restraints)[source]
Bases:
TransformerBase
Transformer to handle AbsoluteCOM restraints
- __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
force
- add_interactions(state, system, topology)[source]
Add new interactions to the system.
This may involve:
Adding new forces, e.g. for restraints
Replacing an existing force with another, e.g. softcore interactions
This method must return the modified system. If the transformer does not add interactions, it may simply return the passed values.
- 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
System
- 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