openmaterials.ai / codes / AtomisticSkills mat-diffusion-analysis
An AtomisticSkills skill that reads ASE trajectories at several temperatures, takes the diffusivity from the mean squared displacement and fits a weighted Arrhenius line for E_a.
analyze_diffusion.py runs pymatgen's DiffusionAnalyzer on each trajectory after a 5 ps equilibration skip and reports D with its error. calculate_activation_energy.py fits ln D against 1/T, weighted by those errors.
The skill asks for NVT or NPT runs at 4 to 6 temperatures between 600 and 1200 K from the run_md tool of the mace or matgl skill, in supercells over 10 A on every side.
The diffusion monitor stops a run once the transport property has converged and writes diffusion_{specie}.json and the MSD plot into the trajectory folder.
The fit weights each temperature by the standard deviation of its D. The covariance propagates into E_a and into the conductivity extrapolated to 300 K in mS/cm.
Input is an ASE .traj file per temperature with its .log for the frame interval. Outputs are diffusion_results.json per run, msd_{specie}.png and arrhenius_plot.png.
A 2x2x1 supercell of about 200 atoms, 20 ps of NVT at 600 to 1000 K with MatPES-r2SCAN, gives E_a = 0.152 +/- 0.035 eV and a 300 K conductivity of 91.44 +/- 79.18 mS/cm. LGPS example README
run_md at 4 to 6 temperatures, supercell_min_length 10 A, diffusion monitor optional.
analyze_diffusion.py trajectory.traj --species Li --temperature 600 --ignore_ps 5.0
calculate_activation_energy.py results/ reads md_*K/diffusion_results.json and fits E_a.
Inspect the MSD plots for a linear regime and the R^2 of the Arrhenius line.