计算化学公社
标题:
LAMMPS create_atoms后盒子参数改变问题
[打印本页]
作者Author:
含光君
时间:
2023-2-15 14:55
标题:
LAMMPS create_atoms后盒子参数改变问题
大家好,最近尝试LAMMPS时发现,输入文件in.lmp执行过create_atoms命令后,输出的data文件中盒子参数发生改变:
in 文件:
# input file
units real
dimension 3
processors * * *
boundary s s s
box tilt large
# initialize
region box block 0 4 0 4 0 4 units box
create_box 1 box
create_atoms 1 random 4 121212 box
mass 1 2
write_data initial.data
复制代码
文件中先建立了4*4*4的正交盒子然后在盒子里填充了原子。但最后输出的data文件长这样:
LAMMPS data file via write_data, version 23 Jun 2022, timestep = 0
4 atoms
1 atom types
1.074142129912666 3.2344212498018616 xlo xhi
0.11089257460650642 3.829977442179237 ylo yhi
1.808672085567318 3.7084707064401687 zlo zhi
Masses
1 2
Atoms # atomic
1 1 1.5443631399163804 0.11129257460650642 2.4943014115534266 0 0 0
2 1 1.7238239784370288 0.3096055911432978 3.5411703454056616 0 0 0
3 1 1.074542129912666 3.8295774421792372 3.708070706440169 0 0 0
4 1 3.2340212498018617 2.195145419889663 1.809072085567318 0 0 0
复制代码
可以大致判断出,输出的盒子只是一个恰好能够容纳所有原子的尺寸。
在这里想请教大家如果我需要在之后模拟的轨迹中保持原先定义的盒子尺寸的话,应该怎么做?请各位多多指教!
作者Author:
含光君
时间:
2023-2-15 22:56
自问自答一下,之前学习时候受了一些误导,仔细阅读官方doc后原因已查明。
LAMMPS设置盒子边界条件boundary命令:
boundary x y z
# x,y,z = p or s or f or m, one or two letters
# p is periodic
# f is non-periodic and fixed
# s is non-periodic and shrink-wrapped
# m is non-periodic and shrink-wrapped with a minimum value
复制代码
所以
boundary
s s s定义的盒子边界会随原子坐标运动,若需固定盒子边界应设为
boundary
f f f。
欢迎光临 计算化学公社 (http://bbs.keinsci.com/)
Powered by Discuz! X3.3