bjmorgan / kinisi

A Python package for estimating diffusion properties from molecular dynamics simulations.
https://kinisi.readthedocs.io
MIT License
49 stars 11 forks source link

Diffusion coefficient Units #65

Closed vikas41299 closed 1 month ago

vikas41299 commented 1 month ago

Hello,

Please let me confirm, that the units for diffusion coefficient are cm^2/s if we extract the data from XDATCAR from VASP MD simulations. If I compare the diffusion coefficient with VASPKIT data (which generates in terms of cm^2/s), then it seems that kinsi produces D in units of m^2/s or vice versa. Below, I provide the value of D from VASPKIT and KINSI at similar temperature: VASPKIT: 0.1012E-04 KINSI: 9.795032526434394e-09

Thankyou!

arm61 commented 1 month ago

I am reasonably sure that the diffusion coefficient units in kinisi are cm2/s when extracted from an XDATCAR file; this is mentioned in the documentation (https://kinisi.readthedocs.io/en/latest/faq.html#faq).

My understanding is that the XDATCAR uses the units of angstrom and femtoseconds. When the file is parsed into kinisi, this is converted to kinisi’s internal units of angstrom and picoseconds (this conversion is performed on line 437 of the parser.py). The linear fit is then determined in these units (so that the unit of the gradient is Å2/ps), and the diffusion coefficient found in units of cm2/s by dividing by 10000 × 2d, where 2d is for the dimensionality of the diffusion and the 10000 takes us from Å2/ps to cm2/s (see line 436 of diffusion.py for that conversion).

As for comparison to VASPKIT, I cannot comment (it looks like the units might be Å/ps, though). The MSD/diffusion functionality of this software is (1) not clearly documented (the only mention of MSD I can find on their documentation is under molecular dynamics processes and makes no mention of units) and (2) closed source, the software appears to only be available as a binary so I cannot determine what the code is doing to reach the outputs that you have obtained.

Hopefully, that all helps. If you have any further questions, please do not hesitate to reach out.