Skip to content

Shortcut: INSPHERE

Module volumes
Description Usage
This quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. used in 1 tutorialsused in 1 eggs
output value type
sum of values of input CVs in regin of interest scalar

Details and examples

This quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell.

This action can be used to calculate whether each of the atoms are within a particular part of the simulation box or not as illustrated by the following example:

Click on the labels of the actions for more information on what each action computes
tested on2.11
f: FIXEDATOMAdd a virtual atom in a fixed position. This action has hidden defaults. More details ATcoordinates of the virtual atom=0,0,0
a: INSPHEREThis quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. More details ATOMSthe group of atoms that you would like to investigate=1-100 CENTERthe atom whose vicinity we are interested in examining=f RADIUSthe switching function that tells us the extent of the sphereical region of interest. Options for this keyword are explained in the documentation for LESS_THAN.={GAUSSIAN R_0=1.5}
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

The 100 elements of the vector a that is returned from the INSPHERE action in the above input are calculated using:

In this expression , and are the components of the vector that connects the th atom that was specified using the ATOMS keyword to the atom that was specified using the CENTER keyword and is one of the switching functions that is described that in the documentation for the action LESS_THAN. In other words, is 1 if atom is within a sphere with a radial extent that is determined by the parameters of the specified switching function and zero otherwise.

If you want to caluclate and print the number of atoms in the sphere of interest you can use an input like the one shown below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
f: FIXEDATOMAdd a virtual atom in a fixed position. This action has hidden defaults. More details ATcoordinates of the virtual atom=0,0,0
a: INSPHEREThis quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. More details ATOMSthe group of atoms that you would like to investigate=1-100 CENTERthe atom whose vicinity we are interested in examining=f RADIUSthe switching function that tells us the extent of the sphereical region of interest. Options for this keyword are explained in the documentation for LESS_THAN.={GAUSSIAN R_0=1.5}
s: SUMCalculate the sum of the arguments More details ARGthe vector/matrix/grid whose elements shuld be added together=a PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
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

If by constrast you want to calculate and print the number of atoms that are not in the sphere of interest you OUTSIDE flag as shown below

Click on the labels of the actions for more information on what each action computes
tested on2.11
f: FIXEDATOMAdd a virtual atom in a fixed position. This action has hidden defaults. More details ATcoordinates of the virtual atom=0,0,0
a: INSPHEREThis quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. More details ...
  ATOMSthe group of atoms that you would like to investigate=1-100 CENTERthe atom whose vicinity we are interested in examining=f
  RADIUSthe switching function that tells us the extent of the sphereical region of interest. Options for this keyword are explained in the documentation for LESS_THAN.={GAUSSIAN R_0=1.5}
  OUTSIDE calculate quantities for colvars that are on atoms outside the region of interest
...
s: SUMCalculate the sum of the arguments More details ARGthe vector/matrix/grid whose elements shuld be added together=a PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
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

You can also calculate the average values of symmetry functions in the sphere of interest by using inputs similar to those described the documentation for the AROUND action. In other words, you can swap out AROUND actions for an INSPHERE actions. Also as with AROUND, earlier versions of PLUMED used a different syntax for doing these types of calculations, which can still be used with this new version of the command. We strongly recommend using the newer syntax but if you are interested in the old syntax you can find more information in the old syntax section of the documentation for AROUND.

Input

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

Keyword Type Description
ATOMS atoms the group of atoms that you would like to investigate
CENTER atoms the atom whose vicinity we are interested in examining

Output components

This action can calculate the values in the following table when the associated keyword is included in the input for the action. These values can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the value required from the list below.

Name Type Keyword Description
lessthan scalar LESS_THAN the number of cvs in the region of interest that are less than a certain threshold
morethan scalar MORE_THAN the number of cvs in the region of interest that are more than a certain threshold
between scalar BETWEEN the number of cvs in the region of interest that are within a certain range
sum scalar SUM the sum of all the colvars weighted by the function that determines if we are in the region
mean scalar MEAN the average values of the colvar in the region of interest

Full list of keywords

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

Keyword Type Default Description
ATOMS input none the group of atoms that you would like to investigate
CENTER input none the atom whose vicinity we are interested in examining
RADIUS compulsory none the switching function that tells us the extent of the sphereical region of interest. Options for this keyword are explained in the documentation for LESS_THAN.
SERIAL optional false do the calculation in serial. Further information about this flag can be found here.
USEGPU optional false run this calculation on the GPU. Further information about this flag can be found here.
OUTSIDE optional false calculate quantities for colvars that are on atoms outside the region of interest

deprecated keywords

The keywords in the following table can still be used with this action but have been deprecated

Keyword Description
ATOM You should use CENTER instead of this keyword which was used in older versions of PLUMED and is provided for back compatibility only
DATA Including this keyword in the input to this action makes no difference to the calculation performed it was used in older versions of PLUMED and is provided here for back compatibility only
LESS_THAN Including this keyword in the input to this action makes no difference to the calculation performed it was used in older versions of PLUMED and is provided here for back compatibility only
MORE_THAN Including this keyword in the input to this action makes no difference to the calculation performed it was used in older versions of PLUMED and is provided here for back compatibility only
BETWEEN Including this keyword in the input to this action makes no difference to the calculation performed it was used in older versions of PLUMED and is provided here for back compatibility only
SUM Including this keyword in the input to this action makes no difference to the calculation performed it was used in older versions of PLUMED and is provided here for back compatibility only
MEAN Including this keyword in the input to this action makes no difference to the calculation performed it was used in older versions of PLUMED and is provided here for back compatibility only