(一)linux命令
1.查询安装的linux版本 uname -a
2.改名 mv
3.超级用户 sudo su 123123
4./bin下做一个应用程序的软链接 ln -s
5.查询命令用法 man
6.以磁盘分区为单位查看文件系统
df -hl 以g为单位
(二)lammps命令
以前用的分子动力学软件是xmd,这两种软件在写入命令参数时有很大的差别,而我现在最喜欢犯的错误就是拿着xmd的经验去书写lammps的命令,然后在出错提示面前郁闷的检查,要学会跳出来,lammps既然是一个全新的软件,那么就真正把它当成一个全新的软件去使用,不要用以前的惯性思维去思考,经验有的时候起的反而是个副作用。这几天的出错集中在最基础的命令上面,这些命令我以前忽略了,根本没有去思考,
1.lattice
命令:我想做一个被四周真空层环绕的盒子,方法是先取一个大盒子,然后在大盒子里取一个准备填充原子的小盒子,但是发现右边边界和真空层有重叠,后来发现是lattice的设置问题,当时写的命令如下
lattice diamond 5.431
region 1 block 0 10 0 10 0 10 units lattice
lattice diamond 5.431 orient x 1 1 0 y -1 1 0 z 1 1 1
create_box 1 1
上述的命令就是出错的原因,前两步的命令给出时,大盒子的尺寸限定为54.31,54.31,54.31,但是实际上我想要的大盒子尺寸是54.31*sqrt(2),54.31*sqrt(2),54.31。第一步的lattice给出的lattice
spacing是5.431,因此第一步的lattice diamond 5.431是错误的,正确的写法应该是:
lattice diamond 5.431 orient x 1 1 0 y -1 1 0
z 1 1 1
region 1 block 0 10 0 10 0 10 units
lattice
create_box 1 1
此外sic的lattice结构应该如下
lattice custom 3.52 a1 0.0 0.5 0.5 a2 0.5 0.0 0.5 a3 0.5 0.5
0.0 &
basis 0.0 0.0 0.0 basis 0.25 0.25 0.25
2.create_atoms 在lattice和create_box使用之后,才能使用create_atoms
create_atoms type style args keyword values ...
· type = atom type (1-Ntypes) of atoms to create
style = box or region or single or random
注意:(a)For the box style, the create_atoms command fills the
entire simulation box with atoms on the lattice. If your simulation
box is periodic, you should insure its size is a multiple of the
lattice spacings, to avoid unwanted atom overlaps at the box
boundaries.
(b)For the region style, the geometric volume is filled that
is inside the simulation box and is also consistent with the region
volume. Note that a region can be specified so that its "volume" is
either inside or outside a geometric boundary. Also note that if
your region is the same size as a periodic simulation box (in some
dimension),to insure exactly one atom at the boundary. if this is
what you desire, you should either use the box style, or tweak
the region size to get precisely the atoms you
want.
3.region命令:使用side in/out
keyword,可以限定给定region的边界是否属于此region;使用 move or
rotate keyword,可以使静态的region变为随时间变化的动态region。
Commands which use regions typically test whether an atom's
position is contained in the region or not. For this purpose,
coordinates exactly on the region boundary are considered to be
interior to the region. This means, for example, for a spherical
region, an atom on the sphere surface would be part of the region
if the sphere were defined with the side in keyword, but would not
be part of the region if it were defined using the side out
keyword.
Normally, regions in LAMMPS are "static", meaning their
geometric extent does not change with time. If the move or rotate
keyword is used, the region becomes "dynamic", meaning it's
location or orientation changes with time.