BondHarmonic
-
class BondHarmonic : public feasst::BondTwoBody
U(r) = k_energy_per_length_sq*(r - equilibrium_length)^2 with parameters given in Bond Properties.
The usual 1/2 factor is not included, but can be incorporated into the k parameter manually by the user input to the particle file.
Public Functions
-
double random_distance(const Bond &bond, const double beta, const int dimen, Random *random) const
Return a randomly selected bond length with harmonic potential as described in Frenkel and Smit, Alg 43, page 578 and Allen and Tildesley, Section G.3.
\(P(l)dl \propto l**2\exp[-\beta U(l)]dl\)
The maximal length is 3 sigma beyond the mean. If 2D, use the accept-reject method
-
double random_distance(const Bond &bond, const double beta, const int dimen, Random *random) const