n2p2 - A neural network potential package
|
#include <SymFncStatistics.h>
Classes | |
struct | Container |
Struct containing statistics gathered during symmetry function calculation. More... | |
Public Member Functions | |
SymFncStatistics () | |
Constructor, initializes bool variables. More... | |
void | addValue (std::size_t index, double value) |
Update symmetry function statistics with one value. More... | |
void | addExtrapolationWarning (std::size_t index, std::size_t type, double value, double Gmin, double Gmax, std::string element, std::size_t indexStructure, std::size_t indexAtom) |
Add extrapolation warning entry. More... | |
std::vector< std::string > | getExtrapolationWarningLines () const |
Get lines with extrapolation warnings. More... | |
std::size_t | countExtrapolationWarnings () const |
Count total number of extrapolation warnings. More... | |
void | resetStatistics () |
Reset statistics for all symmetry functions at once. More... | |
void | resetExtrapolationWarnings () |
Reset extrapolation warnings for all symmetry functions at once. More... | |
void | clear () |
Completely erase database. More... | |
Public Attributes | |
bool | collectStatistics |
Whether statistics are gathered. More... | |
bool | collectExtrapolationWarnings |
Whether extrapolation warnings are logged. More... | |
bool | writeExtrapolationWarnings |
Whether to write out extrapolation warnings immediately as they occur. More... | |
bool | stopOnExtrapolationWarnings |
Whether to raise an exception in case of extrapolation warnings. More... | |
std::map< std::size_t, Container > | data |
Map for all symmetry functions containing all gathered information. More... | |
Definition at line 28 of file SymFncStatistics.h.
SymFncStatistics::SymFncStatistics | ( | ) |
Constructor, initializes bool variables.
Defaults are collectStatistics = false
, collectExtrapolationWarnings = false
, writeExtrapolationWarnings = false
, stopOnExtrapolationWarnings = false
.
Definition at line 72 of file SymFncStatistics.cpp.
void SymFncStatistics::addValue | ( | std::size_t | index, |
double | value | ||
) |
Update symmetry function statistics with one value.
[in] | index | Symmetry function index. |
[in] | value | Symmetry function value. |
Definition at line 80 of file SymFncStatistics.cpp.
References data.
Referenced by nnp::Element::updateSymmetryFunctionStatistics().
void SymFncStatistics::addExtrapolationWarning | ( | std::size_t | index, |
std::size_t | type, | ||
double | value, | ||
double | Gmin, | ||
double | Gmax, | ||
std::string | element, | ||
std::size_t | indexStructure, | ||
std::size_t | indexAtom | ||
) |
Add extrapolation warning entry.
[in] | index | Symmetry function index. |
[in] | type | Symmetry function type. |
[in] | value | Unscaled symmetry function value. |
[in] | Gmin | Minimum symmetry function value from scaling data. |
[in] | Gmax | Maximum symmetry function value from scaling data. |
[in] | element | Symmetry function element string. |
[in] | indexStructure | Index of structure of affected atom. |
[in] | indexAtom | Index of affected atom. |
Definition at line 91 of file SymFncStatistics.cpp.
References data.
Referenced by nnp::Element::updateSymmetryFunctionStatistics().
vector< string > SymFncStatistics::getExtrapolationWarningLines | ( | ) | const |
Get lines with extrapolation warnings.
Definition at line 112 of file SymFncStatistics.cpp.
References d, data, and nnp::strpr().
size_t SymFncStatistics::countExtrapolationWarnings | ( | ) | const |
Count total number of extrapolation warnings.
Definition at line 139 of file SymFncStatistics.cpp.
References data.
void SymFncStatistics::resetStatistics | ( | ) |
Reset statistics for all symmetry functions at once.
Definition at line 152 of file SymFncStatistics.cpp.
References data.
Referenced by nnp::SymFncStatistics::Container::reset().
void SymFncStatistics::resetExtrapolationWarnings | ( | ) |
Reset extrapolation warnings for all symmetry functions at once.
Definition at line 163 of file SymFncStatistics.cpp.
References data.
Referenced by nnp::SymFncStatistics::Container::reset().
void SymFncStatistics::clear | ( | ) |
bool nnp::SymFncStatistics::collectStatistics |
Whether statistics are gathered.
Definition at line 81 of file SymFncStatistics.h.
Referenced by nnp::Element::updateSymmetryFunctionStatistics().
bool nnp::SymFncStatistics::collectExtrapolationWarnings |
Whether extrapolation warnings are logged.
Definition at line 83 of file SymFncStatistics.h.
Referenced by nnp::Element::updateSymmetryFunctionStatistics().
bool nnp::SymFncStatistics::writeExtrapolationWarnings |
Whether to write out extrapolation warnings immediately as they occur.
Definition at line 85 of file SymFncStatistics.h.
Referenced by nnp::Element::updateSymmetryFunctionStatistics().
bool nnp::SymFncStatistics::stopOnExtrapolationWarnings |
Whether to raise an exception in case of extrapolation warnings.
Definition at line 87 of file SymFncStatistics.h.
Referenced by nnp::Element::updateSymmetryFunctionStatistics().
std::map<std::size_t, Container> nnp::SymFncStatistics::data |
Map for all symmetry functions containing all gathered information.
Definition at line 89 of file SymFncStatistics.h.
Referenced by addExtrapolationWarning(), addValue(), clear(), countExtrapolationWarnings(), getExtrapolationWarningLines(), resetExtrapolationWarnings(), and resetStatistics().