22 #ifndef __PLUMED_analysis_Analysis_h
23 #define __PLUMED_analysis_Analysis_h
25 #include "core/ActionPilot.h"
26 #include "core/ActionWithArguments.h"
28 #define PLUMED_ANALYSIS_INIT(ao) Action(ao),Analysis(ao)
74 std::vector<std::vector<double> >
data;
102 void getDataPoint(
const unsigned& idata, std::vector<double>& point,
double& weight )
const ;
144 for(
unsigned i=0;i<point.size();++i) point[i]=
data[idata][i];
163 return nargs -
biases.size();
174 for(
unsigned i=0;i<
biases.size();++i) arg_vals.erase(arg_vals.end()-1);
bool reusing_data
Are we reusing data stored by another analysis action.
void runFinalJobs()
RunFinalJobs This method is called once at the very end of the calculation.
std::vector< Value * > biases
The biases we are using in reweighting and the args we store them separately.
bool nomemory
Are we treating each block of data separately.
bool getPeriodicityInformation(const unsigned &i, std::string &dmin, std::string &dmax)
Returns true if argument i is periodic together with the domain.
bool usingMemory() const
Are we analyzing each data block separately (if we are not this also returns the old normalization ) ...
unsigned idata
The piece of data we are inserting.
unsigned ndata
Number of data point we need to run analysis.
void getDataPoint(const unsigned &idata, std::vector< double > &point, double &weight) const
Retrieve the ith point.
bool ignore_reweight
If we are reusing data are we ignoring the reweighting in that data.
This is used to create PLMD::Action objects that are run with some set frequency. ...
OFile rfile
The checkpoint file.
void parseOutputFile(const std::string &key, std::string &filename)
This is used to read in output file names for analysis methods.
void finalizeWeights(const bool &ignore_weights)
Convert the stored log weights to proper weights.
void readDataFromFile(const std::string &filename)
Read in data from a file.
double retrieveNorm() const
This retrieves the value of norm from the analysis action.
bool firstAnalysisDone
Have we analyzed the data for the first time.
std::vector< std::vector< double > > data
The data we are going to analyze.
This is used to create PLMD::Action objects that take the output from some other Action as input...
std::vector< double > args
Tempory vector to store values of arguments.
std::vector< double > weights
double getNormalization() const
Return the normalization constant.
Analysis * mydatastash
The Analysis action that we are reusing data from.
double simtemp
The temperature at which we are running the calculation.
This class holds the keywords and their documentation.
This class is used to bring the relevant information to the Action constructor.
unsigned freq
The frequency with which we are performing analysis.
std::vector< Value * > & getArguments()
Returns an array of pointers to the arguments.
bool write_chq
Are we writing a checkpoint file.
std::vector< Value * > getArguments()
Overwrite ActionWithArguments getArguments() so that we don't return the bias.
unsigned getNumberOfDataPoints() const
Return the number of data points.
void apply()
Apply an Action.
This is the abstract base class to use for implementing new methods for analyzing the trajectory...
void prepare()
Prepare an Action for calculation This can be used by Action if they need some special preparation be...
unsigned getNumberOfArguments() const
Return the number of arguments (this overwrites the one in ActionWithArguments)
virtual void performAnalysis()=0
void calculate()
Calculate an Action.
bool single_run
Are we running only once for the whole trajectory.
Analysis(const ActionOptions &)
double rtemp
The temperature at which we want the histogram.
bool needeng
Do we need the energy (are we reweighting at a different temperature)
static void registerKeywords(Keywords &keys)
unsigned getNumberOfArguments() const
Returns the number of arguments.
std::string ofmt
The format to use in output files.
double norm
The value of the old normalization constant.
std::vector< double > logweights
The weights of all the data points.
std::string getOutputFormat() const
Return the format to use for numbers in output files.