gromacs xpm eps文件查看

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

EPS免费软件:EPS Viewer

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

xpm文件直接打开
eps文件,该图是-rainbow blue(中间那条线是blue)。注意,此图的标题和x tick的最后一个200显示均有问题,且无法通过调整画布大小和矩阵离画布边的位置来改变,是个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字符类型,used 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 -> legendfont; titlefont -> (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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,402评论 6 499
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,377评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 162,483评论 0 353
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,165评论 1 292
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,176评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,146评论 1 297
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,032评论 3 417
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,896评论 0 274
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,311评论 1 310
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,536评论 2 332
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,696评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,413评论 5 343
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,008评论 3 325
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,659评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,815评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,698评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,592评论 2 353

推荐阅读更多精彩内容