24小时热门版块排行榜    

查看: 1351  |  回复: 3

笑笑愁

金虫 (小有名气)

未知

[求助] 如何把lammps的轨迹文件转化为视频呢? 已有2人参与

如题,谢谢!
回复此楼
有志者,事竟成。
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

茹此无声

木虫 (小有名气)

【答案】应助回帖

★ ★ ★ ★ ★
感谢参与,应助指数 +1
月只蓝: 金币+2, 感谢指导 2014-01-11 07:32:05
笑笑愁: 金币+3, ★★★很有帮助 2014-01-11 14:40:13
在vmd中有个制作视频的,把图像文件导出来,再利用VM制作。

[ 发自小木虫客户端 ]
人类一思考,上帝就发笑。
2楼2014-01-11 00:17:13
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

lsloneil

专家顾问 (正式写手)

【答案】应助回帖

★ ★ ★ ★ ★
感谢参与,应助指数 +1
月只蓝: 金币+2, 鼓励交流 2014-01-12 09:24:59
笑笑愁: 金币+3, ★★★很有帮助 2014-01-12 11:09:23
------- To view a lammps trajectory in VMD --------





1) Build a PSF file for use in viewing with VMD.



This step works with VMD 1.9 and topotools 1.2.  

(Older versions, like VMD 1.8.6, don't support this.)





a) Start VMD

b) Menu  Extensions->Tk Console

c) Enter:



(I assume that the the DATA file is called "system.data"



   topo readlammpsdata system.data full

   animate write psf system.psf



2)



Later, to Load a trajectory in VMD:



  Start VMD

  Select menu: File->New Molecule

-Browse to select the PSF file you created above, and load it.

  (Don't close the window yet.)

-Browse to select the trajectory file.

  If necessary, for "file type" select: "LAMMPS Trajectory"

  Load it.



   ----  A note on trajectory format: -----

If the trajectory is a DUMP file, then make sure the it contains the

information you need for pbctools (see below.  I've been using this

command in my LAMMPS scripts to create the trajectories:



  dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz



It's a good idea to use an atom_style which supports molecule-ID numbers

so that you can assign a molecule-ID number to each atom.  (I think this

is needed to wrap atom coordinates without breaking molecules in half.)



Of course, you don't have to save your trajectories in DUMP format,

(other formats like DCD work fine)  I just mention dump files

because these are the files I'm familiar with.



3) -----  Wrap the coordinates to the unit cell

          (without cutting the molecules in half)



a) Start VMD

b) Load the trajectory in VMD (see above)

c) Menu  Extensions->Tk Console

d) Try entering these commands:



    pbc wrap -compound res -all

    pbc box



    ----- Optional ----

    Sometimes the solvent or membrane obscures the view of the solute.

    It can help to shift the location of the periodic boundary box

    To shift the box in the y direction (for example) do this:



    pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}

    pbc box -shiftcenterrel {0.0 0.15 0.0}



    Distances are measured in units of box-length fractions, not Angstroms.



    Alternately if you have a solute whose atoms are all of type 1,

    then you can also try this to center the box around it:



    pbc wrap -sel type=1 -all -centersel type=2 -center com



4)

    You should check if your periodic boundary conditions are too small.

    To do that:

       select Graphics->Representations menu option

       click on the "Periodic" tab, and

       click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.



5) Optional: If you like, change the atom types in the PSF file so

   that VMD recognizes the atom types, use something like:



sed -e 's/   1    1      /   C    C      /g' < system.psf > temp1.psf

sed -e 's/   2    2      /   H    H      /g' < temp1.psf  > temp2.psf

sed -e 's/   3    3      /   P    P      /g' < temp2.psf  > system.psf



(If you do this, it might effect step 2 above.)


以上为lammps mailing list某位大神的回帖关于vmd如何读入lammps trajectory,读入之后就可以制作动画了。
3楼2014-01-12 00:23:33
已阅   关注TA 给TA发消息 送TA红花 TA的回帖
VMD
4楼2014-01-14 17:14:18
已阅   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 笑笑愁 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 关于filecode +3 布布和一二 2026-08-07 6/300 2026-08-07 17:51 by 医学老男孩
[基金申请] 固定端突然变了,今天 +6 archvillain 2026-08-06 10/500 2026-08-07 16:03 by 医学老男孩
[基金申请] 听说今天filecode变了 +24 布布和一二 2026-08-06 47/2350 2026-08-07 16:02 by zhiyanjiang
[基金申请] filecode与中标关系的预测 +3 布布和一二 2026-08-07 3/150 2026-08-07 15:09 by gltch
[基金申请] filecode变化情况 +6 布布和一二 2026-08-07 22/1100 2026-08-07 14:45 by 且听虎啸
[论文投稿] 十年后又回来了,论文投稿求助 +4 哈哈114477 2026-08-01 4/200 2026-08-07 14:39 by jgy194592
[基金申请] 大家散了吧,后缀研究没有意义,别浪费时间了,过好目前的每一天,不要焦虑 +5 Tide man 2026-08-06 7/350 2026-08-07 13:11 by 医学老男孩
[基金申请] 关于豆爷回答的JTJC与%2F数量 +4 yang182083 2026-08-06 6/300 2026-08-07 12:43 by 虫友是什么虫
[基金申请] 面上再次挂了,太难了,躺也躺不了,倦也卷不过,小学校之殇! +23 低垂的野花 2026-07-31 31/1550 2026-08-07 12:22 by speculiar
[基金申请] filecode +14 等待解的谜 2026-08-06 19/950 2026-08-07 12:20 by wlwhappy
[基金申请] 基金中了 +11 laoda193707 2026-08-06 11/550 2026-08-07 10:54 by TT和NN
[基金申请] filecode +8 布布和一二 2026-08-06 11/550 2026-08-06 20:41 by tangpu318
[基金申请] 求各位大神看下 100+6 hpkpkpkp 2026-08-05 33/1650 2026-08-06 14:49 by zhiyanjiang
[基金申请] 影响面上的因素 +8 布布和一二 2026-08-05 11/550 2026-08-06 10:41 by 宝贝虫子
[基金申请] 好消息?这个有何含义??? +8 Tide man 2026-08-05 10/500 2026-08-05 16:14 by xmuxiaoyu
[考博] 【2027博士申请】纳米药物递送方向 20+3 13586093586 2026-08-03 4/200 2026-08-05 09:59 by lfy8008
[基金申请] 有没有H口的?有收到消息的吗? +3 超级海虾 2026-08-04 3/150 2026-08-04 17:26 by 学教育滴
[基金申请] 纯娱乐,不喜欢勿喷 +7 Tide man 2026-08-04 10/500 2026-08-04 15:10 by loufangrui
[基金申请] 面上提前没消息,有中的吗 +14 archvillain 2026-08-02 18/900 2026-08-04 14:42 by archvillain
[基金申请] 娱乐 +4 Tide man 2026-08-03 4/200 2026-08-04 11:51 by wgch518
信息提示
请填处理意见