gromacs xpm eps文件查看

gromacs xpm eps文件查看,第1张

xpm文件是矩阵格式,删除上方的注释后,可以用Irfanview打开,亮薯判But没有注释Label,没有xy轴label,而且颜色也不好(黑白,而且感觉不到80level),需要采用gromacs xpm2ps转换成eps文件查看。

EPS免费软件:EPS Viewer

注意:xpm2ps关于设置矩阵在画布上的位置和离画布边距离有bug,一般无法把标题和标注显示全,不要在参数文件调,直接在别的画图软件手动拼接!!

首先,需要提供一个参数文件 -di  rmsdpara.m2p

然后 用xpm2ps命令将xpm文件转化为eps文件

gmx_mpi xpm2ps -f rmsd.xpm -di rmsdpara.m2p -o rmsd.eps -rainbow blue

一个矩阵的m2p文件(rmsd.xpm):

linewidth= 6 

titlefont                = Arial //标题字符类型

titlefontsize            = 80 //标题字符大小

legend                  = yes //显示legend

legendfont              = Arial //legend字符类型,u sed when there is none in the .xpm

legendlabel              = RMSD (nm) //legend 名字,

legend2label            = // when merging two xpm's

legendfontsize          = 66  //legend字符大小

xbox                    = 10 // x-size of a matrix element 该值的大小影响画布的大小,得到的像素*像素的值改变,当xbox和ybox设置的值一样时,矩阵正方形,不一样时,是长方形

ybox                    = 10

matrixspacing            = 20  // Space between 2 matrices

xoffset                  = 300  // Between matrix and bounding box控制矩阵左边离box边的距离,同时改变x size,例如本来是2600*3400,当设置xoffset为300,则变成了2300*3400,左边离画布边的留白变小300,但是右敬改边离画布边没有任何变化!真是bug!但是可以通过左边留白,把标题放左边

yoffset                  = 300 //控制矩阵下面离box边的距离

boxlinewidth            = 20 //box边框的宽度

ticklinewidth            = 8 //标度tick的宽度

zerolinewidth            = 0 

x-lineat0value          = none //  Draw line at matrix value==0

x-major                 手则 = 20 //x轴大分隔符间距为20,根据自己的数值设定

x-minor                  = 10 //x轴小分隔符间距为20,一般设置为major的一半

x-firstmajor            = 0  // Offset for major tick 调节第一个标度从?开始

x-majorat0              = no  //  Additional Major tick at first frame

x-majorticklen          = 30 //大标度tick的长度

x-minorticklen          = 25 //小标度tick的长度

x-label                  = Time (ns)  //x轴标题

x-fontsize              = 66 //x轴标题字体大小

x-font                  = Arial //x轴标题字体类型 (Time (ns))

x-tickfontsize          = 60 //x轴标度数字大小(0,20,40...) 我发现设置为60时大小刚好,但是!右侧的最后一个数值显示不全,如上图所示,200被截断 了,只显示20,怎么调画布都不行,是个bug!自己画图时需要自己手动补全

x-tickfont              = Arial   //x轴标度数字类型

y-lineat0value          = none

y-major                  = 20 

y-minor                  = 10

y-firstmajor            = 0

y-majorat0              = no

y-majorticklen          = 30

y-minorticklen          = 25

y-label                  = Time (ns)

y-fontsize              = 66

y-font                  = Arial

y-tickfontsize          = 60

black&white              = no

y-tickfont              = Arial

gmx xpm2ps [-f [<.xpm>]] [-f2 [<.xpm>]] [-di [<.m2p>]] [-do [<.m2p>]]

          [-o [<.eps>]] [-xpm [<.xpm>]] [-[no]w] [-[no]frame]

          [-title <enum>] [-[no]yonce] [-legend <enum>] [-diag <enum>]

          [-size <real>] [-bx <real>] [-by <real>] [-rainbow <enum>]

          [-gradient <vector>] [-skip <int>] [-[no]zeroline]

          [-legoffset <int>] [-combine <enum>] [-cmin <real>] [-cmax <real>]

DESCRIPTION

gmx xpm2ps makes a beautiful color plot of an XPixelMap file. Labels and axis can be displayed, when they are supplied in the correct matrix format. Matrix data may be generated by programs such as gmx do_dssp, gmx rms or gmx mdmat.

When no .m2p file is supplied, many settings are taken from command line options. The most important option is -size , which sets the size of the whole matrix in postscript units. This option can be overridden with the -bx and -by options (and the corresponding parameters in the .m2p file), which set the size of a single matrix element.

With -f2 a second matrix file can be supplied. Both matrix files will be read simultaneously and the upper left half of the first one (-f) is plotted together with the lower right half of the second one (-f2) . The diagonal will contain values from the matrix file selected with -diag. 

