Shortcut: MOMENTS

Module function
Description Usage
Calculate central moments from the distribution of input quantities used in 0 tutorialsused in 0 eggs

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 the values input to this function

Further details and examples

Calculate central moments from the distribution of input quantities

This action takes a set of N input arguments, si, and evaluates the kth central moment of the distribution of input arguments using:

μk=1NNi=1(sis)kwheres=1NNi=1si

A single moments action can evaluate more than one central moment at once so, for example, the input below can be used to calculate the second and third central moment for the distribution of the four input distances.

Click on the labels of the actions for more information on what each action computes
tested on2.11
d12:  DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,2
d13:  DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,3
d14:  DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,4
d15:  DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,5
mv: MOMENTSCalculate central moments from the distribution of input quantities More details ARGthe values input to this function=d12,d13,d14,d15 POWERScalculate the central moments of the distribution of collective variables=2,3
PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=mv.moment-2,mv.moment-3 FILEthe name of the file on which to output these quantities=colvar

Notice that you can also achieve the same result using the following input:

Click on the labels of the actions for more information on what each action computes
tested on2.11
d: DISTANCECalculate the distance/s between pairs of atoms. More details ATOMS1the pair of atom that we are calculating the distance between=1,2 ATOMS2the pair of atom that we are calculating the distance between=1,3 ATOMS3the pair of atom that we are calculating the distance between=1,4 ATOMS4the pair of atom that we are calculating the distance between=1,5
mv: MOMENTSCalculate central moments from the distribution of input quantities More details ARGthe values input to this function=d POWERScalculate the central moments of the distribution of collective variables=2,3
PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=mv.moment-2,mv.moment-3 FILEthe name of the file on which to output these quantities=colvar

In this second case the four distances are passed to the MOMENTS action as a vector. The MOMENTS action then outputs 2 components - the two central moments that were requested.

These examples are representative the only two ways you can use this action. In input it can accept either a list of scalars or a single vector. It does not accept matrices or a list of vectors in input.

Syntax

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

Keyword Type Default Description
ARG input none the values input to this function
POWERS compulsory none calculate the central moments of the distribution of collective variables