.. index:: pair: class; rgpot::ExprPot .. _doxid-classrgpot_1_1_expr_pot: class rgpot::ExprPot ==================== .. toctree:: :hidden: struct_rgpot_ExprPot_Impl.rst Overview ~~~~~~~~ Energy :math:`E = f(E_0, E_1, \ldots)` over named child potentials. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class ExprPot: public rgpot::Potential< ExprPot > { public: // typedefs typedef std::pair`>> :target:`Term`; // structs struct :ref:`Impl`; // construction :target:`ExprPot`(std::string expression, std::vector terms); :target:`ExprPot`(const ExprPot&); :target:`ExprPot`(ExprPot&& other); :target:`~ExprPot`(); // methods ExprPot& :target:`operator=`(const ExprPot&); ExprPot& :target:`operator=`(ExprPot&& other); void :target:`forceImpl`(const :ref:`ForceInput`& in, :ref:`ForceOut`* out) const; virtual :ref:`PotCaps` :ref:`caps`() const; virtual uint64_t :ref:`paramsKey`() const; const std::string& :target:`expression`() const; double :ref:`dEnergyDTerm`(const std::string& name) const; }; .. _details-classrgpot_1_1_expr_pot: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Energy :math:`E = f(E_0, E_1, \ldots)` over named child potentials. The constructor parses ``expression`` with ``Lepton::Parser::parse``, compiles the energy once, and compiles ``ParsedExpression::differentiate(name)`` once per term. Unknown, duplicate, unused, or non-identifier names fail closed before any force call. Forces are the chain rule :math:`F = \sum_i (\partial f/\partial E_i)\, F_i`. Methods ------- .. index:: pair: function; caps .. _doxid-classrgpot_1_1_expr_pot_1acb09d0d256feb5f20d022a3a937d94ed: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`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. .. index:: pair: function; paramsKey .. _doxid-classrgpot_1_1_expr_pot_1a5dd55c06126fb36c9cd539a84c162e9b: .. 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; dEnergyDTerm .. _doxid-classrgpot_1_1_expr_pot_1a37681cf4eb0cb3b65be9ba401151f759: .. ref-code-block:: cpp :class: doxyrest-title-code-block double dEnergyDTerm(const std::string& name) const Analytic :math:`\partial f/\partial E_{\mathrm{name}}` from the construct-time compiled derivative, evaluated at the last child energies (zero if no force call has run).