# Accurate Estimation of Diffusion Coefficients and their Uncertainties [![JCTC Status](https://img.shields.io/badge/JCTC-10.1021/acs.jctc.4c01249-blue.svg)](https://doi.org/10.1021/acs.jctc.4c01249) [![JOSS Status](https://joss.theoj.org/papers/1ae102ffb6b3c63b04c002976440815d/status.svg)](https://joss.theoj.org/papers/1ae102ffb6b3c63b04c002976440815d) [![PyPI version](https://badge.fury.io/py/kinisi.svg)](https://badge.fury.io/py/kinisi) `kinisi` is an open-source Python package that can accurately estimate diffusion processes in atomic and molecular systems and determine an accurate estimate of the uncertainty in these processes. This is achieved by modelling the diffusion process as a [multivariate normal distribution](https://en.wikipedia.org/wiki/Multivariate_normal_distribution), based on that for a random walker. This gives an accurate estimate of the diffusion coefficient and its uncertainty. More information about the approach `kinisi` uses can be found in the [methodology article](https://doi.org/10.1021/acs.jctc.4c01249), which is also introduced in this [poster](./_static/poster.pdf). ```{image} ./_static/example.png :width: 450 :align: center :alt: An example of the kinisi analysis for the diffusion of lithium in a superionic material. ```
An example of the output from kinisi; showing the determined mean-squared displacements (solid line),
the estimated Einstein diffusion relationship (blue regions representing decreasing credible intervals).

`kinisi` is built using the `scipp` library; we recommend [familiarising yourself](https://scipp.github.io/getting-started/index.html) with some of the `scipp` data structures if you want to start doing more complex things with `kinisi`. `kinisi` can handle simulation trajectories from many common molecular dynamics packages; if your trajectory can be read by [MDAnalysis](https://userguide.mdanalysis.org/stable/reading_and_writing.html), [ASE](https://wiki.fysik.dtu.dk/ase/ase/io/io.html), or [pymatgen](https://pymatgen.org), then you can use `kinisi`. The Markov chain Monte Carlo algorithm uses [the `emcee` package](https://emcee.readthedocs.io/en/stable/). Examples of some of the analyses `kinisi` can perform are shown in the [notebooks](./notebooks).
                   
              
## [Contributors](https://github.com/kinisi-dev/kinisi/graphs/contributors) ```{toctree} --- hidden: True --- installation methodology notebooks faq papers modules ```