#include <BasisFunctions.h>
Public Types | |
typedef std::vector< Action * > | Dependencies |
Public Member Functions | |
BasisFunctions (const ActionOptions &ao) | |
bool | hasBeenSet () const |
std::string | getType () const |
std::string | getDescription () const |
unsigned int | getOrder () const |
unsigned int | getNumberOfBasisFunctions () const |
unsigned int | numberOfBasisFunctions () const |
unsigned int | getSize () const |
bool | arePeriodic () const |
bool | intervalBounded () const |
double | intervalMin () const |
double | intervalMax () const |
double | intervalRange () const |
double | intervalMean () const |
double | intervalDerivf () const |
std::string | intervalMinStr () const |
std::string | intervalMaxStr () const |
std::vector< double > | getUniformIntegrals () const |
std::vector< double > | getTargetDistributionIntegrals (const TargetDistribution *) const |
std::vector< std::string > | getKeywordList () const |
std::string | getKeywordString () const |
std::string | getBasisFunctionLabel (const unsigned int index) const |
std::vector< std::string > | getBasisFunctionLabels () const |
void | linkVesBias (VesBias *) |
void | linkAction (Action *) |
VesBias * | getPntrToVesBias () const |
Action * | getPntrToAction () const |
double | translateArgument (const double, bool &) const |
double | checkIfArgumentInsideInterval (const double, bool &) const |
void | apply () |
Apply an Action. More... | |
void | calculate () |
Calculate an Action. More... | |
double | getValue (const double, const unsigned int, double &, bool &) const |
virtual void | getAllValues (const double, double &, bool &, std::vector< double > &, std::vector< double > &) const =0 |
void | printInfo () const |
void | getMultipleValue (const std::vector< double > &, std::vector< double > &, std::vector< std::vector< double > > &, std::vector< std::vector< double > > &, const bool numerical_deriv=false) const |
void | writeBasisFunctionsToFile (OFile &, OFile &, const std::string &min_in, const std::string &max_in, unsigned int nbins=1000, const bool ignore_periodicity=false, const std::string &output_fmt="%15.8f", const bool numerical_deriv=false) const |
bool | checkUpdate () const |
Check if action should be updated. More... | |
void | addDependency (Action *) |
Specify that this Action depends on another one. More... | |
void | clearDependencies () |
Clear the dependence list for this Action. More... | |
long int | getStep () const |
Return the present timestep. More... | |
double | getTime () const |
Return the present time. More... | |
double | getTimeStep () const |
Return the timestep. More... | |
bool | getRestart () const |
Return true if we are doing a restart. More... | |
bool | getCPT () const |
Return true if we are doing at a checkpoint step. More... | |
std::string | getKeyword (const std::string &key) |
Just read one of the keywords and return the whole thing as a string. More... | |
template<class T > | |
void | parse (const std::string &key, T &t) |
Parse one keyword as generic type. 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 > | |
void | parseVector (const std::string &key, std::vector< T > &t) |
Parse one keyword as std::vector. More... | |
template<class T > | |
bool | parseNumberedVector (const std::string &key, const int no, std::vector< T > &t) |
Parse a vector with a number. More... | |
void | parseFlag (const std::string &key, bool &t) |
Parse one keyword as boolean flag. More... | |
void | error (const std::string &msg) const |
Crash calculation and print documentation. More... | |
void | warning (const std::string &msg) |
Issue a warning. More... | |
void | exit (int c=0) |
Exit with error code c. More... | |
void | checkRead () |
Check if Action was properly read. 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 | lockRequests () |
virtual void | unlockRequests () |
virtual void | beforeUpdate () |
Before Update. More... | |
virtual void | update () |
Update. More... | |
virtual void | runFinalJobs () |
RunFinalJobs This method is called once at the very end of the calculation. More... | |
void | fflush () |
Tell to the Action to flush open files. More... | |
virtual std::string | getDocumentation () const |
const std::string & | getLabel () const |
Returns the label. More... | |
const std::string & | getName () const |
Returns the name. More... | |
virtual void | activate () |
Set action to active. More... | |
virtual void | setOption (const std::string &s) |
virtual void | clearOptions () |
virtual void | deactivate () |
Set action to inactive. More... | |
bool | isActive () const |
Check if action is active. More... | |
bool | isOptionOn (const std::string &s) const |
Check if an option is on. More... | |
const Dependencies & | getDependencies () const |
Return dependencies. More... | |
virtual bool | checkNumericalDerivatives () const |
Check if numerical derivatives should be performed. More... | |
virtual bool | checkNeedsGradients () const |
Check if the action needs gradient. More... | |
virtual void | calculateNumericalDerivatives (ActionWithValue *a=NULL) |
Perform calculation using numerical derivatives N.B. More... | |
FILE * | fopen (const char *path, const char *mode) |
Opens a file. More... | |
int | fclose (FILE *fp) |
Closes a file opened with Action::fclose(). More... | |
void | calculateFromPDB (const PDB &) |
Calculate the action given a pdb file as input. 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... | |
bool | getExchangeStep () const |
Check if we are on an exchange step. More... | |
std::string | cite (const std::string &s) |
Cite a paper see PlumedMain::cite. More... | |
Static Public Member Functions | |
static void | registerKeywords (Keywords &) |
Public Attributes | |
PlumedMain & | plumed |
Reference to main plumed object. More... | |
Log & | log |
Reference to the log stream. More... | |
std::set< FILE * > | files |
Communicator & | comm |
Communicator & | multi_sim_comm |
const Keywords & | keywords |
Protected Member Functions | |
void | setupBF () |
void | setupInterval () |
void | setNumericalIntegrationBins (const unsigned int nbins) |
void | numericalUniformIntegrals () |
std::vector< double > | numericalTargetDistributionIntegralsFromGrid (const Grid *) const |
virtual void | setupLabels () |
virtual void | setupUniformIntegrals () |
template<typename T > | |
void | addKeywordToList (const std::string &, const T) |
template<typename T > | |
void | addKeywordToList (const std::string &, const std::vector< T > &) |
void | addKeywordToList (const std::string &, const bool) |
void | setPeriodic () |
void | setNonPeriodic () |
void | setIntervalBounded () |
void | setIntervalNonBounded () |
void | setType (const std::string &type_in) |
void | setDescription (const std::string &description_in) |
void | setNumberOfBasisFunctions (const unsigned int) |
void | setOrder (const unsigned int norder_in) |
void | setIntrinsicInterval (const double, const double) |
void | setIntrinsicInterval (const std::string &, const std::string &) |
void | setInterval (const double, const double) |
void | setInterval (const std::string &, const std::string &) |
double | intrinsicIntervalMin () const |
double | intrinsicIntervalMax () const |
std::string | intrinsicIntervalMinStr () const |
std::string | intrinsicIntervalMaxStr () const |
void | setUniformIntegral (const unsigned int, const double) |
void | setUniformIntegrals (const std::vector< double > &) |
void | setAllUniformIntegralsToZero () |
void | setLabelPrefix (const std::string &) |
void | setLabel (const unsigned int, const std::string &) |
void | setLabels (const std::vector< std::string > &) |
Private Member Functions | |
void | getAllValuesNumericalDerivs (const double, double &, bool &, std::vector< double > &, std::vector< double > &) const |
Private Attributes | |
bool | print_debug_info_ |
bool | has_been_set |
std::string | description_ |
std::string | type_ |
unsigned int | norder_ |
unsigned int | nbasis_ |
std::vector< std::string > | bf_keywords_ |
std::string | bf_label_prefix_ |
std::vector< std::string > | bf_labels_ |
bool | periodic_ |
bool | interval_bounded_ |
std::string | interval_intrinsic_min_str_ |
std::string | interval_intrinsic_max_str_ |
double | interval_intrinsic_min_ |
double | interval_intrinsic_max_ |
double | interval_intrinsic_range_ |
double | interval_intrinsic_mean_ |
std::string | interval_min_str_ |
std::string | interval_max_str_ |
double | interval_min_ |
double | interval_max_ |
double | interval_range_ |
double | interval_mean_ |
double | argT_derivf_ |
bool | numerical_uniform_integrals_ |
unsigned int | nbins_ |
std::vector< double > | uniform_integrals_ |
VesBias * | vesbias_pntr_ |
Action * | action_pntr_ |
|
inherited |
|
explicit |
|
virtualinherited |
Set action to active.
|
inherited |
Specify that this Action depends on another one.
|
protected |
|
protected |
|
inlineprotected |
|
inlinevirtual |
Apply an Action.
This method is called one time per step. The set of all Actions is applied in backward order.
Implements PLMD::Action.
|
inline |
|
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.
|
inlinevirtual |
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::multicolvar::MultiColvarBase, PLMD::ActionAtomistic, PLMD::multicolvar::DumpMultiColvar, PLMD::ActionWithArguments, PLMD::multicolvar::BridgedMultiColvarFunction, PLMD::vesselbase::ActionWithAveraging, PLMD::mapping::Mapping, and PLMD::vesselbase::ActionWithInputVessel.
|
inline |
|
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.
|
virtualinherited |
|
inlinevirtualinherited |
Set action to inactive.
|
inherited |
Crash calculation and print documentation.
|
inherited |
Exit with error code c.
|
inherited |
Closes a file opened with Action::fclose().
|
inherited |
Tell to the Action to flush open files.
|
inherited |
Opens a file.
This is similar to plain fopen, but with some extra functionality.
|
pure virtual |
|
private |
|
inline |
|
inline |
|
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.
|
inherited |
Just read one of the keywords and return the whole thing as a string.
|
inline |
std::string PLMD::ves::BasisFunctions::getKeywordString | ( | ) | const |
|
inlineinherited |
Returns the label.
void PLMD::ves::BasisFunctions::getMultipleValue | ( | const std::vector< double > & | args, |
std::vector< double > & | argsT, | ||
std::vector< std::vector< double > > & | values, | ||
std::vector< std::vector< double > > & | derivs, | ||
const bool | numerical_deriv = false |
||
) | const |
|
inlineinherited |
Returns the name.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
Return true if we are doing a restart.
|
inline |
|
inherited |
Return the present timestep.
std::vector< double > PLMD::ves::BasisFunctions::getTargetDistributionIntegrals | ( | const TargetDistribution * | targetdist_pntr | ) | const |
|
inherited |
Return the present time.
|
inherited |
Return the timestep.
|
inline |
|
inline |
double PLMD::ves::BasisFunctions::getValue | ( | const double | arg, |
const unsigned int | n, | ||
double & | argT, | ||
bool & | inside_range | ||
) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineinherited |
Check if action is active.
|
inlineinherited |
Check if an option is on.
void PLMD::ves::BasisFunctions::linkAction | ( | Action * | action_pntr_in | ) |
void PLMD::ves::BasisFunctions::linkVesBias | ( | VesBias * | vesbias_pntr_in | ) |
|
inlinevirtualinherited |
|
inline |
|
protected |
|
protected |
|
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::multicolvar::MultiColvarBase, PLMD::function::FuncPathMSD, PLMD::generic::DumpMassCharge, PLMD::generic::UpdateIf, PLMD::generic::Print, PLMD::generic::Read, PLMD::bias::ReweightTemperature, PLMD::gridtools::ConvertToFES, PLMD::colvar::Energy, and PLMD::colvar::CoordinationBase.
void PLMD::ves::BasisFunctions::printInfo | ( | ) | const |
|
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.
|
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::analysis::Analysis, PLMD::gridtools::ConvertToFES, and PLMD::gridtools::GridPrintingBase.
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
virtualinherited |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
protectedvirtual |
Reimplemented in PLMD::ves::BF_Fourier, PLMD::ves::BF_Cosine, PLMD::ves::BF_Sine, PLMD::ves::BF_Powers, and PLMD::ves::BF_Combined.
|
protectedvirtual |
Reimplemented in PLMD::ves::BF_Legendre, PLMD::ves::BF_Chebyshev, PLMD::ves::BF_Fourier, PLMD::ves::BF_Cosine, PLMD::ves::BF_Sine, and PLMD::ves::BF_Combined.
|
inline |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Update.
This method is called one time per step. The set of all Actions is updated in forward order.
Reimplemented in PLMD::isdb::CS2Backbone, PLMD::bias::MetaD, PLMD::bias::PBMetaD, PLMD::isdb::Metainference, PLMD::ves::Optimizer, PLMD::isdb::RDC, PLMD::eds::EDS, PLMD::ves::TargetDistribution, PLMD::bias::MaxEnt, PLMD::generic::DumpAtoms, PLMD::multicolvar::VolumeTetrapore, PLMD::bias::ExtendedLagrangian, PLMD::multicolvar::VolumeCavity, PLMD::generic::EffectiveEnergyDrift, PLMD::isdb::SAXS, PLMD::generic::DumpMassCharge, PLMD::isdb::JCoupling, PLMD::mapping::AdaptivePath, PLMD::generic::Print, PLMD::ves::OutputFesBias, PLMD::isdb::PRE, PLMD::adjmat::OutputCluster, PLMD::generic::Read, PLMD::isdb::NOE, PLMD::multicolvar::DumpMultiColvar, PLMD::vesselbase::ActionWithAveraging, PLMD::generic::Flush, PLMD::generic::DumpDerivatives, PLMD::generic::DumpForces, PLMD::generic::DumpProjections, PLMD::adjmat::DumpGraph, and PLMD::gridtools::GridPrintingBase.
|
inherited |
Issue a warning.
void PLMD::ves::BasisFunctions::writeBasisFunctionsToFile | ( | OFile & | ofile_values, |
OFile & | ofile_derivs, | ||
const std::string & | min_in, | ||
const std::string & | max_in, | ||
unsigned int | nbins = 1000 , |
||
const bool | ignore_periodicity = false , |
||
const std::string & | output_fmt = "%15.8f" , |
||
const bool | numerical_deriv = false |
||
) | const |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inherited |
|
private |
|
inherited |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inherited |
|
inherited |
Reference to the log stream.
|
inherited |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inherited |
Reference to main plumed object.
|
private |
|
private |
|
private |
|
private |
Hosted by GitHub | 1.8.14 |