Gmx sham / xpm2ps: how to customize PCA charts?

GROMACS version: 2022
GROMACS modification: No
Here post your question

Dear Gromacs users!
I am using the sequence of the following command for the vizualisation of the projection of MD trajectory onto the collective plane of first PCs
gmx sham -f “{pca_project}"/2d_projection_pc1_2.xvg -ls "{pca_project}”/gibbs.xpm -notime -ngrid 80 -nlevels 80

gmx xpm2ps -f “{pca_project}"/gibbs.xpm -o "{pca_project}”/pc1_2_landscape.eps -rainbow blue -nice 900

  1. how could I improve the resolution of the obtained charts ?
  2. would it be possible to change colors of the graphs produced by xpm2ps ? e.g. I’ve found only a possibility to change background to either blue or red via -rainbow option …

Many thanks in advance!


you can provide gmx xpm2ps option via ps.m2p file, that include options on the matrix, x-axis and y-axis, but not on color setting (as far as I know).
I think you can generate the file with the option -do, then modify option and provide it as input with option -di.