lammps做分子动力学模拟时,需要一个输入文件(input script),也就是in文件,以及关于体系的原子坐标之类的信息文件(data file)和势文件(potential file)。lammps在执行计算的时候,从这个in文件中读入命令,所以对LAMMPS的使用最主要的就是对in文件的编写和使用。
下面是in文件书写方面的注意事项以及对4个模块的详细解释,原文来源于百度文库:
http://wenku.baidu.com/view/152b56906bec0975f465e26a.html?re=view
由RCWDliwei于2014年4月13日上传。在转载并重新编排之前对原文作者表示致谢。
1、lammps命令类型分类整理
Initialization: | atom_modify, atom_style, boundary,dimension, newton, processors, units |
Atom definition: | create_atoms, create_box, lattice, read_data, read_restart, region, replicate |
Force fields: |
angle_coeff, angle_style, bond_coeff, bond_style, dielectric, dihedral_coeff, dihedral_style,improper_coeff, improper_style, kspace_modify, kspace_style, pair_coeff, pair_modify, pair_style, pair_write,special_bonds |
Settings: |
communicate, dipole, group, mass, min_modify, min_style, neigh_modify, neighbor, reset_timestep, run_style, set, shape, timestep, velocity |
Fixes: | fix, fix_modify, unfix |
Computes: | compute, compute_modify, uncompute |
Output: | dump, dump_modify, restart, thermo, thermo_modify, thermo_style, undump, write_restart |
Actions: | delete_atoms, delete_bonds, displace_atoms, displace_box, minimize, run, temper |
Miscellaneous: | clear, echo, if, include, jump, label, log, next, print, shell, variable |
1、命令书写注意事项
2、in文件4个部分的详细解释
2.1 Initialization
这一部分包含了关于计算体系最基本的信息,例如:
2.2 Atom definition
lammps提供3种定义原子方式:
2.3 Settings
原子或分子的拓扑信息定义好后,就需要制定一系列的设置,例如力场系数、模拟参数、输出选项等。
力场系数可以通过这样的一些命令来定义:pair_coeff, bond_coeff, angle_coeff, dihedral_coeff, improper_coeff, kspace_style, dielectric, special_bonds等。实际上力场系数也可以在关于体系的原子坐标之类的信息的文件(data file)中制定,这样具体参考read_data命令的相关介绍。
模拟参数可以由如下这样一些命令来设置:neighbor, neigh_modify, group, timestep, reset_timestep, run_style, min_style, min_modify等。模拟过程中通过compute, compute_modify, variable等一些命令来制定。
输出选项可以由thermo, dump, restart等一些命令来设置。
2.4 Run a simulation
通常run命令被设置在in文件的最后,使用run命令来开始一个分子动力学模拟的过程。另外,使用minimize命令来实施能量最小化计算。使用temper命令来进行复制品交换采样模拟。
其他一些重要的命令被分类列于如下:
关于LAMMPS计算前后的处理问题,计算前的原子初始形态文件的生成,由read_data读入一个data文件,这个文件包括体系中各个原子的xyz坐标等等相关参数,或者由其他软件生成并修改后符合LAMMPS的输入文件格式生成。而计算后的输出,因为LAMMPS不支持图形输出,需要借助第三方可视化软件实现,例如VMD。LAMMPS的输出文件主要可以分为三种:
一种是log.lammps,这里面记录了整个计算过程屏幕上显示的所有信息,可由thermo、thermo_modify等命令控制;
另一种是输出应力、能量、原子位置、速度等等信息,由dump命令控制输出文件;
第三种是断点续算的restart文件输出信息,由write_restart命令控制。
原文:http://www.cnblogs.com/panscience/p/4953940.html