meld.system.restraints.DistanceRestraint
- class meld.system.restraints.DistanceRestraint(system, scaler, ramp, atom1, atom2, r1, r2, r3, r4, k)[source]
Bases:
SelectableRestraintRestrain the distance between two groups
- __init__(system, scaler, ramp, atom1, atom2, r1, r2, r3, r4, k)[source]
Initialize a DistanceRestraint
The energy is zero between
r2andr3. It increases quadratically betweenr1andr2and betweenr3andr4. The energy increases linearly belowr1and abover4.- Parameters
system (
ISystem) – system object that restraint belongs toscaler (
Optional[RestraintScaler]) – a Scaler to vary the force constant with alpha. IfNone, then a constant 1.0 scaler will be used.ramp (
Optional[TimeRamp]) – a time ramp to turn restraints on a beginning of simulationatom_1 – index of atom 1
atom_2 – index of atom 2
r1 (
Union[Quantity,Positioner]) – distancer2 (
Union[Quantity,Positioner]) – distancer3 (
Union[Quantity,Positioner]) – distancer4 (
Union[Quantity,Positioner]) – distancek (
Quantity) – force constant
Methods
__init__(system, scaler, ramp, atom1, atom2, ...)Initialize a DistanceRestraint
Attributes
atom_index_1atom_index_2