计算化学公社

 找回密码 Forget password
 注册 Register
Views: 1388|回复 Reply: 1
打印 Print 上一主题 Last thread 下一主题 Next thread

[Lammps] LAMMPS create_atoms后盒子参数改变问题

[复制链接 Copy URL]

401

帖子

0

威望

2551

eV
积分
2952

Level 5 (御坂)

所念皆星河

跳转到指定楼层 Go to specific reply
楼主
大家好,最近尝试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
复制代码
可以大致判断出,输出的盒子只是一个恰好能够容纳所有原子的尺寸。

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

心之所向,日复一日,必有精进

401

帖子

0

威望

2551

eV
积分
2952

Level 5 (御坂)

所念皆星河

2#
 楼主 Author| 发表于 Post on 2023-2-15 22:56:33 | 只看该作者 Only view this author
自问自答一下,之前学习时候受了一些误导,仔细阅读官方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。
心之所向,日复一日,必有精进

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-2-21 20:12 , Processed in 0.150440 second(s), 20 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list