22 #include "tools/HistogramBead.h"
41 keys.add(
"compulsory",
"NBINS",
"The number of equal width bins you want to divide the range into");
42 keys.addFlag(
"NORM",
false,
"calculate the fraction of values rather than the number");
46 keys.
reserve(
"optional",
"HISTOGRAM",
"calculate a discretized histogram of the distribution of values. "
47 "This shortcut allows you to calculates NBIN quantites like BETWEEN.");
54 if(norm) normstr=
" NORM";
56 for(
unsigned i=0;i<bins.size();++i)
addVessel(
"BETWEEN",bins[i] + normstr);
static void registerKeywords(Keywords &keys)
static void registerKeywords(Keywords &keys)
static void generateBins(const std::string ¶ms, const std::string &dd, std::vector< std::string > &bins)
static void reserveKeyword(Keywords &keys)
This class holds the keywords and their documentation.
void parseFlag(const std::string &key, bool &t)
Parse one keyword as boolean flag.
#define PLUMED_REGISTER_VESSEL(classname, keyword)
void addVessel(const std::string &name, const std::string &intput)
void reserve(const std::string &t, const std::string &k, const std::string &d, const bool isvessel=false)
Reserve a keyword.
This class is used to pass the input to Vessels.
Histogram(const VesselOptions &da)
static void registerKeywords(Keywords &keys)
std::string getAllInput()
This returns the whole input line (it is used for less_than/more_than/between)
T norm(const std::vector< T > &A)
Calculate the dot product between a vector and itself.