All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SwitchingFunction.h
Go to the documentation of this file.
1 /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2  Copyright (c) 2013 The plumed team
3  (see the PEOPLE file at the root of the distribution for a list of names)
4 
5  See http://www.plumed-code.org for more information.
6 
7  This file is part of plumed, version 2.0.
8 
9  plumed is free software: you can redistribute it and/or modify
10  it under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  plumed is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  along with plumed. If not, see <http://www.gnu.org/licenses/>.
21 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
22 #ifndef __PLUMED_tools_SwitchingFunction_h
23 #define __PLUMED_tools_SwitchingFunction_h
24 
25 #include <string>
26 
27 namespace PLMD {
28 
29 class Log;
30 class Keywords;
31 
32 /// \ingroup TOOLBOX
33 /// Small class to compure switching functions in the form
34 /// In the future we might extend it so as to be set using
35 /// a string:
36 /// void set(std::string);
37 /// which can then be parsed for more complex stuff, e.g. exponentials
38 /// tabulated functions from file, matheval, etc...
40  bool init;
42  int nn,mm,a,b;
43  double invr0,d0,dmax,c,d;
44 public:
45  static void registerKeywords( Keywords& keys );
47  void set(int nn,int mm,double r_0,double d_0);
48  void set(const std::string& definition, std::string& errormsg);
49  std::string description() const ;
50  double calculate(double x,double&df)const;
51  double get_d0() const;
52  double get_r0() const;
53 };
54 
55 }
56 
57 #endif
58 
double calculate(double x, double &df) const
void set(int nn, int mm, double r_0, double d_0)
Small class to compure switching functions in the form In the future we might extend it so as to be s...
This class holds the keywords and their documentation.
Definition: Keywords.h:36
std::string description() const
static void registerKeywords(Keywords &keys)
enum PLMD::SwitchingFunction::@7 type