LennardJonesCutShift
-
class LennardJonesCutShift : public feasst::LennardJonesAlpha
The Lennard-Jones potential, \(U_{LJ}\) is described in LennardJonesAlpha. This class implements the cut and shifted (CS) version which ensures \(U(r_c)=0\).
\( U_{LJ}^{CS}(r) = \left\{ \begin{array}{lr} U_{LJ}(r) - U_{LJ}(r_c) & : r < r_c \\ 0 & : r \ge r_c \end{array} \right. \)
For a Weeks-Chandler-Anderson (WCA) potential, use this class. The cutoffs are computed by LennardJonesCutShift::set_wca. Thus, one workflow is as follows:
auto wca = MakeLennardJonesCutShift(); ModelParams wca_params = configuration.model_params(); // copy model params wca->set_wca(type1, type2, wca_params); // set cutoff wca->precompute(wca_params); // compute shifts, etc auto potential = MakePotential(wca); potential->set(wca_params); // use wca_params.