n2p2 - A neural network potential package
|
Weighted angular symmetry function group (type 13) More...
#include <SymGrpExpAngnWeighted.h>
Public Member Functions | |
SymGrpExpAngnWeighted (ElementMap const &elementMap) | |
Constructor, sets type = 13. More... | |
virtual bool | operator== (SymGrp const &rhs) const |
Overload == operator. More... | |
virtual bool | operator< (SymGrp const &rhs) const |
Overload < operator. More... | |
virtual bool | addMember (SymFnc const *const symmetryFunction) |
Potentially add a member to group. More... | |
virtual void | sortMembers () |
Sort member symmetry functions. More... | |
virtual void | setScalingFactors () |
Fill scalingFactors with values from member symmetry functions. More... | |
virtual void | calculate (Atom &atom, bool const derivatives) const |
Calculate all symmetry functions of this group for one atom. More... | |
virtual std::vector< std::string > | parameterLines () const |
Give symmetry function group parameters on multiple lines. More... | |
Public Member Functions inherited from nnp::SymGrpBaseCutoff | |
double | getRc () const |
Get private rc member variable. More... | |
Public Member Functions inherited from nnp::SymGrp | |
virtual | ~SymGrp () |
Virtual destructor. More... | |
virtual bool | operator== (SymGrp const &rhs) const =0 |
Overload == operator. More... | |
virtual bool | operator< (SymGrp const &rhs) const =0 |
Overload < operator. More... | |
bool | operator!= (SymGrp const &rhs) const |
Overload != operator. More... | |
bool | operator> (SymGrp const &rhs) const |
Overload > operator. More... | |
bool | operator<= (SymGrp const &rhs) const |
Overload <= operator. More... | |
bool | operator>= (SymGrp const &rhs) const |
Overload >= operator. More... | |
virtual bool | addMember (SymFnc const *const symmetryFunction)=0 |
Potentially add a member to group. More... | |
virtual void | sortMembers ()=0 |
Sort member symmetry functions. More... | |
virtual void | setScalingFactors ()=0 |
Fill scalingFactors with values from member symmetry functions. More... | |
virtual void | calculate (Atom &atom, bool const derivatives) const =0 |
Calculate all symmetry functions of this group for one atom. More... | |
virtual std::vector< std::string > | parameterLines () const =0 |
Give symmetry function group parameters on multiple lines. More... | |
void | setIndex (std::size_t index) |
Set private index member variable. More... | |
std::size_t | getIndex () const |
Get private index member variable. More... | |
std::size_t | getType () const |
Get private type member variable. More... | |
std::size_t | getEc () const |
Get private ec member variable. More... | |
Private Attributes | |
std::vector< SymFncExpAngnWeighted const * > | members |
Vector of all group member pointers. More... | |
std::vector< bool > | calculateExp |
Vector indicating whether exponential term needs to be calculated. More... | |
std::vector< double > | factorNorm |
Vector containing precalculated normalizing factor for each zeta. More... | |
std::vector< double > | factorDeriv |
Vector containing precalculated normalizing factor for derivatives. More... | |
std::vector< bool > | useIntegerPow |
Vector containing values of all member symmetry functions. More... | |
std::vector< int > | zetaInt |
Vector containing values of all member symmetry functions. More... | |
std::vector< double > | eta |
Vector containing values of all member symmetry functions. More... | |
std::vector< double > | rs |
Vector containing values of all member symmetry functions. More... | |
std::vector< double > | lambda |
Vector containing values of all member symmetry functions. More... | |
std::vector< double > | zeta |
Vector containing values of all member symmetry functions. More... | |
std::vector< double > | zetaLambda |
Vector containing values of all member symmetry functions. More... | |
Additional Inherited Members | |
Protected Types inherited from nnp::SymGrp | |
typedef std::map< std::string, std::pair< std::string, std::string > > | PrintFormat |
typedef std::vector< std::string > | PrintOrder |
Protected Member Functions inherited from nnp::SymGrpBaseCutoff | |
SymGrpBaseCutoff (std::size_t type, ElementMap const &elementMap) | |
Constructor, sets type. More... | |
Protected Member Functions inherited from nnp::SymGrp | |
SymGrp (std::size_t type, ElementMap const &elementMap) | |
Constructor, sets type. More... | |
std::string | getPrintFormatCommon () const |
Get common parameter line format string. More... | |
std::string | getPrintFormatMember () const |
Get member parameter line format string. More... | |
Static Protected Member Functions inherited from nnp::SymGrp | |
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... | |
Protected Attributes inherited from nnp::SymGrpBaseCutoff | |
double | rc |
Cutoff radius \(r_c\) (common feature). More... | |
double | cutoffAlpha |
Cutoff function parameter \(\alpha\) (common feature). More... | |
std::string | subtype |
Subtype string (specifies cutoff type) (common feature). More... | |
CutoffFunction | fc |
Cutoff function used by this symmetry function group. More... | |
CutoffFunction::CutoffType | cutoffType |
Cutoff type used by this symmetry function group (common feature). More... | |
Protected Attributes inherited from nnp::SymGrp | |
std::size_t | type |
Symmetry function type. More... | |
ElementMap | elementMap |
Copy of element map. More... | |
std::size_t | index |
Symmetry function group index. More... | |
std::size_t | ec |
Element index of center atom (common feature). More... | |
double | convLength |
Data set normalization length conversion factor. More... | |
std::vector< size_t > | memberIndex |
Vector containing indices of all member symmetry functions. More... | |
std::vector< double > | scalingFactors |
Scaling factors of all member symmetry functions. More... | |
std::set< std::string > | parametersCommon |
Set of common parameters IDs. More... | |
std::set< std::string > | parametersMember |
Set of common parameters IDs. More... | |
std::vector< std::vector< std::size_t > > | memberIndexPerElement |
Vector containing per-element indices of all member symmetry functions. More... | |
Static Protected Attributes inherited from nnp::SymGrp | |
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... | |
Weighted angular symmetry function group (type 13)
\[ G^{13}_i = 2^{1-\zeta} \sum_{\substack{j,k\neq i \\ j < k}} Z_j Z_k \, \left( 1 + \lambda \cos \theta_{ijk} \right)^\zeta \mathrm{e}^{-\eta \left[ (r_{ij} - r_s)^2 + (r_{ik} - r_s)^2 + (r_{jk} - r_s)^2 \right] } f_c(r_{ij}) f_c(r_{ik}) f_c(r_{jk}) \]
Common features:
Definition at line 49 of file SymGrpExpAngnWeighted.h.
SymGrpExpAngnWeighted::SymGrpExpAngnWeighted | ( | ElementMap const & | elementMap | ) |
Constructor, sets type = 13.
Definition at line 30 of file SymGrpExpAngnWeighted.cpp.
References nnp::SymGrp::parametersMember.
|
virtual |
Overload == operator.
Implements nnp::SymGrp.
Definition at line 42 of file SymGrpExpAngnWeighted.cpp.
References nnp::SymGrpBaseCutoff::cutoffAlpha, nnp::SymGrpBaseCutoff::cutoffType, nnp::SymGrp::ec, nnp::SymGrp::getEc(), nnp::SymGrp::getType(), nnp::SymGrpBaseCutoff::rc, and nnp::SymGrp::type.
|
virtual |
Overload < operator.
Implements nnp::SymGrp.
Definition at line 54 of file SymGrpExpAngnWeighted.cpp.
References nnp::SymGrpBaseCutoff::cutoffAlpha, nnp::SymGrpBaseCutoff::cutoffType, nnp::SymGrp::ec, nnp::SymGrp::getEc(), nnp::SymGrp::getType(), nnp::SymGrpBaseCutoff::rc, and nnp::SymGrp::type.
|
virtual |
Potentially add a member to group.
[in] | symmetryFunction | Candidate symmetry function. |
If symmetry function is compatible with common feature list its pointer will be added to members.
Implements nnp::SymGrp.
Definition at line 71 of file SymGrpExpAngnWeighted.cpp.
References nnp::SymGrp::convLength, nnp::SymGrpBaseCutoff::cutoffAlpha, nnp::SymGrpBaseCutoff::cutoffType, nnp::SymGrp::ec, nnp::SymGrpBaseCutoff::fc, nnp::SymFnc::getConvLength(), nnp::SymFncBaseCutoff::getCutoffAlpha(), nnp::SymFncBaseCutoff::getCutoffType(), nnp::SymFnc::getEc(), nnp::SymFnc::getRc(), nnp::SymFncBaseCutoff::getSubtype(), nnp::SymFnc::getType(), members, nnp::SymGrpBaseCutoff::rc, nnp::CutoffFunction::setCutoffParameter(), nnp::CutoffFunction::setCutoffRadius(), nnp::CutoffFunction::setCutoffType(), nnp::SymGrpBaseCutoff::subtype, and nnp::SymGrp::type.
|
virtual |
Sort member symmetry functions.
Also allocate and precalculate additional stuff.
Implements nnp::SymGrp.
Definition at line 107 of file SymGrpExpAngnWeighted.cpp.
References calculateExp, eta, factorDeriv, factorNorm, nnp::SymGrp::getIndex(), lambda, nnp::SymGrp::memberIndex, nnp::SymGrp::memberIndexPerElement, members, rs, useIntegerPow, zeta, zetaInt, and zetaLambda.
|
virtual |
Fill scalingFactors with values from member symmetry functions.
Implements nnp::SymGrp.
Definition at line 149 of file SymGrpExpAngnWeighted.cpp.
References factorNorm, members, and nnp::SymGrp::scalingFactors.
|
virtual |
Calculate all symmetry functions of this group for one atom.
[in,out] | atom | Atom for which symmetry functions are caluclated. |
[in] | derivatives | If also symmetry function derivatives will be calculated and saved. |
Implements nnp::SymGrp.
Definition at line 167 of file SymGrpExpAngnWeighted.cpp.
References nnp::ElementMap::atomicNumber(), nnp::Atom::Neighbor::cache, calculateExp, nnp::Atom::Neighbor::d, nnp::Atom::Neighbor::dGdr, nnp::Atom::dGdr, nnp::Atom::Neighbor::dr, nnp::Atom::Neighbor::element, nnp::SymGrp::elementMap, eta, factorDeriv, factorNorm, nnp::SymGrpBaseCutoff::fc, nnp::CutoffFunction::fdf(), nnp::Atom::G, lambda, nnp::SymGrp::memberIndex, nnp::SymGrp::memberIndexPerElement, members, nnp::Atom::neighbors, nnp::Atom::numNeighbors, nnp::pow_int(), nnp::Vec3D::r, nnp::SymGrpBaseCutoff::rc, rs, nnp::SymGrp::scalingFactors, useIntegerPow, zeta, zetaInt, and zetaLambda.
|
virtual |
Give symmetry function group parameters on multiple lines.
Implements nnp::SymGrp.
Definition at line 391 of file SymGrpExpAngnWeighted.cpp.
References calculateExp, nnp::SymGrp::convLength, nnp::SymGrpBaseCutoff::cutoffAlpha, nnp::SymGrp::ec, nnp::SymGrp::elementMap, nnp::SymGrp::getIndex(), nnp::SymGrp::getPrintFormatCommon(), nnp::SymGrp::getPrintFormatMember(), nnp::SymGrp::index, members, nnp::SymGrpBaseCutoff::rc, nnp::strpr(), nnp::SymGrpBaseCutoff::subtype, and nnp::SymGrp::type.
|
private |
Vector of all group member pointers.
Definition at line 94 of file SymGrpExpAngnWeighted.h.
Referenced by addMember(), calculate(), parameterLines(), setScalingFactors(), and sortMembers().
|
private |
Vector indicating whether exponential term needs to be calculated.
Definition at line 96 of file SymGrpExpAngnWeighted.h.
Referenced by calculate(), parameterLines(), and sortMembers().
|
private |
Vector containing precalculated normalizing factor for each zeta.
Definition at line 98 of file SymGrpExpAngnWeighted.h.
Referenced by calculate(), setScalingFactors(), and sortMembers().
|
private |
Vector containing precalculated normalizing factor for derivatives.
Definition at line 100 of file SymGrpExpAngnWeighted.h.
Referenced by calculate(), and sortMembers().
|
private |
Vector containing values of all member symmetry functions.
Definition at line 102 of file SymGrpExpAngnWeighted.h.
Referenced by calculate(), and sortMembers().
|
private |
Vector containing values of all member symmetry functions.
Definition at line 104 of file SymGrpExpAngnWeighted.h.
Referenced by calculate(), and sortMembers().
|
private |
Vector containing values of all member symmetry functions.
Definition at line 106 of file SymGrpExpAngnWeighted.h.
Referenced by calculate(), and sortMembers().
|
private |
Vector containing values of all member symmetry functions.
Definition at line 108 of file SymGrpExpAngnWeighted.h.
Referenced by calculate(), and sortMembers().
|
private |
Vector containing values of all member symmetry functions.
Definition at line 110 of file SymGrpExpAngnWeighted.h.
Referenced by calculate(), and sortMembers().
|
private |
Vector containing values of all member symmetry functions.
Definition at line 112 of file SymGrpExpAngnWeighted.h.
Referenced by calculate(), and sortMembers().
|
private |
Vector containing values of all member symmetry functions.
Definition at line 114 of file SymGrpExpAngnWeighted.h.
Referenced by calculate(), and sortMembers().