eabf1D.h

Go to the documentation of this file.
00001 //
00002 // The extended adaptive biasing force method has been contributed to NAMD by the following authors:
00003 //
00004 //    Haohao Fu and Christophe Chipot
00005 //    Laboratoire International Associ\'e
00006 //    Centre National de la Recherche Scientifique et University of Illinois at Urbana--Champaign
00007 //    Unit\'e Mixte de Recherche No. 7565, Universit\'e de Lorraine
00008 //    B.P. 70239, 54506 Vand\oe uvre-lès-Nancy cedex, France
00009 //
00010 // Copyright 2016, Centre National de la Recherche Scientifique
00011 //
00012 
00013 #ifndef EABF1D_H
00014 #define EABF1D_H
00015 
00016 #include <iostream>
00017 #include <string>
00018 #include <sstream>
00019 #include <vector>
00020 
00021 #include "eabf.h"
00022 
00023 class eABF1D: public eABF
00024 {
00025 public:
00026         eABF1D() {}
00027         // called when (re)start a namd run
00028         eABF1D(const double _lowerboundary,
00029                 const double _upperboundary,
00030                 const double _width,
00031                 const double _krestr,
00032                 const std::string& _outputfile,
00033                 const int _outputfreq,
00034                 const bool _restart,
00035                 const std::string& _inputfile,
00036                 const bool _outputgrad,
00037                 const int _gradfreq,
00038                 const double _temperature);
00039         virtual ~eABF1D() {}
00040 
00041         bool update(const std::string&);
00042 
00043 protected:
00044 
00045         std::vector<std::vector<int> > countall; // the distribution of samples, needed for eABF
00046         std::vector<double> sumx; // the sum of x in each bin, needed for eABF
00047         std::vector<double> sumx2; // the sum of x^2, needed for eABF
00048         std::vector<int> county; // the distribution in each bin, needed for eABF
00049 
00050         bool initialize();
00051 
00052         bool readfile();
00053 
00054         bool writefile() const;
00055 
00056         bool writehead(ofstream_namd&) const;
00057 
00058         bool calpmf() const;
00059 
00060         int convertscale(double lowerboundary, int window) const
00061         {
00062                 return int((lowerboundary - this->lowerboundary[0]) / width[0] + window);
00063         }
00064 
00065 };
00066 
00067 #endif // EABF1D_H

Generated on Mon Nov 20 01:17:12 2017 for NAMD by  doxygen 1.4.7