gmx trjconv pbc 周期性边界处理

周期性边界总结:

如果是单聚体,

则 trjconv -pbc mol -ur compact -center,   -fit rot+trans 即可(或者严谨一点,trjconv -pbc whole,    -pbc mol -ur compact -center,    -fit rot+trans )

如果是多聚体,

如果是看整个sys的情况,trjconv -pbc whole(直接用whole,蛋白质在盒子里随机游走,键都是正确的。想使蛋白位于盒子中心,并且还能够看到正确的水分子:-pbc whole, -pbc nojump,  -pbc mol -ur compact -center,  -fit rot+trans,最后用vmd,dynamic bond看)

如果只看pro+lig复合物,trjconv -pbc whole, -pbc nojump -ur compact, -fit rot+trans -center


处理轨迹:

-s tpr 为reference structure,align的时候align到该结构上,而不是第一帧

 -pbc 处理周期性边界(重点难点):

* whole only makes broken molecules whole. 最好都做一下

* mol puts the center of mass of molecules in the box, and requires a run  input file to be supplied with -s.

实践表明,当蛋白/DNA等只有一条链的时候,直接用-pbc mol处理轨迹,蛋白/DNA将被放置在盒子中间。但是当是二聚体时,mol选项不起作用,因为质心在中心有两种情况:分子本身在盒子中心;和两个单体分布在盒子两侧,平均质心依然在盒子中心。此时,-pbc mol无法正确的处理周期性边界。

* res puts the center of mass of residues in the box.

