n2p2 - A neural network potential package
|
Weighted wide angular symmetry function with compact support (type 25) More...
#include <SymGrpCompAngwWeighted.h>
Public Member Functions | |
SymGrpCompAngwWeighted (ElementMap const &elementMap) | |
Constructor, sets type = 25. 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 | calculate (Atom &atom, bool const derivatives) const |
Calculate all symmetry functions of this group for one atom. More... | |
Public Member Functions inherited from nnp::SymGrpBaseCompAngWeighted | |
virtual void | setScalingFactors () |
Fill scalingFactors with values from member symmetry functions. More... | |
virtual std::vector< std::string > | parameterLines () const |
Give symmetry function group parameters on multiple lines. More... | |
Public Member Functions inherited from nnp::SymGrpBaseComp | |
double | getRmin () const |
Getter for rmin. More... | |
double | getRmax () const |
Getter for rmax. 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 Member Functions | |
virtual std::vector< SymFncBaseCompAngWeighted const * > | getMembers () const |
Get symmetry function members. More... | |
Private Attributes | |
std::vector< SymFncCompAngwWeighted const * > | members |
Vector of all group member pointers. 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::SymGrpBaseCompAngWeighted | |
SymGrpBaseCompAngWeighted (std::size_t type, ElementMap const &elementMap) | |
Constructor, sets type. More... | |
virtual std::vector< SymFncBaseCompAngWeighted const * > | getMembers () const =0 |
Get symmetry function members. More... | |
Protected Member Functions inherited from nnp::SymGrpBaseComp | |
SymGrpBaseComp (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::SymGrpBaseCompAngWeighted | |
std::vector< bool > | calculateComp |
Vector indicating whether compact function needs to be recalculated. More... | |
std::vector< double > | mrl |
Member rl. More... | |
std::vector< double > | mrc |
Member rc. More... | |
std::vector< double > | mal |
Member angleLeft. More... | |
std::vector< double > | mar |
Member angleRight. More... | |
std::vector< std::vector< std::vector< std::size_t > > > | mci |
Member cache indices for actual neighbor element. More... | |
Protected Attributes inherited from nnp::SymGrpBaseComp | |
double | rmin |
Minimum radius within group. More... | |
double | rmax |
Maximum radius within group. 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 wide angular symmetry function with compact support (type 25)
\[ G^{25}_i = \sum_{\substack{j,k\neq i \\ j < k}} Z_j Z_k C(r_{ij}, r_l, r_c) C(r_{ik}, r_l, r_c) C(\theta_{ijk}, \theta_l, \theta_r), \]
where \(C(x, x_\text{low}, x_\text{high})\) is a function with compact support \(\left[x_\text{low}, x_\text{high}\right]\). \(Z_j\) is defined as the atomic number of the neighbor atom \(j\).
Common features:
Definition at line 50 of file SymGrpCompAngwWeighted.h.
SymGrpCompAngwWeighted::SymGrpCompAngwWeighted | ( | ElementMap const & | elementMap | ) |
Constructor, sets type = 25.
Definition at line 30 of file SymGrpCompAngwWeighted.cpp.
|
virtual |
Overload == operator.
Implements nnp::SymGrp.
Definition at line 36 of file SymGrpCompAngwWeighted.cpp.
References nnp::SymGrp::ec, nnp::SymGrp::getEc(), nnp::SymGrp::getType(), and nnp::SymGrp::type.
|
virtual |
Overload < operator.
Implements nnp::SymGrp.
Definition at line 43 of file SymGrpCompAngwWeighted.cpp.
References nnp::SymGrp::ec, nnp::SymGrp::getEc(), nnp::SymGrp::getType(), 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 52 of file SymGrpCompAngwWeighted.cpp.
References nnp::SymGrp::convLength, nnp::SymGrp::ec, nnp::SymFnc::getConvLength(), nnp::SymFnc::getEc(), nnp::SymFnc::getRc(), nnp::SymFncBaseComp::getRl(), nnp::SymFnc::getType(), members, nnp::SymGrpBaseComp::rmax, nnp::SymGrpBaseComp::rmin, and nnp::SymGrp::type.
|
virtual |
Sort member symmetry functions.
Also allocate and precalculate additional stuff.
Implements nnp::SymGrp.
Definition at line 81 of file SymGrpCompAngwWeighted.cpp.
References nnp::SymGrpBaseCompAngWeighted::calculateComp, nnp::SymGrp::getIndex(), nnp::SymGrpBaseCompAngWeighted::mal, nnp::SymGrpBaseCompAngWeighted::mar, nnp::SymGrpBaseCompAngWeighted::mci, nnp::SymGrp::memberIndex, nnp::SymGrp::memberIndexPerElement, members, nnp::SymGrpBaseCompAngWeighted::mrc, and nnp::SymGrpBaseCompAngWeighted::mrl.
|
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 119 of file SymGrpCompAngwWeighted.cpp.
References nnp::ElementMap::atomicNumber(), nnp::Atom::Neighbor::cache, nnp::Atom::Neighbor::d, nnp::Atom::Neighbor::dGdr, nnp::Atom::dGdr, nnp::Atom::Neighbor::dr, nnp::Atom::Neighbor::element, nnp::SymGrp::elementMap, nnp::Atom::G, nnp::SymFncBaseCompAngWeighted::getCompactAngle(), nnp::SymFncBaseCompAngWeighted::getCompactRadial(), nnp::SymGrpBaseCompAngWeighted::mal, nnp::SymGrpBaseCompAngWeighted::mar, nnp::SymGrpBaseCompAngWeighted::mci, nnp::SymGrp::memberIndex, nnp::SymGrp::memberIndexPerElement, members, nnp::SymGrpBaseCompAngWeighted::mrc, nnp::SymGrpBaseCompAngWeighted::mrl, nnp::Atom::neighbors, nnp::Atom::numNeighbors, nnp::Vec3D::r, nnp::SymGrpBaseComp::rmin, and nnp::SymGrp::scalingFactors.
|
inlineprivatevirtual |
Get symmetry function members.
Implements nnp::SymGrpBaseCompAngWeighted.
Definition at line 96 of file SymGrpCompAngwWeighted.h.
|
private |
Vector of all group member pointers.
Definition at line 92 of file SymGrpCompAngwWeighted.h.
Referenced by addMember(), calculate(), getMembers(), and sortMembers().