Module |
fourier |
Description |
Usage |
Compute the Discrete Fourier Transform (DFT) by means of FFTW of data stored on a 2D grid. |
  |
output value |
type |
the fourier transform of the input grid |
grid |
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 |
real |
grid |
FT_TYPE |
the real part of the function |
imag |
grid |
FT_TYPE |
the imaginary part of the function |
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 |
grid |
the label of the grid that you want to fourer transform |
Further details and examples
Compute the Discrete Fourier Transform (DFT) by means of FFTW of data stored on a 2D grid.
This action takes a function on a two-dimensional grid as input and computes a fourier transform upon the input function using FFTW.
Currently, this actions performs a complex fourier transition even if the input data is real. The functionality here was developed and used in the paper cited
below. The following input was used in that paper:
Click on the labels of the actions for more information on what each action computes
UNITSThis command sets the internal units for the code. More details NATURAL use natural units
The UNITS action with label calculates somethingfccThe FCCUBIC action with label fcc calculates the following quantities: Quantity | Type | Description |
fcc | vector | the symmetry function for each of the specified atoms |
: FCCUBICMeasure how similar the environment around atoms is to that found in a FCC structure. This action is a shortcut and it has hidden defaults. More details SPECIESthe list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments=1-20736 SWITCHthe switching function that it used in the construction of the contact matrix. Options for this keyword are explained in the documentation for LESS_THAN.={CUBIC D_0=1.2 D_MAX=1.5} ALPHA The alpha parameter of the angular function that is used for FCCUBIC=27
fcc: FCCUBICMeasure how similar the environment around atoms is to that found in a FCC structure. This action is a shortcut and uses the defaults shown here. More details SPECIESthe list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments=1-20736 SWITCHthe switching function that it used in the construction of the contact matrix. Options for this keyword are explained in the documentation for LESS_THAN.={CUBIC D_0=1.2 D_MAX=1.5} ALPHA The alpha parameter of the angular function that is used for FCCUBIC=27 PHI The Euler rotational angle phi=0.0 THETA The Euler rotational angle theta=0.0 PSI The Euler rotational angle psi=0.0
# fcc: FCCUBIC SPECIES=1-20736 SWITCH={CUBIC D_0=1.2 D_MAX=1.5} ALPHA=27
fcc_grpThe GROUP action with label fcc_grp calculates the following quantities: Quantity | Type | Description |
fcc_grp | atoms | indices of atoms specified in GROUP |
: GROUPDefine a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms. More details ATOMSthe numerical indexes for the set of atoms in the group=1-20736
fcc_matThe CONTACT_MATRIX action with label fcc_mat calculates the following quantities: Quantity | Type | Description |
fcc_mat.w | matrix | a matrix containing the weights for the bonds between each pair of atoms |
fcc_mat.x | matrix | the projection of the bond on the x axis |
fcc_mat.y | matrix | the projection of the bond on the y axis |
fcc_mat.z | matrix | the projection of the bond on the z axis |
: CONTACT_MATRIXAdjacency matrix in which two atoms are adjacent if they are within a certain cutoff. More details GROUPspecifies the list of atoms that should be assumed indistinguishable=1-20736 SWITCHthe input for the switching function that acts upon the distance between each pair of atoms. Options for this keyword are explained in the documentation for LESS_THAN.={CUBIC D_0=1.2 D_MAX=1.5} COMPONENTS also calculate the components of the vectors connecting the atoms in the contact matrix
fcc_vfuncThe FCCUBIC_FUNC action with label fcc_vfunc calculates the following quantities: Quantity | Type | Description |
fcc_vfunc | matrix | the matrix obtained by doing an element-wise application of a function that measures the similarity with an fcc environment to the input matrix |
: FCCUBIC_FUNCMeasure how similar the environment around atoms is to that found in a FCC structure. More details ARGthe values input to this function=fcc_mat.x,fcc_mat.y,fcc_mat.z ALPHA The alpha parameter of the angular function=27
fcc_wvfuncThe CUSTOM action with label fcc_wvfunc calculates the following quantities: Quantity | Type | Description |
fcc_wvfunc | matrix | the matrix obtained by doing an element-wise application of an arbitrary function to the input matrix |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=fcc_vfunc,fcc_mat.w 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
fcc_onesThe CONSTANT action with label fcc_ones calculates the following quantities: Quantity | Type | Description |
fcc_ones | vector | the constant value that was read from the plumed input |
: ONESCreate a constant vector with all elements equal to one More details SIZEthe number of ones that you would like to create=20736
fccThe MATRIX_VECTOR_PRODUCT action with label fcc calculates the following quantities: Quantity | Type | Description |
fcc | vector | the vector that is obtained by taking the product between the matrix and the vector that were input |
: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=fcc_wvfunc,fcc_ones
fcc_denomThe MATRIX_VECTOR_PRODUCT action with label fcc_denom calculates the following quantities: Quantity | Type | Description |
fcc_denom | vector | the vector that is obtained by taking the product between the matrix and the vector that were input |
: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=fcc_mat.w,fcc_ones
fcc_nThe CUSTOM action with label fcc_n calculates the following quantities: Quantity | Type | Description |
fcc_n | vector | the vector obtained by doing an element-wise application of an arbitrary function to the input vectors |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=fcc,fcc_denom 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
# --- End of included input --- smapfccThe MORE_THAN action with label smapfcc calculates the following quantities: Quantity | Type | Description |
smapfcc | vector | the vector obtained by doing an element-wise application of a function that is one if the if the input is more than a threshold to the input vectors |
: MORE_THANUse a switching function to determine how many of the input variables are more than a certain cutoff. More details ARGthe values input to this function=fcc SWITCHThis keyword is used if you want to employ an alternative to the continuous swiching function defined above={SMAP R_0=0.5 A=8 B=8}
smapfcc_grpThe GROUP action with label smapfcc_grp calculates the following quantities: Quantity | Type | Description |
smapfcc_grp | atoms | indices of atoms specified in GROUP |
: GROUPDefine a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms. More details ATOMSthe numerical indexes for the set of atoms in the group=1-20736
centerThe ARGS2VATOM action with label center calculates the following quantities: Quantity | Type | Description |
center.x | scalar | the x coordinate of the virtual atom |
center.y | scalar | the y coordinate of the virtual atom |
center.z | scalar | the z coordinate of the virtual atom |
center.mass | scalar | the mass of the virtual atom |
center.charge | scalar | the charge of the virtual atom |
: CENTERCalculate the center for a group of atoms, with arbitrary weights. This action is a shortcut. More details PHASES use trigonometric phases when computing position of center ATOMSthe group of atoms that you are calculating the Gyration Tensor for=fcc WEIGHTSwhat weights should be used when calculating the center=smapfcc
# center: CENTER PHASES ATOMS=fcc WEIGHTS=smapfcc
center_mThe MASS action with label center_m calculates the following quantities: Quantity | Type | Description |
center_m | vector | the MASS for each set of specified atoms |
: MASSGet the mass of one or multiple atoms More details ATOMSthe atom numbers that you would like to store the masses and charges of=fcc
center_massThe SUM action with label center_mass calculates the following quantities: Quantity | Type | Description |
center_mass | scalar | the sum of all the elements in the input vector |
: SUMCalculate the sum of the arguments More details PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO ARGthe values input to this function=center_m
center_qThe CHARGE action with label center_q calculates the following quantities: Quantity | Type | Description |
center_q | vector | the CHARGE for each set of specified atoms |
: CHARGEGet the charges of one or multiple atoms More details ATOMSthe atom numbers that you would like to store the masses and charges of=fcc
center_chargeThe SUM action with label center_charge calculates the following quantities: Quantity | Type | Description |
center_charge | scalar | the sum of all the elements in the input vector |
: SUMCalculate the sum of the arguments More details PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO ARGthe values input to this function=center_q
center_fposThe POSITION action with label center_fpos calculates the following quantities: Quantity | Type | Description |
center_fpos.a | vector | the normalized projection on the first lattice vector of the atom position |
center_fpos.b | vector | the normalized projection on the second lattice vector of the atom position |
center_fpos.c | vector | the normalized projection on the third lattice vector of the atom position |
: POSITIONCalculate the components of the position of an atom or atoms. More details SCALED_COMPONENTS calculate the a, b and c scaled components of the position separately and store them as label ATOMSthe atom numbers that you would like to use the positions of=fcc
center_sinaThe CUSTOM action with label center_sina calculates the following quantities: Quantity | Type | Description |
center_sina | vector | the vector obtained by doing an element-wise application of an arbitrary function to the input vectors |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=smapfcc,center_fpos.a FUNCthe function you wish to evaluate=x*sin(2*pi*y) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_cosaThe CUSTOM action with label center_cosa calculates the following quantities: Quantity | Type | Description |
center_cosa | vector | the vector obtained by doing an element-wise application of an arbitrary function to the input vectors |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=smapfcc,center_fpos.a FUNCthe function you wish to evaluate=x*cos(2*pi*y) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_sinbThe CUSTOM action with label center_sinb calculates the following quantities: Quantity | Type | Description |
center_sinb | vector | the vector obtained by doing an element-wise application of an arbitrary function to the input vectors |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=smapfcc,center_fpos.b FUNCthe function you wish to evaluate=x*sin(2*pi*y) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_cosbThe CUSTOM action with label center_cosb calculates the following quantities: Quantity | Type | Description |
center_cosb | vector | the vector obtained by doing an element-wise application of an arbitrary function to the input vectors |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=smapfcc,center_fpos.b FUNCthe function you wish to evaluate=x*cos(2*pi*y) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_sincThe CUSTOM action with label center_sinc calculates the following quantities: Quantity | Type | Description |
center_sinc | vector | the vector obtained by doing an element-wise application of an arbitrary function to the input vectors |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=smapfcc,center_fpos.c FUNCthe function you wish to evaluate=x*sin(2*pi*y) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_coscThe CUSTOM action with label center_cosc calculates the following quantities: Quantity | Type | Description |
center_cosc | vector | the vector obtained by doing an element-wise application of an arbitrary function to the input vectors |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=smapfcc,center_fpos.c FUNCthe function you wish to evaluate=x*cos(2*pi*y) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_sinsumaThe SUM action with label center_sinsuma calculates the following quantities: Quantity | Type | Description |
center_sinsuma | scalar | the sum of all the elements in the input vector |
: SUMCalculate the sum of the arguments More details ARGthe values input to this function=center_sina PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_cossumaThe SUM action with label center_cossuma calculates the following quantities: Quantity | Type | Description |
center_cossuma | scalar | the sum of all the elements in the input vector |
: SUMCalculate the sum of the arguments More details ARGthe values input to this function=center_cosa PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_sinsumbThe SUM action with label center_sinsumb calculates the following quantities: Quantity | Type | Description |
center_sinsumb | scalar | the sum of all the elements in the input vector |
: SUMCalculate the sum of the arguments More details ARGthe values input to this function=center_sinb PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_cossumbThe SUM action with label center_cossumb calculates the following quantities: Quantity | Type | Description |
center_cossumb | scalar | the sum of all the elements in the input vector |
: SUMCalculate the sum of the arguments More details ARGthe values input to this function=center_cosb PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_sinsumcThe SUM action with label center_sinsumc calculates the following quantities: Quantity | Type | Description |
center_sinsumc | scalar | the sum of all the elements in the input vector |
: SUMCalculate the sum of the arguments More details ARGthe values input to this function=center_sinc PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_cossumcThe SUM action with label center_cossumc calculates the following quantities: Quantity | Type | Description |
center_cossumc | scalar | the sum of all the elements in the input vector |
: SUMCalculate the sum of the arguments More details ARGthe values input to this function=center_cosc PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_aThe CUSTOM action with label center_a calculates the following quantities: Quantity | Type | Description |
center_a | scalar | an arbitrary function |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=center_sinsuma,center_cossuma FUNCthe function you wish to evaluate=atan2(x,y)/(2*pi) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_bThe CUSTOM action with label center_b calculates the following quantities: Quantity | Type | Description |
center_b | scalar | an arbitrary function |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=center_sinsumb,center_cossumb FUNCthe function you wish to evaluate=atan2(x,y)/(2*pi) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center_cThe CUSTOM action with label center_c calculates the following quantities: Quantity | Type | Description |
center_c | scalar | an arbitrary function |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=center_sinsumc,center_cossumc FUNCthe function you wish to evaluate=atan2(x,y)/(2*pi) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
center: ARGS2VATOMCreate a virtual atom from the input scalars More details XPOSthe value to use for the x position of the atom=center_a YPOSthe value to use for the y position of the atom=center_b ZPOSthe value to use for the z position of the atom=center_c MASSthe value to use for the mass of the atom=center_mass CHARGEthe value to use for the charge of the atom=center_charge FRACTIONAL the input arguments are calculated in fractional coordinates so you need to multiply by the cell
# --- End of included input ---
densThe MULTICOLVARDENS action with label dens calculates the following quantities: Quantity | Type | Description |
dens | grid | the average value of the order parameters at each point on the grid |
: MULTICOLVARDENSEvaluate the average value of a multicolvar on a grid. This action is a shortcut. More details DATAthe multicolvar which you would like to calculate the density profile for=smapfcc ORIGINwe will use the position of this atom as the origin=center DIRthe direction in which to calculate the density profile=xyz NBINSthe number of bins to use in each direction (alternative to GRID_NBIN)=50,80,80 BANDWIDTHthe bandwidths for kernel density esimtation=1.0,1.0,1.0 GRID_MINthe lower bounds for the grid (default boxlengths)=0.0,auto,auto GRID_MAXthe upper bounds for the grid (default boxlengths)=20.0,auto,auto STRIDE the frequency with which to accumulate the densities=1 CLEAR the frequency with which to clear the density=1
# dens: MULTICOLVARDENS DATA=smapfcc ORIGIN=center DIR=xyz NBINS=50,80,80 BANDWIDTH=1.0,1.0,1.0 GRID_MIN=0.0,auto,auto GRID_MAX=20.0,auto,auto STRIDE=1 CLEAR=1
dens_distThe DISTANCE action with label dens_dist calculates the following quantities: Quantity | Type | Description |
dens_dist.x | vector | the x-component of the vector connecting the two atoms |
dens_dist.y | vector | the y-component of the vector connecting the two atoms |
dens_dist.z | vector | the z-component of the vector connecting the two atoms |
: DISTANCESCalculate the distances between multiple piars of atoms More details COMPONENTS calculate the x, y and z components of the distance separately and store them as label ORIGINcalculate the distance of all the atoms specified using the ATOMS keyword from this point=center ATOMSthe pairs of atoms that you would like to calculate the angles for=smapfcc
dens_inumerThe KDE action with label dens_inumer calculates the following quantities: Quantity | Type | Description |
dens_inumer | grid | a function on a grid that was obtained by doing a Kernel Density Estimation using the input arguments |
: KDECreate a histogram from the input scalar/vector/matrix using KDE More details VOLUMESthis keyword take the label of an action that calculates a vector of values=smapfcc ARGthe label for the value that should be used to construct the histogram=dens_dist.x,dens_dist.y,dens_dist.z GRID_BINthe number of bins for the grid=50,80,80 BANDWIDTHthe bandwidths for kernel density esimtation=1.0,1.0,1.0 GRID_MIN the lower bounds for the grid=0.0,auto,auto GRID_MAX the upper bounds for the grid=20.0,auto,auto
dens_numerThe ACCUMULATE action with label dens_numer calculates the following quantities: Quantity | Type | Description |
dens_numer | grid | a sum calculated from the time series of the input quantity |
: ACCUMULATESum the elements of this value over the course of the trajectory More details ARGthe label of the argument that is being added to on each timestep=dens_inumer STRIDE the frequency with which the data should be collected and added to the quantity being averaged=1 CLEAR the frequency with which to clear all the accumulated data=1
dens_kdeThe KDE action with label dens_kde calculates the following quantities: Quantity | Type | Description |
dens_kde | grid | a function on a grid that was obtained by doing a Kernel Density Estimation using the input arguments |
: KDECreate a histogram from the input scalar/vector/matrix using KDE More details BANDWIDTHthe bandwidths for kernel density esimtation=1.0,1.0,1.0 GRID_MIN the lower bounds for the grid=0.0,auto,auto GRID_MAX the upper bounds for the grid=20.0,auto,auto ARGthe label for the value that should be used to construct the histogram=dens_dist.x,dens_dist.y,dens_dist.z GRID_BINthe number of bins for the grid=50,80,80
dens_denomThe ACCUMULATE action with label dens_denom calculates the following quantities: Quantity | Type | Description |
dens_denom | grid | a sum calculated from the time series of the input quantity |
: ACCUMULATESum the elements of this value over the course of the trajectory More details ARGthe label of the argument that is being added to on each timestep=dens_kde STRIDE the frequency with which the data should be collected and added to the quantity being averaged=1 CLEAR the frequency with which to clear all the accumulated data=1
densThe CUSTOM action with label dens calculates the following quantities: Quantity | Type | Description |
dens | grid | the grid obtained by doing an element-wise application of an arbitrary function to the input grid |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=dens_numer,dens_denom 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
# --- End of included input ---
contourThe FIND_CONTOUR_SURFACE action with label contour calculates the following quantities: Quantity | Type | Description |
contour | grid | a grid containing the location of the points in the Willard-Chandler surface along the chosen direction |
: FIND_CONTOUR_SURFACEFind an isocontour by searching along either the x, y or z direction. This action has hidden defaults. More details ARGthe labels of the grid in which the contour will be found=dens CONTOURthe value we would like to draw the contour at in the space=0.5 SEARCHDIRIn which directions do you wish to search for the contour=dens_dist.x
contour: FIND_CONTOUR_SURFACEFind an isocontour by searching along either the x, y or z direction. This action uses the defaults shown here. More details ARGthe labels of the grid in which the contour will be found=dens CONTOURthe value we would like to draw the contour at in the space=0.5 SEARCHDIRIn which directions do you wish to search for the contour=dens_dist.x INTERPOLATION_TYPE the method to use for interpolation=spline
DUMPGRIDOutput the function on the grid to a file with the PLUMED grid format. More details ARGthe label for the grid that you would like to output=contour FILE the file on which to write the grid=contour.dat
ftThe FOURIER_TRANSFORM action with label ft calculates the following quantities: Quantity | Type | Description |
ft | grid | the fourier transform of the input grid |
: FOURIER_TRANSFORMCompute the Discrete Fourier Transform (DFT) by means of FFTW of data stored on a 2D grid. More details ARGthe label of the grid that you want to fourer transform=contour FT_TYPEchoose what kind of data you want as output on the grid=norm FOURIER_PARAMETERS what kind of normalization is applied to the output and if the Fourier transform in FORWARD or BACKWARD=-1,1
DUMPGRIDOutput the function on the grid to a file with the PLUMED grid format. More details ARGthe label for the grid that you would like to output=ft FILE the file on which to write the grid=fourier.dat STRIDE the frequency with which the grid should be output to the file=10
We do not think this action has been used in any other paper. If you are interested in using the functionality here we would recommend you carefully
read the documentation for the FFTW library. You may find it necessary to modify the code in this action for your particular purpose.
To what FFTW computes we would recommend reading this page.
Notice that the keyword "FOURIER_PARAMETERS" specifies how the Fourier transform will be normalized. The keyword takes two numerical parameters a and b that are both set equal to one by default.
The normalization is then defined as:
1n(1−a)/2n−1∑j=0Xje2πbjk√−1/n
References
More information about how this action can be used is available in the following articles:
- E. Baldi, M. Ceriotti, G. A. Tribello, Extracting the interfacial free energy and anisotropy from a smooth fluctuating dividing surface. Journal of Physics: Condensed Matter. 29, 445001 (2017)
Syntax
The following table describes the keywords and options that can be used with this action
Keyword |
Type |
Default |
Description |
ARG |
input |
none |
the label of the grid that you want to fourer transform |
FOURIER_PARAMETERS |
compulsory |
default |
what kind of normalization is applied to the output and if the Fourier transform in FORWARD or BACKWARD |
SERIAL |
optional |
false |
do the calculation in serial |
FT_TYPE |
optional |
not used |
choose what kind of data you want as output on the grid |