Jerkwin分享 http://blog.sciencenet.cn/u/Jerkwin

博文

gnuplot绘制RMSD的统计直方图

已有 6031 次阅读 2018-6-26 10:14 |系统分类:科研笔记

 

  • 2018-06-25 21:01:24

在进行蛋白的分子动力学模拟时, 经常需要查看RMSD, 看蛋白是否已经稳定. 计算RMSD的方法很简单, 直接gmx rms即可得到rmsd.xvg, 然后就可以进行作图. 在展示RMSD演化图时, 经常还会同时给出其统计直方图, 这样可以更直观地看出RMSD是否已经稳定. 下面记录使用gnuplot作统计直方图的几种方法备用.

统计分布

gnuplot
1
2
3
4
5
w=.001set tableset output 'freq.dat'plot 'C:\Users\Jicun\Desktop\_JOB\1y57\rmsd.xvg' u (bin($2,w)):(1) s f w punset table

带误差的直方图

gnuplot
1
2
3
4
5
6
7
8
set boxwidth 1 relativeset style data histogramsset style histogram errorbars gap 0 lw 2set style fill solid 1 border 0set bar 2stat 'freq.dat' u 2 nooutputplot [0:] 'freq.dat' using ($2*100/STATS_sum):(1):xticlabels($1*1E3) lw 2 t""

还有另一种简单点的作法, 使用下面的boxxyerrorbars方法.

数据及其分布

可采用两种方式

gnuplot
1
2
3
4
5
6
7
8
9
w=.001set x2tics 1set xtics nomirrorset xl"time(ps)"; set yl"RMSD(nm)"; set x2label 'Freq%'stat 'freq.dat' u 2 nooutputplot [][0:] 'freq.dat' u ($2*100/STATS_sum):1:(0):($2*100/STATS_sum):($1-.5*w):($1+.5*w) w boxxyerrorbars axes x2y1 lc 2 t'', \'C:\Users\Jicun\Desktop\_JOB\1y57\rmsd.xvg' using 1:2 w l lw 4 lc 1 t''

gnuplot
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
w=.001set multi lay 1,1set rmargin at screen 0.8set xl"time(ps)"; set yl"RMSD(nm)"plot [0:][0:] 'C:\Users\Jicun\Desktop\_JOB\1y57\rmsd.xvg' using 1:2 w l lw 4set lmargin at screen 0.8set rmargin at screen .99unset xtics; unset yticsset mxtics 1set xtics format " "set ytics format " "set xl" "; set yl" "stat 'freq.dat' u 2 nooutputplot [][0:] 'freq.dat' u ($2*100/STATS_sum):1:(0):($2*100/STATS_sum):($1-.5*w):($1+.5*w) w boxxyerrorbars t''

网络资料

◆本文地址: https://jerkwin.github.io/2018/06/25/gnuplot绘制RMSD的统计直方图/, 转载请注明◆
◆评论问题: https://jerkwin.herokuapp.com/category/3/博客, 欢迎留言◆



https://blog.sciencenet.cn/blog-548663-1120901.html

上一篇:AMBER高级教程A8:HIV-1整合酶核心结构域的环区动力学
下一篇:AMBER高级教程A15:室温离子液体
收藏 IP: 72.221.39.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-24 04:30

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部