41 if (
ec != rhs.
getEc() )
return false;
44 if (
e1 != c.
e1)
return false;
50 if (
ec < rhs.
getEc() )
return true;
51 else if (
ec > rhs.
getEc() )
return false;
55 if (
e1 < c.
e1)
return true;
56 else if (
e1 > c.
e1)
return false;
62 if (symmetryFunction->
getType() !=
type)
return false;
74 if (sf->
getEc() !=
ec )
return false;
75 if (sf->
getE1() !=
e1 )
return false;
78 throw runtime_error(
"ERROR: Unable to add symmetry function members "
79 "with different conversion factors.\n");
95 comparePointerTargets<SymFncCompRad const>);
97 for (
size_t i = 0; i <
members.size(); i++)
105 for (
size_t i = 0; i <
members.size(); i++)
111#ifndef N2P2_NO_SF_CACHE
113 for (
size_t k = 0; k <
members.size(); ++k)
125 for (
size_t i = 0; i <
members.size(); i++)
141 double* result =
new double[
members.size()];
142 for (
size_t k = 0; k <
members.size(); ++k)
150 double const rij = n.
d;
154 double const*
const d1 = n.
dr.
r;
155 for (
size_t k = 0; k <
members.size(); ++k)
158 if (rij <=
mrl[k] || rij >=
mrc[k])
continue;
161#ifndef N2P2_NO_SF_CACHE
177 if (!derivatives || drad == 0.0)
continue;
181 double const p1drijx = drad * d1[0];
182 double const p1drijy = drad * d1[1];
183 double const p1drijz = drad * d1[2];
186#ifndef N2P2_FULL_SFD_MEMORY
195 double* dGdr = atom.
dGdr[ki].r;
200#ifndef N2P2_FULL_SFD_MEMORY
211 for (
size_t k = 0; k <
members.size(); ++k)
233 for (
size_t i = 0; i <
members.size(); ++i)
236 members[i]->getSubtype().c_str(),
239 members[i]->getLineNumber() + 1,
double getRl() const
Get private rl member variable.
Radial symmetry function with compact support (type 20)
std::size_t getE1() const
Get private e1 member variable.
void getCompactOnly(double const x, double &fx, double &dfx) const
Symmetry function base class.
double getConvLength() const
Get private convLength member variable.
double getRc() const
Get private rc member variable.
std::size_t getType() const
Get private type member variable.
std::size_t getEc() const
Get private ec member variable.
double rmin
Minimum radius within group.
double rmax
Maximum radius within group.
Radial symmetry function with compact support (type 20)
virtual std::vector< std::string > parameterLines() const
Give symmetry function group parameters on multiple lines.
std::size_t e1
Element index of neighbor atom (common feature).
std::vector< double > mrc
Member rc.
virtual void setScalingFactors()
Fill scalingFactors with values from member symmetry functions.
virtual bool operator<(SymGrp const &rhs) const
Overload < operator.
std::vector< double > mrl
Member rl.
virtual bool operator==(SymGrp const &rhs) const
Overload == operator.
virtual void sortMembers()
Sort member symmetry functions.
std::vector< SymFncCompRad const * > members
Vector of all group member pointers.
std::vector< std::vector< std::size_t > > mci
Member cache indices for actual neighbor element.
virtual bool addMember(SymFnc const *const symmetryFunction)
Potentially add a member to group.
virtual void calculate(Atom &atom, bool const derivatives) const
Calculate all symmetry functions of this group for one atom.
std::size_t type
Symmetry function type.
std::size_t getType() const
Get private type member variable.
std::size_t index
Symmetry function group index.
std::vector< size_t > memberIndex
Vector containing indices of all member symmetry functions.
std::string getPrintFormatCommon() const
Get common parameter line format string.
std::size_t ec
Element index of center atom (common feature).
std::vector< std::vector< std::size_t > > memberIndexPerElement
Vector containing per-element indices of all member symmetry functions.
std::size_t getEc() const
Get private ec member variable.
double convLength
Data set normalization length conversion factor.
std::set< std::string > parametersCommon
Set of common parameters IDs.
ElementMap elementMap
Copy of element map.
std::size_t getIndex() const
Get private index member variable.
std::string getPrintFormatMember() const
Get member parameter line format string.
std::vector< double > scalingFactors
Scaling factors of all member symmetry functions.
string strpr(const char *format,...)
String version of printf function.
Struct to store information on neighbor atoms.
std::vector< double > cache
Symmetry function cache (e.g. for cutoffs, compact functions).
std::size_t element
Element index of neighbor atom.
double d
Distance to neighbor atom.
Vec3D dr
Distance vector to neighbor atom.
std::vector< Vec3D > dGdr
Derivatives of symmetry functions with respect to neighbor coordinates.
Storage for a single atom.
std::vector< Neighbor > neighbors
Neighbor array (maximum number defined in macros.h.
std::vector< Vec3D > dGdr
Derivative of symmetry functions with respect to this atom's coordinates.
std::vector< double > G
Symmetry function values.
std::size_t numNeighbors
Total number of neighbors.
double r[3]
cartesian coordinates.