Skip to content

Action: SPHERICAL_KDE

Module gridtools
Description Usage
Create a histogram from the input scalar/vector/matrix using SPHERICAL_KDE used in 0 tutorialsused in 0 eggs
output value type
a function on a grid that was obtained by doing a Kernel Density Estimation using the input arguments grid

Details and examples

Create a histogram from the input scalar/vector/matrix using SPHERICAL_KDE

This action operates similarly to KDE but it is designed to be used for investigating directional statistics. It is particularly useful if you are looking at the distribution of bond vectors as illustrated in the input below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
# Calculate all the bond vectors
d1: 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-100 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.={RATIONAL R_0=0.1} COMPONENTS also calculate the components of the vector connecting the atoms in the contact matrix
# Normalise the bond vectors
mag: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=d1.x,d1.y,d1.z FUNCthe function you wish to evaluate=sqrt(x*x+y*y+z*z) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
d1x: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=d1.x,mag 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
d1y: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=d1.y,mag 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
d1z: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=d1.z,mag 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 construct the KDE
kde: SPHERICAL_KDECreate a histogram from the input scalar/vector/matrix using SPHERICAL_KDE More details ARGthe label for the value that should be used to construct the histogram=d1x,d1y,d1z HEIGHTS this keyword takes the label of an action that calculates a vector of values=d1.w CONCENTRATIONthe concentration parameter for the Von Mises-Fisher distributions=100 GRID_BINthe number of points on the fibonacci sphere at which the density should be evaluated=144

Each bond vector here contributes a Fisher von-Mises kernel to the spherical grid. This spherical grid is constructed using a Fibonnacci sphere algorithm so the number of specified using the GRID_BIN keyword must be a Fibonacci number.

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
ARG scalar/vector/matrix the label for the value that should be used to construct the histogram

Full list of keywords

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

Keyword Type Default Description
ARG input none the label for the value that should be used to construct the histogram
CONCENTRATION compulsory none the concentration parameter for the Von Mises-Fisher distributions
HEIGHTS compulsory 1.0 this keyword takes the label of an action that calculates a vector of values
GRID_BIN compulsory none the number of points on the fibonacci sphere at which the density should be evaluated
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.