daishoujun的个人博客分享 http://blog.sciencenet.cn/u/daishoujun

博文

【LAMMPS如何系列】计算热膨胀系数

已有 7171 次阅读 2018-4-20 09:10 |个人分类:lammps|系统分类:科研笔记| lammps

  原帖在http://www.52souji.net/how-to-calculate-equilibrium-lattice-constant-using-lammps.html

我在下面编了一段程序,提供大家参考:

units metal
dimension 3
#boundary p p sf#最早尝试这个配置,但是在fix nvt模拟报错,必须在三维周期结构

boundary p p p

atom_style atomic
#read_data  data.lammps2

lattice fcc 3.6147 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
#Cu的晶格常数,从material studio得到,指向1 0 0 数字之间要有空格。
region box block 0 10 0 10 0 10 units lattice #定义以为名为box的区域,大小为10a*10a*10a(a为#lattice##的值,若采用units box,则这里默认a为1埃)。
create_box 1 box#在名为box的区域内创建1种原子类型的simulation box,create_box定义盒子,指定原子类型的#数量。
create_atoms 1 box#在名为box区域内建立类型为1的原子。
pair_style eam  #eam势函数
pair_coeff  1 1 Cu_u3.eam#前面的 数字1 和1 挺特殊,下行指令会报错(一般在此文件放在与in文件的同一个目录下)
#pair_coeff**Cu_u3.eam #势函数文件名
mass 1 63.54#模拟Cu原子
velocity all create 3.0 825577 dist gaussian#velocity 关键字用来给原子设定初始速度,后面的参数 all 表#示模拟盒子里所有的原子,不分钟类种类都按照同一种方式设定初始速度。后面的一串参数是说所有的速度都是从满##足高斯分布的随机数中抽取获得的,其中3.0是设定温度。
neighbor 0.3 bin
neigh_modify every 10 delay 0 check no #每10次建立邻居列表,后面check需要检查,check no 只要满足#every and delay要求时,就建立就重新,默认是check yes
timestep 0.001#metal时间为皮秒,模拟步长

#fix 1 all nve#这条指令的意思是模拟在微正则系宗 NVE 下运行。
fix 1 all nvt temp 3.0 3.0 0.4
run 2000
unfix 1
fix 2 all npt temp 3 300 0.4 iso 0 0 10
run 22000
unfix 2
fix 3 all nvt temp 300 300 0.4
run 20000
thermo 1000# 每隔 1000 步模拟步长输出一次系统的热力学参量。
thermo_style custom step temp pe ke etotal press vol#自定义输出,步数,温度,势能,动能,总能,压力,体积
dump 1 all custom 200 dump.atom id type mass x y z#dump原子Id 类型 质量 坐标(笛卡尔坐标)
clear#模拟运行结束之后,把所有的指令清零



https://blog.sciencenet.cn/blog-3384943-1109908.html

上一篇:Materials Studio构建的模型如何导入lammps
下一篇:origin的默认字体调节
收藏 IP: 61.148.244.*| 热度|

0

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

数据加载中...

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

GMT+8, 2024-4-20 05:14

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部