Pronunciation: kee-nee-see
kinisi is an open-source package focussed on accurately quantifying the uncertainty in atomic and molecular displacements, and using this to more completely understand diffusion in materials.
kinisi can be installed from PyPI with pip:
pip install kinisi
or from conda-forge:
conda install -c conda-forge kinisi
To install the latest development version, clone this repository and run pip install . from its root. See the installation guide for development and documentation builds.
Estimate the lithium self-diffusion coefficient, with its uncertainty, from a VASP XDATCAR (reading the file needs pymatgen; ASE and MDAnalysis trajectories are also supported):
import scipp as sc
from pymatgen.io.vasp import Xdatcar
from kinisi.analyze import DiffusionAnalyzer
xd = Xdatcar('XDATCAR')
diff = DiffusionAnalyzer.from_xdatcar(
xd, specie='Li', time_step=2.0 * sc.Unit('fs'), step_skip=50 * sc.Unit('dimensionless')
)
# Fit from the time at which the mean-squared displacement becomes linear (diffusive).
diff.diffusion(start_dt=3000 * sc.Unit('fs'))
print(sc.mean(diff.D), sc.std(diff.D, ddof=1)) # diff.D holds samples of D in cm^2/sThe documentation has worked examples for each trajectory format, jump diffusion, conductivity, Arrhenius fitting, and finite-size corrections, as well as a description of the methodology.
If you use kinisi in your research, please cite the methodology paper and the JOSS software paper, and give the version of kinisi you used. See the FAQ for the other papers to cite for specific features.
If you would like to contribute to kinisi, have a look at CONTRIBUTING.md, which outlines the different ways to help out.