class gpr::geometry::PairBox¶
Overview¶
Pair displacement through the LODE minimage mi_* C ABI. More…
#include <gpr/auxiliary/MinImage.h>
class PairBox {
public:
// construction
PairBox();
PairBox(const double cell[9]);
PairBox(const std::array<double, 9>& cell);
PairBox(const double cell[9], const std::array<bool, 3>& periodic);
// methods
void reset(const double cell[9]);
bool periodic() const;
const std::array<bool, 3>& periodicAxes() const;
void displacement(const double p[3], const double q[3], double dr[3]) const;
Eigen::Vector3d displacement(const Eigen::Vector3d& p, const Eigen::Vector3d& q) const;
double dist2(const Eigen::Vector3d& p, const Eigen::Vector3d& q) const;
};
Detailed Documentation¶
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 PairBox.
Construction¶
PairBox(const double cell[9], const std::array<bool, 3>& periodic)
Periodic along the axes of periodic only; the rows of the open axes are ignored.
Methods¶
bool periodic() const
Some axis is periodic.
const std::array<bool, 3>& periodicAxes() const
The periodic axes, a, b, c.
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.