Methods to calculate distances between atoms. More...
#include <gpr/auxiliary/Distance.h>
Public Member Functions | |
| void | clear () |
| bool | matches (const gpr::Coord &x1, const gpr::Coord &x2, const double cell[9]) const |
| Whether the cache describes exactly this pair of coordinate sets. | |
Public Attributes | |
| std::vector< std::vector< double > > | invr_x1 |
| std::vector< std::vector< double > > | invr_x2 |
| std::vector< gpr::Index_t > | pair_types |
| gpr::Coord | x1_cached |
| gpr::Coord | x2_cached |
| double | cell_cached [9] = {0., 0., 0., 0., 0., 0., 0., 0., 0.} |
| Eigen::Index | n1 = 0 |
| Eigen::Index | n2 = 0 |
| Eigen::Index | n_mov = 0 |
| Eigen::Index | n_fro = 0 |
| bool | valid = false |
Methods to calculate distances between atoms.
Cache for raw inverse interatomic distances.
During hyperparameter optimization, atomic positions are fixed while lengthscales change every iteration. This cache stores the position- dependent 1/r_ij values so that dist_at() only needs to recompute the lengthscale-weighted sum on subsequent calls.
Cache layout: invr_x1[pair_idx][n] = 1/r_ij for configuration n in x1 invr_x2[pair_idx][m] = 1/r_ij for configuration m in x2 pair_types[pair_idx] = pairtype index for this atom pair
Moving-moving pairs come first (triangular: j < i), then moving-frozen.
Definition at line 104 of file Distance.h.
|
inline |
Definition at line 121 of file Distance.h.
|
inlinenodiscard |
Whether the cache describes exactly this pair of coordinate sets.
Definition at line 135 of file Distance.h.
| double aux::InverseDistanceCache::cell_cached[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0.} |
Definition at line 116 of file Distance.h.
| std::vector<std::vector<double> > aux::InverseDistanceCache::invr_x1 |
Definition at line 105 of file Distance.h.
| std::vector<std::vector<double> > aux::InverseDistanceCache::invr_x2 |
Definition at line 106 of file Distance.h.
| Eigen::Index aux::InverseDistanceCache::n1 = 0 |
Definition at line 117 of file Distance.h.
| Eigen::Index aux::InverseDistanceCache::n2 = 0 |
Definition at line 117 of file Distance.h.
| Eigen::Index aux::InverseDistanceCache::n_fro = 0 |
Definition at line 118 of file Distance.h.
| Eigen::Index aux::InverseDistanceCache::n_mov = 0 |
Definition at line 118 of file Distance.h.
| std::vector<gpr::Index_t> aux::InverseDistanceCache::pair_types |
Definition at line 107 of file Distance.h.
| bool aux::InverseDistanceCache::valid = false |
Definition at line 119 of file Distance.h.
| gpr::Coord aux::InverseDistanceCache::x1_cached |
Definition at line 114 of file Distance.h.
| gpr::Coord aux::InverseDistanceCache::x2_cached |
Definition at line 115 of file Distance.h.