MD2D: A python module for accurate determination of diffusion coefficient from molecular dynamics

Published: 6 December 2022| Version 1 | DOI: 10.17632/d2x8rw83jb.1


Self-diffusion coefficient can be derived from molecular dynamics (MD) simulations by fitting the mean squared displacement (MSD) into the Einstein relation. However, the finite system size, nonfulfillment of the Brownian motion, and finite simulation time may bring in significant uncertainties that need to be estimated. We present a python module to facilitate the accurate determination of self-diffusion coefficient from the Einstein relation. We show that the ballistic stage can be clearly recognized and excluded to improve the accuracy and efficiency of self-diffusion coefficient calculation. The correct self-diffusion coefficient and its uncertainty can be conveniently obtained by taking the ensemble average of diffusion coefficients calculated at different time intervals. At the meantime, the module calculates viscosity that can correct the MD-derived self-diffusion coefficient to the thermodynamic limit.



Condensed Matter Physics, Computational Physics, Molecular Dynamics