Struct HS_WCA_interaction#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct HS_WCA_interaction : public pele::BaseInteraction#

Fast pairwise interaction for Hard Sphere + Weeks-Chandler-Andersen (fHS_WCA) potential, refer to S.

Martiniani CPGS pp 20 well depth _eps and scaling factor (shell thickness = sca * R, where R is the hard core radius), sca determines the thickness of the shell

Public Functions

inline HS_WCA_interaction(const double eps, const double sca)#
inline virtual double energy(const double r2, const double dij) const#
inline virtual double energy_gradient(
const double r2,
double *const gij,
const double dij
) const#
inline virtual double energy_gradient_hessian(
const double r2,
double *const gij,
double *const hij,
const double dij
) const#
inline double compute_energy(const double C_ir_6, const double C_ir_12) const#

If r2 > r02 && r2 <= coff * coff, this computes the energy.

Returning the maximum of 0 and the enrgy term makes the result strictly positive also in the regime close to zero where there can be numerical issues.

inline void evaluate_pair_potential(
const double rmin,
const double rmax,
const size_t nr_points,
const double dij,
std::vector<double> &x,
std::vector<double> &y
) const#

This can be used to plot the potential, as evaluated numerically.