One-dimensional Prinz potentialΒΆ

Example for the deeptime.data.prinz_potential() dataset.

plot prinz
 8 import matplotlib.pyplot as plt
 9 import numpy as np
10 from deeptime.data import prinz_potential
11
12 system = prinz_potential(n_steps=500, h=1e-5)
13 xs = np.linspace(-1, 1, 1000)
14 energy = system.potential(xs.reshape((-1, 1)))
15 traj = system.trajectory([[0.]], 3000)
16 dtraj = np.digitize(traj, bins=xs[:-1], right=False).squeeze()
17 f, (ax1, ax2) = plt.subplots(1, 2, sharey=True)
18 ax1.plot(energy, xs)
19 ax1.set_ylabel('x coordinate')
20 ax1.set_xlabel('energy(x)')
21 ax2.plot(xs[dtraj])
22 ax2.set_xlabel('time (a.u.)')

Total running time of the script: ( 0 minutes 0.547 seconds)

Estimated memory usage: 8 MB