#include <TargetDistribution.h>
Public Types | |
typedef std::vector< Action * > | Dependencies |
Public Member Functions | |
TargetDistribution (const ActionOptions &) | |
~TargetDistribution () | |
virtual void | activate () |
Set action to active. More... | |
void | addDependency (Action *) |
Specify that this Action depends on another one. More... | |
void | allowBiasCutoff () |
void | apply () override |
Apply an Action. More... | |
virtual void | beforeUpdate () |
Before Update. More... | |
bool | biasCutoffActive () const |
bool | biasGridNeeded () const |
bool | biasWithoutCutoffGridNeeded () const |
void | calculate () override |
Calculate an Action. More... | |
void | calculateFromPDB (const PDB &) |
Calculate the action given a pdb file as input. More... | |
virtual void | calculateNumericalDerivatives (ActionWithValue *a=NULL) |
Perform calculation using numerical derivatives N.B. More... | |
virtual bool | checkNeedsGradients () const |
Check if the action needs gradient. More... | |
virtual bool | checkNumericalDerivatives () const |
Check if numerical derivatives should be performed. More... | |
void | checkRead () |
Check if Action was properly read. More... | |
bool | checkUpdate () const |
Check if action should be updated. More... | |
std::string | cite (const std::string &s) |
Cite a paper see PlumedMain::cite. More... | |
void | clearDependencies () |
Clear the dependence list for this Action. More... | |
void | clearLogTargetDistGrid () |
virtual void | clearOptions () |
virtual void | deactivate () |
Set action to inactive. More... | |
void | doNotAllowBiasCutoff () |
void | error (const std::string &msg) const |
Crash calculation and print documentation. More... | |
void | exit (int c=0) |
Exit with error code c. More... | |
int | fclose (FILE *fp) |
Closes a file opened with Action::fclose(). More... | |
bool | fesGridNeeded () const |
void | fflush () |
Tell to the Action to flush open files. More... | |
FILE * | fopen (const char *path, const char *mode) |
Opens a file. More... | |
bool | forcedNormalization () const |
bool | getCPT () const |
Return true if we are doing at a checkpoint step. More... | |
const Dependencies & | getDependencies () const |
Return dependencies. More... | |
unsigned | getDimension () const |
virtual std::string | getDocumentation () const |
bool | getExchangeStep () const |
Check if we are on an exchange step. More... | |
std::string | getKeyword (const std::string &key) |
Just read one of the keywords and return the whole thing as a string. More... | |
const std::string & | getLabel () const |
Returns the label. More... | |
Grid * | getLogTargetDistGridPntr () const |
Grid | getMarginal (const std::vector< std::string > &) |
const std::string & | getName () const |
Returns the name. More... | |
bool | getRestart () const |
Return true if we are doing a restart. More... | |
long int | getStep () const |
Return the present timestep. More... | |
Grid * | getTargetDistGridPntr () const |
double | getTime () const |
Return the present time. More... | |
double | getTimeStep () const |
Return the timestep. More... | |
virtual double | getValue (const std::vector< double > &) const =0 |
bool | isActive () const |
Check if action is active. More... | |
bool | isBiasCutoffAllowed () const |
bool | isDynamic () const |
bool | isOptionOn (const std::string &s) const |
Check if an option is on. More... | |
bool | isStatic () const |
bool | isTargetDistGridShiftedToZero () const |
virtual void | linkAction (Action *) |
virtual void | linkBiasGrid (Grid *) |
virtual void | linkBiasWithoutCutoffGrid (Grid *) |
virtual void | linkFesGrid (Grid *) |
virtual void | linkVesBias (VesBias *) |
virtual void | lockRequests () |
template<class T > | |
void | parse (const std::string &key, T &t) |
Parse one keyword as generic type. More... | |
void | parseFlag (const std::string &key, bool &t) |
Parse one keyword as boolean flag. More... | |
template<class T > | |
bool | parseNumbered (const std::string &key, const int no, T &t) |
Parse one numbered keyword as generic type. More... | |
template<class T > | |
bool | parseNumberedVector (const std::string &key, const int no, std::vector< T > &t) |
Parse a vector with a number. More... | |
template<class T > | |
void | parseVector (const std::string &key, std::vector< T > &t) |
Parse one keyword as std::vector. More... | |
virtual void | prepare () |
Prepare an Action for calculation This can be used by Action if they need some special preparation before calculation. More... | |
virtual void | readAtomsFromPDB (const PDB &) |
This is overwritten in ActionAtomistic so that we can read the atoms from the pdb input file rather than taking them from the MD code. More... | |
void | readInRestartTargetDistGrid (const std::string &) |
virtual void | runFinalJobs () |
RunFinalJobs This method is called once at the very end of the calculation. More... | |
void | setDimension (const unsigned int dimension) |
virtual void | setOption (const std::string &s) |
void | setupBiasCutoff () |
void | setupGrids (const std::vector< Value *> &, const std::vector< std::string > &, const std::vector< std::string > &, const std::vector< unsigned int > &) |
virtual void | unlockRequests () |
void | update () override |
Update. More... | |
void | updateTargetDist () |
void | warning (const std::string &msg) |
Issue a warning. More... | |
Static Public Member Functions | |
static Grid | getMarginalDistributionGrid (Grid *, const std::vector< std::string > &) |
static double | integrateGrid (const Grid *) |
static double | normalizeGrid (Grid *) |
static void | registerKeywords (Keywords &) |
Public Attributes | |
Communicator & | comm |
std::set< FILE * > | files |
const Keywords & | keywords |
Log & | log |
Reference to the log stream. More... | |
Communicator & | multi_sim_comm |
PlumedMain & | plumed |
Reference to main plumed object. More... | |
Protected Member Functions | |
void | applyTargetDistModiferToGrid (TargetDistModifer *modifer_pntr) |
double | getBeta () const |
Grid * | getBiasGridPntr () const |
Grid * | getBiasWithoutCutoffGridPntr () const |
Grid * | getFesGridPntr () const |
Action * | getPntrToAction () const |
VesBias * | getPntrToVesBias () const |
Grid & | logTargetDistGrid () const |
void | normalizeTargetDistGrid () |
void | setBiasGridNeeded () |
void | setBiasWithoutCutoffGridNeeded () |
void | setDynamic () |
void | setFesGridNeeded () |
void | setForcedNormalization () |
void | setMinimumOfTargetDistGridToZero () |
void | setStatic () |
virtual void | setupAdditionalGrids (const std::vector< Value *> &, const std::vector< std::string > &, const std::vector< std::string > &, const std::vector< unsigned int > &) |
Grid & | targetDistGrid () const |
void | unsetForcedNormalization () |
virtual void | updateGrid () |
void | updateLogTargetDistGrid () |
Private Types | |
enum | TargetDistType { static_targetdist, dynamic_targetdist } |
Private Member Functions | |
void | calculateStaticDistributionGrid () |
void | checkNanAndInf () |
void | updateBiasCutoffForTargetDistGrid () |
Private Attributes | |
Action * | action_pntr_ |
bool | allow_bias_cutoff_ |
bool | bias_cutoff_active_ |
Grid * | bias_grid_pntr_ |
Grid * | bias_withoutcutoff_grid_pntr_ |
bool | check_nan_inf_ |
bool | check_nonnegative_ |
bool | check_normalization_ |
unsigned int | dimension_ |
Grid * | fes_grid_pntr_ |
bool | force_normalization_ |
std::vector< Value * > | grid_args_ |
Grid * | log_targetdist_grid_pntr_ |
bool | needs_bias_grid_ |
bool | needs_bias_withoutcutoff_grid_ |
bool | needs_fes_grid_ |
bool | shift_targetdist_to_zero_ |
bool | static_grid_calculated |
Grid * | targetdist_grid_pntr_ |
std::vector< TargetDistModifer * > | targetdist_modifer_pntrs_ |
enum PLMD::ves::TargetDistribution::TargetDistType | type_ |
VesBias * | vesbias_pntr_ |
|
inherited |
|
private |
|
explicit |
PLMD::ves::TargetDistribution::~TargetDistribution | ( | ) |
|
virtualinherited |
Set action to active.
|
inherited |
Specify that this Action depends on another one.
|
inline |
|
inlineoverridevirtual |
Apply an Action.
This method is called one time per step. The set of all Actions is applied in backward order.
Implements PLMD::Action.
|
protected |
|
inlinevirtualinherited |
Before Update.
This is a special method that is called just before the update() method. It can be used by actions that want to do something irrespectively of the fact that update() is active or not. In other words, this is always called, even when action is not active.
Reimplemented in PLMD::generic::UpdateIf.
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Calculate an Action.
This method is called one or more times per step. The set of all Actions is calculated in forward order.
Implements PLMD::Action.
|
inherited |
Calculate the action given a pdb file as input.
This is used to initialize things like distance from a point in CV map space given a pdb as an input file
|
virtualinherited |
Perform calculation using numerical derivatives N.B.
only pass an ActionWithValue to this routine if you know exactly what you are doing.
Reimplemented in PLMD::isdb::MetainferenceBase, PLMD::mapping::PCAVars, PLMD::ActionAtomistic, PLMD::multicolvar::MultiColvarBase, PLMD::analysis::AnalysisBase, PLMD::vesselbase::ActionWithAveraging, PLMD::mapping::Mapping, PLMD::multicolvar::DumpMultiColvar, PLMD::ActionWithArguments, PLMD::multicolvar::BridgedMultiColvarFunction, and PLMD::vesselbase::ActionWithInputVessel.
|
private |
|
private |
|
inlinevirtualinherited |
Check if the action needs gradient.
Reimplemented in PLMD::bias::MetaD, PLMD::bias::PBMetaD, and PLMD::generic::DumpProjections.
|
inlinevirtualinherited |
Check if numerical derivatives should be performed.
Reimplemented in PLMD::ActionWithValue.
|
inherited |
Check if Action was properly read.
This checks if Action::line is empty. It must be called after a final Action has been initialized
|
inherited |
Check if action should be updated.
|
inherited |
Cite a paper see PlumedMain::cite.
|
inherited |
Clear the dependence list for this Action.
void PLMD::ves::TargetDistribution::clearLogTargetDistGrid | ( | ) |
|
virtualinherited |
|
inlinevirtualinherited |
Set action to inactive.
|
inline |
|
inherited |
Crash calculation and print documentation.
|
inherited |
Exit with error code c.
|
inherited |
Closes a file opened with Action::fclose().
|
inline |
|
inherited |
Tell to the Action to flush open files.
|
inherited |
Opens a file.
This is similar to plain fopen, but with some extra functionality.
|
inline |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
inherited |
Return true if we are doing at a checkpoint step.
|
inlineinherited |
Return dependencies.
|
inline |
|
virtualinherited |
|
inherited |
Check if we are on an exchange step.
|
inlineprotected |
|
inherited |
Just read one of the keywords and return the whole thing as a string.
|
inlineinherited |
Returns the label.
|
inline |
Grid PLMD::ves::TargetDistribution::getMarginal | ( | const std::vector< std::string > & | args | ) |
|
static |
|
inlineinherited |
Returns the name.
|
inlineprotected |
|
inlineprotected |
|
inlineinherited |
Return true if we are doing a restart.
|
inherited |
Return the present timestep.
|
inline |
|
inherited |
Return the present time.
|
inherited |
Return the timestep.
|
pure virtual |
Implemented in PLMD::ves::TD_MultithermalMultibaric, PLMD::ves::TD_Uniform, PLMD::ves::TD_Gaussian, PLMD::ves::TD_Multicanonical, PLMD::ves::TD_Custom, PLMD::ves::TD_LinearCombination, PLMD::ves::TD_ProductCombination, PLMD::ves::TD_ExponentiallyModifiedGaussian, PLMD::ves::TD_Grid, PLMD::ves::TD_GeneralizedNormal, PLMD::ves::TD_GeneralizedExtremeValue, PLMD::ves::TD_VonMises, PLMD::ves::TD_WellTempered, PLMD::ves::TD_ProductDistribution, PLMD::ves::TD_Chi, PLMD::ves::TD_ChiSquared, and PLMD::ves::TD_Exponential.
|
static |
|
inlineinherited |
Check if action is active.
|
inline |
|
inline |
|
inlineinherited |
Check if an option is on.
|
inline |
|
inline |
|
virtual |
Reimplemented in PLMD::ves::TD_LinearCombination, PLMD::ves::TD_ProductCombination, and PLMD::ves::TD_ProductDistribution.
|
virtual |
Reimplemented in PLMD::ves::TD_LinearCombination, PLMD::ves::TD_ProductCombination, and PLMD::ves::TD_ProductDistribution.
|
virtual |
Reimplemented in PLMD::ves::TD_LinearCombination, PLMD::ves::TD_ProductCombination, and PLMD::ves::TD_ProductDistribution.
|
virtual |
Reimplemented in PLMD::ves::TD_LinearCombination, PLMD::ves::TD_ProductCombination, and PLMD::ves::TD_ProductDistribution.
|
virtual |
Reimplemented in PLMD::ves::TD_LinearCombination, PLMD::ves::TD_ProductCombination, and PLMD::ves::TD_ProductDistribution.
|
inlinevirtualinherited |
|
inlineprotected |
|
static |
|
inlineprotected |
|
inherited |
Parse one keyword as generic type.
|
inherited |
Parse one keyword as boolean flag.
|
inherited |
Parse one numbered keyword as generic type.
|
inherited |
Parse a vector with a number.
|
inherited |
Parse one keyword as std::vector.
|
virtualinherited |
Prepare an Action for calculation This can be used by Action if they need some special preparation before calculation.
Typical case is for collective variables which would like to change their list of requested atoms. By default (if not overridden) does nothing.
Reimplemented in PLMD::isdb::EMMI, PLMD::function::FuncPathMSD, PLMD::generic::Plumed, PLMD::multicolvar::MultiColvarBase, PLMD::generic::DumpMassCharge, PLMD::generic::Read, PLMD::maze::Optimizer, PLMD::generic::UpdateIf, PLMD::generic::Print, PLMD::colvar::Energy, PLMD::SetupMolInfo, PLMD::gridtools::ConvertToFES, PLMD::colvar::ExtraCV, and PLMD::colvar::CoordinationBase.
|
inlinevirtualinherited |
This is overwritten in ActionAtomistic so that we can read the atoms from the pdb input file rather than taking them from the MD code.
Reimplemented in PLMD::ActionAtomistic.
void PLMD::ves::TargetDistribution::readInRestartTargetDistGrid | ( | const std::string & | grid_fname | ) |
|
static |
|
inlinevirtualinherited |
RunFinalJobs This method is called once at the very end of the calculation.
The set of all Actions in run for the final time in forward order.
Reimplemented in PLMD::vesselbase::ActionWithAveraging, PLMD::analysis::AnalysisBase, PLMD::gridtools::ConvertToFES, PLMD::analysis::ReadDissimilarityMatrix, and PLMD::gridtools::GridPrintingBase.
|
inlineprotected |
|
inlineprotected |
void PLMD::ves::TargetDistribution::setDimension | ( | const unsigned int | dimension | ) |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
virtualinherited |
|
inlineprotected |
|
inlineprotectedvirtual |
void PLMD::ves::TargetDistribution::setupBiasCutoff | ( | ) |
void PLMD::ves::TargetDistribution::setupGrids | ( | const std::vector< Value *> & | arguments, |
const std::vector< std::string > & | min, | ||
const std::vector< std::string > & | max, | ||
const std::vector< unsigned int > & | nbins | ||
) |
|
inlineprotected |
|
inlinevirtualinherited |
|
inlineprotected |
|
inlineoverridevirtual |
Update.
This method is called one time per step. The set of all Actions is updated in forward order.
Reimplemented from PLMD::Action.
|
private |
|
inlineprotectedvirtual |
|
protected |
void PLMD::ves::TargetDistribution::updateTargetDist | ( | ) |
|
inherited |
Issue a warning.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inherited |
|
private |
|
private |
|
inherited |
|
private |
|
private |
|
inherited |
|
inherited |
Reference to the log stream.
|
private |
|
inherited |
|
private |
|
private |
|
private |
|
inherited |
Reference to main plumed object.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Hosted by GitHub | 1.8.14 |