PerturbDistanceAngle

class PerturbDistanceAngle : public feasst::PerturbDistance

Put first site in selection, i, in a sphere about the first site in anchor, j, and at an angle i,j,k (vertex: j) about the second site in anchor, j. For angle potentials, the equilibrium angle and spring constant are as described in Random::bond_angle Currently implemented for harmonic bonds (exponent: 2), but could add an optional exponent model parameter to generalize this.

Public Functions

void precompute(TrialSelect *select, System *system)

Same as PerturbDistance, but also obtain the equilibrium angle and spring constant. If 2D, angles are positive when clockwise. Thus, when 2D and reverse (e.g., kji instead of ijk), angle = 2pi - angle.

double angle() const

Return the angle.

double spring_constant() const

Return the spring constant. If rigid, return -1 (default).

bool is_rigid() const

Return true if angle is rigid (e.g., if spring_constant is -1).

bool is_freely_jointed() const

Return true if angle is freely-jointed (e.g., if spring_constant is 0).

double random_angle(Random *random, const double beta, const int dimension) const

Parameters
  • dimension: inverse temperature

Return the randomly selected angle from the potential. If the spring constant is -1 (rigid), simplly return the angle. IF the spring constant is 0 (freely-jointed), use angle() for minimum.

void place_in_circle(const double distance, const double angle, System *system, TrialSelect *select, Random *random)

Place mobile site randomly in the circle about the anchors.

void move(System *system, TrialSelect *select, Random *random)

Move the selection of the system.