* atom puts all the atoms in the box. 把所有的原子都放在box里,李继存的笔记(http://blog.sciencenet.cn/blog-548663-981600.html)中讲到,可以选择一个处在(二聚体)分子中间的原子, 

在index.ndx文件中添加这个中心组

[ center ]154

然后执行下面的命令

gmx trjconv -s npt.tpr -f prod_whole.xtc -n index.ndx -o prod_atom_center.xtc -pbc atom -center

提示时分别选择中心组(-center的时候,用154号原子作为中心)和DNA(输出)即可。处理后的构型如下



但是我尝试了该方法,不是很好用,

第一步处理轨迹:gmx_mpi trjconv -f md.xtc -s md.tpr -o md_pbcwhole.xtc -pbc whole ,输出选0 System,得到的轨迹是whole的,二聚体在溶液中自由游走

第二步:选择一个二聚体中心的原子


gmx_mpi trjconv -f md_pbcwhole.xtc -s md.tpr -o md_pbcwhole_atom.xtc -pbc atom -center -n index.ndx(此命令并不能输出正确的system的情况,只能看pro+lig体系,而且还要写center原子,最后效果和直接-pbc whole一样,不采纳,详细结果如下:)

输出选择中心原子(写到index里)centering,选择0 System输出。结果

全乱了

我试了选择pro+lig的index输出,虽然不再出现上述pbc的乱线,但是,并没有center,跟第一步输出结果差不多,蛋白质还是在溶液中游走。

并没有center

* nojump checks if atoms jump across the box and then puts them back. This has the effect that all molecules will remain whole (provided they were whole in the initial conformation). Note that this ensures a continuous  trajectory but molecules may diffuse out of the box. The starting configuration for this procedure is taken from the structure file, if one is supplied, otherwise it is the first frame.


采用nojump来处理:

用了nojump后,蛋白质和配体没有问题,但是水分子的周期性边界看起来乱七八糟的,应该是有bug

我试了 -pbc whole 之后,-pbc nojump, 再-center,蛋白质和配体没有问题,但对水分子没有用,再-pbc mol,大部分水分子恢复正常,采纳


-pbc whole,-pbc nojump (-center)水分子基本都是这样,数量少,


 -pbc whole,-pbc nojump -center -pbc mol 之后,水分子会好一些,感觉只有边界的水分子有问题,蛋白附近的水分子比较正常


(上图的细节图)很多水分子恢复正常


用dynamic bond来显示,则基本上恢复正常(个别水分子多于3个原子)



* cluster clusters all the atoms in the selected index such that they are all closest to the center of mass of the cluster, which is iteratively updated.   Note that this will only give meaningful results if you in fact have a cluster. Luckily that can be checked afterwards using a trajectory viewer. Note also that if your molecules are broken this will not work either.



gmx trjconv can convert trajectory files in many ways:

* from one format to another

* select a subset of atoms

* change the periodicity representation

* keep multimeric molecules together

* center atoms in the box

* fit atoms to reference structure

* reduce the number of frames

* change the timestamps of the frames (-t0 and -timestep)

* cut the trajectory in small subtrajectories according to information in an  index file. This allows subsequent analysis of the subtrajectories that  could, for example, be the result of a cluster analysis. Use option -sub.  This assumes that the entries in the index file are frame numbers and dumps each group in the index file to a separate trajectory file.

* select frames within a certain range of a quantity given in an .xvg file. 

gmx trjcat is better suited for concatenating multiple trajectory files.

The following formats are supported for input and output: .xtc, .trr, .gro, .g96 and .pdb. The file formats are detected from the file extension. The precision of the .xtc output is taken from the input file for .xtc, .gro and .pdb, and from the -ndec option for other input formats. The precision is always taken from -ndec, when this option is set. All other formats have fixed precision. .trr output can be single or double precision, depending on the precision of the gmx trjconv binary. Note that velocities are only supported in .trr, .gro and .g96 files.

Option -sep can be used to write every frame to a separate .gro, .g96 or .pdb file. By default, all frames all written to one file. .pdb files with all frames concatenated can be viewed with rasmol -nmrpdb. It is possible to select part of your trajectory and write it out to a new trajectory file in order to save disk space, e.g. for leaving out the water from a trajectory of a protein in water. ALWAYS put the original trajectory on tape! We recommend to use the portable .xtc format for your analysis to save disk space and to have portable files.

There are two options for fitting the trajectory to a reference either for essential dynamics analysis, etc. The first option is just plain fitting to a reference structure in the structure file. The second option is a progressive fit in which the first timeframe is fitted to the reference structure in the structure file to obtain and each subsequent timeframe is fitted to the previously fitted structure. This way a continuous trajectory is generated, which might not be the case when using the regular fit method, e.g. when your protein undergoes large conformational transitions.

Option -pbc sets the type of periodic boundary condition treatment:

* mol puts the center of mass of molecules in the box, and requires a run    input file to be supplied with -s.

* res puts the center of mass of residues in the box.

* atom puts all the atoms in the box.

* nojump checks if atoms jump across the box and then puts them back. This   has the effect that all molecules will remain whole (provided they were whole in the initial conformation). Note that this ensures a continuous  trajectory but molecules may diffuse out of the box. The starting configuration for this procedure is taken from the structure file, if one is supplied, otherwise it is the first frame.

* cluster clusters all the atoms in the selected index such that they are all closest to the center of mass of the cluster, which is iteratively updated.   Note that this will only give meaningful results if you in fact have a cluster. Luckily that can be checked afterwards using a trajectory viewer. Note also that if your molecules are broken this will not work either.

* whole only makes broken molecules whole.

Option -ur sets the unit cell representation for options mol, res and atom of -pbc. All three options give different results for triclinic boxes and identical results for rectangular boxes. rect is the ordinary brick shape. tric is the triclinic unit cell. compact puts all atoms at the closest distance from the center of the box. This can be useful for visualizing e.g. truncated octahedra or rhombic dodecahedra. The center for options tric and compact is tric (see below), unless the option -boxcenter is set differently.

Option -center centers the system in the box. The user can select the group which is used to determine the geometrical center. Option -boxcenter sets the location of the center of the box for options -pbc and -center. The center options are: tric: half of the sum of the box vectors, rect: half of the box diagonal, zero: zero. Use option -pbc mol in addition to -center when you want all molecules in the box after the centering.

Option -box sets the size of the new box. This option only works for leading dimensions and is thus generally only useful for rectangular boxes. If you want to modify only some of the dimensions, e.g. when reading from a trajectory, you can use -1 for those dimensions that should stay the same It is not always possible to use combinations of -pbc, -fit, -ur and -center to do exactly what you want in one call to gmx trjconv. Consider using multiple calls, and check out the GROMACS website for suggestions.

With -dt, it is possible to reduce the number of frames in the output. This option relies on the accuracy of the times in your input trajectory, so if these are inaccurate use the -timestep option to modify the time (this can be done simultaneously). For making smooth movies, the program gmx filter can reduce the number of frames while using low-pass frequency filtering, this reduces aliasing of high frequency motions.

Using -trunc gmx trjconv can truncate .trr in place, i.e. without copying the file. This is useful when a run has crashed during disk I/O (i.e. full disk), or when two contiguous trajectories must be concatenated without having double frames.

Option -dump can be used to extract a frame at or near one specific time from your trajectory, but only works reliably if the time interval between frames is uniform.

Option -drop reads an .xvg file with times and values. When options -dropunder and/or -dropover are set, frames with a value below and above the value of the respective options will not be written.

OPTIONS

Options to specify input files:

-f      [<.xtc/.trr/...>]  (traj.xtc)

          Trajectory: xtc trr cpt gro g96 pdb tng

-s      [<.tpr/.gro/...>]  (topol.tpr)      (Opt.)

          Structure+mass(db): tpr gro g96 pdb brk ent

-n      [<.ndx>]          (index.ndx)      (Opt.)

          Index file

-fr    [<.ndx>]          (frames.ndx)    (Opt.)

          Index file

-sub    [<.ndx>]          (cluster.ndx)    (Opt.)

          Index file

-drop  [<.xvg>]          (drop.xvg)      (Opt.)

          xvgr/xmgr file

Options to specify output files:

-o      [<.xtc/.trr/...>]  (trajout.xtc)

          Trajectory: xtc trr gro g96 pdb tng

Other options:

-b      <time>            (0)

          Time of first frame to read from trajectory (default unit ps)

-e      <time>            (0)

          Time of last frame to read from trajectory (default unit ps)

-tu    <enum>            (ps)

          Unit for time values: fs, ps, ns, us, ms, s

-[no]w                    (no)

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

-xvg    <enum>            (xmgrace)

          xvg plot formatting: xmgrace, xmgr, none

-skip  <int>              (1)

          Only write every nr-th frame

-dt    <time>            (0)

          Only write frame when t MOD dt = first time (ps)

-[no]round                (no)

          Round measurements to nearest picosecond

-dump  <time>            (-1)

          Dump frame nearest specified time (ps)

-t0    <time>            (0)

          Starting time (ps) (default: don't change)

-timestep <time>          (0)

          Change time step between input frames (ps)

-pbc    <enum>            (none)

          PBC treatment (see help text for full description): none, mol, res,

          atom, nojump, cluster, whole

-ur    <enum>            (rect)

          Unit-cell representation: rect, tric, compact

-[no]center                (no)

          Center atoms in box

-boxcenter <enum>          (tric)

          Center for -pbc and -center: tric, rect, zero

-box    <vector>          (0 0 0)

          Size for new cubic box (default: read from input)

-trans  <vector>          (0 0 0)

          All coordinates will be translated by trans. This can

          advantageously be combined with -pbc mol -ur compact.

-shift  <vector>          (0 0 0)

          All coordinates will be shifted by framenr*shift

-fit    <enum>            (none)

          Fit molecule to ref structure in the structure file: none,

          rot+trans, rotxy+transxy, translation, transxy, progressive

-ndec  <int>              (3)

          Number of decimal places to write to .xtc output

-[no]vel                  (yes)

          Read and write velocities if possible

-[no]force                (no)

          Read and write forces if possible

-trunc  <time>            (-1)

          Truncate input trajectory file after this time (ps)

-exec  <string>

          Execute command for every output frame with the frame number as

          argument

-split  <time>            (0)

          Start writing new file when t MOD split = first time (ps)

-[no]sep                  (no)

          Write each frame to a separate .gro, .g96 or .pdb file

-nzero  <int>              (0)

          If the -sep flag is set, use these many digits for the file numbers

          and prepend zeros as needed

-dropunder <real>          (0)

          Drop all frames below this value

-dropover <real>          (0)

          Drop all frames above this value

-[no]conect                (no)

          Add conect records when writing .pdb files. Useful for

          visualization of non-standard molecules, e.g. coarse grained ones

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

推荐阅读更多精彩内容