Transition Manifold module (tmrc.transition_manifold)¶
Transition Manifold-related classes and methods.
-
class
tmrc.transition_manifold.EmbeddingBurstTransitionManifold(embfun, epsi=1.0)¶ Embedding transition manifold class based on the Whitney embedding of transition densities and their euclidean distance in embedding space. This estimator is based on multiple iid simulations (bursts) of the dynamics such that pointclouds can be used as empirical approximations of transition densities corresponding to Dirac functions in state space.
Please refer to A. Bittracher, P. Koltai, S. Klus, R. Banisch, M. Dellnitz, C. Schütte ‘Transition Manifolds of Complex Metastable Systems - Theory and Data-Driven Computation of Effective Dynamics’ J Nonlinear Sci (2018) 28:471–512 https://doi.org/10.1007/s00332-017-9415-0
-
embedd(X, showprogress=True)¶ Embedds the point cloud data in X into Euclidean space via the objects own EmbeddingFunction. Stores the resulting points in an array self.embpointclouds.
Parameters: X (np.array of shape [# startpoints, # simulations per startpoint, dimension]) – data array containing endpoints of trajectory simulations for each startpoint
-
fit(X, n_components=10, showprogress=True)¶ Computes the reaction coordinate based on the data X.
Parameters: - X (np.array of shape [# startpoints, # simulations per startpoint, dimension]) – data array containing endpoints of trajectory simulations for each startpoint
- n_components (int, number of the eigenpairs of the diffusion matrix) – which are computed. NOTE: n_components needs to be at least as big as the dimension of the desired reaction coordinate to which the data is projected by the .predict() method.
-
predict(n_components)¶ Project data to diffusion space
- NOTE: the maximal possible dimension of the diffusion space is
- determined by the number of eigenpairs available specified by the argument <n_components> in the .fit() routine
- NOTE: this method returns all dimensions in diffusion space including the
- dimension related to first eigenpair. When projecting to diffusion space, it is therefore reasonable to not use the first coordinate returned by this method.
Example
Projecting to a one-dimensional reaction coordinate
>>> transformed = embTM.predict(n_components=2) >>> reaction_coordinate = transformed[:, 1]
Parameters: n_components (int, number of dimensions in) – diffusion space Returns: the transformed data in diffusion space Return type: array of shape (n_features, n_components)
-
-
class
tmrc.transition_manifold.EmbeddingTrajTransitionManifold(embfun, epsi=1.0)¶ Embedding transition manifold based on the Whitney embedding of evolved indicator densities over Voronoi cells. If the diameters of the cells are small, these densities approximate the transition densities starting from the cell center points. This estimator is based on a single long trajectory and approximates the Euclidean inner product between the embedded evolved indicator densities by counting transitions between the Voronoi cells within the trajectory.
Please refer to A. Bittracher, R. Banisch, C. Schütte ‘Data-driven computation of molecular reaction coordinates’ J Chem Phys 149, 154103 (2018) https://doi.org/10.1063/1.5035183
-
fit(X, Xtest, lag, n_components=10, showprogress=True)¶ Computes the reaction coordinate based on the trajectory data X.
Parameters: - X (np.array of shape [# steps, dimension]) – data array containing steps of a trajectory simulation
- Xtest (np.array of shape [# points, dimension]) – array containing center points of Voronoi cells
- lag (int) – number of steps after which the endpoints are selected
- n_components (int, number of the eigenpairs of the diffusion matrix) – which are computed. NOTE: n_components needs to be at least as big as the dimension of the desired reaction coordinate to which the data is projected by the .predict() method.
-
predict(n_components)¶ Project data to diffusion space
- NOTE: the maximal possible dimension of the diffusion space is
- determined by the number of eigenpairs available specified by the argument <n_components> in the .fit() routine
- NOTE: this method returns all dimensions in diffusion space including the
- dimension related to first eigenpair. When projecting to diffusion space, it is therefore reasonable to not use the first coordinate returned by this method.
emb .. rubric:: Example
Projecting to a one-dimensional reaction coordinate
>>> transformed = kernel_tm.predict(n_components=2) >>> reaction_coordinate = transformed[:, 1]
Parameters: n_components (int, number of dimensions in) – diffusion space Returns: the transformed data in diffusion space Return type: array of shape (n_features, n_components)
-
-
class
tmrc.transition_manifold.KernelBurstTransitionManifold(kernel, epsi=1.0)¶ Kernel transition manifold based on the kernel mean embeddings of transition densities and maximum mean discrepancy. The reaction coordinate is computed by diffusion maps based on the embedded empirical approximations of the transition densities. This estimator is based on multiple iid simulations (bursts) of the dynamics such that pointclouds can be used as empirical approximations of transition densities corresponding to Dirac functions in state space.
Please refer to A. Bittracher, S. Klus, B. Hamzi, C. Schütte ‘A kernel-based method for coarse graining complex dynamical systems’ https://arxiv.org/abs/1904.08622
-
fit(X, n_components=10, showprogress=True)¶ Computes the reaction coordinate based on the data X.
Parameters: - X (np.array of shape [# startpoints, # simulations per startpoint, dimension]) – data array containing endpoints of trajectory simulations for each startpoint
- n_components (int, number of the eigenpairs of the diffusion matrix) – which are computed. NOTE: n_components needs to be at least as big as the dimension of the desired reaction coordinate to which the data is projected by the .predict() method.
-
predict(n_components)¶ Project data to diffusion space
- NOTE: the maximal possible dimension of the diffusion space is
- determined by the number of eigenpairs available specified by the argument <n_components> in the .fit() routine
- NOTE: this method returns all dimensions in diffusion space including the
- dimension related to first eigenpair. When projecting to diffusion space, it is therefore reasonable to not use the first coordinate returned by this method.
Example
Projecting to a one-dimensional reaction coordinate
>>> transformed = kerTM.predict(n_components=2) >>> reaction_coordinate = transformed[:, 1]
Parameters: n_components (int, number of dimensions in) – diffusion space Returns: the transformed data in diffusion space Return type: array of shape (n_features, n_components)
-
-
class
tmrc.transition_manifold.KernelTrajTransitionManifold(kernel, epsi=1.0)¶ Kernel transition manifold based on the kernel mean embeddings of evolved indicator densities over Voronoi cells. If the diameters of the cells are small, these densities approximate the transition densities starting from the cell center points. This estimator is based on a single long trajectory and approximates the evolved indicator densities by considering all trajectory points within one Voronoi cell and treating the shifted points within the trajectory as endpoints of short simulations.
Consistency analysis of this method is current work in progress. The method should thus be considered experimental.
-
fit(X, Xtest, lag, n_components=10, showprogress=True)¶ Computes the reaction coordinate based on the trajectory data X.
Parameters: - X (np.array of shape [# steps, dimension]) – data array containing steps of a trajectory simulation
- Xtest (np.array of shape [# points, dimension]) – array containing center points of Voronoi cells
- lag (int) – number of steps after which the endpoints are selected
- n_components (int, number of the eigenpairs of the diffusion matrix) – which are computed. NOTE: n_components needs to be at least as big as the dimension of the desired reaction coordinate to which the data is projected by the .predict() method.
-
predict(n_components)¶ Project data to diffusion space
- NOTE: the maximal possible dimension of the diffusion space is
- determined by the number of eigenpairs available specified by the argument <n_components> in the .fit() routine
- NOTE: this method returns all dimensions in diffusion space including the
- dimension related to first eigenpair. When projecting to diffusion space, it is therefore reasonable to not use the first coordinate returned by this method.
Example
Projecting to a one-dimensional reaction coordinate
>>> transformed = kernel_tm.predict(n_components=2) >>> reaction_coordinate = transformed[:, 1]
Parameters: n_components (int, number of dimensions in) – diffusion space Returns: the transformed data in diffusion space Return type: array of shape (n_features, n_components)
-
-
class
tmrc.transition_manifold.LinearRandomFeatureManifold(method='rff', n_components=100, kernel='rbf', gamma=0.1, **kwargs)¶ A class providing a linear transition manifold by using kernel feature Approximations. The kernel embeddings of the transition densities are approximated with either random Fourier features or the Nystroem method. This estimator is based on multiple iid simulations (bursts) of the dynamics such that pointclouds can be used as empirical approximations of transition densities corresponding to Dirac functions in state space.
Please refer also to the documentation of sklearn.kernel_approximation
-
fit(X)¶ Computes a linear reaction coordinate based on the data X.
Parameters: X (np.array of shape [# startpoints, # simulations per startpoint, dimension]) – data array containing endpoints of trajectory simulations for each startpoint
-
predict(Y)¶ Evaluates the computed eigenfunction on given test data Y. Note: fit() has to be run first.
Parameters: Y (np.array of shape [# testpoints, dimension]) – data array containing endpoints of trajectory simulations for each startpoint
-
-
class
tmrc.transition_manifold.TransitionManifold¶ TransitionManifold base class