24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 1191  |  回复: 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的回帖
相关版块跳转 我要订阅楼主 笑笑愁 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 286求调剂 +12 Faune 2026-04-06 12/600 2026-04-06 17:40 by dongzh2009
[考研] 308求调剂 +13 倘若起风了呢 2026-04-05 13/650 2026-04-06 14:20 by 蒋皓禹
[考研] 材料工程310专硕调剂 +14 捞捞我…. 2026-04-04 15/750 2026-04-06 14:18 by lqwchd
[考研] 一志愿211生物学280分 求调剂 +5 李rien 2026-04-05 5/250 2026-04-06 10:30 by zhyzzh
[考研] 272分求调剂 +4 wangyile2233 2026-04-02 4/200 2026-04-05 22:21 by 286640313
[考研] 材料调剂 +9 革微桂 2026-04-04 9/450 2026-04-05 08:27 by 544594351
[考研] 调剂 +9 19945159693 2026-04-03 10/500 2026-04-04 20:16 by dongzh2009
[考研] 求调剂:085600材料与化工,考材科基,总分319 +21 678lucky 2026-03-31 26/1300 2026-04-04 16:22 by dongzh2009
[考研] 325求调剂 +4 春风不借意 2026-04-04 4/200 2026-04-04 14:46 by 湘农储能材料
[考研] 297求调剂 +11 ljy20040718! 2026-04-03 13/650 2026-04-04 09:23 by 来看流星雨10
[考研] 学硕288调剂!!! +3 小王xw123 2026-04-03 3/150 2026-04-03 21:20 by 啵啵啵0119
[考研] 372分材料与化工(085600)一志愿湖南大学求调剂 +3 蓝笺片 2026-04-03 4/200 2026-04-03 17:58 by Jimmyandyou
[考研] 283求调剂 +3 jiouuu 2026-04-03 4/200 2026-04-03 13:28 by jiouuu
[考研] 316求调剂 +14 舟自梗 2026-04-01 18/900 2026-04-03 10:28 by linyelide
[考研] 一志愿山东大学,085600,344 +7 魏子per 2026-04-02 8/400 2026-04-02 21:12 by 百灵童888
[考研] 一志愿上海海洋大学083200食品学硕,求调剂,接受其他专业 +6 what张 2026-04-01 7/350 2026-04-02 16:48 by zzsw+
[考研] 学硕化学工程与技术,一志愿中国海洋大学320+求调剂 +8 披星河 2026-04-02 8/400 2026-04-02 14:12 by oooqiao
[考研] 【求调剂】新能源材料本科,一志愿211,初试321 +6 求调剂学校, 2026-04-02 6/300 2026-04-02 09:41 by 晴空210210
[考研] 一志愿北京科技,085601总分305求调剂 +9 半生瓜! 2026-04-01 11/550 2026-04-02 08:28 by Wang200018
[考研] 福建理工大学材料学院先进合金团队招收考研调剂学生 +3 大华金商都 2026-03-30 4/200 2026-03-31 01:04 by 方英俊602
信息提示
请填处理意见