.. index:: pair: namespace; rgpot::types::adapt::capnp .. _doxid-namespacergpot_1_1types_1_1adapt_1_1capnp: namespace rgpot::types::adapt::capnp ==================================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace capnp { // global functions :ref:`AtomMatrix` :ref:`convertPositionsFromCapnp`(const ::capnp::List::Reader& capnpPos, size_t numAtoms); std::vector :ref:`convertAtomNumbersFromCapnp`(const ::capnp::List::Reader& capnpAtmnrs); std::array, 3> :ref:`convertBoxMatrixFromCapnp`(const ::capnp::List::Reader& capnpBox); void :ref:`populatePositionsToCapnp`(::capnp::List::Builder& capnpPos, const :ref:`AtomMatrix`& positions); void :ref:`populateForcesToCapnp`(::capnp::List::Builder& capnpForces, const :ref:`AtomMatrix`& forces); void :ref:`populateAtomNumbersToCapnp`(::capnp::List::Builder& capnpAtmnrs, const std::vector& atomNumbers); void :ref:`populateBoxMatrixToCapnp`(::capnp::List::Builder& capnpBox, const std::array, 3>& boxMatrix); } // namespace capnp .. _details-namespacergpot_1_1types_1_1adapt_1_1capnp: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; convertPositionsFromCapnp .. _doxid-capnp__adapter_8hpp_1a0a79c1c4b7abbc4780efbb15b4518f48: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`AtomMatrix` convertPositionsFromCapnp(const ::capnp::List::Reader& capnpPos, size_t numAtoms) Converts Cap'n Proto position list to an :ref:`AtomMatrix `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - capnpPos - The reader for the position list. * - numAtoms - The number of atoms in the system. .. rubric:: Returns: An ``:ref:`AtomMatrix ``` containing the positions. .. index:: pair: function; convertAtomNumbersFromCapnp .. _doxid-capnp__adapter_8hpp_1a4a0d38e4d3dda0fff2e3f1db4080acf2: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector convertAtomNumbersFromCapnp(const ::capnp::List::Reader& capnpAtmnrs) Converts Cap'n Proto atomic number list to an STL vector. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - capnpAtmnrs - The reader for the atomic numbers list. .. rubric:: Returns: A ``std::vector`` containing the atomic numbers. .. index:: pair: function; convertBoxMatrixFromCapnp .. _doxid-capnp__adapter_8hpp_1a0439f60268321b5f177044fb015fdcf9: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::array, 3> convertBoxMatrixFromCapnp(const ::capnp::List::Reader& capnpBox) Converts Cap'n Proto box list to a native 3x3 array. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - capnpBox - The reader for the box matrix list. .. rubric:: Returns: A nested ``std::array`` of doubles representing the cell. .. index:: pair: function; populatePositionsToCapnp .. _doxid-capnp__adapter_8hpp_1aaedaa2305fd8ecfb729b8ef49e8c9647: .. ref-code-block:: cpp :class: doxyrest-title-code-block void populatePositionsToCapnp(::capnp::List::Builder& capnpPos, const :ref:`AtomMatrix`& positions) Serializes an :ref:`AtomMatrix ` of positions to a Cap'n Proto builder. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - capnpPos - The builder for the position list. * - positions - The source ``:ref:`AtomMatrix ```. .. rubric:: Returns: Void. .. index:: pair: function; populateForcesToCapnp .. _doxid-capnp__adapter_8hpp_1a052124b85f756b68a270a0fa04633476: .. ref-code-block:: cpp :class: doxyrest-title-code-block void populateForcesToCapnp(::capnp::List::Builder& capnpForces, const :ref:`AtomMatrix`& forces) Serializes an :ref:`AtomMatrix ` of forces to a Cap'n Proto builder. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - capnpForces - The builder for the force list. * - forces - The source ``:ref:`AtomMatrix ```. .. rubric:: Returns: Void. .. index:: pair: function; populateAtomNumbersToCapnp .. _doxid-capnp__adapter_8hpp_1a551b5cda1f05af62a20cd29db9272407: .. ref-code-block:: cpp :class: doxyrest-title-code-block void populateAtomNumbersToCapnp(::capnp::List::Builder& capnpAtmnrs, const std::vector& atomNumbers) Serializes an STL vector of atomic numbers to a Cap'n Proto builder. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - capnpAtmnrs - The builder for the atomic numbers list. * - atomNumbers - The source ``std::vector``. .. rubric:: Returns: Void. .. index:: pair: function; populateBoxMatrixToCapnp .. _doxid-capnp__adapter_8hpp_1a20074a7bb255479d980fa7fbbcfbf370: .. ref-code-block:: cpp :class: doxyrest-title-code-block void populateBoxMatrixToCapnp(::capnp::List::Builder& capnpBox, const std::array, 3>& boxMatrix) Serializes a native 3x3 box matrix to a Cap'n Proto builder. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - capnpBox - The builder for the box matrix list. * - boxMatrix - The source nested ``std::array``. .. rubric:: Returns: Void.