All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FlexibleBin.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_core_FlexibleBin_h
23 #define __PLUMED_core_FlexibleBin_h
24 
25 #include<vector>
26 
27 namespace PLMD{
28 
29 class ActionWithArguments;
30 
32  private:
33  const int type;
34  // this contains all the infos about the CVs including periodicity
36  double sigma;
37  // variance is the matrix that really matters
38  std::vector<double> variance;
39  // this is only there
40  std::vector<double> average;
41  // minimum and maximum values
42  std::vector<double> sigmamin;
43  std::vector<double> sigmamax;
44  std::vector<bool> limitmax;
45  std::vector<bool> limitmin;
46  public:
47  /// a constructor that takes the pointer of the action that contains it
48  FlexibleBin(int type,ActionWithArguments *paction, double const &d, std::vector<double> &sigmamin, std::vector<double> &sigmamax );
49  /// update the average (always for diffusion) or calculate the geom covariance ( only when do_when_zero is zero)
50  void update(bool nowAddAHill );
51  std::vector<double> getMatrix() const;
52  std::vector<double> getInverseMatrix() const;
54 };
55 
56 
57 
58 }
59 #endif
FlexibleBin(int type, ActionWithArguments *paction, double const &d, std::vector< double > &sigmamin, std::vector< double > &sigmamax)
a constructor that takes the pointer of the action that contains it
Definition: FlexibleBin.cpp:33
ActionWithArguments * paction
Definition: FlexibleBin.h:35
std::vector< double > variance
Definition: FlexibleBin.h:38
std::vector< double > getMatrix() const
std::vector< double > sigmamin
Definition: FlexibleBin.h:42
std::vector< double > average
Definition: FlexibleBin.h:40
This is used to create PLMD::Action objects that take the output from some other Action as input...
std::vector< bool > limitmax
Definition: FlexibleBin.h:44
std::vector< bool > limitmin
Definition: FlexibleBin.h:45
std::vector< double > sigmamax
Definition: FlexibleBin.h:43
std::vector< double > getInverseMatrix() const
Calculate the matrix of (dcv_i/dx)*(dcv_j/dx)^-1 that is needed for the metrics in metadynamics...
void update(bool nowAddAHill)
update the average (always for diffusion) or calculate the geom covariance ( only when do_when_zero i...
Definition: FlexibleBin.cpp:66
const int type
Definition: FlexibleBin.h:33