function triple_well_2d

deeptime.data.triple_well_2d(h=1e-05, n_steps=10000)

This dataset generates trajectories of a two-dimensional particle living in a triple-well potential landscape. The example can be found in [1].

The particle is subject to the stochastic differential equation

\[\mathrm{d}X_t = \nabla V(X_t) \mathrm{d}t + \sigma(t, X_t)\mathrm{d}W_t\]

with \(W_t\) being a Wiener process, \(\sigma = 1.09\), and the potential \(V\) being given by

\[\begin{aligned} V(x) &= 3e^{-x^2 - (y-\frac{1}{3})^2} - 3e^{-x^2 - (y - \frac{5}{3})^2} \\ &\quad - 5e^{-(x-1)^2 - y^2} - 5e^{-(x+1)^2 - y^2} \\ &\quad + \frac{2}{10} x^4 + \frac{2}{10}\left(y-\frac{1}{3}\right)^4. \end{aligned}\]

(Source code, png, hires.png, pdf)

../../_images/plot_triple_well_2d.png
Parameters:
  • h (float, default = 1e-5) – Integration step size. The implementation uses an Euler-Maruyama integrator.

  • n_steps (int, default = 10000) – Number of integration steps between each evaluation. That means the default lag time is h*n_steps=0.1.

Returns:

model – The model.

Return type:

TimeIndependentSystem

Examples

The model possesses the capability to simulate trajectories as well as be evaluated at test points:

>>> import numpy as np
>>> import deeptime as dt

First, set up the model (which internally already creates the integrator).

>>> model = dt.data.triple_well_2d(h=1e-3, n_steps=100)  # create model instance

Now, a trajectory can be generated:

>>> traj = model.trajectory(np.array([[-1., 0.]]), 1000, seed=42, n_jobs=1)  # simulate trajectory
>>> assert traj.shape == (1000, 2)  # 1000 evaluations from initial condition [0, 0]

Or, alternatively the model can be evaluated at test points (mapping forward using the dynamical system):

>>> test_points = np.random.uniform(-2, 2, (100, 2))  # 100 test point in [-2, 2] x [-2, 2]
>>> evaluations = model(test_points, seed=53, n_jobs=1)
>>> assert evaluations.shape == (100, 2)

References