Action: DIPOLE
Module | colvar |
---|---|
Description | Usage |
Calculate the dipole moment for a group of atoms. | |
output value | type |
the DIPOLE for these atoms | scalar/vector |
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 |
---|---|---|---|
x | scalar/vector | COMPONENTS | the x-component of the dipole |
y | scalar/vector | COMPONENTS | the y-component of the dipole |
z | scalar/vector | COMPONENTS | the z-component of the dipole |
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 |
---|---|---|
GROUP | atoms | the group of atoms we are calculating the dipole moment for |
Further details and examples
Calculate the dipole moment for a group of atoms.
The following input tells plumed to calculate the dipole for the group of atoms containing the atoms from 1-10 and print it every 5 steps
dDIPOLECalculate the dipole moment for a group of atoms. More details GROUPthe group of atoms we are calculating the dipole moment for=1-10 PRINTPrint quantities to a file. More details FILEthe name of the file on which to output these quantities=output STRIDE the frequency with which the quantities of interest should be output=5 ARGthe labels of the values that you would like to print to the file=d:
The output value from this input is a scalar that tells you the total magnitude of the dipole vector. If you would like to access the dipole vector directly you can use the command:
dDIPOLECalculate the dipole moment for a group of atoms. More details GROUPthe group of atoms we are calculating the dipole moment for=1-10 COMPONENTS calculate the x, y and z components of the dipole separately and store them as label PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=d.* FILEthe name of the file on which to output these quantities=output:
This command will output three values d.x, d.y and d.z, which are the x, y and z components of the dipole respectively.
You can calculate three instinguishable dipoles using a single DIPOLE command by using an input like the one below:
dDIPOLECalculate the dipole moment for a group of atoms. More details GROUP1the group of atoms we are calculating the dipole moment for=1-10 GROUP2the group of atoms we are calculating the dipole moment for=11-20 GROUP3the group of atoms we are calculating the dipole moment for=21-30 PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=d FILEthe name of the file on which to output these quantities=output:
The output, d, here is a three dimensional vector. The first element of this vector is the magnitude of the dipole for atoms 1-10, the second is the magnitude of the dipole for atoms 11-20 and the third is the magnitude of the dipole for atoms 21-30. You can also obtain vector components for the three dipoles above by using the following input:
dDIPOLECalculate the dipole moment for a group of atoms. More details COMPONENTS calculate the x, y and z components of the dipole separately and store them as label GROUP1the group of atoms we are calculating the dipole moment for=1-10 GROUP2the group of atoms we are calculating the dipole moment for=11-20 GROUP3the group of atoms we are calculating the dipole moment for=21-30 PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=d.x,d.y,d.z FILEthe name of the file on which to output these quantities=output:
The output from the DIPOLE command now consists of three three dimensional vectors called d.x, d.y and d.z that contain the x, y and z components of the three dipoles respectively.
When running with periodic boundary conditions, the atoms in every group should be in the proper periodic image. This is done automatically since PLUMED 2.5, by considering the ordered list of atoms and rebuilding the molecule with a procedure that is equivalent to that done in WHOLEMOLECULES. Notice that rebuilding is local to this action. This is different from WHOLEMOLECULES which actually modifies the coordinates stored in PLUMED. If you want to recover the old behavior you should use the NOPBC flag. In that case you need to take care that atoms are in the correct periodic image.
[!CAUTION] If the total charge Q of any of the specified groups is non zero, then a charge Q/N will be subtracted from every atom, where N is the number of atoms. This implies that the dipole (which for a charged system depends on the position) is computed on the geometric center of the group.
Syntax
The following table describes the keywords and options that can be used with this action
Keyword | Type | Default | Description |
---|---|---|---|
GROUP | input | none | the group of atoms we are calculating the dipole moment for |
NUMERICAL_DERIVATIVES | optional | false | calculate the derivatives for these quantities numerically |
NOPBC | optional | false | ignore the periodic boundary conditions when calculating distances |
COMPONENTS | optional | false | calculate the x, y and z components of the dipole separately and store them as label |