Provides the keyword <a href="../../user-doc/html/_"_m_a_z_e__m_e_m_e_t_i_c__s_a_m_p_l_i_n_g.html"> "MAZE_MEMETIC_SAMPLING More...
#include "maze/Memetic.h"
Public Types | |
typedef std::vector< Action * > | Dependencies |
Public Member Functions | |
Memetic (const ActionOptions &ao) | |
PLMD constructor. More... | |
~Memetic () | |
Destructor required for deriving classes. More... | |
virtual void | activate () |
Set action to active. More... | |
void | addComponent (const std::string &name) |
Add a value with a name like label.name. More... | |
void | addComponentWithDerivatives (const std::string &name) |
Add a value with a name like label.name that has derivatives. More... | |
void | addDependency (Action *) |
Specify that this Action depends on another one. More... | |
void | addValue () |
Add a value with the name label. More... | |
void | addValueWithDerivatives () |
Add a value with the name label that has derivatives. More... | |
void | allowToAccessGlobalForces () |
Allow calls to modifyGlobalForce() More... | |
void | applyForces () |
virtual void | beforeUpdate () |
Before Update. More... | |
void | calculate () |
Calculate the optimal direction of pulling. More... | |
void | calculateAtomicNumericalDerivatives (ActionWithValue *a, const unsigned &startnum) |
Numerical derivative routine to use when using Actions that inherit from BOTH ActionWithArguments and ActionAtomistic. More... | |
void | calculateFromPDB (const PDB &) |
Calculate the action given a pdb file as input. More... | |
void | calculateNumericalDerivatives (ActionWithValue *a=NULL) override |
N.B. More... | |
Vector | center_of_mass () const |
Calculate the center of mass. More... | |
void | changeBox (const Tensor &newbox) |
Change the box shape. More... | |
virtual void | checkFieldsAllowed () |
bool | checkIsEnergy () |
virtual bool | checkNeedsGradients () const |
Check if the action needs gradient. More... | |
virtual bool | checkNumericalDerivatives () const |
Check if numerical derivatives should be performed. More... | |
bool | checkNumericalDerivatives () const override |
Check if numerical derivatives should be used. 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... | |
virtual void | clearDerivatives () |
Clear the derivatives of values wrt parameters. More... | |
void | clearInputForces () |
Clear the forces on the values. More... | |
virtual void | clearOptions () |
void | clearOutputForces () |
void | componentIsNotPeriodic (const std::string &name) |
Set your value component to have no periodicity. More... | |
void | componentIsPeriodic (const std::string &name, const std::string &min, const std::string &max) |
Set the value to be periodic with a particular domain. More... | |
Value * | copyOutput (const std::string &name) const |
Return a pointer to the value with name (this is used to retrieve values in other PLMD::Actions) You should NEVER use this routine to refer to the components of your PLMD::Action. More... | |
Value * | copyOutput (const unsigned &n) const |
Return a pointer to the value with this number (this is used to retrieve values in other PLMD::Actions) You should NEVER use this routine to refer to the components of your PLMD::Action. More... | |
virtual void | deactivate () |
Set action to inactive. More... | |
virtual bool | doNotCalculateDerivatives () const |
Are we not calculating derivatives. More... | |
void | doNotForce () |
Skip atom forces - use with care. More... | |
void | doNotRetrieve () |
Skip atom retrieval - use with care. More... | |
void | error (const std::string &msg) const |
Crash calculation and print documentation. More... | |
bool | exists (const std::string &name) const |
Check if a value with a particular name is present. More... | |
void | exit (int c=0) |
Exit with error code c. More... | |
int | fclose (FILE *fp) |
Closes a file opened with Action::fclose(). More... | |
void | fflush () |
Tell to the Action to flush open files. More... | |
FILE * | fopen (const char *path, const char *mode) |
Opens a file. More... | |
unsigned int | get_capacity () const |
Setters and getters. More... | |
double | get_cauchy_mean () const |
double | get_cauchy_spread () const |
unsigned int | get_coding_len () const |
std::string | get_label () const |
Getters and setters. More... | |
double | get_local_search_rate () const |
std::string | get_local_search_type () const |
double | get_mating_rate () const |
double | get_mutation_rate () const |
unsigned int | get_n_global_iterations () const |
unsigned int | get_n_iterations () const |
unsigned int | get_n_local_iterations () const |
unsigned int | get_n_threads_openmp () const |
double | get_nl_cutofff () const |
unsigned int | get_nl_stride () const |
Vector | get_opt () const |
double | get_opt_value () const |
unsigned int | get_optimizer_stride () const |
unsigned int | get_rank_openmp () const |
double | get_sampling_radius () const |
unsigned int | get_stride_openmp () const |
AtomNumber | getAbsoluteIndex (int i) const |
Get the absolute index of an atom. More... | |
virtual const std::vector< AtomNumber > & | getAbsoluteIndexes () const |
Get the vector of absolute indexes. More... | |
const Tensor & | getBox () const |
Get box shape. More... | |
double | getCharge (int i) const |
Get charge of i-th atom. More... | |
std::string | getComponentsList () const |
get a string that contains all the available components More... | |
std::vector< std::string > | getComponentsVector () const |
get a vector that contains the label for all the components More... | |
bool | getCPT () const |
Return true if we are doing at a checkpoint step. More... | |
const Dependencies & | getDependencies () const |
Return dependencies. More... | |
virtual std::string | getDocumentation () const |
const double & | getEnergy () const |
Get energy. More... | |
bool | getExchangeStep () const |
Check if we are on an exchange step. More... | |
const Vector & | getGlobalPosition (AtomNumber) const |
Get position of i-th atom (access by absolute AtomNumber). 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... | |
double | getMass (int i) const |
Get mass of i-th atom. More... | |
const std::string & | getName () const |
Returns the name. More... | |
unsigned | getNumberOfAtoms () const |
Get number of available atoms. More... | |
int | getNumberOfComponents () const |
Returns the number of values defined. More... | |
unsigned | getNumberOfDerivatives () override |
double | getOutputQuantity (const std::string &name) const |
Get the value with a specific name (N.B. if there is no such value this returns zero) More... | |
double | getOutputQuantity (const unsigned j) const |
Get the value of one of the components of the PLMD::Action. More... | |
const Pbc & | getPbc () const |
Get reference to Pbc. More... | |
const Vector & | getPosition (int) const |
Get position of i-th atom (access by relative index) More... | |
const std::vector< Vector > & | getPositions () const |
Get the array of all positions. More... | |
bool | getRestart () const |
Return true if we are doing a restart. 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... | |
unsigned | getTotAtoms () const |
Get total number of atoms, including virtual ones. More... | |
const std::set< AtomNumber > & | getUnique () const |
const std::set< AtomNumber > & | getUniqueLocal () const |
void | interpretAtomList (std::vector< std::string > &strings, std::vector< AtomNumber > &t) |
Convert a set of read in strings into an atom list (this is used in parseAtomList) More... | |
bool | is_local_search_on () const |
bool | is_pbc_on () const |
bool | isActive () const |
Check if action is active. More... | |
bool | isOptionOn (const std::string &s) const |
Check if an option is on. More... | |
void | local_search_off () |
void | local_search_on () |
void | lockRequests () override |
void | makeWhole () |
Make atoms whole, assuming they are in the proper order. More... | |
double & | modifyForceOnEnergy () |
Get a reference to force on energy. More... | |
double & | modifyForceOnExtraCV () |
Get a reference to force on extraCV. More... | |
std::vector< Vector > & | modifyForces () |
Get a reference to forces array. More... | |
Vector & | modifyGlobalForce (AtomNumber) |
Get modifiable force of i-th atom (access by absolute AtomNumber). More... | |
Pbc & | modifyGlobalPbc () |
Get modifiable PBC Should be used by action that need to modify the stored box. More... | |
Vector & | modifyGlobalPosition (AtomNumber) |
Get modifiable position of i-th atom (access by absolute AtomNumber). More... | |
Tensor & | modifyGlobalVirial () |
Get modifiable virial Should be used by action that need to modify the stored virial. More... | |
Tensor & | modifyVirial () |
Get a reference to virial array. More... | |
void | optimize () override |
Each class deriving from Optimizer needs to override this function. More... | |
virtual double | pairing (double distance) const |
The pairing function needs to be overridden by a specific optimizer. More... | |
template<class T > | |
void | parse (const std::string &key, T &t) |
Parse one keyword as generic type. More... | |
void | parseAtomList (const std::string &key, const int num, std::vector< AtomNumber > &t) |
Parse an list of atom with a numbred keyword. More... | |
void | parseAtomList (const std::string &key, std::vector< AtomNumber > &t) |
Parse a list of atoms without a numbered keyword. 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... | |
void | pbc_off () |
void | pbc_on () |
void | pbcApply (std::vector< Vector > &dlist, unsigned max_index=0) const |
Applies PBCs to a seriens of positions or distances. More... | |
Vector | pbcDistance (const Vector &, const Vector &) const |
Compute the pbc distance between two positions. More... | |
void | prepare () |
Prepare the neighbor list. More... | |
void | readAtomsFromPDB (const PDB &pdb) override |
Read in an input file containing atom positions and calculate the action for the atomic configuration therin. More... | |
void | requestAtoms (const std::vector< AtomNumber > &a, const bool clearDep=true) |
Request an array of atoms. More... | |
virtual void | retrieveAtoms () |
virtual void | runFinalJobs () |
RunFinalJobs This method is called once at the very end of the calculation. More... | |
double | sampling_radius () |
Calculate sampling radius as the minimal distance between two groups in neighbors list. More... | |
double | score () |
Score a ligand-protein configuration. More... | |
void | set_capacity (unsigned int) |
void | set_cauchy_mean (double) |
void | set_cauchy_spread (double) |
void | set_coding_len (unsigned int) |
void | set_label (const std::string &) |
void | set_local_search_rate (double) |
void | set_local_search_type (const std::string &) |
void | set_mating_rate (double) |
void | set_mutation_rate (double) |
void | set_n_global_iterations (unsigned int) |
void | set_n_iterations (unsigned int) |
void | set_n_local_iterations (unsigned int) |
void | set_n_threads_openmp (unsigned int) |
void | set_nl_cutoff (double) |
void | set_nl_stride (unsigned int) |
void | set_opt (Vector) |
void | set_opt_value (double) |
void | set_optimizer_stride (unsigned int) |
void | set_rank_openmp (unsigned int) |
void | set_sampling_radius (double) |
void | set_stride_openmp (unsigned int) |
void | setForcesOnAtoms (const std::vector< double > &forcesToApply, unsigned ind=0) |
Add the forces to the atoms. More... | |
void | setGradientsIfNeeded () |
Calculate the gradients and store them for all the values (need for projections) More... | |
void | setNotPeriodic () |
Set your default value to have no periodicity. More... | |
virtual void | setOption (const std::string &s) |
void | setPeriodic (const std::string &min, const std::string &max) |
Set the value to be periodic with a particular domain. More... | |
void | setValue (Value *, double) |
Set the value. More... | |
void | start_step_0 () |
void | start_step_stride () |
virtual void | turnOnDerivatives () |
Activate the calculation of derivatives. More... | |
void | unlockRequests () override |
virtual void | update () |
Update. More... | |
void | update_nl () |
Load new positions of atoms in the neighbor list. More... | |
void | updateUniqueLocal () |
updates local unique atoms More... | |
void | useNumericalDerivatives () |
This forces the class to use numerical derivatives. More... | |
void | warning (const std::string &msg) |
Issue a warning. More... | |
Static Public Member Functions | |
static void | componentsAreNotOptional (Keywords &keys) |
Puts a message into the manual that the components always output. More... | |
static void | noAnalyticalDerivatives (Keywords &keys) |
Insist that numerical derivatives should always be used for an action and make this fact appear in the manual. More... | |
static void | registerKeywords (Keywords &keys) |
Registers PLMD keywords. More... | |
static void | useCustomisableComponents (Keywords &keys) |
The components in the action will depend on the user. More... | |
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... | |
Value * | value_action_ |
Loss value. More... | |
Value * | value_sampling_radius_ |
Sampling radiues value. More... | |
Value * | value_x_ |
Biased cv. More... | |
Value * | value_y_ |
Value * | value_z_ |
Protected Member Functions | |
void | adaptive_random_search (Member &m, const std::vector< double > ¶ms={1.0, 1.e-5, 2.0, 2.0, 3.0, 3.0}) |
Solis-Wets random walk. More... | |
void | annealing (Member &m, const std::vector< double > ¶ms={300.0, 0.95}) |
Local annealing. More... | |
void | apply () override |
Apply an Action. More... | |
const Tensor & | getBoxDerivatives () const |
const double & | getForce () const |
Value * | getPntrToComponent (const std::string &name) |
Return a pointer to the value by name. More... | |
Value * | getPntrToComponent (int i) |
Return a pointer to the component by index. More... | |
Value * | getPntrToValue () |
Get a pointer to the default value. More... | |
void | local_search (std::vector< Member > &members) |
Apply local search to members. More... | |
void | luus_jaakola (Member &m, const std::vector< double > ¶ms) |
Luus–Jaakola heuristics. More... | |
void | random_restart_hill_climbing (Member &m, const std::vector< double > ¶ms={10}) |
Random-restart hill climbing. More... | |
void | requestAtoms (const std::vector< AtomNumber > &a) |
void | setAtomsDerivatives (int, const Vector &) |
void | setAtomsDerivatives (Value *, int, const Vector &) |
void | setBoxDerivatives (const Tensor &) |
void | setBoxDerivatives (Value *, const Tensor &) |
void | setBoxDerivativesNoPbc () |
Set box derivatives automatically. More... | |
void | setBoxDerivativesNoPbc (Value *) |
void | setExtraCV (const std::string &name) |
void | setValue (const double &d) |
Set the default value (the one without name) More... | |
Vector | solve () |
Return an optimal biasing direction. More... | |
void | stochastic_hill_climbing (Member &m, const std::vector< double > ¶ms={}) |
Local searches to improve global solutions. More... | |
Protected Attributes | |
bool | adaptation_ |
If a local search is performed. More... | |
Atoms & | atoms |
double | bound_ |
Bound. More... | |
unsigned int | capacity_ |
Size of population. More... | |
double | cauchy_mean_alpha_ |
Mean and spread of cauchy sampler. More... | |
double | cauchy_mean_beta_ |
unsigned int | coding_len_ |
Length of coding. More... | |
bool | first_step_ |
Start either at time = 0 or time = optimizer stride. More... | |
bool | isEnergy |
bool | isExtraCV |
std::string | label_ |
Optimizer label. More... | |
bool | local_search_on_ |
If local search is employed in sampling. More... | |
double | local_search_rate_ |
Rate of local mutation. More... | |
std::string | local_search_type_ |
Type of local search, stochastic_hill_climbing or adaptive_random_search. More... | |
double | mating_rate_ |
Probability of mating. More... | |
Member | member_best_ |
std::vector< Member > | members_ |
Population. More... | |
double | mutation_rate_ |
Probability of mutation. More... | |
unsigned int | n_global_iterations_ |
Number of global search iterations, doomsday. More... | |
unsigned int | n_iter_ |
Number of global iterations. More... | |
unsigned int | n_local_iterations_ |
Number of local search iterations. More... | |
unsigned int | n_threads_ |
NeighborList * | neighbor_list_ |
Neighbor list of ligand-protein atom pairs. More... | |
double | nl_cutoff_ |
Neighbor list cut-off. More... | |
int | nl_stride_ |
Neighbor list stride. More... | |
Vector | opt_ |
Biasing direction. More... | |
double | opt_value_ |
Current loss function value. More... | |
unsigned int | optimizer_stride_ |
Optimizer stride. More... | |
bool | pbc_ |
Periodic boundary conditions. More... | |
unsigned int | rank_ |
OpenMP. More... | |
double | sampling_r_ |
Sampling radius. More... | |
double | score_best_ |
double | score_worst_ |
Scores. More... | |
unsigned int | stride_ |
Private Member Functions | |
Vector | create_coding () |
Encode a ligand conformation. More... | |
void | crossover (Member &m1, Member &m2) |
Mate two members. More... | |
int | getComponent (const std::string &name) const |
Return the index for the component named name. More... | |
void | initialize_members () |
Create a set of translations relative to the ligand, each translation encodes a probable biasing direction. More... | |
void | mating (std::vector< Member > &members) |
Perform mating in the population. More... | |
void | mutation (Member &m) |
Mutate a member. More... | |
void | mutation (std::vector< Member > &members) |
Mutate the population. More... | |
bool | out_of_bounds (double v) |
Check if the vector length is out of bounds. More... | |
void | print_status () const |
Print a status. More... | |
double | score_mean () |
Calculate the mean score. More... | |
double | score_member (const Vector &v) |
Score a single member. More... | |
void | score_members () |
Score each translation by the loss function. More... | |
void | selection_roulette () |
Select a new population using the roulette selection. More... | |
void | sort_members () |
Sort the population using heaps, required for finding a minimum of the loss function. More... | |
Private Attributes | |
bool | active |
Switch to activate Action on this step. More... | |
Dependencies | after |
Actions on which this Action depends. More... | |
std::vector< double > | charges |
bool | chargesWereSet |
bool | doCheckPoint |
bool | donotforce |
bool | donotretrieve |
double | energy |
std::string | extraCV |
bool | first_time_ |
double | forceOnEnergy |
double | forceOnExtraCV |
std::vector< Vector > | forces |
std::vector< AtomNumber > | indexes |
std::string | label |
Label of the Action, as set with LABEL= in the plumed.dat file. More... | |
std::vector< std::string > | line |
Directive line. More... | |
bool | lockRequestAtoms |
Loss * | loss_ |
Pointer to the loss function. More... | |
std::vector< double > | masses |
const std::string | name |
Name of the directive in the plumed.dat file. More... | |
bool | noderiv |
Are we skipping the calculation of the derivatives. More... | |
bool | numericalDerivatives |
Are we using numerical derivatives to differentiate. More... | |
std::set< std::string > | options |
Option that you might have enabled. More... | |
Pbc & | pbc =*pbc_fwd |
ForwardDecl< Pbc > | pbc_fwd |
std::vector< Vector > | positions |
int | replica_index |
bool | restart |
bool | serial_ |
std::set< AtomNumber > | unique |
unique should be an ordered set since we later create a vector containing the corresponding indexes More... | |
std::set< AtomNumber > | unique_local |
unique_local should be an ordered set since we later create a vector containing the corresponding indexes More... | |
double | update_from |
Update only after this time. More... | |
double | update_until |
Update only until this time. More... | |
bool | validate_list_ |
std::vector< std::unique_ptr< Value > > | values |
An array containing the values for this action. More... | |
std::vector< Loss * > | vec_loss_ |
Tensor | virial |
Provides the keyword <a href="../../user-doc/html/_"_m_a_z_e__m_e_m_e_t_i_c__s_a_m_p_l_i_n_g.html"> "MAZE_MEMETIC_SAMPLING
Memetic algorithms for the optimization of the loss function.
|
inherited |
|
explicit |
PLMD constructor.
[in] | ao | PLMD::ActionOptions&. |
PLMD::maze::Memetic::~Memetic | ( | ) |
Destructor required for deriving classes.
|
virtualinherited |
Set action to active.
|
protected |
Solis-Wets random walk.
Adaptive random search algorithm was designed to address the limitations of the fixed step size. The strategy for adaptive random search is to continually approximate the optimal step size required to reach the global optimum in the search space. This is achieved by trialling and adopting smaller or larger step sizes only if they result in an improvement in the search performance.
Very large step sizes are trialled with a much lower frequency. This strategy of preferring large moves is intended to allow the technique to escape local optima. Smaller step sizes are adopted if no improvement is made for an extended period.
[in,out] | m | Member. |
[in] | params |
|
inherited |
Add a value with a name like label.name.
|
inherited |
Add a value with a name like label.name that has derivatives.
|
inherited |
Specify that this Action depends on another one.
|
inherited |
Add a value with the name label.
|
inherited |
Add a value with the name label that has derivatives.
|
inlineinherited |
Allow calls to modifyGlobalForce()
|
protected |
Local annealing.
[in,out] | m | Member. |
[in] | params | T, alpha. |
|
overrideprotectedvirtualinherited |
Apply an Action.
This method is called one time per step. The set of all Actions is applied in backward order.
Implements PLMD::Action.
|
inherited |
|
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.
|
virtualinherited |
Calculate the optimal direction of pulling.
Implements PLMD::Action.
|
inherited |
Numerical derivative routine to use when using Actions that inherit from BOTH ActionWithArguments and ActionAtomistic.
|
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
|
overridevirtualinherited |
N.B.
only pass an ActionWithValue to this routine if you know exactly what you are doing. The default will be correct for the vast majority of cases
Reimplemented from PLMD::Action.
Reimplemented in PLMD::vesselbase::ActionWithAveraging, PLMD::multicolvar::DumpMultiColvar, PLMD::multicolvar::MultiColvarBase, PLMD::mapping::Mapping, PLMD::multicolvar::BridgedMultiColvarFunction, PLMD::isdb::EMMI, PLMD::isdb::MetainferenceBase, and PLMD::mapping::PCAVars.
|
inherited |
Calculate the center of mass.
|
inherited |
Change the box shape.
|
inlinevirtualinherited |
Reimplemented in PLMD::colvar::ContactMap, and PLMD::piv::PIV.
|
inlineinherited |
|
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.
|
inlineoverridevirtualinherited |
Check if numerical derivatives should be used.
Reimplemented from PLMD::Action.
|
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 |
Clear the derivatives of values wrt parameters.
Reimplemented in PLMD::multicolvar::BridgedMultiColvarFunction, and PLMD::manyrestraints::ManyRestraintsBase.
|
inherited |
Clear the forces on the values.
|
virtualinherited |
|
inherited |
|
inherited |
Set your value component to have no periodicity.
|
inherited |
Set the value to be periodic with a particular domain.
|
staticinherited |
Puts a message into the manual that the components always output.
|
inherited |
Return a pointer to the value with name (this is used to retrieve values in other PLMD::Actions) You should NEVER use this routine to refer to the components of your PLMD::Action.
Use getPntrToComponent instead.
|
inherited |
Return a pointer to the value with this number (this is used to retrieve values in other PLMD::Actions) You should NEVER use this routine to refer to the components of your PLMD::Action.
Use getPntrToComponent instead.
|
private |
Encode a ligand conformation.
Mate two members.
[in,out] | m1 | 1st member. |
[in,out] | m2 | 2nd member. |
|
inlinevirtualinherited |
Set action to inactive.
|
inlinevirtualinherited |
Are we not calculating derivatives.
Reimplemented in PLMD::multicolvar::MultiColvarBase.
|
inlineinherited |
Skip atom forces - use with care.
If this function is called during initialization, then forces are not going to be propagated. Can be used for optimization.
|
inlineinherited |
Skip atom retrieval - use with care.
If this function is called during initialization, then atoms are not going to be retrieved. Can be used for optimization. Notice that calling getPosition(int) in an Action where DoNotRetrieve() was called might lead to undefined behavior.
|
inherited |
Crash calculation and print documentation.
|
inherited |
Check if a value with a particular name is present.
This is only used in PLMD::ActionWithArguments. You should not use it when manipulating components.
|
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.
|
inline |
Setters and getters.
|
inline |
|
inline |
|
inline |
|
inlineinherited |
Getters and setters.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get the absolute index of an atom.
|
inlinevirtualinherited |
Get the vector of absolute indexes.
Reimplemented in PLMD::multicolvar::BridgedMultiColvarFunction.
|
inlineinherited |
Get box shape.
|
protectedinherited |
|
inlineinherited |
Get charge of i-th atom.
|
privateinherited |
Return the index for the component named name.
|
inherited |
get a string that contains all the available components
|
inherited |
get a vector that contains the label for all the components
|
inherited |
Return true if we are doing at a checkpoint step.
|
inlineinherited |
Return dependencies.
|
virtualinherited |
|
inlineinherited |
Get energy.
|
inherited |
Check if we are on an exchange step.
|
protectedinherited |
|
inlineinherited |
Get position of i-th atom (access by absolute AtomNumber).
With direct access to the global atom array.
|
inherited |
Just read one of the keywords and return the whole thing as a string.
|
inlineinherited |
Returns the label.
|
inlineinherited |
Get mass of i-th atom.
|
inlineinherited |
Returns the name.
|
inlineinherited |
Get number of available atoms.
|
inlineinherited |
Returns the number of values defined.
|
inlineoverridevirtualinherited |
Implements PLMD::ActionWithValue.
|
inlineinherited |
Get the value with a specific name (N.B. if there is no such value this returns zero)
|
inlineinherited |
Get the value of one of the components of the PLMD::Action.
|
protectedinherited |
Return a pointer to the value by name.
|
protectedinherited |
Return a pointer to the component by index.
|
protectedinherited |
Get a pointer to the default value.
|
inlineinherited |
Get position of i-th atom (access by relative index)
|
inlineinherited |
Get the array of all positions.
|
inlineinherited |
Return true if we are doing a restart.
|
inherited |
Return the present timestep.
|
inherited |
Return the present time.
|
inherited |
Return the timestep.
|
inlineinherited |
Get total number of atoms, including virtual ones.
Can be used to make a loop on modifyGlobalPosition or getGlobalPosition.
|
inlineinherited |
|
inlineinherited |
|
private |
Create a set of translations relative to the ligand, each translation encodes a probable biasing direction.
|
inherited |
Convert a set of read in strings into an atom list (this is used in parseAtomList)
|
inline |
|
inlineinherited |
|
inlineinherited |
Check if action is active.
|
inlineinherited |
Check if an option is on.
|
protected |
Apply local search to members.
[in,out] | members | Population. |
|
inline |
|
inline |
|
inlineoverridevirtualinherited |
Reimplemented from PLMD::Action.
Reimplemented in PLMD::isdb::EMMI, PLMD::isdb::MetainferenceBase, PLMD::mapping::PCAVars, PLMD::mapping::Mapping, and PLMD::vesselbase::ActionWithAveraging.
|
protected |
Luus–Jaakola heuristics.
[in,out] | m | Member. |
[in] | params | Bounds. |
|
inherited |
Make atoms whole, assuming they are in the proper order.
|
private |
Perform mating in the population.
[in,out] | members | Population. |
|
inlineinherited |
Get a reference to force on energy.
|
inlineinherited |
Get a reference to force on extraCV.
|
inlineinherited |
Get a reference to forces array.
|
inlineinherited |
Get modifiable force of i-th atom (access by absolute AtomNumber).
|
inlineinherited |
Get modifiable PBC Should be used by action that need to modify the stored box.
|
inlineinherited |
Get modifiable position of i-th atom (access by absolute AtomNumber).
|
inlineinherited |
Get modifiable virial Should be used by action that need to modify the stored virial.
|
inlineinherited |
Get a reference to virial array.
|
private |
Mutate a member.
[in,out] | m | Member. |
|
private |
Mutate the population.
[in,out] | members | Population. |
|
staticinherited |
Insist that numerical derivatives should always be used for an action and make this fact appear in the manual.
|
overridevirtual |
Each class deriving from Optimizer needs to override this function.
Implements PLMD::maze::Optimizer.
|
private |
Check if the vector length is out of bounds.
[in] | v | Vector length. |
|
virtualinherited |
The pairing function needs to be overridden by a specific optimizer.
[in] | distance | distance between a pair of atoms |
|
inherited |
Parse one keyword as generic type.
|
inherited |
Parse an list of atom with a numbred keyword.
|
inherited |
Parse a list of atoms without a numbered keyword.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inherited |
Applies PBCs to a seriens of positions or distances.
Compute the pbc distance between two positions.
|
virtualinherited |
Prepare the neighbor list.
Reimplemented from PLMD::Action.
|
private |
Print a status.
|
protected |
Random-restart hill climbing.
The algorithm can be restarted and repeated a number of times after it converges to provide an improved result.
[in,out] | m | Member. |
[in] | params | Number of restarts. |
|
overridevirtualinherited |
Read in an input file containing atom positions and calculate the action for the atomic configuration therin.
Reimplemented from PLMD::Action.
|
static |
|
protectedinherited |
|
inherited |
Request an array of atoms.
This method is used to ask for a list of atoms. Atoms should be asked for by number. If this routine is called during the simulation, atoms will be available at the next step MAYBE WE HAVE TO FIND SOMETHING MORE CLEAR FOR DYNAMIC LISTS OF ATOMS
|
virtualinherited |
Reimplemented in PLMD::multicolvar::MultiColvarBase.
|
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.
|
inherited |
Calculate sampling radius as the minimal distance between two groups in neighbors list.
|
inherited |
Score a ligand-protein configuration.
|
private |
Calculate the mean score.
|
private |
Score a single member.
[in] | v | Member's translation. |
|
private |
Score each translation by the loss function.
|
private |
Select a new population using the roulette selection.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
Set box derivatives automatically.
It should be called after the setAtomsDerivatives has been used for all single atoms.
|
protectedinherited |
|
inlineprotectedinherited |
|
inherited |
Add the forces to the atoms.
|
inherited |
Calculate the gradients and store them for all the values (need for projections)
|
inherited |
Set your default value to have no periodicity.
|
virtualinherited |
|
inherited |
Set the value to be periodic with a particular domain.
|
inlineprotectedinherited |
Set the default value (the one without name)
|
inherited |
Set the value.
|
protected |
Return an optimal biasing direction.
|
private |
Sort the population using heaps, required for finding a minimum of the loss function.
|
inlineinherited |
|
inlineinherited |
|
protected |
Local searches to improve global solutions.
Stochastic hill climbing.
Neighbors with better or equal cost should be accepted, allowing the technique to navigate across plateaus in the response surface.
[in,out] | m | Member. |
[in] | params | None. |
|
virtualinherited |
Activate the calculation of derivatives.
Reimplemented in PLMD::isdb::EMMI, PLMD::analysis::Histogram, PLMD::isdb::MetainferenceBase, PLMD::multicolvar::MultiColvarBase, PLMD::generic::Read, PLMD::mapping::Mapping, PLMD::secondarystructure::SecondaryStructureRMSD, PLMD::adjmat::ClusterDiameter, PLMD::adjmat::ClusterSize, PLMD::multicolvar::BridgedMultiColvarFunction, PLMD::adjmat::ClusterAnalysisBase, PLMD::gridtools::ActionWithGrid, PLMD::adjmat::ClusteringBase, PLMD::gridtools::ActionWithIntegral, PLMD::eds::EDS, and PLMD::fisst::FISST.
|
inlineoverridevirtualinherited |
Reimplemented from PLMD::Action.
Reimplemented in PLMD::isdb::EMMI, PLMD::isdb::MetainferenceBase, PLMD::mapping::PCAVars, PLMD::mapping::Mapping, and PLMD::vesselbase::ActionWithAveraging.
|
inlinevirtualinherited |
Update.
This method is called one time per step. The set of all Actions is updated in forward order.
Reimplemented in PLMD::bias::MetaD, PLMD::isdb::CS2Backbone, PLMD::bias::PBMetaD, PLMD::ves::VesLinearExpansion, PLMD::isdb::Metainference, PLMD::opes::OPESmetad< mode >, PLMD::isdb::RDC, PLMD::ves::Optimizer, PLMD::ves::TargetDistribution, PLMD::ves::VesDeltaF, PLMD::opes::OPESexpanded, PLMD::generic::Plumed, PLMD::bias::MaxEnt, PLMD::generic::DumpAtoms, PLMD::isdb::SAXS, PLMD::multicolvar::VolumeTetrapore, PLMD::bias::ExtendedLagrangian, PLMD::multicolvar::VolumeCavity, PLMD::generic::EffectiveEnergyDrift, PLMD::mapping::AdaptivePath, PLMD::ves::OutputFesBias, PLMD::isdb::JCoupling, PLMD::generic::Read, PLMD::analysis::AnalysisBase, PLMD::generic::DumpMassCharge, PLMD::generic::Print, PLMD::vesselbase::ActionWithAveraging, PLMD::adjmat::OutputCluster, PLMD::isdb::PRE, PLMD::multicolvar::DumpMultiColvar, PLMD::isdb::NOE, PLMD::generic::Flush, PLMD::analysis::ReadDissimilarityMatrix, PLMD::generic::DumpDerivatives, PLMD::generic::DumpForces, PLMD::generic::DumpProjections, PLMD::adjmat::DumpGraph, PLMD::analysis::ReadAnalysisFrames, PLMD::gridtools::GridPrintingBase, PLMD::logmfd::LogMFD, PLMD::eds::EDS, and PLMD::fisst::FISST.
|
inherited |
Load new positions of atoms in the neighbor list.
|
inherited |
updates local unique atoms
|
staticinherited |
The components in the action will depend on the user.
|
inlineinherited |
This forces the class to use numerical derivatives.
|
inherited |
Issue a warning.
|
privateinherited |
Switch to activate Action on this step.
|
protected |
If a local search is performed.
|
privateinherited |
Actions on which this Action depends.
|
protectedinherited |
|
protected |
Bound.
|
protected |
Size of population.
|
protected |
Mean and spread of cauchy sampler.
|
protected |
|
privateinherited |
|
privateinherited |
|
protected |
Length of coding.
|
inherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
inherited |
|
protectedinherited |
Start either at time = 0 or time = optimizer stride.
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
privateinherited |
Label of the Action, as set with LABEL= in the plumed.dat file.
|
protectedinherited |
Optimizer label.
|
privateinherited |
Directive line.
This line is progressively erased during Action construction so as to check if all the present keywords are correct.
|
protected |
If local search is employed in sampling.
|
protected |
Rate of local mutation.
|
protected |
Type of local search, stochastic_hill_climbing or adaptive_random_search.
|
privateinherited |
|
inherited |
Reference to the log stream.
|
privateinherited |
Pointer to the loss function.
|
privateinherited |
|
protected |
Probability of mating.
|
protected |
|
protected |
Population.
|
inherited |
|
protected |
Probability of mutation.
|
protected |
Number of global search iterations, doomsday.
|
protectedinherited |
Number of global iterations.
|
protected |
Number of local search iterations.
|
protectedinherited |
|
privateinherited |
Name of the directive in the plumed.dat file.
|
protectedinherited |
Neighbor list of ligand-protein atom pairs.
|
protectedinherited |
Neighbor list cut-off.
|
protectedinherited |
Neighbor list stride.
|
privateinherited |
Are we skipping the calculation of the derivatives.
|
privateinherited |
Are we using numerical derivatives to differentiate.
|
protectedinherited |
Biasing direction.
|
protectedinherited |
Current loss function value.
|
protectedinherited |
Optimizer stride.
|
privateinherited |
Option that you might have enabled.
|
protectedinherited |
Periodic boundary conditions.
|
privateinherited |
|
inherited |
Reference to main plumed object.
|
privateinherited |
|
protectedinherited |
|
privateinherited |
|
privateinherited |
|
protectedinherited |
Sampling radius.
|
protected |
|
protected |
Scores.
|
privateinherited |
|
protectedinherited |
|
privateinherited |
unique should be an ordered set since we later create a vector containing the corresponding indexes
|
privateinherited |
unique_local should be an ordered set since we later create a vector containing the corresponding indexes
|
privateinherited |
Update only after this time.
|
privateinherited |
Update only until this time.
|
privateinherited |
|
inherited |
Sampling radiues value.
|
inherited |
Biased cv.
|
inherited |
|
inherited |
|
privateinherited |
An array containing the values for this action.
|
privateinherited |
|
privateinherited |
Hosted by GitHub | 1.8.17 |