Action: UPDATE_IF

Module generic
Description Usage
Conditional update of other actions. used in 0 tutorialsused in 0 eggs
This action outputs data to a file. You can read more about how PLUMED manages output files here

Input

The arguments that serve as the input for this action are specified using one or more of the keywords in the following table.

Keyword Type Description
ARG scalar the labels of values that should be used to make the decision on whether to update or not

Further details and examples

Conditional update of other actions.

This action can be used to enable and disable the update step for the following actions depending on the value of its arguments. This allows one to extract snapshots with value of some CVs in a given range.

When called with MORE_THAN and/or LESS_THAN keywords, this action starts an if block. The block is executed if all the arguments are less than all the respective values in the LESS_THAN keyword (if present) and all the arguments are more than all the respective values in the MORE_THAN keyword (if present).

When called with the END flag, this action ends the corresponding IF block. Notice that in this case one should also provide the ARG keyword. It is recommended to use the same ARG keyword that was used to begin the block, so as to make the input more readable.

Of course, blocks can be nested at will.

There are many potential usages for this keyword. One might e.g. decide to analyze some variable only when another variable is within a given range.

[!CAUTION] Notice that not all the possible usage make particular sense. For example, conditionally updating a \ref METAD keyword (that is: adding hills only if a variable is within a given range) can lead to unexpected results.

Examples

The following input instructs plumed dump all the snapshots where an atom is in touch with the solute.

Click on the labels of the actions for more information on what each action computes
tested on2.11
solute: GROUPDefine a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms. More details ATOMSthe numerical indexes for the set of atoms in the group=1-124
coord: COORDINATIONCalculate coordination numbers. This action has hidden defaults. More details GROUPAFirst list of atoms=solute GROUPBSecond list of atoms (if empty, N*(N-1)/2 pairs in GROUPA are counted)=500 R_0The r_0 parameter of the switching function=0.5

# A coordination number higher than 0.5 indicate that there is at least one # atom of group `solute` at less than 5 A from atom number 500
UPDATE_IFConditional update of other actions. More details ARGthe labels of values that should be used to make the decision on whether to update or not=coord MORE_THANlower bound=0.5 DUMPATOMSDump selected atoms on a file. More details ATOMSthe atom indices whose positions you would like to print out=solute,500 FILEfile on which to output coordinates; extension is automatically detected=output.xyz UPDATE_IFConditional update of other actions. More details ARGthe labels of values that should be used to make the decision on whether to update or not=coord END end

Syntax

The following table describes the keywords and options that can be used with this action

Keyword Type Default Description
ARG input none the labels of values that should be used to make the decision on whether to update or not
STRIDE compulsory 1 the frequency with which the quantities of interest should be output
END optional false end
LESS_THAN optional not used upper bound
MORE_THAN optional not used lower bound