系列文章目录
` 例对应Lammps来说,in文件是它的灵魂,只有in只能进行文件lammps的运行。 接下来将介绍Lampps这里是文件的基本框架FeCoNiCr以高熵合金放松为例。
文章目录
- 系列文章目录
- 前言
- 一、in文件是什么
- 二、In文件的基本框架
-
- 1.初始化(单位、边界条件、模型结构维度、全局常量设置)
- 2.模拟区域信息设置(由晶体结构类型、参数、形状、大小、原子组成)
- 2.1 原子转换(不同原子比例的转换)
- 2.2 注释原子类型(不同原子质量信息和编号)
- 上述效果相当于实验中的成分
- 3.势函数/力场设置(选择势函数,准备势函数文件)
- 4.动力学设置(初始温度/速度、运行时间)
- 5.放松设置(加热温度、加热时间)
- 6.模拟过程的输出信息设置(步长、变量、压力、能量、温度等)
- 7.最终构型的输出信息设置(原子坐标,.Lammps文件)
- 8.运行步数设置(模拟次数)
- 总结
- 下一步计划
前言
例如,随着材料的不断发展,传统的试错方法越来越难以满足新材料的研发效率,计算材料技术越来越重要,分子动力学由于其强大的模拟功能和可视化,可以模拟晶体、位错和原子信息,分子动力学相对容易开始,所以很多人开始学习分子动力学,本文介绍了分子动力学的基本内容。
提示:以下是本文的文本内容,以下案例可供参考
一、in文件是什么
In文件决定分子动力学模拟的结果,没有in没有模拟文件。
二、In文件的基本框架
1.初始化(单位、边界条件、模型结构维度、全局常量设置)
代码如下(示例):
units metal #单位制 dimension 3 #维度 boundary p p p #边界条件 atom_style atomic
2.模拟区域信息设置(由晶体结构类型、参数、形状、大小、原子组成)
代码如下(示例):
lattice fcc 3.6149 region box1 block 0 15 0 15 0 15 create_box 4 box1 #设置原子种类 create_atoms 1 region box1 将原子子添加到模拟区域
2.1 原子转换(不同原子比例的转换)
set type 1 type/fraction 2 0.25 87393 set type 1 type/fraction 3 0.3333 87393 set type 1 type/fraction 4 0.5 87393
2.2 注释原子类型(不同原子质量信息和编号)
mass 1 55.845 #Fe mass 2 51.996 #Cr mass 3 58.693 #Ni mass 4 58.933194 #Co ```c 代码如下(示例):
上述效果相当于实验中的成分
#输出原子初始结构
write_data chushi.data
3.势函数/力场设置(选择势函数,准备势函数文件)
代码如下(示例):
pair_style eam/alloy pair_coeff * * FeNiCrCoCu-with-ZBL.eam.alloy Fe Cr Ni Co
4.动力学设置(初始温度/速度、运行时间)
timestep 0.001 velocity all create 300 12345
5.放松设置(加热温度、加热时间)
fix 1 all npt temp 300 300 0.1 iso 0 0 0.1
6.模拟过程的输出信息设置(步长、变量、压力、能量、温度等)
thermo 1000 thermo_style custom step lx ly lz press pxx pyy pzz pe temp
7.最终构型的输出信息设置(原子坐标,.Lammps文件)
dump 1 all custom 1000 dump.lammpstrj id type x y z
dump_modify 1 sort id
8.运行步数设置(模拟的次数)
run 20000
总结
以上基本上囊括了分子动力学in文件的主要框架,此外下面将介绍一个更具有泛化性的框架给大家。
#in文件模板
#----------1 模拟参数--------------------
units metal
boundary p p p
atom_style atomic
timestep 0.001
neighbor 2.0 bin
neigh_modify delay 0 every 5 check yes
#----------2 体系模型的建立----------------
variable xbox index 100
variable ybox index 100
variable zbox index 100
region simulationbox block 0 ${xbox} 0 ${ybox} 0 ${zbox} units box
create_box 1 simulationbox
lattice fcc 3.61
region cu block ${xstbox} ${xtbox} ${ystbox} ${ytbox} ${zstbox} ${ztbox} units box
create_atoms 1 region cu
mass 1 64
#输出原子初始结构
write_data test.data
#----------3 力场的设置-------
pair_style eam/fs
pair_coeff * * Cu.eam.fs Cu
#----------4 能量最小化-------
thermo 100
thermo_style custom step press pe temp ke
dump 1 all atom 100 mini.lammpstrj
min_style cg
minimize 1e-15 1e-15 5000 5000
undump 1
reset_timestep 0
#-----------5 温度初始化--------
velocity all create 300 321456 rot yes dist gaussian
#-----------6 弛豫-------------
thermo 100
thermo_style custom step press pe temp ke
dump 1 all atom 100 mini.lammpstrj
fix 1 all nvt temp 300 300 0.1
run 10000
unfix 1
undump 1
reset_timestep 0
#-------7 具体模拟设置-------
thermo 100
thermo_style custom step press pe temp ke
dump 1 all atom 100 mini.lammpstrj
fix 1 all npt temp 300 300 1 y 0 0 1 z 0 0 1 drag 1
variable srate equal 1.0e10
variable srate1 equal "-v_srate / 1.0e12"
fix 2 all deform 1 x erate ${srate1} units box remap x
run 100000
例如:以上就是今天要讲的内容,本文仅仅简单介绍了In文件的基本框架,以高熵合金弛豫为例子给大家进行介绍。
下一步计划
明天要掌握WC参数的获取,拉伸模型的重构,WC+拉伸模型的融合 感谢瑾玥,雯玥师姐的帮助 2022-07-15