Skip to content

Plot Scripts

Plot Scripts

This folder contains Python scripts for visualization of data generated by GPUMD and NEP.

  • plt_nep_thermo.py: Python script to visualize temperature, pressure, kinetic energy, potential energy, lattice parameters, volume, and interaxial angles evolution over simulation time based on data from thermo.out.

  • plt_nep_train_results.py: Python script to visualize parameters during NEP training and comparison of DFT and NEP predictions for energy, force, stress, etc.
msd
  • plt_nep_train_test.py: Python script to visualize the parity plot of *_train.out and *_test.out .

  • plt_nep_prediction_results.py: Python script to visualize predictions during the NEP prediction process.

  • plt_descriptors.py: Plot the high-dimensional descriptors in different training sets. See arXiv:2504.15925 for more details. You can generate the descriptors.npy by the scripts calc_descriptors.py in the calculators, or use gpumdkit.sh -calc des <method> <input.xyz> <output.npy> <element>.
UMAP of descriptors
  • plt_msd.py and plt_sdc.py: Python scripts to visualize the mean-square displacement (MSD) and self diffusion coefficient (SDC) from msd.out.
msd sdc
  • plt_rdf.py: Python script to visualize the RDF from rdf.out file.

  • python plt_rdf.py [save] will plot all columns in the rdf.out.

    rdf1

  • python plt_rdf.py [column] [save] will plot the specified column in the rdf.out.

    rdf2

  • plt_nep_restart.py: Python script to visualize the parameters in nep.restart file.

restart
  • plt_dimer.py: Python script to plot the dimer interaction. See arXiv:2504.15925 for more details.
dimer dimer

thermo.png, train.png, train_test.png, prediction.png, msd.png, nep_restart.png, rdf.png, dimer.png: Example output plots generated by the scripts.

Usage:

You can use gpumdkit.sh for simplified execution:

gpumdkit.sh -plt thermo/train/prediction/train_test/msd/sdc/rdf/vac/restart/dimer/des [save]

Replace thermo, train, prediction, train_test, msd, rdf,vac, restart, dimer, des with the desired script keyword.

The optional save argument will save the plot as a PNG file; omitting it will display the plot using plt.show().

Example:

To visualize thermo evolution from thermo.out :

gpumdkit.sh -plt thermo

To save the plot of thermo evolution from thermo.out :

gpumdkit.sh -plt thermo save

Thank you for using GPUMDkit! If you have any questions or need further assistance, feel free to open an issue on our GitHub repository or contact Zihan YAN (yanzihan@westlake.edu.cn).