Template Class sf_HS_WCA_interaction#
Defined in File hs_wca.hpp
Inheritance Relationships#
Base Type#
private pele::BaseInteraction(Struct BaseInteraction)
Class Documentation#
-
template<size_t exp = 6>
class sf_HS_WCA_interaction : private pele::BaseInteraction# This a WCA-like potential, which mostly avoids square roots and extrapolates linearly “into the hard core”.
That should be useful to minimize HS-WCA-like systems. The pair potential is:
Here: \(E_\times = V_\text{fHS-WCA}(r_\times)\) \(G_\times = \text{grad}[V_\text{fHS-WCA}](r_\times)\) And: dij : sum of hard radii \(r_S = (1 + \alpha) * dij\) \(r_\times = dij + \delta\) The choice of the delta parameter below is somewhat arbitrary and could probably be optimised. Computing the gradient GX at the point where we go from fWCA to linear is somewhat confusing because the gradient is originally computed as grad / (-r).\[\begin{split}\begin{aligned} V_\text{sfHS-WCA}(r^2) &= 0 \text{ if } r \geq r_S \\ V_\text{sfHS-WCA}(r^2) &= V_\text{fHS-WCA}(r^2) \text{ if } r_\times < r < r_S \\ V_\text{sfHS-WCA}(r^2) &= E_\times - (\sqrt{r^2} - r_\times)G_\times \text{ if } r \leq r_\times \end{aligned} \end{split}\]Public Functions
-
sf_HS_WCA_interaction(const double eps, const double alpha, const double delta = 1e-10)#
-
virtual double energy(const double r2, const double dij) const#
- virtual double energy_gradient(
- const double r2,
- double *const gij,
- const double dij
- virtual double energy_gradient_hessian(
- const double r2,
- double *const gij,
- double *const hij,
- const double dij
- 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
This can be used to plot the potential, as evaluated numerically.
-
sf_HS_WCA_interaction(const double eps, const double alpha, const double delta = 1e-10)#