n2p2 - A neural network potential package
|
Base class for all NNP applications. More...
#include <Mode.h>
Classes | |
struct | NNSetup |
Setup data for one neural network. More... | |
Public Types | |
enum class | NNPType { HDNNP_2G = 2 , HDNNP_4G = 4 , HDNNP_Q = 10 } |
Public Member Functions | |
Mode () | |
void | initialize () |
Write welcome message with version information. More... | |
void | loadSettingsFile (std::string const &fileName="input.nn") |
Open settings file and load all keywords into memory. More... | |
void | setupGeneric (std::string const &nnpDir="", bool skipNormalize=false, bool initialHardness=false) |
Combine multiple setup routines and provide a basic NNP setup. More... | |
void | setupNormalization (bool standalone=true) |
Set up normalization. More... | |
virtual void | setupElementMap () |
Set up the element map. More... | |
virtual void | setupElements () |
Set up all Element instances. More... | |
void | setupCutoff () |
Set up cutoff function for all symmetry functions. More... | |
virtual void | setupSymmetryFunctions () |
Set up all symmetry functions. More... | |
void | setupSymmetryFunctionScalingNone () |
Set up "empy" symmetry function scaling. More... | |
virtual void | setupSymmetryFunctionScaling (std::string const &fileName="scaling.data") |
Set up symmetry function scaling from file. More... | |
virtual void | setupSymmetryFunctionGroups () |
Set up symmetry function groups. More... | |
virtual void | setupSymmetryFunctionCache (bool verbose=false) |
Set up symmetry function cache. More... | |
void | setupSymmetryFunctionMemory (bool verbose=false) |
Extract required memory dimensions for symmetry function derivatives. More... | |
void | setupSymmetryFunctionStatistics (bool collectStatistics, bool collectExtrapolationWarnings, bool writeExtrapolationWarnings, bool stopOnExtrapolationWarnings) |
Set up symmetry function statistics collection. More... | |
void | setupCutoffMatrix () |
Setup matrix storing all symmetry function cut-offs for each element. More... | |
virtual void | setupNeuralNetwork () |
Set up neural networks for all elements. More... | |
virtual void | setupNeuralNetworkWeights (std::map< std::string, std::string > fileNameFormats=std::map< std::string, std::string >()) |
Set up neural network weights from files with given name format. More... | |
virtual void | setupNeuralNetworkWeights (std::string directoryPrefix, std::map< std::string, std::string > fileNameFormats=std::map< std::string, std::string >()) |
Set up neural network weights from files with given name format. More... | |
virtual void | setupElectrostatics (bool initialHardness=false, std::string directoryPrefix="", std::string fileNameFormat="hardness.%03zu.data") |
Set up electrostatics related stuff (hardness, screening, ...). More... | |
void | calculateSymmetryFunctions (Structure &structure, bool const derivatives) |
Calculate all symmetry functions for all atoms in given structure. More... | |
void | calculateSymmetryFunctionGroups (Structure &structure, bool const derivatives) |
Calculate all symmetry function groups for all atoms in given structure. More... | |
void | calculateAtomicNeuralNetworks (Structure &structure, bool const derivatives, std::string id="") |
Calculate atomic neural networks for all atoms in given structure. More... | |
void | chargeEquilibration (Structure &structure, bool const derivativesElec) |
Perform global charge equilibration method. More... | |
void | calculateEnergy (Structure &structure) const |
Calculate potential energy for a given structure. More... | |
void | calculateCharge (Structure &structure) const |
Calculate total charge for a given structure. More... | |
void | calculateForces (Structure &structure) const |
Calculate forces for all atoms in given structure. More... | |
void | evaluateNNP (Structure &structure, bool useForces=true, bool useDEdG=true) |
Evaluate neural network potential (includes total energy, optionally forces and in some cases charges. More... | |
void | addEnergyOffset (Structure &structure, bool ref=true) |
Add atomic energy offsets to reference energy. More... | |
void | removeEnergyOffset (Structure &structure, bool ref=true) |
Remove atomic energy offsets from reference energy. More... | |
double | getEnergyOffset (Structure const &structure) const |
Get atomic energy offset for given structure. More... | |
double | getEnergyWithOffset (Structure const &structure, bool ref=true) const |
Add atomic energy offsets and return energy. More... | |
double | normalized (std::string const &property, double value) const |
Apply normalization to given property. More... | |
double | normalizedEnergy (Structure const &structure, bool ref=true) const |
Apply normalization to given energy of structure. More... | |
double | physical (std::string const &property, double value) const |
Undo normalization for a given property. More... | |
double | physicalEnergy (Structure const &structure, bool ref=true) const |
Undo normalization for a given energy of structure. More... | |
void | convertToNormalizedUnits (Structure &structure) const |
Convert one structure to normalized units. More... | |
void | convertToPhysicalUnits (Structure &structure) const |
Convert one structure to physical units. More... | |
void | logEwaldCutoffs () |
Logs Ewald params whenever they change. More... | |
std::size_t | getNumExtrapolationWarnings () const |
Count total number of extrapolation warnings encountered for all elements and symmetry functions. More... | |
void | resetExtrapolationWarnings () |
Erase all extrapolation warnings and reset counters. More... | |
NNPType | getNnpType () const |
Getter for Mode::nnpType. More... | |
double | getMeanEnergy () const |
Getter for Mode::meanEnergy. More... | |
double | getConvEnergy () const |
Getter for Mode::convEnergy. More... | |
double | getConvLength () const |
Getter for Mode::convLength. More... | |
double | getConvCharge () const |
Getter for Mode::convCharge. More... | |
double | getMaxCutoffRadius () const |
Getter for Mode::maxCutoffRadius. More... | |
std::size_t | getNumElements () const |
Getter for Mode::numElements. More... | |
std::vector< std::size_t > | getNumSymmetryFunctions () const |
Get number of symmetry functions per element. More... | |
bool | useNormalization () const |
Check if normalization is enabled. More... | |
bool | settingsKeywordExists (std::string const &keyword) const |
Check if keyword was found in settings file. More... | |
std::string | settingsGetValue (std::string const &keyword) const |
Get value for given keyword in Settings instance. More... | |
std::vector< std::size_t > | pruneSymmetryFunctionsRange (double threshold) |
Prune symmetry functions according to their range and write settings file. More... | |
std::vector< std::size_t > | pruneSymmetryFunctionsSensitivity (double threshold, std::vector< std::vector< double > > sensitivity) |
Prune symmetry functions with sensitivity analysis data. More... | |
void | writePrunedSettingsFile (std::vector< std::size_t > prune, std::string fileName="output.nn") const |
Copy settings file but comment out lines provided. More... | |
void | writeSettingsFile (std::ofstream *const &file) const |
Write complete settings file. More... | |
Public Attributes | |
ElementMap | elementMap |
Global element map, populated by setupElementMap(). More... | |
Log | log |
Global log file. More... | |
Protected Member Functions | |
void | readNeuralNetworkWeights (std::string const &id, std::string const &fileName) |
Read in weights for a specific type of neural network. More... | |
Protected Attributes | |
NNPType | nnpType |
bool | normalize |
bool | checkExtrapolationWarnings |
std::size_t | numElements |
std::vector< std::size_t > | minNeighbors |
std::vector< double > | minCutoffRadius |
double | maxCutoffRadius |
double | cutoffAlpha |
double | meanEnergy |
double | convEnergy |
double | convLength |
double | convCharge |
double | fourPiEps |
EwaldSetup | ewaldSetup |
settings::Settings | settings |
SymFnc::ScalingType | scalingType |
CutoffFunction::CutoffType | cutoffType |
ScreeningFunction | screeningFunction |
std::vector< Element > | elements |
std::vector< std::string > | nnk |
std::map< std::string, NNSetup > | nns |
std::vector< std::vector< double > > | cutoffs |
Matrix storing all symmetry function cut-offs for all elements. More... | |
ErfcBuf | erfcBuf |
Base class for all NNP applications.
This top-level class is the anchor point for existing and future applications. It contains functions to set up an existing neural network potential and calculate energies and forces for configurations given as Structure. A minimal setup requires some consecutive functions calls as this minimal example shows:
To load weights and scaling information from files add these lines:
The NNP is now ready! If we load a structure from a data file:
we can finally predict the energy and forces from the neural network potential:
The resulting potential energy is stored in Structure::energy, the forces on individual atoms are located within the Structure::atoms vector in Atom::f.
|
strong |
Definition at line 89 of file Mode.h.
Mode::Mode | ( | ) |
Definition at line 40 of file Mode.cpp.
void Mode::initialize | ( | ) |
Write welcome message with version information.
Definition at line 55 of file Mode.cpp.
References log, N2P2_GIT_BRANCH, N2P2_GIT_REV, N2P2_GIT_VERSION, and N2P2_VERSION.
Referenced by nnp::InterfaceLammps::initialize(), main(), and nnp::Prediction::setup().
void Mode::loadSettingsFile | ( | std::string const & | fileName = "input.nn" | ) |
Open settings file and load all keywords into memory.
[in] | fileName | Settings file name. |
Definition at line 161 of file Mode.cpp.
References HDNNP_2G, HDNNP_4G, HDNNP_Q, nnp::settings::Settings::info(), nnp::settings::Settings::keywordExists(), nnp::settings::Settings::loadFile(), log, nnpType, settings, and nnp::strpr().
Referenced by nnp::InterfaceLammps::initialize(), main(), and nnp::Prediction::setup().
void Mode::setupGeneric | ( | std::string const & | nnpDir = "" , |
bool | skipNormalize = false , |
||
bool | initialHardness = false |
||
) |
Combine multiple setup routines and provide a basic NNP setup.
[in] | nnpDir | Optional directory where NNP files reside. |
[in] | skipNormalize | Whether to skip normalization setup. |
[in] | initialHardness | Signalizes to use initial hardness in NN settings. |
Sets up elements, symmetry functions, symmetry function groups, neural networks. No symmetry function scaling data is read, no weights are set.
Definition at line 212 of file Mode.cpp.
References HDNNP_4G, nnpType, setupCutoff(), setupCutoffMatrix(), setupElectrostatics(), setupElementMap(), setupElements(), setupNeuralNetwork(), setupNormalization(), setupSymmetryFunctionCache(), setupSymmetryFunctionGroups(), setupSymmetryFunctionMemory(), and setupSymmetryFunctions().
Referenced by nnp::InterfaceLammps::initialize(), main(), and nnp::Prediction::setup().
void Mode::setupNormalization | ( | bool | standalone = true | ) |
Set up normalization.
[in] | standalone | Whether to write section header and footer. |
If the keywords mean_energy
, conv_length
and conv_length
are present, the provided conversion factors are used to internally use a different unit system.
Definition at line 238 of file Mode.cpp.
References convCharge, convEnergy, convLength, nnp::settings::Settings::keywordExists(), log, meanEnergy, normalize, settings, and nnp::strpr().
Referenced by nnp::Training::dataSetNormalization(), and setupGeneric().
|
virtual |
Set up the element map.
Uses keyword elements
. This function should follow immediately after settings are loaded via loadSettingsFile().
Reimplemented in nnp::ModeCabana< t_device >.
Definition at line 301 of file Mode.cpp.
References nnp::ElementMap::atomicNumber(), elementMap, log, nnp::ElementMap::registerElements(), settings, nnp::ElementMap::size(), and nnp::strpr().
Referenced by main(), and setupGeneric().
|
virtual |
Set up all Element instances.
Uses keywords number_of_elements
and atom_energy
. This function should follow immediately after setupElementMap().
Reimplemented in nnp::ModeCabana< t_device >.
Definition at line 322 of file Mode.cpp.
References elementMap, elements, nnp::settings::Settings::getValues(), nnp::settings::Settings::keywordExists(), log, numElements, nnp::reduce(), settings, nnp::ElementMap::size(), nnp::split(), and nnp::strpr().
Referenced by main(), and setupGeneric().
void Mode::setupCutoff | ( | ) |
Set up cutoff function for all symmetry functions.
Uses keyword cutoff_type
. Cutoff parameters are read from settings keywords and stored internally. As soon as setupSymmetryFunctions() is called the settings are restored and used for all symmetry functions. Thus, this function must be called before setupSymmetryFunctions().
Definition at line 520 of file Mode.cpp.
References nnp::CutoffFunction::CT_COS, nnp::CutoffFunction::CT_EXP, nnp::CutoffFunction::CT_HARD, nnp::CutoffFunction::CT_POLY1, nnp::CutoffFunction::CT_POLY2, nnp::CutoffFunction::CT_POLY3, nnp::CutoffFunction::CT_POLY4, nnp::CutoffFunction::CT_TANH, nnp::CutoffFunction::CT_TANHU, cutoffAlpha, cutoffType, log, settings, nnp::split(), and nnp::strpr().
Referenced by main(), and setupGeneric().
|
virtual |
Set up all symmetry functions.
Uses keyword symfunction_short
. Reads all symmetry functions from settings and automatically assigns them to the correct element.
Reimplemented in nnp::ModeCabana< t_device >.
Definition at line 615 of file Mode.cpp.
References convLength, cutoffAlpha, cutoffType, elementMap, elements, nnp::settings::Settings::getValues(), log, maxCutoffRadius, minCutoffRadius, minNeighbors, normalize, numElements, nnp::reduce(), settings, nnp::split(), and nnp::strpr().
Referenced by nnp::Training::dataSetNormalization(), main(), and setupGeneric().
void Mode::setupSymmetryFunctionScalingNone | ( | ) |
Set up "empy" symmetry function scaling.
Does not use any keywords. Sets no scaling for all symmetry functions. Call after setupSymmetryFunctions(). Alternatively set scaling via setupSymmetryFunctionScaling().
Definition at line 692 of file Mode.cpp.
Referenced by main().
|
virtual |
Set up symmetry function scaling from file.
[in] | fileName | Scaling file name. |
Uses keywords scale_symmetry_functions
, center_symmetry_functions
, scale_symmetry_functions_sigma
, scale_min_short
and scale_max_short
. Reads in scaling information and sets correct scaling behavior for all symmetry functions. Call after setupSymmetryFunctions().
Reimplemented in nnp::ModeCabana< t_device >.
Definition at line 712 of file Mode.cpp.
References elements, nnp::settings::Settings::keywordExists(), log, scalingType, settings, nnp::SymFnc::ST_CENTER, nnp::SymFnc::ST_NONE, nnp::SymFnc::ST_SCALE, nnp::SymFnc::ST_SCALECENTER, nnp::SymFnc::ST_SCALESIGMA, and nnp::strpr().
Referenced by nnp::Training::dataSetNormalization(), nnp::InterfaceLammps::initialize(), main(), and nnp::Prediction::setup().
|
virtual |
Set up symmetry function groups.
Does not use any keywords. Call after setupSymmetryFunctions() and ensure that correct scaling behavior has already been set.
Reimplemented in nnp::ModeCabana< t_device >.
Definition at line 842 of file Mode.cpp.
References elements, log, and nnp::strpr().
Referenced by nnp::Training::dataSetNormalization(), and setupGeneric().
|
virtual |
Set up symmetry function cache.
[in] | verbose | If true, print more cache information. |
Searches symmetry functions for identical cutoff functions or compact function (i.e. all cachable stuff) and sets up a caching index.
Definition at line 984 of file Mode.cpp.
References elementMap, elements, nnp::SymFnc::getCacheIdentifiers(), nnp::SymFnc::getIndex(), nnp::Element::getSymbol(), nnp::Element::getSymmetryFunction(), log, numElements, nnp::Element::numSymmetryFunctions(), nnp::Element::setCacheIndices(), nnp::split(), and nnp::strpr().
Referenced by nnp::Training::dataSetNormalization(), and setupGeneric().
void Mode::setupSymmetryFunctionMemory | ( | bool | verbose = false | ) |
Extract required memory dimensions for symmetry function derivatives.
[in] | verbose | If true, print all symmetry function lines. |
Call after symmetry functions have been set up and sorted.
Definition at line 894 of file Mode.cpp.
References elementMap, elements, nnp::SymFnc::getIndex(), nnp::SymFnc::getIndexPerElement(), log, numElements, nnp::SymFnc::parameterLine(), and nnp::strpr().
Referenced by nnp::Training::dataSetNormalization(), and setupGeneric().
void Mode::setupSymmetryFunctionStatistics | ( | bool | collectStatistics, |
bool | collectExtrapolationWarnings, | ||
bool | writeExtrapolationWarnings, | ||
bool | stopOnExtrapolationWarnings | ||
) |
Set up symmetry function statistics collection.
[in] | collectStatistics | Whether statistics (min, max, mean, sigma) is collected. |
[in] | collectExtrapolationWarnings | Whether extrapolation warnings are logged. |
[in] | writeExtrapolationWarnings | Write extrapolation warnings immediately when they occur. |
[in] | stopOnExtrapolationWarnings | Throw error immediately when an extrapolation warning occurs. |
Does not use any keywords. Calling this setup function is not required, by default no statistics collection is enabled (all arguments false
). Call after setupElements().
Definition at line 1103 of file Mode.cpp.
References checkExtrapolationWarnings, elements, log, and nnp::strpr().
Referenced by nnp::Training::dataSetNormalization(), nnp::InterfaceLammps::initialize(), main(), and nnp::Prediction::setup().
void Mode::setupCutoffMatrix | ( | ) |
Setup matrix storing all symmetry function cut-offs for each element.
Definition at line 1143 of file Mode.cpp.
References cutoffs, elements, nnp::ScreeningFunction::getOuter(), numElements, screeningFunction, and nnp::vectorContains().
Referenced by setupGeneric().
|
virtual |
Set up neural networks for all elements.
Uses keywords global_hidden_layers_short
, global_nodes_short
, global_activation_short
, normalize_nodes
. Call after setupSymmetryFunctions(), only then the number of input layer neurons is known.
Reimplemented in nnp::ModeCabana< t_device >.
Definition at line 1158 of file Mode.cpp.
References nnp::activationFromString(), nnp::Mode::NNSetup::Topology::activationFunctionsPerLayer, nnp::NeuralNetwork::AF_IDENTITY, nnp::NeuralNetwork::AF_UNSET, elementMap, elements, nnp::Element::getSymbol(), nnp::settings::Settings::getValues(), HDNNP_2G, HDNNP_4G, HDNNP_Q, nnp::Mode::NNSetup::id, nnp::settings::Settings::keywordExists(), nnp::Mode::NNSetup::keywordSuffix, log, nnp::Element::neuralNetworks, nnk, nnpType, nns, numElements, nnp::Mode::NNSetup::Topology::numLayers, nnp::Mode::NNSetup::Topology::numNeuronsPerLayer, nnp::reduce(), settings, nnp::ElementMap::size(), nnp::split(), nnp::strpr(), and nnp::Mode::NNSetup::topology.
Referenced by setupGeneric().
|
virtual |
Set up neural network weights from files with given name format.
[in] | fileNameFormats | Map of NN ids to format for weight file names. Must contain a placeholder "%zu" for the element atomic number. Map keys are "short", "elec". Map argument may be ommitted, then default name formats are used. |
Does not use any keywords. The weight files should contain one weight per line, see NeuralNetwork::setConnections() for the correct order.
Definition at line 1445 of file Mode.cpp.
References setupNeuralNetworkWeights().
Referenced by nnp::InterfaceLammps::initialize(), main(), nnp::Prediction::setup(), and setupNeuralNetworkWeights().
|
virtual |
Set up neural network weights from files with given name format.
[in] | directoryPrefix | Directory prefix which is applied to all fileNameFormats. |
[in] | fileNameFormats | Map of NN ids to format for weight file names. Must contain a placeholder "%zu" for the element atomic number. Map keys are "short", "elec". Map argument may be ommitted, then default name formats are used. |
Does not use any keywords. The weight files should contain one weight per line, see NeuralNetwork::setConnections() for the correct order.
Definition at line 1451 of file Mode.cpp.
References nnp::cap(), log, nnk, nns, readNeuralNetworkWeights(), and nnp::strpr().
|
virtual |
Set up electrostatics related stuff (hardness, screening, ...).
[in] | initialHardness | Use initial hardness from keyword in settings file (useful for training). |
[in] | directoryPrefix | Directory prefix which is applied to fileNameFormat. |
[in] | fileNameFormat | Name format of file containing atomic hardness data. |
Definition at line 368 of file Mode.cpp.
References nnp::ScreeningFunction::changeLengthUnits(), convCharge, convEnergy, convLength, elementMap, elements, ewaldSetup, fourPiEps, nnp::EwaldSetup::getMaxCharge(), nnp::EwaldSetup::getPrecision(), nnp::EwaldSetup::getTruncMethod(), nnp::settings::Settings::getValues(), nnp::ScreeningFunction::info(), nnp::JACKSON_CATLOW, nnp::settings::Settings::keywordExists(), nnp::KOLAFA_PERRAM, log, normalize, normalized(), numElements, physical(), nnp::readColumnsFromFile(), nnp::EwaldSetup::readFromArgs(), nnp::reduce(), screeningFunction, nnp::ScreeningFunction::setCoreFunction(), nnp::ScreeningFunction::setInnerOuter(), nnp::EwaldSetup::setMaxQSigma(), settings, nnp::EwaldSetup::setTruncMethod(), nnp::ElementMap::size(), nnp::split(), nnp::strpr(), and nnp::EwaldSetup::toNormalizedUnits().
Referenced by setupGeneric().
void Mode::calculateSymmetryFunctions | ( | Structure & | structure, |
bool const | derivatives | ||
) |
Calculate all symmetry functions for all atoms in given structure.
[in] | structure | Input structure. |
[in] | derivatives | If true calculate also derivatives of symmetry functions. |
This function should be replaced by calculateSymmetryFunctionGroups() whenever possible. Results are stored in Atom::G. If derivatives are calculated, additional results are stored in Atom::dGdr and Atom::Neighbor::dGdr.
Definition at line 1480 of file Mode.cpp.
References nnp::Atom::allocate(), nnp::Structure::atoms, nnp::Atom::cacheSizePerElement, nnp::Atom::calculateNumNeighbors(), nnp::Element::calculateSymmetryFunctions(), checkExtrapolationWarnings, nnp::Atom::element, elements, nnp::Element::getCacheSizes(), nnp::Element::getIndex(), nnp::Element::getSymmetryFunctionNumTable(), nnp::Atom::hasSymmetryFunctionDerivatives, nnp::Structure::hasSymmetryFunctionDerivatives, nnp::Atom::hasSymmetryFunctions, nnp::Structure::hasSymmetryFunctions, HDNNP_4G, HDNNP_Q, nnp::Atom::index, nnp::Atom::indexStructure, log, maxCutoffRadius, minCutoffRadius, minNeighbors, nnpType, nnp::Atom::numSymmetryFunctionDerivatives, nnp::Atom::numSymmetryFunctions, nnp::Element::numSymmetryFunctions(), nnp::strpr(), nnp::Element::updateSymmetryFunctionStatistics(), and nnp::Atom::useChargeNeuron.
Referenced by nnp::Training::calculateError(), nnp::Training::calculateWeightDerivatives(), nnp::Training::dataSetNormalization(), evaluateNNP(), main(), nnp::InterfaceLammps::process(), and nnp::Training::update().
void Mode::calculateSymmetryFunctionGroups | ( | Structure & | structure, |
bool const | derivatives | ||
) |
Calculate all symmetry function groups for all atoms in given structure.
[in] | structure | Input structure. |
[in] | derivatives | If true calculate also derivatives of symmetry functions. |
This function replaces calculateSymmetryFunctions() when symmetry function groups are enabled (faster, default behavior). Results are stored in Atom::G. If derivatives are calculated, additional results are stored in Atom::dGdr and Atom::Neighbor::dGdr.
Definition at line 1561 of file Mode.cpp.
References nnp::Atom::allocate(), nnp::Structure::atoms, nnp::Atom::cacheSizePerElement, nnp::Atom::calculateNumNeighbors(), nnp::Element::calculateSymmetryFunctionGroups(), checkExtrapolationWarnings, nnp::Atom::element, elements, nnp::Element::getCacheSizes(), nnp::Element::getIndex(), nnp::Element::getSymmetryFunctionNumTable(), nnp::Atom::hasSymmetryFunctionDerivatives, nnp::Structure::hasSymmetryFunctionDerivatives, nnp::Atom::hasSymmetryFunctions, nnp::Structure::hasSymmetryFunctions, HDNNP_4G, HDNNP_Q, nnp::Atom::index, nnp::Atom::indexStructure, log, maxCutoffRadius, minCutoffRadius, minNeighbors, nnpType, nnp::Atom::numSymmetryFunctionDerivatives, nnp::Atom::numSymmetryFunctions, nnp::Element::numSymmetryFunctions(), nnp::strpr(), nnp::Element::updateSymmetryFunctionStatistics(), and nnp::Atom::useChargeNeuron.
Referenced by nnp::Training::calculateError(), nnp::Training::calculateWeightDerivatives(), nnp::Training::dataSetNormalization(), evaluateNNP(), main(), nnp::InterfaceLammps::process(), and nnp::Training::update().
void Mode::calculateAtomicNeuralNetworks | ( | Structure & | structure, |
bool const | derivatives, | ||
std::string | id = "" |
||
) |
Calculate atomic neural networks for all atoms in given structure.
[in] | structure | Input structure. |
[in] | derivatives | If true calculate also derivatives of neural networks with respect to input layer neurons (required for force calculation). |
[in] | id | Neural network ID to use. If empty, the first entry nnk.front() is used. |
Definition at line 1642 of file Mode.cpp.
References nnp::Structure::atoms, nnp::NeuralNetwork::calculateDEdG(), elements, nnp::NeuralNetwork::getOutput(), HDNNP_2G, HDNNP_4G, HDNNP_Q, nnk, nnpType, normalize, normalized(), nnp::NeuralNetwork::propagate(), and nnp::NeuralNetwork::setInput().
Referenced by nnp::Training::calculateError(), nnp::Training::dataSetNormalization(), nnp::Training::dPdcN(), evaluateNNP(), main(), nnp::InterfaceLammps::process(), and nnp::Training::update().
void Mode::chargeEquilibration | ( | Structure & | structure, |
bool const | derivativesElec | ||
) |
Perform global charge equilibration method.
[in] | structure | Input structure. |
[in] | derivativesElec | Turn on/off calculation of dElecdQ and pElecpr (Typically needed for elecstrosttic forces). |
Definition at line 1754 of file Mode.cpp.
References nnp::Structure::calculateDAdrQ(), nnp::Structure::calculateElectrostaticEnergy(), nnp::Structure::calculateElectrostaticEnergyDerivatives(), elements, erfcBuf, ewaldSetup, fourPiEps, numElements, and screeningFunction.
Referenced by nnp::Training::calculateError(), evaluateNNP(), nnp::InterfaceLammps::process(), and nnp::Training::update().
void Mode::calculateEnergy | ( | Structure & | structure | ) | const |
Calculate potential energy for a given structure.
[in] | structure | Input structure. |
Sum up potential energy from atomic energy contributions. Result is stored in Structure::energy.
Definition at line 1803 of file Mode.cpp.
References nnp::Structure::atoms, nnp::Structure::energy, nnp::Structure::energyElec, and nnp::Structure::energyShort.
Referenced by nnp::Training::calculateError(), nnp::Training::dataSetNormalization(), nnp::Training::dPdcN(), evaluateNNP(), main(), nnp::InterfaceLammps::process(), and nnp::Training::update().
void Mode::calculateCharge | ( | Structure & | structure | ) | const |
Calculate total charge for a given structure.
[in] | structure | Input structure. |
Sum up charge from atomic charge contributions. Result is stored in Structure::charge.
Definition at line 1830 of file Mode.cpp.
References nnp::Structure::atoms, and nnp::Structure::charge.
Referenced by evaluateNNP(), and nnp::InterfaceLammps::process().
void Mode::calculateForces | ( | Structure & | structure | ) | const |
Calculate forces for all atoms in given structure.
[in] | structure | Input structure. |
Combine intermediate results from symmetry function and neural network computation to atomic forces. Results are stored in Atom::f.
Definition at line 1849 of file Mode.cpp.
References nnp::Structure::atoms, nnp::Atom::calculateDChidr(), nnp::Structure::calculateForceLambdaElec(), nnp::Structure::calculateForceLambdaTotal(), nnp::Atom::calculatePairForceShort(), nnp::Atom::calculateSelfForceShort(), nnp::Atom::element, elements, nnp::Atom::f, nnp::Atom::getStoredMinNumNeighbors(), HDNNP_4G, HDNNP_Q, nnp::Atom::Neighbor::index, nnp::Atom::index, maxCutoffRadius, nnp::Atom::neighbors, nnp::Atom::neighborsUnique, nnpType, and nnp::Structure::numAtoms.
Referenced by nnp::Training::calculateError(), nnp::Training::dataSetNormalization(), nnp::Training::dPdcN(), evaluateNNP(), main(), and nnp::Training::update().
void Mode::evaluateNNP | ( | Structure & | structure, |
bool | useForces = true , |
||
bool | useDEdG = true |
||
) |
Evaluate neural network potential (includes total energy, optionally forces and in some cases charges.
[in] | structure | Input structure. |
[in] | useForces | If true, calculate forces too. |
[in] | useDEdG | If true, calculate dE/dG too. |
Definition at line 1967 of file Mode.cpp.
References nnp::Structure::atoms, calculateAtomicNeuralNetworks(), calculateCharge(), calculateEnergy(), calculateForces(), nnp::Structure::calculateMaxCutoffRadiusOverall(), nnp::Structure::calculateNeighborList(), calculateSymmetryFunctionGroups(), calculateSymmetryFunctions(), chargeEquilibration(), cutoffs, ewaldSetup, nnp::ScreeningFunction::getOuter(), HDNNP_4G, HDNNP_Q, maxCutoffRadius, nnpType, and screeningFunction.
Referenced by main(), and nnp::Prediction::predict().
void Mode::addEnergyOffset | ( | Structure & | structure, |
bool | ref = true |
||
) |
Add atomic energy offsets to reference energy.
[in] | structure | Input structure. |
[in] | ref | If true, use reference energy, otherwise use NN energy. |
Definition at line 2018 of file Mode.cpp.
References elements, nnp::Structure::energy, nnp::Structure::energyRef, nnp::Structure::numAtomsPerElement, and numElements.
Referenced by main(), nnp::Prediction::predict(), nnp::InterfaceLammps::process(), and nnp::Training::writeSetsToFiles().
void Mode::removeEnergyOffset | ( | Structure & | structure, |
bool | ref = true |
||
) |
Remove atomic energy offsets from reference energy.
[in] | structure | Input structure. |
[in] | ref | If true, use reference energy, otherwise use NN energy. |
This function should be called immediately after structures are read in.
Definition at line 2037 of file Mode.cpp.
References elements, nnp::Structure::energy, nnp::Structure::energyRef, nnp::Structure::numAtomsPerElement, and numElements.
Referenced by nnp::Dataset::distributeStructures(), nnp::Prediction::readStructureFromFile(), and nnp::Training::writeSetsToFiles().
double Mode::getEnergyOffset | ( | Structure const & | structure | ) | const |
Get atomic energy offset for given structure.
[in] | structure | Input structure. |
Definition at line 2056 of file Mode.cpp.
References elements, nnp::Structure::numAtomsPerElement, and numElements.
Referenced by main(), and nnp::Dataset::writeSymmetryFunctionFile().
double Mode::getEnergyWithOffset | ( | Structure const & | structure, |
bool | ref = true |
||
) | const |
Add atomic energy offsets and return energy.
[in] | structure | Input structure. |
[in] | ref | If true, use reference energy, otherwise use NN energy. |
Definition at line 2069 of file Mode.cpp.
References elements, nnp::Structure::energy, nnp::Structure::energyRef, nnp::Structure::numAtomsPerElement, and numElements.
Referenced by nnp::Training::dataSetNormalization(), and main().
double Mode::normalized | ( | std::string const & | property, |
double | value | ||
) | const |
Apply normalization to given property.
[in] | property | One of "energy", "force", "charge", "hardness" "negativity". |
[in] | value | Input property value in physical units. |
Definition at line 2084 of file Mode.cpp.
References convCharge, convEnergy, and convLength.
Referenced by calculateAtomicNeuralNetworks(), setupElectrostatics(), and nnp::Training::update().
double Mode::normalizedEnergy | ( | Structure const & | structure, |
bool | ref = true |
||
) | const |
Apply normalization to given energy of structure.
[in] | structure | Input structure with energy in physical units. |
[in] | ref | If true, use reference energy, otherwise use NN energy. |
Definition at line 2096 of file Mode.cpp.
References convEnergy, nnp::Structure::energy, nnp::Structure::energyRef, meanEnergy, and nnp::Structure::numAtoms.
double Mode::physical | ( | std::string const & | property, |
double | value | ||
) | const |
Undo normalization for a given property.
[in] | property | One of "energy", "force", "charge", "hardness", "negativity". |
[in] | value | Input property value in normalized units. |
Definition at line 2110 of file Mode.cpp.
References convCharge, convEnergy, and convLength.
Referenced by nnp::InterfaceLammps::getAtomicEnergy(), main(), nnp::Training::printEpoch(), setupElectrostatics(), nnp::Training::writeHardness(), and nnp::Training::writeLearningCurve().
double Mode::physicalEnergy | ( | Structure const & | structure, |
bool | ref = true |
||
) | const |
Undo normalization for a given energy of structure.
[in] | structure | Input structure with energy in normalized units. |
[in] | ref | If true, use reference energy, otherwise use NN energy. |
Definition at line 2122 of file Mode.cpp.
References convEnergy, nnp::Structure::energy, nnp::Structure::energyRef, meanEnergy, and nnp::Structure::numAtoms.
Referenced by main(), nnp::InterfaceLammps::process(), and nnp::Dataset::writeSymmetryFunctionFile().
void Mode::convertToNormalizedUnits | ( | Structure & | structure | ) | const |
Convert one structure to normalized units.
[in,out] | structure | Input structure. |
Definition at line 2135 of file Mode.cpp.
References convCharge, convEnergy, convLength, meanEnergy, and nnp::Structure::toNormalizedUnits().
void Mode::convertToPhysicalUnits | ( | Structure & | structure | ) | const |
Convert one structure to physical units.
[in,out] | structure | Input structure. |
Definition at line 2142 of file Mode.cpp.
References convCharge, convEnergy, convLength, meanEnergy, and nnp::Structure::toPhysicalUnits().
Referenced by main().
void Mode::logEwaldCutoffs | ( | ) |
Logs Ewald params whenever they change.
Definition at line 2149 of file Mode.cpp.
References convLength, ewaldSetup, HDNNP_4G, log, nnp::EwaldSetup::logEwaldCutoffs(), and nnpType.
Referenced by main().
size_t Mode::getNumExtrapolationWarnings | ( | ) | const |
Count total number of extrapolation warnings encountered for all elements and symmetry functions.
Definition at line 2166 of file Mode.cpp.
References elements.
Referenced by LAMMPS_NS::PairHDNNP::handleExtrapolationWarnings(), and main().
void Mode::resetExtrapolationWarnings | ( | ) |
Erase all extrapolation warnings and reset counters.
Definition at line 2155 of file Mode.cpp.
References elements.
Referenced by main().
|
inline |
|
inline |
Getter for Mode::meanEnergy.
Definition at line 673 of file Mode.h.
References meanEnergy.
Referenced by main().
|
inline |
Getter for Mode::convEnergy.
Definition at line 678 of file Mode.h.
References convEnergy.
Referenced by main().
|
inline |
Getter for Mode::convLength.
Definition at line 683 of file Mode.h.
References convLength.
Referenced by main().
|
inline |
Getter for Mode::convCharge.
Definition at line 688 of file Mode.h.
References convCharge.
Referenced by main().
|
inline |
Getter for Mode::maxCutoffRadius.
The maximum cutoff radius is determined by setupSymmetryFunctions().
Definition at line 693 of file Mode.h.
References maxCutoffRadius.
Referenced by main(), and nnp::SetupAnalysis::writeSymmetryFunctionShape().
|
inline |
Getter for Mode::numElements.
The number of elements is determined by setupElements().
Definition at line 698 of file Mode.h.
References numElements.
Referenced by main().
vector< size_t > Mode::getNumSymmetryFunctions | ( | ) | const |
Get number of symmetry functions per element.
Definition at line 2180 of file Mode.cpp.
References elements.
Referenced by main().
|
inline |
bool Mode::settingsKeywordExists | ( | std::string const & | keyword | ) | const |
Check if keyword was found in settings file.
[in] | keyword | Keyword for which value is requested. |
true
if keyword exists, false
otherwise. Definition at line 2193 of file Mode.cpp.
References nnp::settings::Settings::keywordExists(), and settings.
Referenced by main().
string Mode::settingsGetValue | ( | std::string const & | keyword | ) | const |
Get value for given keyword in Settings instance.
[in] | keyword | Keyword for which value is requested. |
Definition at line 2198 of file Mode.cpp.
References nnp::settings::Settings::getValue(), and settings.
vector< size_t > Mode::pruneSymmetryFunctionsRange | ( | double | threshold | ) |
Prune symmetry functions according to their range and write settings file.
[in] | threshold | Symmetry functions with range (max - min) smaller than this threshold will be pruned. |
Definition at line 2228 of file Mode.cpp.
References elements, nnp::SymFnc::getGmax(), and nnp::SymFnc::getGmin().
Referenced by main().
vector< size_t > Mode::pruneSymmetryFunctionsSensitivity | ( | double | threshold, |
std::vector< std::vector< double > > | sensitivity | ||
) |
Prune symmetry functions with sensitivity analysis data.
[in] | threshold | Symmetry functions with sensitivity lower than this threshold will be pruned. |
[in] | sensitivity | Sensitivity data for each element and symmetry function. |
Definition at line 2249 of file Mode.cpp.
References elements, and numElements.
Referenced by main().
void Mode::writePrunedSettingsFile | ( | std::vector< std::size_t > | prune, |
std::string | fileName = "output.nn" |
||
) | const |
Copy settings file but comment out lines provided.
[in] | prune | List of line numbers to comment out. |
[in] | fileName | Output file name. |
Definition at line 2204 of file Mode.cpp.
References nnp::settings::Settings::getSettingsLines(), and settings.
Referenced by main().
void Mode::writeSettingsFile | ( | std::ofstream *const & | file | ) | const |
Write complete settings file.
[in,out] | file | Settings file. |
Definition at line 2221 of file Mode.cpp.
References settings, and nnp::settings::Settings::writeSettingsFile().
Referenced by nnp::Training::dataSetNormalization(), and main().
|
protected |
Read in weights for a specific type of neural network.
[in] | id | Actual network type to initialize ("short" or "elec"). |
[in] | fileNameFormat | Weights file name format. |
Definition at line 2270 of file Mode.cpp.
References elements, log, nnp::readColumnsFromFile(), nnp::NeuralNetwork::setConnections(), and nnp::strpr().
Referenced by nnp::Training::initializeWeights(), setupNeuralNetworkWeights(), and nnp::Training::setupNumericDerivCheck().
ElementMap nnp::Mode::elementMap |
Global element map, populated by setupElementMap().
Definition at line 591 of file Mode.h.
Referenced by nnp::Dataset::distributeStructures(), nnp::InterfaceLammps::initialize(), main(), nnp::Dataset::prepareNumericForces(), nnp::Prediction::readStructureFromFile(), nnp::Training::selectSets(), setupElectrostatics(), setupElementMap(), setupElements(), setupNeuralNetwork(), setupSymmetryFunctionCache(), setupSymmetryFunctionMemory(), setupSymmetryFunctions(), nnp::Dataset::writeAtomicEnvironmentFile(), nnp::Dataset::writeNeighborLists(), nnp::Dataset::writeSymmetryFunctionFile(), nnp::Dataset::writeSymmetryFunctionHistograms(), and nnp::Training::writeUpdaterStatus().
Log nnp::Mode::log |
Global log file.
Definition at line 593 of file Mode.h.
Referenced by nnp::Training::allocateArrays(), nnp::Training::calculateNeighborLists(), calculateSymmetryFunctionGroups(), calculateSymmetryFunctions(), nnp::Training::checkSelectionMode(), nnp::Dataset::collectSymmetryFunctionStatistics(), nnp::Training::dataSetNormalization(), nnp::Dataset::distributeStructures(), LAMMPS_NS::PairHDNNP::init_style(), initialize(), nnp::InterfaceLammps::initialize(), nnp::Training::initializeWeights(), nnp::Training::initializeWeightsMemory(), loadSettingsFile(), logEwaldCutoffs(), nnp::Training::loop(), main(), nnp::Training::printEpoch(), nnp::Training::printHeader(), nnp::InterfaceLammps::process(), nnp::Training::randomizeNeuralNetworkWeights(), readNeuralNetworkWeights(), nnp::Training::selectSets(), setupCutoff(), setupElectrostatics(), setupElementMap(), setupElements(), nnp::Training::setupFileOutput(), nnp::Dataset::setupMPI(), setupNeuralNetwork(), setupNeuralNetworkWeights(), setupNormalization(), nnp::Training::setupNumericDerivCheck(), nnp::Dataset::setupRandomNumberGenerator(), nnp::Training::setupSelectionMode(), setupSymmetryFunctionCache(), setupSymmetryFunctionGroups(), setupSymmetryFunctionMemory(), setupSymmetryFunctions(), setupSymmetryFunctionScaling(), setupSymmetryFunctionScalingNone(), setupSymmetryFunctionStatistics(), nnp::Training::setupTraining(), nnp::Training::setupUpdatePlan(), nnp::Dataset::sortNeighborLists(), nnp::Dataset::writeAtomicEnvironmentFile(), nnp::InterfaceLammps::writeExtrapolationWarnings(), nnp::Dataset::writeNeighborHistogram(), nnp::Dataset::writeNeighborLists(), nnp::Training::writeSetsToFiles(), nnp::Dataset::writeSymmetryFunctionFile(), nnp::Dataset::writeSymmetryFunctionHistograms(), nnp::Dataset::writeSymmetryFunctionScaling(), and nnp::SetupAnalysis::writeSymmetryFunctionShape().
|
protected |
Definition at line 628 of file Mode.h.
Referenced by calculateAtomicNeuralNetworks(), nnp::Training::calculateError(), calculateForces(), nnp::Training::calculateNeighborLists(), calculateSymmetryFunctionGroups(), calculateSymmetryFunctions(), nnp::Training::collectDGdxia(), nnp::Training::dataSetNormalization(), evaluateNNP(), nnp::InterfaceLammps::finalizeNeighborList(), nnp::InterfaceLammps::getCharges(), nnp::InterfaceLammps::getForces(), nnp::InterfaceLammps::getMaxCutoffRadiusOverall(), getNnpType(), nnp::Training::getWeights(), nnp::Training::initializeWeights(), nnp::Training::initializeWeightsMemory(), loadSettingsFile(), logEwaldCutoffs(), nnp::InterfaceLammps::process(), nnp::Training::selectSets(), nnp::Training::setStage(), setupGeneric(), setupNeuralNetwork(), nnp::Training::setupNumericDerivCheck(), nnp::Training::setupTraining(), nnp::Training::setWeights(), nnp::Training::update(), nnp::Training::writeHardnessEpoch(), nnp::Training::writeLearningCurve(), nnp::Training::writeNeuronStatisticsEpoch(), nnp::Training::writeTimingData(), nnp::Training::writeUpdaterStatus(), and nnp::Training::writeWeightsEpoch().
|
protected |
Definition at line 629 of file Mode.h.
Referenced by nnp::InterfaceLammps::addNeighbor(), calculateAtomicNeuralNetworks(), nnp::Training::calculateNeighborLists(), nnp::Training::dataSetNormalization(), nnp::InterfaceLammps::getAtomicEnergy(), nnp::InterfaceLammps::getForces(), nnp::InterfaceLammps::getMaxCutoffRadius(), nnp::InterfaceLammps::getMaxCutoffRadiusOverall(), nnp::Prediction::predict(), nnp::Training::printEpoch(), nnp::InterfaceLammps::process(), nnp::Prediction::readStructureFromFile(), nnp::InterfaceLammps::setBoxVectors(), nnp::InterfaceLammps::setLocalAtomPositions(), setupElectrostatics(), setupNormalization(), setupSymmetryFunctions(), nnp::Training::update(), useNormalization(), nnp::Training::writeHardness(), nnp::Training::writeLearningCurve(), and nnp::Dataset::writeSymmetryFunctionFile().
|
protected |
Definition at line 630 of file Mode.h.
Referenced by calculateSymmetryFunctionGroups(), calculateSymmetryFunctions(), and setupSymmetryFunctionStatistics().
|
protected |
Definition at line 631 of file Mode.h.
Referenced by addEnergyOffset(), nnp::Training::calculateWeightDerivatives(), chargeEquilibration(), nnp::Training::dPdcN(), getEnergyOffset(), getEnergyWithOffset(), getNumElements(), nnp::Training::getWeights(), nnp::Training::initializeWeightsMemory(), pruneSymmetryFunctionsSensitivity(), nnp::Training::randomizeNeuralNetworkWeights(), removeEnergyOffset(), nnp::Training::selectSets(), nnp::InterfaceLammps::setLocalAtoms(), setupCutoffMatrix(), setupElectrostatics(), setupElements(), setupNeuralNetwork(), setupSymmetryFunctionCache(), setupSymmetryFunctionMemory(), setupSymmetryFunctions(), nnp::Training::setWeights(), nnp::Training::update(), nnp::Dataset::writeAtomicEnvironmentFile(), nnp::Training::writeHardness(), nnp::Dataset::writeNeighborLists(), nnp::Training::writeNeuronStatistics(), nnp::SetupAnalysis::writeSymmetryFunctionShape(), and nnp::Training::writeWeights().
|
protected |
Definition at line 632 of file Mode.h.
Referenced by calculateSymmetryFunctionGroups(), calculateSymmetryFunctions(), setupSymmetryFunctions(), and nnp::Dataset::writeNeighborHistogram().
|
protected |
Definition at line 633 of file Mode.h.
Referenced by calculateSymmetryFunctionGroups(), calculateSymmetryFunctions(), and setupSymmetryFunctions().
|
protected |
Definition at line 634 of file Mode.h.
Referenced by nnp::Training::calculateError(), calculateForces(), nnp::Training::calculateNeighborLists(), calculateSymmetryFunctionGroups(), calculateSymmetryFunctions(), nnp::Training::calculateWeightDerivatives(), nnp::Training::dataSetNormalization(), evaluateNNP(), nnp::InterfaceLammps::finalizeNeighborList(), nnp::InterfaceLammps::getForces(), getMaxCutoffRadius(), nnp::InterfaceLammps::getMaxCutoffRadius(), nnp::InterfaceLammps::getMaxCutoffRadiusOverall(), setupSymmetryFunctions(), and nnp::Training::update().
|
protected |
Definition at line 635 of file Mode.h.
Referenced by setupCutoff(), and setupSymmetryFunctions().
|
protected |
Definition at line 636 of file Mode.h.
Referenced by convertToNormalizedUnits(), convertToPhysicalUnits(), nnp::Training::dataSetNormalization(), nnp::InterfaceLammps::getAtomicEnergy(), getMeanEnergy(), normalizedEnergy(), physicalEnergy(), nnp::Prediction::predict(), nnp::Prediction::readStructureFromFile(), setupNormalization(), nnp::Dataset::toNormalizedUnits(), nnp::Dataset::toPhysicalUnits(), and nnp::InterfaceLammps::writeToFile().
|
protected |
Definition at line 637 of file Mode.h.
Referenced by convertToNormalizedUnits(), convertToPhysicalUnits(), nnp::Training::dataSetNormalization(), getConvEnergy(), nnp::InterfaceLammps::getForces(), normalized(), normalizedEnergy(), physical(), physicalEnergy(), nnp::Prediction::predict(), nnp::Prediction::readStructureFromFile(), setupElectrostatics(), setupNormalization(), nnp::Dataset::toNormalizedUnits(), nnp::Dataset::toPhysicalUnits(), and nnp::InterfaceLammps::writeToFile().
|
protected |
Definition at line 638 of file Mode.h.
Referenced by nnp::InterfaceLammps::addNeighbor(), nnp::Training::calculateNeighborLists(), convertToNormalizedUnits(), convertToPhysicalUnits(), nnp::Training::dataSetNormalization(), getConvLength(), nnp::InterfaceLammps::getForces(), nnp::InterfaceLammps::getMaxCutoffRadius(), nnp::InterfaceLammps::getMaxCutoffRadiusOverall(), logEwaldCutoffs(), normalized(), physical(), nnp::Prediction::predict(), nnp::InterfaceLammps::process(), nnp::Prediction::readStructureFromFile(), nnp::InterfaceLammps::setBoxVectors(), nnp::InterfaceLammps::setLocalAtomPositions(), setupElectrostatics(), setupNormalization(), setupSymmetryFunctions(), nnp::Dataset::toNormalizedUnits(), nnp::Dataset::toPhysicalUnits(), and nnp::InterfaceLammps::writeToFile().
|
protected |
Definition at line 639 of file Mode.h.
Referenced by convertToNormalizedUnits(), convertToPhysicalUnits(), getConvCharge(), normalized(), physical(), nnp::Prediction::predict(), nnp::Prediction::readStructureFromFile(), setupElectrostatics(), setupNormalization(), nnp::Dataset::toNormalizedUnits(), nnp::Dataset::toPhysicalUnits(), and nnp::InterfaceLammps::writeToFile().
|
protected |
Definition at line 640 of file Mode.h.
Referenced by chargeEquilibration(), and setupElectrostatics().
|
protected |
Definition at line 641 of file Mode.h.
Referenced by nnp::Training::calculateNeighborLists(), chargeEquilibration(), evaluateNNP(), nnp::InterfaceLammps::finalizeNeighborList(), nnp::InterfaceLammps::getMaxCutoffRadiusOverall(), logEwaldCutoffs(), nnp::InterfaceLammps::process(), and setupElectrostatics().
|
protected |
Definition at line 642 of file Mode.h.
Referenced by nnp::Training::dataSetNormalization(), nnp::Training::initializeWeights(), loadSettingsFile(), nnp::Training::randomizeNeuralNetworkWeights(), nnp::Training::selectSets(), nnp::Training::setStage(), settingsGetValue(), settingsKeywordExists(), setupCutoff(), setupElectrostatics(), setupElementMap(), setupElements(), nnp::Training::setupFileOutput(), setupNeuralNetwork(), setupNormalization(), nnp::Dataset::setupRandomNumberGenerator(), nnp::Training::setupSelectionMode(), setupSymmetryFunctions(), setupSymmetryFunctionScaling(), nnp::Training::setupTraining(), nnp::Training::setupUpdatePlan(), writePrunedSettingsFile(), and writeSettingsFile().
|
protected |
Definition at line 643 of file Mode.h.
Referenced by setupSymmetryFunctionScaling().
|
protected |
Definition at line 644 of file Mode.h.
Referenced by setupCutoff(), and setupSymmetryFunctions().
|
protected |
Definition at line 645 of file Mode.h.
Referenced by nnp::Training::calculateNeighborLists(), chargeEquilibration(), evaluateNNP(), nnp::InterfaceLammps::finalizeNeighborList(), nnp::InterfaceLammps::getMaxCutoffRadiusOverall(), setupCutoffMatrix(), and setupElectrostatics().
|
protected |
Definition at line 646 of file Mode.h.
Referenced by addEnergyOffset(), calculateAtomicNeuralNetworks(), calculateForces(), calculateSymmetryFunctionGroups(), calculateSymmetryFunctions(), nnp::Training::calculateWeightDerivatives(), chargeEquilibration(), nnp::InterfaceLammps::clearExtrapolationWarnings(), nnp::Training::collectDGdxia(), nnp::Dataset::collectSymmetryFunctionStatistics(), nnp::Training::dataSetNormalization(), nnp::Training::dPdc(), nnp::InterfaceLammps::extractEWBuffer(), nnp::InterfaceLammps::fillEWBuffer(), nnp::InterfaceLammps::getAtomicEnergy(), nnp::Training::getConnectionOffsets(), getEnergyOffset(), getEnergyWithOffset(), nnp::InterfaceLammps::getEWBufferSize(), nnp::InterfaceLammps::getForces(), nnp::Training::getNumConnections(), nnp::Training::getNumConnectionsPerElement(), getNumExtrapolationWarnings(), getNumSymmetryFunctions(), nnp::Training::getWeights(), nnp::Training::initializeWeightsMemory(), pruneSymmetryFunctionsRange(), pruneSymmetryFunctionsSensitivity(), nnp::Training::randomizeNeuralNetworkWeights(), readNeuralNetworkWeights(), removeEnergyOffset(), resetExtrapolationWarnings(), nnp::Training::resetNeuronStatistics(), setupCutoffMatrix(), setupElectrostatics(), setupElements(), setupNeuralNetwork(), setupSymmetryFunctionCache(), setupSymmetryFunctionGroups(), setupSymmetryFunctionMemory(), setupSymmetryFunctions(), setupSymmetryFunctionScaling(), setupSymmetryFunctionScalingNone(), setupSymmetryFunctionStatistics(), nnp::Training::setupTraining(), nnp::Training::setWeights(), nnp::Training::update(), nnp::InterfaceLammps::writeExtrapolationWarnings(), nnp::Training::writeHardness(), nnp::Training::writeNeuronStatistics(), nnp::Dataset::writeSymmetryFunctionHistograms(), nnp::Dataset::writeSymmetryFunctionScaling(), nnp::SetupAnalysis::writeSymmetryFunctionShape(), and nnp::Training::writeWeights().
|
protected |
Definition at line 647 of file Mode.h.
Referenced by calculateAtomicNeuralNetworks(), setupNeuralNetwork(), and setupNeuralNetworkWeights().
|
protected |
Definition at line 649 of file Mode.h.
Referenced by nnp::Training::initializeWeights(), nnp::Training::randomizeNeuralNetworkWeights(), setupNeuralNetwork(), setupNeuralNetworkWeights(), and nnp::Training::setupTraining().
|
protected |
Matrix storing all symmetry function cut-offs for all elements.
Definition at line 652 of file Mode.h.
Referenced by nnp::Training::calculateNeighborLists(), evaluateNNP(), nnp::InterfaceLammps::finalizeNeighborList(), and setupCutoffMatrix().
|
protected |
Definition at line 653 of file Mode.h.
Referenced by chargeEquilibration().