Prepare GPUMD workflows for self-diffusion, ionic conductivity, and viscosity. Use when the user needs `compute_msd`, `compute_sdc`, `compute_viscosity`, Nernst-Einstein ionic conductivity, Arrhenius fitting, or species-selective diffusion through group indices.
Use this subskill for mass-transport and viscous observables. These live
separately from gpumd/transport because the physics, the averaging scheme,
and the expected outputs differ from thermal conductivity.
| Target | Keyword | Output file |
|---|---|---|
| mean-square displacement | compute_msd | msd.out |
| self-diffusion coefficient | compute_sdc | sdc.out |
| shear viscosity (GK) | compute_viscosity | viscosity.out |
| ionic conductivity | compute_msd group | msd.out + NE formula |
model.xyz accordingly.Annotated example (see assets/examples/diffusion/run.in):
potential nep.txt
velocity 2500
time_step 2
# equilibrate at 2500 K (above melting) then cool to target
ensemble npt_scr 2500 2500 100 0 50 1000
dump_thermo 100
run 10000
ensemble npt_scr 1800 1800 100 0 50 1000
dump_thermo 100
run 10000
# production in NVE, both MSD and VAC running simultaneously
ensemble nve
dump_thermo 100
compute_msd 1 2000
compute_sdc 1 2000
run 20000
compute_msd sample_interval Nc — writes msd.out with the mean-square
displacement up to Nc time-lags, sampled every sample_interval steps.compute_sdc sample_interval Nc — writes sdc.out with velocity
autocorrelation and its running integral, from which the diffusion
coefficient is read off as the long-time plateau.Fit the diffusion coefficient from the linear region of msd.out:
python scripts/fit_msd_diffusion.py msd.out --start-frac 0.3 --end-frac 0.9
Annotated example (see assets/examples/viscosity/run.in):
potential nep.txt
velocity 2500
time_step 2
ensemble npt_scr 2500 2500 100 0 50 1000
dump_thermo 100
run 10000
ensemble npt_scr 1600 1600 100 0 50 1000
dump_thermo 100
run 10000
ensemble nve
dump_thermo 100
compute_viscosity 1 1000
run 50000
compute_viscosity sample_interval Nc — writes viscosity.out with the
off-diagonal stress autocorrelation and its running integral.The Green-Kubo viscosity is the long-time plateau of the integral; inspect it like a heat-flux autocorrelation. Multiple seeds are strongly recommended because stress fluctuations are noisy.
Species-selective MSD plus the Nernst-Einstein relation (see the
24_Ionic_Conductivity tutorial for a complete LLZO example).
model.xyz with a group:I:M column flagging the mobile species.compute_msd 1 2000 group 0 0
The group 0 0 syntax means "compute MSD for group method 0, group index
0", i.e. the first grouping scheme, first label. Adjust to the mobile
species' label.D_ion from the linear region.σ = (N_ion * q^2) / (V * k_B * T) * D_ion
Read when needed:
msd.out, sdc.out, or viscosity.outpackmol-generate-mixture to pack
molecules into a simulation box before converting to model.xyz.pymatgen-structure.compute_msd: https://gpumd.org/gpumd/input_parameters/compute_msd.htmlcompute_sdc: https://gpumd.org/gpumd/input_parameters/compute_sdc.htmlcompute_viscosity: https://gpumd.org/gpumd/input_parameters/compute_viscosity.html09_Silicon_diffusion, 10_Silicon_viscosity,
24_Ionic_Conductivity, 28_thermal_transport_superionic_EMD