CILES: Continuous Interval Langevin Equation Simulator
Langevin integrator for SDEs with constant drift and diffusion on continuous intervals with circular boundary conditions.
CILES is written in Cython and uses GSL for interpolation of drift & diffusion fields, to be able to simulate continuous variables.
Description
Given a discretized drift field A(x) and a (position dependent) diffusion coefficient B(x) this tool performs simple time-forward integration of the SDE:
dx(t)/dt = A(x(t)) + sqrt(B(x(t))) * eta(t)
where eta(t) is a gaussian white noise term and x is a variable on an interval with circular boundaries (commonly 0 <= x < 2PI).
Both drift field A and diffusion B need to be arrays of the same dimension. They are internally interpolated (using gsl_interp_cspline_periodic) to provide continuous fields, which are then used in the forward integration.
Forward integration is performed with the Euler-Murayama scheme: x(t+dt) = x(t) + dt * A(x(t)) + r * sqrt(dt * B(x(t))), where r is a normally distributed random number with zero mean and unit variance.
Dependencies
Numpy
Cython
Installation
Clone repository
python setup.py install
To test (using nosetests): nosetests
Example use
from ciles.integrator import LangevinIntegrator as LI
import numpy as np
drift = np.zeros(100) # no drift field
diff = np.ones(100) # constant diffusion with 1 deg^2/s
dt = 1e-3 # 1 ms timestep
tmax = 1. # simulate until 1s
# initialize the integrator
li = LI(drift, diff, dt=dt, tmax=tmax)
# simulate a single trajectory
li.run()
out = li.out
More examples
Below are the plot results of the currently available examples from ciles.examples.
Final distributions after 2s diffusion
See the source
Trajectories for drift-field with 2 fixed points
See the source
Metadata
Release files for ciles 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ciles-0.1.0.tar.gz | 61.4 kB | Without provenance | Details for ciles-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ciles-0.1.0-cp27-cp27m-macosx_10_11_x86_64.whl | CPython 2.7 | CPython 2.7 pymalloc | macOS 10.11+ x86-64 | Details for ciles-0.1.0-cp27-cp27m-macosx_10_11_x86_64.whl |
Total release size: 93.9 kB
Release files / ciles-0.1.0.tar.gz
| Download URL | ciles-0.1.0.tar.gz |
|---|---|
| Size | 61.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9a8eb5749285cec0542ac083d6331163f05e48138d20bf33f111e216eb58d31
|
|
BLAKE2b-256 checksum How to use checksums |
4e32b95462360f49519064f6487f9e9fff9c99461208402b862c04a6e63449aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / ciles-0.1.0-cp27-cp27m-macosx_10_11_x86_64.whl
| Download URL | ciles-0.1.0-cp27-cp27m-macosx_10_11_x86_64.whl |
|---|---|
| Size | 32.5 kB |
| Tags | CPython 2.7 CPython 2.7 pymalloc macOS 10.11+ x86-64 |
|
SHA-256 checksum How to use checksums |
6f762e9f76762bf003278b2ff24825bfe239d2667a14a9c20278752229b3247b
|
|
BLAKE2b-256 checksum How to use checksums |
353d7970983bdc4acf325458114d8c7345b4364ebf8741d134a0bf5427029dcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ciles 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.