.. index:: pair: class; rgpot::MorsePot .. _doxid-classrgpot_1_1_morse_pot: class rgpot::MorsePot ===================== .. toctree:: :hidden: Overview ~~~~~~~~ Pairwise Morse potential, :math:`V(r) = D_e [1 - e^{-a(r - r_e)}]^2 - D_e`, shifted so that :math:`V(r_\mathrm{cut}) = 0`. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class MorsePot: public rgpot::Potential< MorsePot > { public: // construction :target:`MorsePot`(); :target:`MorsePot`(const :ref:`MorseConfig`& c); // methods const :ref:`MorseConfig`& :target:`config`() const; double :ref:`energyShift`() const; virtual uint64_t :ref:`paramsKey`() const; void :ref:`forceImpl`(const :ref:`ForceInput`& in, :ref:`ForceOut`* out) const; }; .. _details-classrgpot_1_1_morse_pot: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Pairwise Morse potential, :math:`V(r) = D_e [1 - e^{-a(r - r_e)}]^2 - D_e`, shifted so that :math:`V(r_\mathrm{cut}) = 0`. Pairwise interactions within the cutoff radius, minimum image convention on an orthogonal box. Pairs come from the shared ``:ref:`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 ------- .. index:: pair: function; energyShift .. _doxid-classrgpot_1_1_morse_pot_1a4a12503dd2fb3c2ac2efbc86a3ae27c7: .. ref-code-block:: cpp :class: doxyrest-title-code-block double energyShift() const Energy offset subtracted from every pair term (the unshifted well depth at the cutoff). .. index:: pair: function; paramsKey .. _doxid-classrgpot_1_1_morse_pot_1a3efdba266543f10b6b5c18ad0384e4ce: .. ref-code-block:: cpp :class: doxyrest-title-code-block 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 :ref:`ParamHash.hpp `) plus a kernel-version salt that changes whenever the numerics change. The default (0) suits parameter-free potentials whose numerics never changed. .. index:: pair: function; forceImpl .. _doxid-classrgpot_1_1_morse_pot_1ad87ad7cbb6c64258f8471c594424e6c9: .. ref-code-block:: cpp :class: doxyrest-title-code-block void forceImpl(const :ref:`ForceInput`& in, :ref:`ForceOut`* out) const Computes the forces and energy for a given configuration. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - in - Structure containing coordinates and cell info. * - out - Pointer to the results structure. .. rubric:: Returns: Void.