Action: GATHER_REPLICAS
Module | generic |
---|---|
Description | Usage |
Create a vector that contains the copies of the input quantities from all replicas |
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/vector/matrix/grid | the argument from the various replicas that you would like to gather |
Further details and examples
Create a vector that contains the copies of the input quantities from all replicas
There are three ways that you can generate indistinguishable replicas of a system for calculating ensemble averages:
- You can take a time average.
- You can run a multiple replica simulation and average over the replicas.
- You can do a spatial average and assume that there are multiple replicas of the system in the same simulation box and average over them.
Many actions within PLUMED will perform average over more than one of these type of replica. However, since v2.10 we have tried to separate out these three ways of generating multiple replicas for averaging. There are thus many actions where you take time averages by using ACCUMULATE or COLLECT. You take spatial averages by passing working the vectors of values. You then use this action to average over replicas. The way this works in practise is illustrated by the simple example shown below.
#SETTINGS NREPLICAS=2 # Calculate distance between atoms 1 and 2 on for all 2 replicas d : DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,2 # Now gather the values of this distance on all the replicas: g : GATHER_REPLICASCreate a vector that contains the copies of the input quantities from all replicas More details ARGthe argument from the various replicas that you would like to gather=d # Now average the two distances on the two replicas s : COMBINECalculate a polynomial combination of a set of other variables. More details ARGthe values input to this function=g.rep-1,g.rep-2 COEFFICIENTS the coefficients of the arguments in your function=0.5,0.5 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # And print the instaneous average for the distance on the two replicas PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=s FILEthe name of the file on which to output these quantities=colvar
Now suppose that we wanted to calculate a time average of the distance and an average over the replicas. We could use an input like this:
#SETTINGS NREPLICAS=2 d : DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,2 g : GATHER_REPLICASCreate a vector that contains the copies of the input quantities from all replicas More details ARGthe argument from the various replicas that you would like to gather=d s : COMBINECalculate a polynomial combination of a set of other variables. More details ARGthe values input to this function=g.rep-1,g.rep-2 COEFFICIENTS the coefficients of the arguments in your function=0.5,0.5 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # This does the time averaging aAVERAGECalculate the ensemble average of a collective variable This action is a shortcut and it has hidden defaults. More details ARGthe quantity that is being averaged=s : # And output the final average PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=a FILEthe name of the file on which to output these quantities=colvar
Syntax
The following table describes the keywords and options that can be used with this action
Keyword | Type | Default | Description |
---|---|---|---|
ARG | input | none | the argument from the various replicas that you would like to gather |
NUMERICAL_DERIVATIVES | optional | false | calculate the derivatives for these quantities numerically |