LennardJonesCutShift¶
-
class
LennardJonesCutShift
: public feasst::LennardJonesAlpha¶ The Lennard-Jones potential, \(U_{LJ}\) is described in LennardJones. 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:
ModelParams wca_params = configuration.model_params(); // copy model params LennardJonesCutShift::set_wca(type1, type2, wca_params); // set cutoff wca->precompute(wca_params); // compute shifts, etc Potential::set_model_params(wca_params); // use wca_params.
Public Functions
-
void
precompute
(const ModelParams &existing)¶ Precompute the shift factor for optimization, given existing model parameters.
-
void
set_alpha
(const double alpha)¶ Set the value of \(\alpha\). The default value is 6.
-
void
set_wca
(const int site_type1, const int site_type2, ModelParams *params)¶ Initialize WCA cutoff distances for types 1 and 2 in model parameters.
-
void
serialize
(std::ostream &ostr) const¶ Output a serialized version of the existing model.
-
void