32class SymFncStatistics;
118 bool const derivatives)
const = 0;
128 virtual std::vector<std::string>
139 std::string statisticsLine,
147 double scale(
double value)
const;
153 double unscale(
double value)
const;
165 std::size_t
getEc()
const;
171 double getRc()
const;
241#ifndef N2P2_NO_SF_CACHE
256 std::size_t cacheIndex,
257 std::string cacheIdentifier);
259 std::vector<std::vector<
264 typedef std::map<std::string,
303#ifndef N2P2_NO_SF_CACHE
337 return !((*this) == rhs);
342 return rhs < (*this);
347 return !((*this) > rhs);
352 return !((*this) < rhs);
395#ifndef N2P2_NO_SF_CACHE
Symmetry function base class.
ScalingType
List of available scaling types.
virtual std::string parameterLine() const =0
Give symmetry function parameters in one line.
void setIndex(std::size_t index)
Set private index member variable.
double getGmin() const
Get private Gmin member variable.
virtual bool checkRelevantElement(std::size_t index) const =0
Check whether symmetry function is relevant for given element.
virtual void calculate(Atom &atom, bool const derivatives) const =0
Calculate symmetry function for one atom.
double convLength
Data set normalization length conversion factor.
virtual bool operator<(SymFnc const &rhs) const =0
Overload < operator.
static PrintFormat const printFormat
Map of parameter format strings and empty strings.
std::map< std::string, std::pair< std::string, std::string > > PrintFormat
void addCacheIndex(std::size_t element, std::size_t cacheIndex, std::string cacheIdentifier)
Add one cache index for given neighbor element and check identifier.
double Gmean
Mean unscaled symmetry function value.
double getConvLength() const
Get private convLength member variable.
bool operator>(SymFnc const &rhs) const
Overload > operator.
bool operator>=(SymFnc const &rhs) const
Overload >= operator.
std::size_t type
Symmetry function type.
virtual ~SymFnc()
Virtual destructor.
void setIndexPerElement(std::size_t elementIndex, std::size_t index)
Set private indexPerElement member variable.
double getGmax() const
Get private Gmax member variable.
std::vector< std::size_t > getIndexPerElement() const
Get private indexPerElement member variable.
virtual double calculateRadialPart(double distance) const =0
Calculate (partial) symmetry function value for one given distance.
virtual std::vector< std::string > getCacheIdentifiers() const
Get unique cache identifiers.
double Gmax
Maximum unscaled symmetry function value.
std::size_t getIndex() const
Get private index member variable.
std::set< std::string > parameters
Set with symmetry function parameter IDs (lookup for printing).
double getRc() const
Get private rc member variable.
virtual double calculateAngularPart(double angle) const =0
Calculate (partial) symmetry function value for one given angle.
void setLineNumber(std::size_t lineNumber)
Set line number.
bool operator!=(SymFnc const &rhs) const
Overload != operator.
static PrintOrder const printOrder
Vector of parameters in order of printing.
std::size_t index
Symmetry function index (per element).
double scalingFactor
Scaling factor.
std::size_t getType() const
Get private type member variable.
ScalingType scalingType
Symmetry function scaling type used by this symmetry function.
void setScalingType(ScalingType scalingType, std::string statisticsLine, double Smin, double Smax)
Set symmetry function scaling type.
std::vector< std::string > PrintOrder
std::vector< std::vector< std::size_t > > cacheIndices
Cache indices for each element.
std::set< std::string > getParameters() const
Get private parameters member variable.
SymFnc(std::size_t type, ElementMap const &)
Constructor, initializes type.
double Smin
Minimum for scaling range.
double getScalingFactor() const
Get private scalingFactor member variable.
std::vector< std::vector< std::size_t > > getCacheIndices() const
Getter for cacheIndices.
double unscale(double value) const
Undo symmetry function scaling and/or centering.
std::size_t getLineNumber() const
Get private lineNumber member variable.
ElementMap elementMap
Copy of element map.
double Smax
Maximum for scaling range.
double scale(double value) const
Apply symmetry function scaling and/or centering.
std::size_t getEc() const
Get private ec member variable.
virtual void setParameters(std::string const ¶meterString)=0
Set parameters.
double Gsigma
Sigma of unscaled symmetry function values.
double Gmin
Minimum unscaled symmetry function value.
std::vector< std::size_t > indexPerElement
Per-element index for derivative memory in Atom::Neighbor::dGdr arrays.
std::size_t ec
Element index of center atom.
static std::size_t const sfinfoWidth
Width of the SFINFO parameter description field (see parameterInfo()).
static PrintFormat const initializePrintFormat()
Initialize static print format map for all possible parameters.
std::size_t minNeighbors
Minimum number of neighbors required.
virtual bool operator==(SymFnc const &rhs) const =0
Overload == operator.
virtual std::string getSettingsLine() const =0
Get settings file line from currently set parameters.
std::string scalingLine() const
Get string with scaling information.
std::size_t lineNumber
Line number.
std::string getPrintFormat() const
Generate format string for symmetry function parameter printing.
virtual std::vector< std::string > parameterInfo() const
Get description with parameter names and values.
bool operator<=(SymFnc const &rhs) const
Overload <= operator.
std::size_t getMinNeighbors() const
Get private minNeighbors member variable.
virtual void changeLengthUnit(double convLength)=0
Change length unit.
static PrintOrder const initializePrintOrder()
Initialize static print order vector for all possible parameters.
Storage for a single atom.