计算化学公社

标题: LAMMPS create_atoms后盒子参数改变问题 [打印本页]

作者
Author:
含光君    时间: 2023-2-15 14:55
标题: LAMMPS create_atoms后盒子参数改变问题
大家好,最近尝试LAMMPS时发现,输入文件in.lmp执行过create_atoms命令后,输出的data文件中盒子参数发生改变:

in 文件:
  1. # input file
  2. units                real
  3. dimension        3
  4. processors        * * *
  5. boundary                s s s
  6. box tilt large

  7. # initialize
  8. region box block 0 4 0 4 0 4 units box
  9. create_box 1 box
  10. create_atoms 1 random 4 121212 box
  11. mass 1 2

  12. write_data        initial.data
复制代码
文件中先建立了4*4*4的正交盒子然后在盒子里填充了原子。但最后输出的data文件长这样:

  1. LAMMPS data file via write_data, version 23 Jun 2022, timestep = 0

  2. 4 atoms
  3. 1 atom types

  4. 1.074142129912666 3.2344212498018616 xlo xhi
  5. 0.11089257460650642 3.829977442179237 ylo yhi
  6. 1.808672085567318 3.7084707064401687 zlo zhi

  7. Masses

  8. 1 2

  9. Atoms # atomic

  10. 1 1 1.5443631399163804 0.11129257460650642 2.4943014115534266 0 0 0
  11. 2 1 1.7238239784370288 0.3096055911432978 3.5411703454056616 0 0 0
  12. 3 1 1.074542129912666 3.8295774421792372 3.708070706440169 0 0 0
  13. 4 1 3.2340212498018617 2.195145419889663 1.809072085567318 0 0 0
复制代码
可以大致判断出,输出的盒子只是一个恰好能够容纳所有原子的尺寸。

在这里想请教大家如果我需要在之后模拟的轨迹中保持原先定义的盒子尺寸的话,应该怎么做?请各位多多指教!


作者
Author:
含光君    时间: 2023-2-15 22:56
自问自答一下,之前学习时候受了一些误导,仔细阅读官方doc后原因已查明。

LAMMPS设置盒子边界条件boundary命令:

  1. boundary x y z
  2. # x,y,z = p or s or f or m, one or two letters
  3. # p is periodic
  4. # f is non-periodic and fixed
  5. # s is non-periodic and shrink-wrapped
  6. # 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