class rgpot::MorsePot

Overview

Pairwise Morse potential, \(V(r) = D_e [1 - e^{-a(r - r_e)}]^2 - D_e\), shifted so that \(V(r_\mathrm{cut}) = 0\). More…

#include <MorsePot.hpp>
 
class MorsePot: public rgpot::Potential< MorsePot > {
public:
    // construction
 
    MorsePot();
    MorsePot(const MorseConfig& c);
 
    // methods
 
    const MorseConfig& config() const;
    double energyShift() const;
    virtual uint64_t paramsKey() const;
    void forceImpl(const ForceInput& in, ForceOut* out) const;
};

Detailed Documentation

Pairwise Morse potential, \(V(r) = D_e [1 - e^{-a(r - r_e)}]^2 - D_e\), shifted so that \(V(r_\mathrm{cut}) = 0\).

Pairwise interactions within the cutoff radius, minimum image convention on an orthogonal box. Pairs come from the shared rgpot::nlist::PairListCache, so repeated evaluations on nearby geometries (NEB images, dimer rotations) reuse a Verlet-skin cached candidate list.

Warning

The box is assumed to be orthogonal.

Methods

double energyShift() const

Energy offset subtracted from every pair term (the unshifted well depth at the cutoff).

virtual uint64_t paramsKey() const

Fingerprint of the potential’s parameter set.

Mixed into the result-cache key so results never cross parameter sets. Implementations hash their config field by field (see ParamHash.hpp) plus a kernel-version salt that changes whenever the numerics change. The default (0) suits parameter-free potentials whose numerics never changed.

void forceImpl(const ForceInput& in, ForceOut* out) const

Computes the forces and energy for a given configuration.

Parameters:

in

Structure containing coordinates and cell info.

out

Pointer to the results structure.

Returns:

Void.