meld.system.restraints.RestraintManager
- class meld.system.restraints.RestraintManager(system)[source]
Bases:
object
A class to manage restraints for a System
- __init__(system)[source]
Initialize a RestraintManager
- Parameters
system (
ISystem
) – the System to manage restraints for
Methods
__init__
(system)Initialize a RestraintManager
add_as_always_active
(restraint)Add a restraint as always active
add_as_always_active_list
(restraint_list)Add a list of restraints as always active
add_selectively_active_collection
(rest_list, ...)Add a selectively active collection
create_restraint
(rest_type[, scaler, ramp])Create a restraint
create_restraint_group
(rest_list, num_active)Create a restraint group
create_scaler
(scaler_type, **kwargs)Create a restraint scaler
Attributes
Always active restraints
Selectively active collections
- add_as_always_active(restraint)[source]
Add a restraint as always active
- Parameters
restraint (
Union
[NonSelectableRestraint
,SelectableRestraint
]) – the restraint to add- Return type
None
- add_as_always_active_list(restraint_list)[source]
Add a list of restraints as always active
- Parameters
restraint_list (
List
[Union
[NonSelectableRestraint
,SelectableRestraint
]]) – the restraints to add- Return type
None
- add_selectively_active_collection(rest_list, num_active)[source]
Add a selectively active collection
- Parameters
rest_list (
List
[Union
[RestraintGroup
,SelectableRestraint
]]) – list of restraints or restraint groups to addnum_active (
int
) – number of active groups in collection
- Return type
None
- create_restraint(rest_type, scaler=None, ramp=None, **kwargs)[source]
Create a restraint
- Parameters
rest_type (
str
) – type of restraint to addscaler (
Optional
[RestraintScaler
]) – scale the force with alpharamp (
Optional
[TimeRamp
]) – scale the force over time**kwargs – passed along to restraint creation functions
- Return type
- create_restraint_group(rest_list, num_active)[source]
Create a restraint group
- Parameters
rest_list (
List
[SelectableRestraint
]) – restraints to include in groupnum_active (
int
) – number of restraints active at each timestep
- Return type
- Returns
the new restraint group
- create_scaler(scaler_type, **kwargs)[source]
Create a restraint scaler
- Parameters
scaler_type (
str
) – the type a scaler to create**kwargs – passed along to the scaler creattion functions
- Return type
- Returns
the new restraint scaler
- property selectively_active_collections: List[SelectivelyActiveCollection]
Selectively active collections