dynsight.soap.saponify_trajectory

dynsight.soap.saponify_trajectory(universe, soaprcut, soapnmax=8, soaplmax=8, selection='all', soap_respectpbc=True, n_core=1, centers='all', trajslice=None)[source]

Calculate the SOAP fingerprints for each atom in a MDA universe.

  • Author: Simone Martino

Parameters:
  • universe (MDAnalysis.Universe) – Contains the trajectory.

  • soaprcut (float) – The cutoff for the local region in angstroms. Should be greater than 1 angstrom (option passed to the desired SOAP engine).

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

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

  • selection (str) – Selection of atoms taken from the Universe for the computation. More information concerning the selection language can be found here

  • centers (str) –

    Selection of atoms used as centers for the SOAP calculation. If not specified all the atoms present in the selection will be used as centers. More information concerning the selection language can be found here

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

  • n_core (int) – Number of core used for parallel processing. Default to 1.

  • trajslice (slice | None) – The slice of the trajectory to consider. Defaults to slice(None).

Returns:

The SOAP spectra for all the particles and frames. np.ndarray of shape (n_atoms, n_frames, n_components)

Return type:

NDArray[np.float64]

Example

import numpy as np
import MDAnalysis
from dynsight.soap import saponify_trajectory

univ = MDAnalysis.Universe(path / "trajectory.xyz")
cutoff = 2.0

soap = saponify_trajectory(univ, cutoff, soap_respectpbc=False)