Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute molecular graph autocorrelation vectors, convolved over atomic properties
returns the graph property autocorrelation function for the input Molecule mol.
returns the graph property autocorrelation function for the input SMILES string str.
|"Distance"||3||path length or distance between atoms|
|"PropertyKernels"||(see below)||properties to include in the computation|
|"OutputStyle"||"Vector"||format of returned quantity|
The function can take either a SMILES string or a Molecule as input. By default, it returns a vector of 20 values, four values (0-, 1-, 2-, 3- neighbor autocorrelation distance) for each of the five default properties:
Redo using an explicit Molecule input form:
Both the path length and the properties computed can be set as options. The returned vector has the dimension of the number of property kernels times the number of distances considered. In general, any AtomList property can be used in the "PropertyKernels" option value:
For small molecules without second- or third-nearest neighbors, the vector that is returned has zeros at those entries (for example, atoms in a water molecule are at most two bonds away from each other):
Changing the "OutputStyle" to "Association" clarifies that it is the fourth element (the third-neighbor) terms that are zero for each property:
The option "Distance" controls the number of neighbors over which the graph correlation is calculated. The default value is 3 and must be a non-negative integer (0, 1, 2, 3, …):
Use the "PropertyKernels" option to specify properties (from AtomList) to include in the calculations:
Use the "OutputStyle" option to specify the format of returned quantity. The default is a "Vector" output:
Other options include "Association", which returns an Association whose keys are the property and whose values are the vector of autocorrelated values for each distance:
The option "Matrix" returns a list of lists, arranged by property and then by distance:
This "Matrix" setting for "OutputStyle" can be convenient for tabular data presentations:
Visualize molecular similarity by using the MolecularGraphAutocorrelation:
Each point in the graph has a Tooltip that shows the corresponding structure. In this example, the first principal component (PC1) is related to overall molecular size and the second principal component (PC2) captures whether the molecule has a ring (positive values) or not (negative values).
This work is licensed under a Creative Commons Attribution 4.0 International License