.. index:: pair: namespace; rgpot .. _doxid-namespacergpot: namespace rgpot =============== .. toctree:: :hidden: namespace_rgpot_cache.rst namespace_rgpot_details.rst namespace_rgpot_types.rst struct_rgpot_ForceInput.rst struct_rgpot_ForceOut.rst class_rgpot_CuH2Pot.rst class_rgpot_LJPot.rst class_rgpot_PotentialBase.rst class_rgpot_registry.rst Overview ~~~~~~~~ POD structures for force and energy calculation interfaces. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace rgpot { // namespaces namespace :ref:`rgpot::cache`; namespace :ref:`rgpot::details`; namespace :ref:`rgpot::types`; namespace :ref:`rgpot::types::adapt`; namespace :ref:`rgpot::types::adapt::capnp`; namespace :ref:`rgpot::types::adapt::eigen`; namespace :ref:`rgpot::types::adapt::xtensor`; // structs struct :ref:`ForceInput`; struct :ref:`ForceOut`; // classes class :ref:`CalcResult`; class :ref:`CuH2Pot`; class :ref:`Error`; class :ref:`InputSpec`; class :ref:`LJPot`; class :ref:`PotentialBase`; class :ref:`PotentialHandle`; class :ref:`RpcClient`; template class :ref:`registry`; // global variables size_t :target:`registry< T >::count` = 0; size_t :target:`registry< T >::forceCalls` = 0; T* :target:`registry< T >::head` = nullptr; // global functions void :ref:`zeroForceOut`(const size_t& nAtoms, :ref:`ForceOut`* efvd); void :ref:`checkParams`(const :ref:`ForceInput`& params); } // namespace rgpot .. _details-namespacergpot: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ POD structures for force and energy calculation interfaces. Definition of the native :ref:`AtomMatrix ` class. Conversion utilities between Cap'n Proto and native types. Utility templates and functions for potential management. Implementation of utility functions for potential management. Defines the core data exchange structures used between the high-level potential wrappers and the low-level physics engines. Contains the implementations for global helper functions used to manage and validate the core force and energy data structures. Defines a static registry for tracking potential instances and global force call counters. It also provides utility functions for structure initialization and validation. This file contains inline adapter functions designed to facilitate the seamless transfer of data between the Cap'n Proto RPC layer and the internal ``Eigen`` based ``:ref:`AtomMatrix ``` and other STL types. This file defines a lightweight, row-major matrix class designed for storing atomic coordinates and forces. Global Functions ---------------- .. index:: pair: function; zeroForceOut .. _doxid-namespacergpot_1aa8cb0fd12ead45cd35dd0ea5c3b6fb7a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void zeroForceOut(const size_t& nAtoms, :ref:`ForceOut`* efvd) Zeroes the members of a :ref:`ForceOut ` structure. This function performs a manual reset of the ``:ref:`ForceOut ``` structure. It ensures the energy and variance are set to zero and iterates through the force array to clear components for each atom. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - nAtoms - The number of atoms. * - efvd - The results structure to reset. .. rubric:: Returns: Void. .. index:: pair: function; checkParams .. _doxid-namespacergpot_1a7a27dd46fdc6dc15479964efd8c8f088: .. ref-code-block:: cpp :class: doxyrest-title-code-block void checkParams(const :ref:`ForceInput`& params) Validates the input parameters for a potential calculation. Verifies that the input parameters represent a physically valid configuration. Currently, it strictly checks that the system contains at least one atom. .. warning:: Throws a ``std::runtime_error`` if *nAtoms* is zero or less. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - params - The configuration structure to check. .. rubric:: Returns: Void.