This is Python script to automate the plotting of .xvg
files generated by GROMACS, with proper labeling, dynamic time unit detection, and colorful plots. This script reads data from .xvg
files, assigns meaningful labels based on file contents, and saves the plots as .png
images.
- Automatic Axis Labeling: Labels for y-axis based on common GROMACS output keywords (e.g., Potential, RMSD, Density).
- Time Unit Detection: Detects and uses the appropriate time unit (e.g.,
ps
,ns
,fs
) from each.xvg
file header. - Colorful Plots: Randomized colors for each plot line to distinguish different files.
- Batch Processing: Processes all
.xvg
files in the folder, creating individual plot images for each file.
- Python 3
- numpy
- matplotlib
Install the dependencies using:
pip install numpy matplotlib