n2p2 - A neural network potential package
SymGrpExpAngnWeighted.h
Go to the documentation of this file.
1// n2p2 - A neural network potential package
2// Copyright (C) 2018 Andreas Singraber (University of Vienna)
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <https://www.gnu.org/licenses/>.
16
17#ifndef SYMGRPEXPANGNWEIGHTED_H
18#define SYMGRPEXPANGNWEIGHTED_H
19
20#include "SymGrpBaseCutoff.h"
21#include <cstddef> // std::size_t
22#include <string> // std::string
23#include <vector> // std::vector
24
25namespace nnp
26{
27
28struct Atom;
29class ElementMap;
30class SymFnc;
31class SymFncExpAngnWeighted;
32
50{
51public:
57 virtual bool operator==(SymGrp const& rhs) const;
60 virtual bool operator<(SymGrp const& rhs) const;
69 virtual bool addMember(SymFnc const* const symmetryFunction);
74 virtual void sortMembers();
77 virtual void setScalingFactors();
84 virtual void calculate(Atom& atom, bool const derivatives) const;
89 virtual std::vector<std::string>
90 parameterLines() const;
91
92private:
94 std::vector<SymFncExpAngnWeighted const*> members;
96 std::vector<bool> calculateExp;
98 std::vector<double> factorNorm;
100 std::vector<double> factorDeriv;
102 std::vector<bool> useIntegerPow;
104 std::vector<int> zetaInt;
106 std::vector<double> eta;
108 std::vector<double> rs;
110 std::vector<double> lambda;
112 std::vector<double> zeta;
114 std::vector<double> zetaLambda;
115};
116
117}
118
119#endif
Contains element map.
Definition: ElementMap.h:30
Symmetry function base class.
Definition: SymFnc.h:40
Weighted angular symmetry function group (type 13)
std::vector< double > zetaLambda
Vector containing values of all member symmetry functions.
virtual bool addMember(SymFnc const *const symmetryFunction)
Potentially add a member to group.
std::vector< double > eta
Vector containing values of all member symmetry functions.
std::vector< bool > useIntegerPow
Vector containing values of all member symmetry functions.
SymGrpExpAngnWeighted(ElementMap const &elementMap)
Constructor, sets type = 13.
std::vector< double > zeta
Vector containing values of all member symmetry functions.
std::vector< double > lambda
Vector containing values of all member symmetry functions.
std::vector< double > rs
Vector containing values of all member symmetry functions.
virtual void setScalingFactors()
Fill scalingFactors with values from member symmetry functions.
virtual bool operator==(SymGrp const &rhs) const
Overload == operator.
std::vector< int > zetaInt
Vector containing values of all member symmetry functions.
virtual void calculate(Atom &atom, bool const derivatives) const
Calculate all symmetry functions of this group for one atom.
std::vector< bool > calculateExp
Vector indicating whether exponential term needs to be calculated.
std::vector< double > factorDeriv
Vector containing precalculated normalizing factor for derivatives.
virtual bool operator<(SymGrp const &rhs) const
Overload < operator.
virtual void sortMembers()
Sort member symmetry functions.
std::vector< SymFncExpAngnWeighted const * > members
Vector of all group member pointers.
std::vector< double > factorNorm
Vector containing precalculated normalizing factor for each zeta.
virtual std::vector< std::string > parameterLines() const
Give symmetry function group parameters on multiple lines.
ElementMap elementMap
Copy of element map.
Definition: SymGrp.h:108
Definition: Atom.h:29
Storage for a single atom.
Definition: Atom.h:33