SOAPify.utils
Utilities submodule, cointains unclassified support functions Author: Daniele Rapetti
Functions
|
Given the result of a SOAP calculation from dscribe returns the SOAP power spectrum |
|
create a support bdarray to reorder the quippy output in a dscribe fashion |
|
Gets the settings of the SOAP calculation |
|
returns the positional slices for the calculated fingerprints |
|
returns how dscribe saves the SOAP results |
|
returns how quippi saves the SOAP results |
Normalizes the futher axis of the given array |
|
|
Orders the list of species by their atomic number |
- SOAPify.utils.fillSOAPVectorFromdscribe(soapFromdscribe, lMax, nMax, atomTypes=None, atomicSlices=None)[source]
- Given the result of a SOAP calculation from dscribe returns the SOAP power spectrum
with also the symmetric part explicitly stored, see the note in https://singroup.github.io/dscribe/1.2.x/tutorials/descriptors/soap.html
No controls are implemented on the shape of the soapFromdscribe vector.
- Parameters
soapFromdscribe (numpy.ndarray) – the result of the SOAP calculation from the dscribe utility
lMax (int) – the l_max specified in the calculation.
nMax (int) – the n_max specified in the calculation.
- Returns
The full soap spectrum, with the symmetric part sored explicitly
- Return type
- SOAPify.utils.getAddressesQuippyLikeDscribe(lmax, nmax, species)[source]
create a support bdarray to reorder the quippy output in a dscribe fashion
Given the lmax and nmax of a SOAP calculation and the species of the atoms returns an array of idexes for reordering the quippy results as the dscribe results
- SOAPify.utils.getSOAPSettings(fitsetData)[source]
Gets the settings of the SOAP calculation
you can feed directly this output to
fillSOAPVectorFromdscribe()#TODO: make tests for this
- Parameters
fitsetData (h5py.Dataset) – A soap dataset with attributes
- Returns
- a dictionary with the following components:
nMax
lMax
atomTypes
atomicSlices
- Return type
- SOAPify.utils.getSlicesFromAttrs(attrs)[source]
returns the positional slices for the calculated fingerprints
Given the attributes of from a SOAP dataset returns the slices of the SOAP vector that contains the pair information
- SOAPify.utils.getdscribeSOAPMapping(lmax, nmax, species, crossover=True)[source]
returns how dscribe saves the SOAP results
return a list of string with the identities of the data returned from dscribe, see the note in https://singroup.github.io/dscribe/1.2.x/tutorials/descriptors/soap.html
- Parameters
- Returns
an array of strings with the mapping of the output of the analysis
- Return type
- SOAPify.utils.getquippySOAPMapping(lmax, nmax, species, diagonalRadial=False)[source]
returns how quippi saves the SOAP results
return a list of string with the identities of the data returned from quippy, see https://github.com/libAtoms/GAP/blob/main/descriptors.f95#L7588
- Parameters
- Returns
an array of strings with the mapping of the output of the analysis
- Return type
- SOAPify.utils.normalizeArray(x)[source]
Normalizes the futher axis of the given array
(eg. in an array of shape (100,50,3) normalizes all the 5000 3D vectors)
- Parameters
x (numpy.ndarray) – the array to be normalized
- Returns
the normalized array
- Return type