struct gpr::AtomsConfiguration¶
Overview¶
Stores configurations of all atoms in the system. More…
#include <structures/Structures.h>
struct AtomsConfiguration {
// fields
Coord positions;
FieldMatrixU8 is_frozen;
FieldMatrixIdx id;
FieldMatrixi atomicNrs;
Eigen::VectorXd atomic_masses;
FieldMatrixIdx type;
AtomsPositionAndType atoms_froz_active;
AtomsPositionAndType atoms_froz_inactive;
AtomsPositionAndType atoms_mov;
FieldMatrixi pairtype;
Index_t n_pt = 0;
std::vector<Index_t> pair_type_parent;
Index_t n_base_pt = 0;
double cell[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0.};
double pair_cutoff = 0.0;
double pair_cutoff_width = 0.0;
bool evict_frozen = false;
Index_t nn_frozen = 0;
bool nn_auto = true;
// methods
void seedNearestNeighbourFromActive();
void assignFromField(const FieldMatrixd& field);
void clear();
void clearDistribution();
void copy(const AtomsConfiguration& other);
Index_t countMovingAtoms();
};
Detailed Documentation¶
Stores configurations of all atoms in the system.
Fields¶
Coord positions
Positions of all atoms in the system.
FieldMatrixU8 is_frozen
Indicates whether atom is frozen or not.
ID of each atom (we do not use it).
FieldMatrixi atomicNrs
Atomic Number of each atom.
Eigen::VectorXd atomic_masses
Per-atom input masses; empty selects unit masses.
FieldMatrixIdx type
Type of each atom.
AtomsPositionAndType atoms_froz_active
Info on active frozen atoms.
AtomsPositionAndType atoms_froz_inactive
Info on inactive frozen atoms.
AtomsPositionAndType atoms_mov
Info on moving atoms.
FieldMatrixi pairtype
Pairtype indices for pairs of atomtypes (n_at x n_at). Active pairtypes are indexed as 0,1,2,…,n_pt-1. Inactive pairtypes are given index -1.
Index_t n_pt = 0
Number of active pairtypes Base pair type of every pair type when the pair types refine a coarser typing (environment sub-types of the element-and-role types); empty when every pair type stands on its own.
Index_t n_base_pt = 0
Number of base pair types (0: none).
ASE-style 3x3 cell, row-major lattice vectors a, b, c. All zeros is an isolated molecule: Sexpat pair vectors stay on the Cartesian difference. A nonzero cell wraps through the LODE minimage mi_* ABI.
double cell[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0.}
Zero retains the unbounded inverse-distance kernel. Positive values use a C2 switching shell; zero width selects min(1 A, cutoff / 5).
double pair_cutoff_width = 0.0
Active-frozen-set policy (config options; default monotonic radius). evict_frozen returns active atoms that leave actdist_fro to the inactive set (non-monotonic radius window). nn_frozen, when > 0, keeps the nn_frozen frozen atoms nearest the moving atoms (a fixed-size set) and takes precedence over the radius rule.
Index_t nn_frozen = 0
Default policy: after the initial radius activation, fix the active set at that size and maintain it with the nearest-neighbour rule (seeds nn_frozen from the radius-activated count). Set false for the pure radius rule (monotonic, or eviction when evict_frozen). No effect when there are no frozen atoms (the count is zero) or nn_frozen/evict_frozen are set explicitly.
Methods¶
void seedNearestNeighbourFromActive()
Seed the fixed-N nearest-neighbour set from the current active (radius-activated) frozen count. Call once after the initial radius activation. No-op unless nn_auto is set and neither an explicit nn_frozen nor eviction was requested, and when there are no active frozen atoms (molecular systems).
void assignFromField(const FieldMatrixd& field)
Extract data from a 5-column field.