struct traj::BoxCell#

Overview#

Restricted-triclinic periodic simulation cell. More…

#include <src/include/internal/trajectory.hpp>
 
struct BoxCell {
    // fields
 
    double ox = 0.0;
    double oy = 0.0;
    double oz = 0.0;
    double lx = 0.0;
    double ly = 0.0;
    double lz = 0.0;
    double xy = 0.0;
    double xz = 0.0;
    double yz = 0.0;
    double halfMin = 0.0;
    bool triclinic = false;
    bool ok = false;
 
    // methods
 
    static BoxCell fromBox9(const double box9[9]);
    static BoxCell fromCloud(const molSys::PointCloud<molSys::Point<double>, double>& cloud);
    void toBox9(double out[9]) const;
    std::array<double, 3> micDelta(double dx, double dy, double dz) const;
    std::array<double, 3> micDeltaSearch(double dx, double dy, double dz) const;
};

Detailed Documentation#

Restricted-triclinic periodic simulation cell.

Edge matrix H has columns a = (lx, 0, 0), b = (xy, ly, 0), c = (xz, yz, lz) and origin (ox, oy, oz).

Methods#

std::array<double, 3> micDelta(double dx, double dy, double dz) const

Euclidean minimum-image Cartesian displacement for raw delta (dx, dy, dz).

Uses minimage’s reduced-basis search when built with it, otherwise micDeltaSearch. Independent rounding of fractional coordinates is not the minimum image on a tilted cell.

std::array<double, 3> micDeltaSearch(double dx, double dy, double dz) const

Euclidean minimum image by exhaustive search over the lattice shifts that can beat the fractional image.