46#ifndef N2P2_NO_SF_CACHE
86 std::vector<std::string>
info()
const;
129#ifndef N2P2_NO_SF_CACHE
134 std::vector<double>
G;
139#ifdef N2P2_FULL_SFD_MEMORY
142 std::vector<double> dGdxia;
153#ifdef N2P2_FULL_SFD_MEMORY
171 void collectDGdxia(std::size_t indexAtom,
172 std::size_t indexComponent);
237 std::string
const& property,
238 std::map<std::string, double>& error,
239 std::size_t& count)
const;
255 std::vector<std::string>
info()
const;
260 return !((*this) == rhs);
265 return rhs < (*this);
270 return !((*this) > rhs);
275 return !((*this) < rhs);
Struct to store information on neighbor atoms.
bool operator!=(Neighbor const &rhs) const
Overload != operator.
Neighbor()
Neighbor constructor, initialize to zero.
std::size_t index
Index of neighbor atom.
std::vector< double > cache
Symmetry function cache (e.g. for cutoffs, compact functions).
std::size_t element
Element index of neighbor atom.
double d
Distance to neighbor atom.
Vec3D dr
Distance vector to neighbor atom.
bool operator>=(Neighbor const &rhs) const
Overload >= operator.
bool operator==(Neighbor const &rhs) const
Overload == operator.
bool operator<=(Neighbor const &rhs) const
Overload <= operator.
int64_t tag
Tag of neighbor atom.
std::vector< std::string > info() const
Get atom information as a vector of strings.
std::vector< Vec3D > dGdr
Derivatives of symmetry functions with respect to neighbor coordinates.
bool operator<(Neighbor const &rhs) const
Overload < operator.
bool operator>(Neighbor const &rhs) const
Overload > operator.
Storage for a single atom.
std::vector< Neighbor > neighbors
Neighbor array (maximum number defined in macros.h.
std::vector< std::string > info() const
Get atom information as a vector of strings.
std::size_t numSymmetryFunctions
Number of symmetry functions used to describe the atom environment.
void clearNeighborList(std::size_t const numElements)
Clear neighbor list and change number of elements.
Vec3D r
Cartesian coordinates.
std::vector< double > dEdG
Derivative of atomic energy with respect to symmetry functions.
Vec3D f
Force vector calculated by neural network.
bool hasSymmetryFunctionDerivatives
If symmetry function derivatives are saved for this atom.
std::vector< double > dQdG
Derivative of atomic charge with respect to symmetry functions.
double charge
Atomic charge determined by neural network.
void allocate(bool all)
Allocate vectors related to symmetry functions (G, dEdG).
std::size_t index
Index number of this atom.
std::vector< std::size_t > numSymmetryFunctionDerivatives
Number of neighbor atom symmetry function derivatives per element.
Vec3D fRef
Reference force vector from data set.
bool useChargeNeuron
If an additional charge neuron in the short-range NN is present.
std::vector< Vec3D > dGdr
Derivative of symmetry functions with respect to this atom's coordinates.
void toPhysicalUnits(double convEnergy, double convLength)
Switch to physical length and energy units.
void clearNeighborList()
Clear neighbor list.
std::size_t indexStructure
Index number of structure this atom belongs to.
int64_t tag
Tag number of this atom.
std::size_t element
Element index of this atom.
bool hasSymmetryFunctions
If symmetry function values are saved for this atom.
void updateError(std::string const &property, std::map< std::string, double > &error, std::size_t &count) const
Update property error metrics with data from this atom.
std::vector< std::size_t > cacheSizePerElement
Cache size for each element.
Atom()
Atom constructor, initialize to zero.
void toNormalizedUnits(double convEnergy, double convLength)
Switch to normalized length and energy units.
bool hasNeighborList
If the neighbor list has been calculated for this atom.
double energy
Atomic energy determined by neural network.
std::vector< double > G
Symmetry function values.
std::vector< std::size_t > neighborsUnique
List of unique neighbor indices (don't count multiple PBC images).
double chargeRef
Atomic reference charge.
std::vector< std::size_t > numNeighborsPerElement
Number of neighbors per element.
std::vector< std::string > getForcesLines() const
Get reference and NN forces for this atoms.
std::string getChargeLine() const
Get reference and NN charge for this atoms.
std::size_t numNeighborsUnique
Number of unique neighbor indices (don't count multiple PBC images).
std::size_t getNumNeighbors(double cutoffRadius) const
Calculate number of neighbors for a given cutoff radius.
void free(bool all)
Free vectors related to symmetry functions, opposite of allocate().
std::size_t numNeighbors
Total number of neighbors.
Vector in 3 dimensional real space.