function quadruple_well¶
- deeptime.data.quadruple_well(h: float = 0.001, n_steps: int = 10000)¶
This dataset generates trajectories of a two-dimensional particle living in a quadruple-well potential landscape. It is subject to the stochastic differential equation
\[\mathrm{d}X_t = \nabla V(X_t) \mathrm{d}t + \sqrt{2\beta^{-1}}\mathrm{d}W_t\]with \(W_t\) being a Wiener process and the potential \(V\) being given by
\[V(x) = (x_1 - 1)^2 + (x_2 - 1)^2.\]The inverse temperature is set to be \(\beta = 4\).
(Source code, png, hires.png, pdf)
- Parameters:
h (float, default = 1e-3) – 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=10
.
- Returns:
model – The model.
- Return type:
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.quadruple_well(h=1e-3, n_steps=100) # create model instance
Now, a trajectory can be generated:
>>> traj = model.trajectory([0., 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)