.. index:: pair: class; rgpot::PotentialBase .. _doxid-classrgpot_1_1_potential_base: class rgpot::PotentialBase ========================== .. toctree:: :hidden: Overview ~~~~~~~~ Abstract base class for all potential energy surfaces. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class PotentialBase { public: // construction :ref:`PotentialBase`(PotType inp_type); virtual :ref:`~PotentialBase`(); // methods virtual std::pair`> :ref:`operator()`(const :ref:`AtomMatrix`& positions, const std::vector& atmtypes, const std::array, 3>& box) = 0; PotType :ref:`get_type`() const; }; .. _details-classrgpot_1_1_potential_base: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Abstract base class for all potential energy surfaces. Construction ------------ .. index:: pair: function; PotentialBase .. _doxid-classrgpot_1_1_potential_base_1a35185d956a387e730f6a7e8d0716c57f: .. ref-code-block:: cpp :class: doxyrest-title-code-block PotentialBase(PotType inp_type) Constructor for :ref:`PotentialBase `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - inp_type - The type of the potential. .. _doxid-classrgpot_1_1_potential_base_1a85dc9932b5cab819c052347dcebb4221: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual ~PotentialBase() Virtual destructor. Methods ------- .. index:: pair: function; operator() .. _doxid-classrgpot_1_1_potential_base_1a64c4a9352dae2abb8262aeeceef71efa: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual std::pair`> operator()(const :ref:`AtomMatrix`& positions, const std::vector& atmtypes, const std::array, 3>& box) = 0 Main interface for potential and force calculation. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - positions - The atomic coordinates. * - atmtypes - The atomic numbers. * - box - The simulation cell vectors. .. rubric:: Returns: A pair containing the energy and the force matrix. .. index:: pair: function; get_type .. _doxid-classrgpot_1_1_potential_base_1a4de79175b891b7ea98dedb310029f834: .. ref-code-block:: cpp :class: doxyrest-title-code-block PotType get_type() const Fetches the potential type. .. rubric:: Returns: The potential type.