118 std::string
const& element);
142 std::string>
const& lines);
269 std::string
const& property,
270 std::map<std::string, double>& error,
271 std::size_t& count)
const;
295 std::string
const fileName =
"output.data",
296 bool const ref =
true,
297 bool const append =
false)
const;
305 std::ofstream*
const& file,
306 bool const ref =
true)
const;
320 std::ofstream*
const& file)
const;
327 std::ofstream*
const& file,
328 std::string
const elements)
const;
333 std::vector<std::string>
info()
const;
Storage for a single atom.
Storage for one atomic configuration.
void toPhysicalUnits(double meanEnergy, double convEnergy, double convLength)
Switch to physical units, shift energy and change energy and length unit.
void calculateVolume()
Calculate volume from box vectors.
SampleType
Enumerates different sample types (e.g.
@ ST_VALIDATION
Structure is part of validation set (currently unused).
@ ST_TRAINING
Structure is part of the training set.
@ ST_UNKNOWN
Sample type not assigned yet.
@ ST_TEST
Structure is part of the test set.
Vec3D invbox[3]
Inverse simulation box vectors.
Vec3D box[3]
Simulation box vectors.
bool isTriclinic
If the simulation box is triclinic.
std::size_t getMaxNumNeighbors() const
Find maximum number of neighbors.
std::vector< std::size_t > numAtomsPerElement
Number of atoms of each element in this structure.
void writeToFile(std::string const fileName="output.data", bool const ref=true, bool const append=false) const
Write configuration to file.
std::string comment
Structure comment.
bool isPeriodic
If periodic boundary conditions apply.
double charge
Charge determined by neural network potential.
ElementMap elementMap
Copy of element map provided as constructor argument.
void setElementMap(ElementMap const &elementMap)
Set element map of structure.
std::size_t index
Index number of this structure.
void remap()
Translate all atoms back into box if outside.
std::vector< std::string > getChargesLines() const
Get reference and NN charges for all atoms.
double chargeRef
Reference charge.
SampleType sampleType
Sample type (training or test set).
void addAtom(Atom const &atom, std::string const &element)
Add a single atom to structure.
void calculateInverseBox()
Calculate inverse box.
void writeToFilePoscar(std::ofstream *const &file) const
Write configuration to POSCAR file.
void writeToFileXyz(std::ofstream *const &file) const
Write configuration to xyz file.
bool hasSymmetryFunctionDerivatives
If symmetry function derivatives are saved for each atom.
void calculatePbcCopies(double cutoffRadius)
Calculate required PBC copies.
std::string getEnergyLine() const
Get reference and NN energy.
void freeAtoms(bool all)
Free symmetry function memory for all atoms, see free() in Atom class.
double energy
Potential energy determined by neural network.
void readFromFile(std::string const fileName="input.data")
Read configuration from file.
double energyRef
Reference potential energy.
int pbc[3]
Number of PBC images necessary in each direction.
void reset()
Reset everything but elementMap.
std::vector< std::string > getForcesLines() const
Get reference and NN forces for all atoms.
Structure()
Constructor, initializes to zero.
double volume
Simulation box volume.
void toNormalizedUnits(double meanEnergy, double convEnergy, double convLength)
Normalize structure, shift energy and change energy and length unit.
std::size_t numAtoms
Total number of atoms present in this structure.
std::size_t numElements
Global number of elements (all structures).
void updateError(std::string const &property, std::map< std::string, double > &error, std::size_t &count) const
Update property error metrics with this structure.
void calculateNeighborList(double cutoffRadius)
Calculate neighbor list for all atoms.
std::vector< Atom > atoms
Vector of all atoms in this structure.
std::size_t numElementsPresent
Number of elements present in this structure.
void readFromLines(std::vector< std::string > const &lines)
Read configuration from lines.
bool hasNeighborList
If the neighbor list has been calculated.
void clearNeighborList()
Clear neighbor list of all atoms.
std::vector< std::string > info() const
Get structure information as a vector of strings.
bool hasSymmetryFunctions
If symmetry function values are saved for each atom.
Vector in 3 dimensional real space.