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 |
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
d: DIPOLECalculate 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:
d: DIPOLECalculate 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:
d: DIPOLECalculate 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:
d: DIPOLECalculate 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.
A final important thing to note is that in all the commands above the default is to use a procedure akin to that used in WHOLEMOLECULES to ensure that the sets of atoms that are specified to each GROUP keyword are not broken by the periodic boundary conditions. If you would like to turn this off for any reason you add the NOPBC in your input file as shown below:
d: DIPOLECalculate the dipole moment for a group of atoms. More details GROUPthe group of atoms we are calculating the dipole moment for=1-10 NOPBC ignore the periodic boundary conditions when calculating distances 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
behaviour for non charge neutral groups
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.
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 |
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 |
Full list of keywords
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 |
| 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 |