LennardJonesForceShift

class LennardJonesForceShift : public feasst::LennardJonesAlpha

The Lennard-Jones potential, \(U_{LJ}\) is described in LennardJonesAlpha. This class implements the force shifted (FS) version which ensures both \(U(r_c)=0\) and \(\left.\frac{\partial U}{\partial r}\right|_{r=r_c}=0\).

\( U_{LJ}^{FS}(r) = \left\{ \begin{array}{lr} U_{LJ}(r) - U_{LJ}(r_c) - \left.\frac{\partial U}{\partial r}\right|_{r=r_c} (r - r_c) & : r < r_c \\ 0 & r \ge r_c \end{array} \right. \)

Public Functions

void precompute(const ModelParams &existing)

Precompute the shift factor for optimization, given existing model parameters.

void serialize(std::ostream &ostr) const

Output a serialized version of the existing model.