This module contains sympy-based symbolic tools for the short-time propagator for one-dimensional Fokker-Planck dynamics. This python module accompanies the paper Ref. [1].
For a given drift
where
In this module, we implement an approximate short-time propagator
and the positivity-preserving representation
Here,
In PySTFP we furthermore implement the explicit perturbation expansions for the spatial moments
In the subfolder examples/ we provide several notebooks that illustrate the use of PySTFP, as well as allow to re-derive and extend the symbolic perturbative expressions used.
Here is a list of the notebooks:
Subfolder examples/
These notebooks showcase basic functionality of PySTFP:
- plot propagator.ipynb: Plot the short-time propagator for a given drift and diffusivity profile.
- propagator in physical units.ipynb: Access the symbolic propagator stored in PySTFP, which are expressed in dimensionless variables, and rewrite them in physical dimensions.
- entropy production in physical units.ipynb: Access the symbolic entropy production (rates) stored in PySTFP, which are expressed in dimensionless variables, and rewrite them in physical dimensions.
Subfolder examples/derivations
These notebooks implement the symbolic derivations of all the perturbative results from Ref. [1]:
-
perturbative propagators and moments.ipynb:
Symbolically evaluate the perturbation series for both the normalization-preserving and positivity-preserving propagator. Additionally, use the normalization-preserving propagator to calculate some moments
$\langle \Delta x^k \rangle$ . - entropy production rates.ipynb: Symbolically calculate the medium entropy production rate, the total entropy production rate, and the Gibbs entropy.
Subfolder examples/numerical example
These notebooks allow to reproduce the plots of Ref. [1]:
- analytical solution.ipynb: Evaluate the drift, diffusivity, and propagator exactly.
- Fig1 diffusivity and drift.ipynb: Plot the drift and diffusivity.
- Fig2 exact vs approximate propagator.ipynb: Compare the exact and perturbative propagators.
- Fig3 exact vs approximate Kramers-Moyal coefficients.ipynb: Compare the exact and perturbative finite-time Kramers-Moyal coefficients.
- Fig4 exact vs approximate medium entropy production.ipynb: Compare the exact and perturbative medium entropy production rate.
- Fig5 exact vs second order propagators.ipynb: Compare exact and various second-order perturbative propagators.
PySTFP requires sympy and numpy, the example notebooks furthermore use matplotlib and h5py. To install these requirements as well as PySTFP, you can run the following commands.
>> git clone https://github.com/juliankappler/PySTFP.git .
>> cd PySTFP
>> pip install -r requirements.txt
>> pip install .
[1] Short-time Fokker-Planck propagator beyond the Gaussian approximation. J. Kappler. arXiv: 2405.18381.
We acknowledge funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 101068745.