.. index:: pair: class; gpr::geometry::PairBox .. _doxid-classgpr_1_1geometry_1_1_pair_box: class gpr::geometry::PairBox ============================ .. toctree:: :hidden: Overview ~~~~~~~~ :ref:`Pair ` displacement through the LODE minimage mi\_\* C ABI. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class PairBox { public: // construction :target:`PairBox`(); :target:`PairBox`(const double cell[9]); :target:`PairBox`(const std::array& cell); :ref:`PairBox`(const double cell[9], const std::array& periodic); // methods void :target:`reset`(const double cell[9]); bool :ref:`periodic`() const; const std::array& :ref:`periodicAxes`() const; void :ref:`displacement`(const double p[3], const double q[3], double dr[3]) const; Eigen::Vector3d :target:`displacement`(const Eigen::Vector3d& p, const Eigen::Vector3d& q) const; double :target:`dist2`(const Eigen::Vector3d& p, const Eigen::Vector3d& q) const; }; .. _details-classgpr_1_1geometry_1_1_pair_box: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ :ref:`Pair ` displacement through the LODE minimage mi\_\* C ABI. A zero cell keeps the Cartesian difference q - p and never calls mi\_\*. A cell with three nonzero rows builds one mi_cell (ASE row-major) and every displacement is the nearest Euclidean lattice image. A cell with one or two zero rows is periodic along its nonzero rows only (a slab or a wire): an mi_pbc_cell takes the nearest image over the lattice of those rows and none along the open axes. Distances and derivatives use that same displacement. The 25 A vacuum box stays off this path at the load and overlay sites (cellIsMicLattice), not inside :ref:`PairBox `. Construction ------------ .. index:: pair: function; PairBox .. _doxid-classgpr_1_1geometry_1_1_pair_box_1a0861ee2424272085a4c57a014779bc03: .. ref-code-block:: cpp :class: doxyrest-title-code-block PairBox(const double cell[9], const std::array& periodic) Periodic along the axes of periodic only; the rows of the open axes are ignored. Methods ------- .. index:: pair: function; periodic .. _doxid-classgpr_1_1geometry_1_1_pair_box_1a402c5154f8ecc18735463e05360ea32e: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool periodic() const Some axis is periodic. .. index:: pair: function; periodicAxes .. _doxid-classgpr_1_1geometry_1_1_pair_box_1a3f5601b722e199465f8cabd10f963d45: .. ref-code-block:: cpp :class: doxyrest-title-code-block const std::array& periodicAxes() const The periodic axes, a, b, c. .. index:: pair: function; displacement .. _doxid-classgpr_1_1geometry_1_1_pair_box_1ac8fc757973eb401fde5f916da22b5473: .. ref-code-block:: cpp :class: doxyrest-title-code-block void displacement(const double p[3], const double q[3], double dr[3]) const Displacement from p to q. Cartesian q - p when the cell is zero.