SOAPify.engine

This submodule contains the settings and the function to call the SOAP engines

Module Attributes

KNOWNSOAPENGINES

Literal type for the Known SOAP engine

Functions

centerMaskCreator(SOAPatomMask, symbols)

Creates a mask for calculating SOAP only on a subset of the given symbols

getSoapEngine(atomNames, SOAPrcut, SOAPnmax, ...)

set up a soap engine with the given settings

Classes

SOAPengineContainer(SOAPengine, centerMask, ...)

A container for the SOAP engine

dscribeSOAPengineContainer(SOAPengine, ...)

A container for the SOAP engine from dscribe

quippySOAPengineContainer(SOAPengine, centerMask)

A container for the SOAP engine from quippy

SOAPify.engine.KNOWNSOAPENGINES

Literal type for the Known SOAP engine

alias of Literal[‘dscribe’, ‘quippy’]

class SOAPify.engine.SOAPengineContainer(SOAPengine, centerMask, SOAPengineKind)[source]

Bases: ABC

A container for the SOAP engine

SOAPengine

the soap engine already set up

Type

SOAP

property SOAPenginekind

retunrs the name of the library used for the engine

Returns

the name of the engine stored

Return type

str

__init__(SOAPengine, centerMask, SOAPengineKind)[source]
property centersMask

Retunr the centersMask

abstract property crossover: bool

returns True if the engine wil calculate the terms for the non same species

property engine

retunrs the sotred engine

Returns

the stored engine

Return type

varies

abstract property features: int

returns the features of the engine

abstract getLocation(specie1, specie2)[source]

returns the slice where the two asked species are stored in the ouput array

abstract property lmax: int

returns the lmax

abstract property nmax: int

returns the nmax

abstract property rcut: int

returns the cutoff radius of the engine

abstract property species: list

returns the species set up fro the engine

SOAPify.engine.centerMaskCreator(SOAPatomMask, symbols)[source]

Creates a mask for calculating SOAP only on a subset of the given symbols

given the list of types of atoms to select and the list od types of atoms in the topology returns the mask of the selected species

the mask is 1 if the atom i is in the SOAPatomMask list, else is 0

Parameters
  • SOAPatomMask (list[str]) – the mask to apply

  • symbols (list[str]) – the list of the type of atoms in the trajectory

Returns

the mask of selected atoms

Return type

list[int]

class SOAPify.engine.dscribeSOAPengineContainer(SOAPengine, centerMask)[source]

Bases: SOAPengineContainer

A container for the SOAP engine from dscribe

SOAPengine

the soap engine already set up

Type

SOAP

property SOAPenginekind

retunrs the name of the library used for the engine

Returns

the name of the engine stored

Return type

str

__init__(SOAPengine, centerMask)[source]
property centersMask

Retunr the centersMask

property crossover: bool

returns True if the engine wil calculate the terms for the non same species

property engine

retunrs the sotred engine

Returns

the stored engine

Return type

varies

property features

returns the features of the engine

getLocation(specie1, specie2)[source]

returns the slice where the two asked species are stored in the ouput array

property lmax

returns the lmax

property nmax

returns the nmax

property rcut

returns the cutoff radius of the engine

property species

returns the species set up fro the engine

SOAPify.engine.getSoapEngine(atomNames, SOAPrcut, SOAPnmax, SOAPlmax, SOAPatomMask=None, centersMask=None, SOAP_respectPBC=True, SOAPkwargs=None, useSoapFrom='dscribe')[source]

set up a soap engine with the given settings

please visit the manual of the relative soap engine for the calculation parameters

SOAPatomMask and centersMask are mutually exclusive:

  • centerMask is a list of atoms whose SOAP fingerprints will be calculate

  • SOAPatomMask is the list of species that will be included in the centerMask

NB: if you use quippy, we impose it to not normalize the soap vector

Parameters
  • atomNames (list[str]) – The list of species present in the system

  • SOAPrcut (float) – the SOAP cut offf

  • SOAPnmax (int, optional) – The number of radial basis functions (option passed to the desired SOAP engine). Defaults to 8.

  • SOAPlmax (int, optional) – The maximum degree of spherical harmonics (option passed to the desired SOAP engine). Defaults to 8.

  • SOAPatomMask (list[str], optional) – the symbols of the atoms whose SOAP fingerprint will be calculated. Defaults to None.

  • centersMask (Iterable, optional) – the indexes of the atoms whose SOAP fingerprint will be calculated. Defaults to None.

  • SOAP_respectPBC (bool, optional) –

  • passed (Determines whether the system is considered to be periodic (option) – to the desired SOAP engine). Defaults to True.

  • SOAPkwargs (dict, optional) – additional keyword arguments to be passed to the SOAP engine. Defaults to {}.

  • useSoapFrom (KNOWNSOAPENGINES, optional) – This string determines the selected SOAP engine for the calculations. Defaults to “dscribe”.

Returns

the soap engine set up for the calcualations

Return type

SOAPengineContainer

class SOAPify.engine.quippySOAPengineContainer(SOAPengine, centerMask)[source]

Bases: SOAPengineContainer

A container for the SOAP engine from quippy

SOAPengine

the soap engine already set up

Type

SOAP

property SOAPenginekind

retunrs the name of the library used for the engine

Returns

the name of the engine stored

Return type

str

__init__(SOAPengine, centerMask)[source]
property centersMask

Retunr the centersMask

property crossover: bool

returns True if the engine wil calculate the terms for the non same species

property engine

retunrs the sotred engine

Returns

the stored engine

Return type

varies

property features

returns the features of the engine

getLocation(specie1, specie2)[source]

returns the slice where the two asked species are stored in the ouput array

property lmax

returns the lmax

property nmax

returns the nmax

property rcut

returns the cutoff radius of the engine

property species

returns the species set up fro the engine