n2p2 - A neural network potential package
|
Intermediate class for SFs based on cutoff functions. More...
#include <SymFncBaseCutoff.h>
Public Member Functions | |
virtual std::vector< std::string > | parameterInfo () const |
Get description with parameter names and values. More... | |
void | setCutoffFunction (CutoffFunction::CutoffType cutoffType, double cutoffAlpha) |
Set cutoff function type and parameter. More... | |
double | getCutoffAlpha () const |
Get private cutoffAlpha member variable. More... | |
std::string | getSubtype () const |
Get private subtype member variable. More... | |
CutoffFunction::CutoffType | getCutoffType () const |
Get private cutoffType member variable. More... | |
Public Member Functions inherited from nnp::SymFnc | |
virtual | ~SymFnc () |
Virtual destructor. More... | |
virtual bool | operator== (SymFnc const &rhs) const =0 |
Overload == operator. More... | |
virtual bool | operator< (SymFnc const &rhs) const =0 |
Overload < operator. More... | |
bool | operator!= (SymFnc const &rhs) const |
Overload != operator. More... | |
bool | operator> (SymFnc const &rhs) const |
Overload > operator. More... | |
bool | operator<= (SymFnc const &rhs) const |
Overload <= operator. More... | |
bool | operator>= (SymFnc const &rhs) const |
Overload >= operator. More... | |
virtual void | setParameters (std::string const ¶meterString)=0 |
Set parameters. More... | |
virtual void | changeLengthUnit (double convLength)=0 |
Change length unit. More... | |
virtual std::string | getSettingsLine () const =0 |
Get settings file line from currently set parameters. More... | |
virtual void | calculate (Atom &atom, bool const derivatives) const =0 |
Calculate symmetry function for one atom. More... | |
virtual std::string | parameterLine () const =0 |
Give symmetry function parameters in one line. More... | |
virtual std::vector< std::string > | parameterInfo () const |
Get description with parameter names and values. More... | |
void | setScalingType (ScalingType scalingType, std::string statisticsLine, double Smin, double Smax) |
Set symmetry function scaling type. More... | |
double | scale (double value) const |
Apply symmetry function scaling and/or centering. More... | |
double | unscale (double value) const |
Undo symmetry function scaling and/or centering. More... | |
std::size_t | getType () const |
Get private type member variable. More... | |
std::size_t | getIndex () const |
Get private index member variable. More... | |
std::size_t | getLineNumber () const |
Get private lineNumber member variable. More... | |
std::size_t | getEc () const |
Get private ec member variable. More... | |
std::size_t | getMinNeighbors () const |
Get private minNeighbors member variable. More... | |
double | getRc () const |
Get private rc member variable. More... | |
double | getGmin () const |
Get private Gmin member variable. More... | |
double | getGmax () const |
Get private Gmax member variable. More... | |
double | getScalingFactor () const |
Get private scalingFactor member variable. More... | |
double | getConvLength () const |
Get private convLength member variable. More... | |
std::set< std::string > | getParameters () const |
Get private parameters member variable. More... | |
std::vector< std::size_t > | getIndexPerElement () const |
Get private indexPerElement member variable. More... | |
void | setIndex (std::size_t index) |
Set private index member variable. More... | |
void | setIndexPerElement (std::size_t elementIndex, std::size_t index) |
Set private indexPerElement member variable. More... | |
void | setLineNumber (std::size_t lineNumber) |
Set line number. More... | |
std::string | scalingLine () const |
Get string with scaling information. More... | |
virtual double | calculateRadialPart (double distance) const =0 |
Calculate (partial) symmetry function value for one given distance. More... | |
virtual double | calculateAngularPart (double angle) const =0 |
Calculate (partial) symmetry function value for one given angle. More... | |
virtual bool | checkRelevantElement (std::size_t index) const =0 |
Check whether symmetry function is relevant for given element. More... | |
virtual std::vector< std::string > | getCacheIdentifiers () const |
Get unique cache identifiers. More... | |
void | addCacheIndex (std::size_t element, std::size_t cacheIndex, std::string cacheIdentifier) |
Add one cache index for given neighbor element and check identifier. More... | |
std::vector< std::vector< std::size_t > > | getCacheIndices () const |
Getter for cacheIndices. More... | |
Protected Member Functions | |
SymFncBaseCutoff (std::size_t type, ElementMap const &) | |
Constructor, initializes type. More... | |
Protected Member Functions inherited from nnp::SymFnc | |
SymFnc (std::size_t type, ElementMap const &) | |
Constructor, initializes type. More... | |
std::string | getPrintFormat () const |
Generate format string for symmetry function parameter printing. More... | |
Protected Attributes | |
double | cutoffAlpha |
Cutoff parameter \(\alpha\). More... | |
std::string | subtype |
Subtype string (specifies cutoff type). More... | |
CutoffFunction | fc |
Cutoff function used by this symmetry function. More... | |
CutoffFunction::CutoffType | cutoffType |
Cutoff type used by this symmetry function. More... | |
Protected Attributes inherited from nnp::SymFnc | |
std::size_t | type |
Symmetry function type. More... | |
ElementMap | elementMap |
Copy of element map. More... | |
std::size_t | index |
Symmetry function index (per element). More... | |
std::size_t | lineNumber |
Line number. More... | |
std::size_t | ec |
Element index of center atom. More... | |
std::size_t | minNeighbors |
Minimum number of neighbors required. More... | |
double | Smin |
Minimum for scaling range. More... | |
double | Smax |
Maximum for scaling range. More... | |
double | Gmin |
Minimum unscaled symmetry function value. More... | |
double | Gmax |
Maximum unscaled symmetry function value. More... | |
double | Gmean |
Mean unscaled symmetry function value. More... | |
double | Gsigma |
Sigma of unscaled symmetry function values. More... | |
double | rc |
Cutoff radius \(r_c\). More... | |
double | scalingFactor |
Scaling factor. More... | |
double | convLength |
Data set normalization length conversion factor. More... | |
ScalingType | scalingType |
Symmetry function scaling type used by this symmetry function. More... | |
std::set< std::string > | parameters |
Set with symmetry function parameter IDs (lookup for printing). More... | |
std::vector< std::size_t > | indexPerElement |
Per-element index for derivative memory in Atom::Neighbor::dGdr arrays. More... | |
std::vector< std::vector< std::size_t > > | cacheIndices |
Cache indices for each element. More... | |
Additional Inherited Members | |
Public Types inherited from nnp::SymFnc | |
enum | ScalingType { ST_NONE , ST_SCALE , ST_CENTER , ST_SCALECENTER , ST_SCALESIGMA } |
List of available scaling types. More... | |
Protected Types inherited from nnp::SymFnc | |
typedef std::map< std::string, std::pair< std::string, std::string > > | PrintFormat |
typedef std::vector< std::string > | PrintOrder |
Static Protected Member Functions inherited from nnp::SymFnc | |
static PrintFormat const | initializePrintFormat () |
Initialize static print format map for all possible parameters. More... | |
static PrintOrder const | initializePrintOrder () |
Initialize static print order vector for all possible parameters. More... | |
Static Protected Attributes inherited from nnp::SymFnc | |
static std::size_t const | sfinfoWidth = 12 |
Width of the SFINFO parameter description field (see parameterInfo()). More... | |
static PrintFormat const | printFormat = initializePrintFormat() |
Map of parameter format strings and empty strings. More... | |
static PrintOrder const | printOrder = initializePrintOrder() |
Vector of parameters in order of printing. More... | |
Intermediate class for SFs based on cutoff functions.
Definition at line 30 of file SymFncBaseCutoff.h.
|
protected |
Constructor, initializes type.
Definition at line 51 of file SymFncBaseCutoff.cpp.
References nnp::SymFnc::parameters.
|
virtual |
Get description with parameter names and values.
Reimplemented from nnp::SymFnc.
Reimplemented in nnp::SymFncBaseExpAng, nnp::SymFncExpAngnWeighted, nnp::SymFncExpRad, and nnp::SymFncExpRadWeighted.
Definition at line 24 of file SymFncBaseCutoff.cpp.
References cutoffAlpha, nnp::pad(), nnp::SymFnc::parameterInfo(), nnp::SymFnc::sfinfoWidth, nnp::strpr(), and subtype.
Referenced by nnp::SymFncBaseExpAng::parameterInfo(), nnp::SymFncExpAngnWeighted::parameterInfo(), nnp::SymFncExpRad::parameterInfo(), and nnp::SymFncExpRadWeighted::parameterInfo().
void SymFncBaseCutoff::setCutoffFunction | ( | CutoffFunction::CutoffType | cutoffType, |
double | cutoffAlpha | ||
) |
Set cutoff function type and parameter.
[in] | cutoffType | Desired cutoff function for this symmetry function. |
[in] | cutoffAlpha | Cutoff function parameter \(\alpha\). |
Definition at line 38 of file SymFncBaseCutoff.cpp.
References cutoffAlpha, cutoffType, fc, nnp::CutoffFunction::setCutoffParameter(), nnp::CutoffFunction::setCutoffType(), nnp::strpr(), and subtype.
Referenced by nnp::Element::setCutoffFunction().
|
inline |
Get private cutoffAlpha member variable.
Definition at line 78 of file SymFncBaseCutoff.h.
References cutoffAlpha.
Referenced by nnp::SymGrpExpAngn::addMember(), nnp::SymGrpExpAngnWeighted::addMember(), nnp::SymGrpExpAngw::addMember(), nnp::SymGrpExpRad::addMember(), and nnp::SymGrpExpRadWeighted::addMember().
|
inline |
Get private subtype member variable.
Definition at line 79 of file SymFncBaseCutoff.h.
References subtype.
Referenced by nnp::SymGrpExpAngn::addMember(), nnp::SymGrpExpAngnWeighted::addMember(), nnp::SymGrpExpAngw::addMember(), nnp::SymGrpExpRad::addMember(), and nnp::SymGrpExpRadWeighted::addMember().
|
inline |
Get private cutoffType member variable.
Definition at line 81 of file SymFncBaseCutoff.h.
References cutoffType.
Referenced by nnp::SymGrpExpAngn::addMember(), nnp::SymGrpExpAngnWeighted::addMember(), nnp::SymGrpExpAngw::addMember(), nnp::SymGrpExpRad::addMember(), and nnp::SymGrpExpRadWeighted::addMember().
|
protected |
Cutoff parameter \(\alpha\).
Definition at line 61 of file SymFncBaseCutoff.h.
Referenced by nnp::SymFncBaseExpAng::changeLengthUnit(), nnp::SymFncExpAngnWeighted::changeLengthUnit(), nnp::SymFncExpRad::changeLengthUnit(), nnp::SymFncExpRadWeighted::changeLengthUnit(), nnp::SymFncBaseExpAng::getCacheIdentifiers(), nnp::SymFncExpAngnWeighted::getCacheIdentifiers(), nnp::SymFncExpRad::getCacheIdentifiers(), nnp::SymFncExpRadWeighted::getCacheIdentifiers(), getCutoffAlpha(), nnp::SymFncExpAngn::operator<(), nnp::SymFncExpAngnWeighted::operator<(), nnp::SymFncExpAngw::operator<(), nnp::SymFncExpRad::operator<(), nnp::SymFncExpRadWeighted::operator<(), nnp::SymFncExpAngn::operator==(), nnp::SymFncExpAngnWeighted::operator==(), nnp::SymFncExpAngw::operator==(), nnp::SymFncExpRad::operator==(), nnp::SymFncExpRadWeighted::operator==(), parameterInfo(), nnp::SymFncBaseExpAng::parameterLine(), nnp::SymFncExpAngnWeighted::parameterLine(), nnp::SymFncExpRad::parameterLine(), nnp::SymFncExpRadWeighted::parameterLine(), setCutoffFunction(), nnp::SymFncBaseExpAng::setParameters(), nnp::SymFncExpAngnWeighted::setParameters(), nnp::SymFncExpRad::setParameters(), and nnp::SymFncExpRadWeighted::setParameters().
|
protected |
Subtype string (specifies cutoff type).
Definition at line 63 of file SymFncBaseCutoff.h.
Referenced by nnp::SymFncBaseExpAng::getCacheIdentifiers(), nnp::SymFncExpAngnWeighted::getCacheIdentifiers(), nnp::SymFncExpRad::getCacheIdentifiers(), nnp::SymFncExpRadWeighted::getCacheIdentifiers(), getSubtype(), parameterInfo(), nnp::SymFncBaseExpAng::parameterLine(), nnp::SymFncExpAngnWeighted::parameterLine(), nnp::SymFncExpRad::parameterLine(), nnp::SymFncExpRadWeighted::parameterLine(), and setCutoffFunction().
|
protected |
Cutoff function used by this symmetry function.
Definition at line 65 of file SymFncBaseCutoff.h.
Referenced by nnp::SymFncExpAngn::calculate(), nnp::SymFncExpAngnWeighted::calculate(), nnp::SymFncExpAngw::calculate(), nnp::SymFncExpRad::calculate(), nnp::SymFncExpRadWeighted::calculate(), nnp::SymFncBaseExpAng::calculateRadialPart(), nnp::SymFncExpAngnWeighted::calculateRadialPart(), nnp::SymFncExpRad::calculateRadialPart(), nnp::SymFncExpRadWeighted::calculateRadialPart(), nnp::SymFncBaseExpAng::changeLengthUnit(), nnp::SymFncExpAngnWeighted::changeLengthUnit(), nnp::SymFncExpRad::changeLengthUnit(), nnp::SymFncExpRadWeighted::changeLengthUnit(), setCutoffFunction(), nnp::SymFncBaseExpAng::setParameters(), nnp::SymFncExpAngnWeighted::setParameters(), nnp::SymFncExpRad::setParameters(), and nnp::SymFncExpRadWeighted::setParameters().
|
protected |
Cutoff type used by this symmetry function.
Definition at line 67 of file SymFncBaseCutoff.h.
Referenced by getCutoffType(), nnp::SymFncExpAngn::operator<(), nnp::SymFncExpAngnWeighted::operator<(), nnp::SymFncExpAngw::operator<(), nnp::SymFncExpRad::operator<(), nnp::SymFncExpRadWeighted::operator<(), nnp::SymFncExpAngn::operator==(), nnp::SymFncExpAngnWeighted::operator==(), nnp::SymFncExpAngw::operator==(), nnp::SymFncExpRad::operator==(), nnp::SymFncExpRadWeighted::operator==(), and setCutoffFunction().