Plotting of the diagonal values can be suppressed altogether by setting -diag to none. In this case, a new color map will be generated with a red gradient for negative numbers and a blue for positive.对角线值默认显示的是左上矩阵,可以通过-diag变为右下矩阵。

 If the color coding and legend labels of both matrices are identical, only one legend will be displayed, else two separate legends are displayed. 

OPTIONS

Options to specify input files:

-f      [<.xpm>]          (root.xpm)

          X PixMap compatible matrix file

-f2    [<.xpm>]          (root2.xpm)      (Opt.) //第二个矩阵

          X PixMap compatible matrix file

-di    [<.m2p>]          (ps.m2p)        (Opt., Lib.) //参数文件

          Input file for mat2ps

Parameters are set in the .m2p file optionally supplied with -di. Reasonable defaults are provided. Settings for the y-axis default to those for the x-axis. Font names have a defaulting hierarchy: titlefont ->legendfonttitlefont ->(xfont ->yfont ->ytickfont) ->xtickfont, e.g. setting titlefont sets all fonts, setting xfont sets yfont, ytickfont and xtickfont.

Options to specify output files:

-do    [<.m2p>]          (out.m2p)        (Opt.)

          Input file for mat2ps

-o      [<.eps>]          (plot.eps)      (Opt.)

          Encapsulated PostScript (tm) file

-xpm    [<.xpm>]          (root.xpm)      (Opt.) //可以输出一个彩色的或merge的新矩阵

          X PixMap compatible matrix file

Merged  or  rainbowed matrices  can be written to an XPixelMap file with the -xpm option.

Other options:

-[no]w                    (no)

          View output .xvg, .xpm, .eps and .pdb files

-[no]frame                (yes)

          Display frame, ticks, labels, title and legend

-title  <enum>            (top) //更改标题显示的位置,尝试过更改为ylabel,还是不显示,矩阵离边框的距离设置太bug

          Show title at: top, once, ylabel, none

-title can be set to none to suppress the title, or to ylabel to show the title in the Y-label position (alongside the y-axis).

-[no]yonce                (no)

          Show y-label only once

-legend <enum>            (both)

          Show legend: both, first, second, none

-diag  <enum>            (first) //对角线数值默认来自第一个

          Diagonal: first, second, none

-size  <real>            (400) 

          Horizontal size of the matrix in ps units

-bx    <real>            (0) 

          Element x-size, overrides -size (also y-size when -by is not set)

-by    <real>            (0)

          Element y-size

-rainbow <enum>            (no)

          Rainbow colors, convert white to: no, blue, red

With the -rainbow option, dull grayscale matrices can be turned into attractive color pictures.

-gradient <vector>        (0 0 0)

          Re-scale colormap to a smooth gradient from white {1,1,1} to

          {r,g,b}

-skip  <int>              (1)

          only write out every nr-th row and column

-[no]zeroline              (no) 

          insert line in .xpm matrix where axis label is zero

-legoffset <int>          (0)

          Skip first N colors from .xpm file for the legend

-combine <enum>            (halves) //当xpm中有两个矩阵的时候,结合模式默认为一半一半

          Combine two matrices: halves, add, sub, mult, div

With -combine, an alternative operation can be selected to combine the matrices. The output range is automatically set to the actual range of the combined matrix. This can be overridden with -cmin and -cmax.

-cmin  <real>            (0)

          Minimum for combination output

-cmax  <real>            (0)

          Maximum for combination output

1、点击【滤镜】然后选择【Camera Row 滤镜】。

2、找到基本右侧有个更多选项按钮的图标点击它,d出的下拉框选择【载入设置】。

3、在你下载好的文滚纤件中找到xmp格式的文件,【右击】坦备枣然后选择【复制】。

4、在载入设置的窗口注意格式为xmp,然后在空白处【右击】选择【粘贴】。

5、这样就增加好了样式,然后选择你要的样式,点击【打开】。

6、确认好让拆样式后点击【确定】。

7、然后就可以得到最终效果。

XPM(XPixMap)图形格式是X11中一个标准图形格式,它把图形保存成ASCII文雀迅本,顷宏此一个XPM的定义不仅仅是ASCII形式,它的格式还可以是 C源代码形式的,可以直接将它编辑到自己的应用程序中去。

XBM作为XPM的一个特例,也可以保存为ASCII和 C源码的形绝哪式,通常用作鼠标键盘指针。 GRUB下可支持的背景图片格式!


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/12166522.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-21
下一篇 2023-05-21

发表评论

登录后才能评论

评论列表(0条)

保存