Action: ARGS2VATOM
Module | vatom |
---|---|
Description | Usage |
Create a virtual atom from the input scalars |
Output components
This action calculates the values in the following table. 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 | Description |
---|---|---|
x | scalar | the x coordinate of the virtual atom |
y | scalar | the y coordinate of the virtual atom |
z | scalar | the z coordinate of the virtual atom |
mass | scalar | the mass of the virtual atom |
charge | scalar | the charge of the virtual atom |
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 |
---|---|---|
XPOS | scalar | the value to use for the x position of the atom |
YPOS | scalar | the value to use for the y position of the atom |
ZPOS | scalar | the value to use for the z position of the atom |
MASS | scalar | the value to use for the mass of the atom |
CHARGE | scalar | the value to use for the charge of the atom |
XBKP | scalar | x position to use in case PBC not set when using PHASES |
YBKP | scalar | y position to use in case PBC not set when using PHASES |
ZBKP | scalar | z position to use in case PBC not set when using PHASES |
Further details and examples
Create a virtual atom from the input scalars
This action takes five scalars that are computed by other actions in input and uses them to set the x, y and z positions and the mass and charge of a virtual atom. This action is used within the CENTER shortcut to compute a center of mass. An example input that shows how you can use this command to calculate the center of mass of atoms 1-10 is as follows:
# Calculate the total mass of the atoms m : MASSGet the mass of one or multiple atoms More details ATOMSthe atom numbers that you would like to store the masses and charges of=1-10 mass : SUMCalculate the sum of the arguments More details ARGthe values input to this function=m PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # Calculate the totla charge of the atoms q : CHARGEGet the charges of one or multiple atoms More details ATOMSthe atom numbers that you would like to store the masses and charges of=1-10 charge : SUMCalculate the sum of the arguments More details ARGthe values input to this function=q PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # Now get the positions of the atoms pos : POSITIONCalculate the components of the position of an atom or atoms. More details WHOLEMOLECULES if this is a vector of positions do you want to make the positions into a whole before ATOMSthe atom numbers that you would like to use the positions of=1-10 # Multiply each vector of positions by the masses xwvec : CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=m,pos.x FUNCthe function you wish to evaluate=x*y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO ywvec : CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=m,pos.y FUNCthe function you wish to evaluate=x*y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO zwvec : CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=m,pos.z FUNCthe function you wish to evaluate=x*y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # Sum the numerators in the expression for the center of mass xnum : SUMCalculate the sum of the arguments More details ARGthe values input to this function=xwvec PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO ynum : SUMCalculate the sum of the arguments More details ARGthe values input to this function=ywvec PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO znum : SUMCalculate the sum of the arguments More details ARGthe values input to this function=zwvec PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # And compute the x, y and z positions of the center of mass x : CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=xnum,mass FUNCthe function you wish to evaluate=x/y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO y : CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=ynum,mass FUNCthe function you wish to evaluate=x/y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO z : CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=znum,mass FUNCthe function you wish to evaluate=x/y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # And now create the virtual atom p : ARGS2VATOMCreate a virtual atom from the input scalars More details XPOSthe value to use for the x position of the atom=x YPOSthe value to use for the y position of the atom=y ZPOSthe value to use for the z position of the atom=z MASSthe value to use for the mass of the atom=mass CHARGEthe value to use for the charge of the atom=charge
This input provides a very slow way of providing a center of mass - PLUMED contains a faster implementation that does all this. This type of input is nevertheless useful if you are using arbitary weights when computing the sums in the numerator and denominator of the expression for the center as is detailed in the documentation for the CENTER command.
Syntax
The following table describes the keywords and options that can be used with this action
Keyword | Type | Default | Description |
---|---|---|---|
XPOS | input | none | the value to use for the x position of the atom |
YPOS | input | none | the value to use for the y position of the atom |
ZPOS | input | none | the value to use for the z position of the atom |
MASS | input | none | the value to use for the mass of the atom |
CHARGE | input | none | the value to use for the charge of the atom |
XBKP | input | none | x position to use in case PBC not set when using PHASES |
YBKP | input | none | y position to use in case PBC not set when using PHASES |
ZBKP | input | none | z position to use in case PBC not set when using PHASES |
NUMERICAL_DERIVATIVES | optional | false | calculate the derivatives for these quantities numerically |
FRACTIONAL | optional | false | the input arguments are calculated in fractional coordinates so you need to multiply by the cell |