#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 () |
|
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::vesselbase::ActionWithAveraging, PLMD::multicolvar::DumpMultiColvar, PLMD::ActionAtomistic, PLMD::multicolvar::MultiColvarBase, PLMD::analysis::AnalysisBase, PLMD::ActionWithArguments, PLMD::mapping::Mapping, PLMD::multicolvar::BridgedMultiColvarFunction, PLMD::vesselbase::ActionWithInputVessel, PLMD::isdb::EMMI, PLMD::isdb::MetainferenceBase, and PLMD::mapping::PCAVars.
|
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::Read, PLMD::generic::DumpMassCharge, PLMD::generic::UpdateIf, PLMD::generic::Print, PLMD::GenericMolInfo, PLMD::gridtools::ConvertToFES, PLMD::colvar::Energy, PLMD::colvar::ExtraCV, PLMD::colvar::CoordinationBase, PLMD::function::FuncPathGeneral, PLMD::maze::Optimizer, and PLMD::s2cm::S2ContactModel.
|
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 |
|
privateinherited |
Switch to activate Action on this step.
|
privateinherited |
Actions on which this Action depends.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inherited |
|
private |
|
privateinherited |
|
private |
|
inherited |
|
private |
|
private |
|
inherited |
|
privateinherited |
Label of the Action, as set with LABEL= in the plumed.dat file.
|
privateinherited |
Directive line.
This line is progressively erased during Action construction so as to check if all the present keywords are correct.
|
inherited |
Reference to the log stream.
|
private |
|
inherited |
|
privateinherited |
Name of the directive in the plumed.dat file.
|
private |
|
private |
|
private |
|
privateinherited |
Option that you might have enabled.
|
inherited |
Reference to main plumed object.
|
privateinherited |
|
privateinherited |
|
private |
|
private |
|
private |
|
private |
|
private |
|
privateinherited |
Update only after this time.
|
privateinherited |
Update only until this time.
|
private |
Hosted by GitHub | 1.8.17 |