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 PotCaps caps() 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.

With MorseConfig::switch_width set, each pair term is the unshifted Morse energy times the C^2 quintic switch of PairSwitch.hpp; otherwise the energy is shifted to zero at the cutoff and the force jumps there.

Warning

The box is assumed to be orthogonal.

Methods

double energyShift() const

Energy offset subtracted from every pair term (the unshifted pair energy at the cutoff); 0 when the quintic switch replaces the shift.

virtual PotCaps caps() const

Concurrency and evaluation capabilities of this potential.

Multi-threaded callers (NEB images, dimer endpoints) derive their sharing and cloning policy from this instead of hard-coded lists.

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.