meld.system.restraints.DistanceRestraint

class meld.system.restraints.DistanceRestraint(system, scaler, ramp, atom1, atom2, r1, r2, r3, r4, k)[source]

Bases: meld.system.restraints.SelectableRestraint

Restrain 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 r2 and r3. It increases quadratically between r1 and r2 and between r3 and r4. The energy increases linearly below r1 and above r4.

Parameters
  • system (ISystem) – system object that restraint belongs to

  • scaler (Optional[RestraintScaler]) – a Scaler to vary the force constant with alpha. If None, then a constant 1.0 scaler will be used.

  • ramp (Optional[TimeRamp]) – a time ramp to turn restraints on a beginning of simulation

  • atom_1 – index of atom 1

  • atom_2 – index of atom 2

  • r1 (Union[Quantity, Positioner]) – distance

  • r2 (Union[Quantity, Positioner]) – distance

  • r3 (Union[Quantity, Positioner]) – distance

  • r4 (Union[Quantity, Positioner]) – distance

  • k (Quantity) – force constant

Methods

__init__(system, scaler, ramp, atom1, atom2, ...)

Initialize a DistanceRestraint

Attributes

atom_index_1

atom_index_2