n2p2 - A neural network potential package
SymFncExpRadWeighted.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 SYMFNCEXPRADWEIGHTED_H
18#define SYMFNCEXPRADWEIGHTED_H
19
20#include "SymFncBaseCutoff.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;
30
49{
50public:
56 virtual bool operator==(SymFnc const& rhs) const;
59 virtual bool operator<(SymFnc const& rhs) const;
65 virtual void setParameters(std::string const& parameterString);
70 virtual void changeLengthUnit(double convLength);
75 virtual std::string getSettingsLine() const;
82 virtual void calculate(Atom& atom, bool const derivatives) const;
87 virtual std::string parameterLine() const;
92 virtual std::vector<
93 std::string> parameterInfo() const;
96 double getEta() const;
99 double getRs() const;
105 virtual double calculateRadialPart(double distance) const;
111 virtual double calculateAngularPart(double angle) const;
118 virtual bool checkRelevantElement(std::size_t index) const;
119#ifndef N2P2_NO_SF_CACHE
125 virtual std::vector<
126 std::string> getCacheIdentifiers() const;
127#endif
128
129private:
131 double eta;
133 double rs;
134};
135
137// Inlined function definitions //
139
140inline double SymFncExpRadWeighted::getEta() const { return eta; }
141inline double SymFncExpRadWeighted::getRs() const { return rs; }
142
143}
144
145#endif
Contains element map.
Definition: ElementMap.h:30
Intermediate class for SFs based on cutoff functions.
Weighted radial symmetry function (type 12)
virtual std::vector< std::string > parameterInfo() const
Get description with parameter names and values.
double rs
Shift of gaussian.
virtual void setParameters(std::string const &parameterString)
Set symmetry function parameters.
virtual std::string getSettingsLine() const
Get settings file line from currently set parameters.
virtual std::vector< std::string > getCacheIdentifiers() const
Get unique cache identifiers.
virtual double calculateRadialPart(double distance) const
Calculate (partial) symmetry function value for one given distance.
virtual bool operator<(SymFnc const &rhs) const
Overload < operator.
virtual std::string parameterLine() const
Give symmetry function parameters in one line.
double getRs() const
Get private rs member variable.
double eta
Width of gaussian.
double getEta() const
Get private eta member variable.
virtual void calculate(Atom &atom, bool const derivatives) const
Calculate symmetry function for one atom.
SymFncExpRadWeighted(ElementMap const &elementMap)
Constructor, sets type = 12.
virtual bool operator==(SymFnc const &rhs) const
Overload == operator.
virtual void changeLengthUnit(double convLength)
Change length unit.
virtual double calculateAngularPart(double angle) const
Calculate (partial) symmetry function value for one given angle.
virtual bool checkRelevantElement(std::size_t index) const
Check whether symmetry function is relevant for given element.
Symmetry function base class.
Definition: SymFnc.h:40
double convLength
Data set normalization length conversion factor.
Definition: SymFnc.h:296
std::size_t index
Symmetry function index (per element).
Definition: SymFnc.h:272
ElementMap elementMap
Copy of element map.
Definition: SymFnc.h:270
Definition: Atom.h:28
Storage for a single atom.
Definition: Atom.h:32