26Prediction::Prediction() :
Mode(),
27 fileNameSettings (
"input.nn" ),
28 fileNameScaling (
"scaling.data" ),
29 formatWeightsFilesShort (
"weights.%03zu.data" ),
30 formatWeightsFilesCharge(
"weightse.%03zu.data")
40 map<string, string> formatWeights {
51 file.open(fileName.c_str());
Base class for all NNP applications.
ElementMap elementMap
Global element map, populated by setupElementMap().
void addEnergyOffset(Structure &structure, bool ref=true)
Add atomic energy offsets to reference energy.
void initialize()
Write welcome message with version information.
void setupGeneric(std::string const &nnpDir="", bool skipNormalize=false, bool initialHardness=false)
Combine multiple setup routines and provide a basic NNP setup.
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.
virtual void setupSymmetryFunctionScaling(std::string const &fileName="scaling.data")
Set up symmetry function scaling from file.
void removeEnergyOffset(Structure &structure, bool ref=true)
Remove atomic energy offsets from reference energy.
void evaluateNNP(Structure &structure, bool useForces=true, bool useDEdG=true)
Evaluate neural network potential (includes total energy, optionally forces and in some cases charges...
void setupSymmetryFunctionStatistics(bool collectStatistics, bool collectExtrapolationWarnings, bool writeExtrapolationWarnings, bool stopOnExtrapolationWarnings)
Set up symmetry function statistics collection.
void loadSettingsFile(std::string const &fileName="input.nn")
Open settings file and load all keywords into memory.
void readStructureFromFile(std::string const &fileName="input.data")
std::string fileNameSettings
std::string formatWeightsFilesShort
std::string formatWeightsFilesCharge
std::string fileNameScaling
void toPhysicalUnits(double meanEnergy, double convEnergy, double convLength, double convCharge)
Switch to physical units, shift energy and change energy, length and charge unit.
void setElementMap(ElementMap const &elementMap)
Set element map of structure.
void readFromFile(std::string const fileName="input.data")
Read configuration from file.
void toNormalizedUnits(double meanEnergy, double convEnergy, double convLength, double convCharge)
Normalize structure, shift energy and change energy, length and charge unit.
void reset()
Reset everything but elementMap.