dynsight.descriptors.many_body_tica

dynsight.descriptors.many_body_tica(data, lag_time, tica_dim)[source]

Perform tICA on trajectories from a many-body system.

The tICA model is fitted on the entire dataset, concatenating different atoms one after the other. Then, with this model, the trajectories of the individual atoms are trnsformed individually. The model is fitted using the ‘kinetic_map’ scaling, which is the suggested one if data are subsequently clustered.

This function uses the TICA module from the deeptime package; refer to Moritz Hoffmann et al 2022 Mach. Learn.: Sci. Technol. 3 015009.

Parameters:
  • data (NDArray[np.float64]) – shape (n_atoms, n_frames, n_dims) The multivariated data for tICA dimensionality reduction.

  • lag_time (int) – The lagtime under which time correlations are maximized.

  • tica_dim (int) – The number of dimensions to keep.

Returns:

  • The typical relaxation time-scale of each tIC

  • The coefficient matrix for the tICA projection;

    shape (tica_dim, n_dims)

  • The original dataset projected onto tICs;

    shape (n_atoms, n_frames, tica_dim)

Return type:

tuple[NDArray[np.float64], NDArray[np.float64], NDArray[np.float64]]

Example

import numpy as np
from dynsight.descriptors import many_body_tica

np.random.seed(42)
random_array = np.random.rand(100, 100, 10)

relax_times, coeffs, tica_data = many_body_tica(
    random_array, lag_time=10, tica_dim=3)