计算化学公社

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

[Lammps] 经验之谈,如何解决:Out of range atoms - cannot compute PPPM

  [复制链接 Copy URL]

48

帖子

0

威望

1344

eV
积分
1392

Level 4 (黑子)

本帖最后由 SherryLiu 于 2019-11-5 06:59 编辑

最近刚开始学习LAMMPS,遇到 Out of range atoms - cannot compute PPPM 问题时,不知道是什么原因,在网上也找不到有效的解决办法。一般的经验之谈是减小步长,和导师交流了一下,我导师也告诉我减小步长去算,结果就是治标不治本。
经过一天的试验摸索后,我得出结论:Out of range atoms 的错误根本在于分子在趋近平衡的运动过程中有分子重叠了,减小步长的结果就是在计算足够时间后还是会重叠,只不过步数变长了。
我尝试的解决办法是重新定义box size,具体看报错之前的box size或者Lx,y,z是多少,然后将体系的box size设置大概在那个范围内,然后重新run,就可以了。

以下是我的Debug过程:Lx,y,z设置为40时,减小步长还是会报错,大致报错前输出的Lx为25~左右,然后我设置Lx为20或30后,就没再报错。


----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

补更,最近随着慢慢深入了解 LAMMPS 中的 Force Field 以及 LAMMPS in.file 的书写规则,发现其实出现上述问题是因为在 in.file 中设置 kspace_style pppm 这一项 (当然,其实错误提示中已经告诉了是这一项,但当时自己对 LAMMPS 的理解尚浅,不知道到底是哪错了)。

在 LAMMPS 手册中有写明 pair_style lj/cut/coul/long (既计算L-J势能又计算库仑力)跟 kspace_style ewald or pppm 配对使用,效果等同于 pair_style lj/cut/coul/cut,具体如下所述:Styles lj/cut/coul/long and lj/cut/coul/msm compute the same Coulombic interactions as style lj/cut/coul/cut except that an additional damping factor is applied to the Coulombic term so it can be used in conjunction with the kspace_style command and its ewald or pppmoption. The Coulombic cutoff specified for this style means that pairwise interactions within this distance are computed directly; interactions outside that distance are computed in reciprocal space.


所以在 Equilibrate stage 的 in.file 中 pair_style 设置为 lj/cut/coul/cut,而在 Production Run 阶段改为 pair_style lj/cut/coul/long + kspace_style pppm 0.0001。
附上我在 LAMMPS 中使用 OPLS-AA 力场的 in.file 脚本 (计算的力场参数来源于LigGenPar):
    units real
    boundary p p p
    atom_style full
  # interaction styles
    bond_style harmonic
    angle_style harmonic
    dihedral_style opls
  # improper_style cvff
    pair_style lj/cut/coul/cut 15.0
    pair_modify mix geometric tail yes
  # OPLS considers 1-4 interactions with 50%.
    special_bonds lj/coul 0.0 0.0 0.5
    neighbor 2.0 bin
    neigh_modify every 5 delay 0 check yes   
  # kspace_style pppm 0.0001

评分 Rate

参与人数
Participants 9
eV +28 收起 理由
Reason
杨晓彤 + 3
YuanMeng + 3 牛!
BangbooCat + 1 帮大忙了
学!!! + 5 GJ!
JasonTtheGOAT + 2 之前做毕设的时候,这个问题一直困扰着我,.
核能小虾米 + 3 谢谢分享
luyao + 2 谢谢分享
飞出个未来 + 4 牛!
sobereva + 5

查看全部评分 View all ratings

5

帖子

0

威望

43

eV
积分
48

Level 2 能力者

2#
发表于 Post on 2019-7-30 20:14:01 | 只看该作者 Only view this author
SherryLiu 发表于 2019-7-9 03:44
补更,最近随着慢慢深入了解 LAMMPS 中的 Force Field 以及 LAMMPS in.file 的书写规则,发现其实出现上述 ...

楼主 你好 我也遇到了这样的问题 您的意思是应该在初始阶段不使用kspace_style pppm命令吗?

48

帖子

0

威望

1344

eV
积分
1392

Level 4 (黑子)

3#
 楼主 Author| 发表于 Post on 2019-7-31 03:51:44 | 只看该作者 Only view this author
wangyf 发表于 2019-7-30 20:14
楼主 你好 我也遇到了这样的问题 您的意思是应该在初始阶段不使用kspace_style pppm命令吗?

对的 在没平衡之前不使用 kspace_style 的命令

5

帖子

0

威望

43

eV
积分
48

Level 2 能力者

4#
发表于 Post on 2019-7-31 10:03:37 | 只看该作者 Only view this author
SherryLiu 发表于 2019-7-31 03:51
对的 在没平衡之前不使用 kspace_style 的命令

好的 十分感谢!

1

帖子

0

威望

7

eV
积分
8

Level 1 能力者

5#
发表于 Post on 2019-9-26 19:44:12 | 只看该作者 Only view this author
你好,我也遇到了同样的问题,既然kspce +coul /cut 和coul /long效果相同,为什么在没平衡之前不使用kspace命令可以解决这个问题呢?

48

帖子

0

威望

1344

eV
积分
1392

Level 4 (黑子)

6#
 楼主 Author| 发表于 Post on 2019-10-4 02:43:04 | 只看该作者 Only view this author
梁猫头123 发表于 2019-9-26 19:44
你好,我也遇到了同样的问题,既然kspce +coul /cut 和coul /long效果相同,为什么在没平衡之前不使用kspac ...

我也不知道

2

帖子

0

威望

47

eV
积分
49

Level 2 能力者

7#
发表于 Post on 2019-11-21 09:02:03 | 只看该作者 Only view this author
Sherry,你好,我是小白一个,最近开始学习分子动力学模拟。想向你请教个问题~用lammps提交任务的时候,仅仅是做个npt平衡,任务运行中,没有出现error却自动终止了,我想请问下你出现过这种情况吗?问题出在哪里呢?

3

帖子

0

威望

49

eV
积分
52

Level 2 能力者

8#
发表于 Post on 2020-3-31 13:29:02 | 只看该作者 Only view this author
以前经常遇见这个问题只知道可能是构型的不合理,受教了

1

帖子

0

威望

25

eV
积分
26

Level 2 能力者

9#
发表于 Post on 2020-5-13 16:05:15 | 只看该作者 Only view this author
楼主你好,lampps里长程力处理如pppm等,在盒子距离内的力,用potentials计算,超出盒子距离的力,采用傅立叶转化在倒空间中计算,在预平衡不计算长程力对结果有影响么?

48

帖子

0

威望

1344

eV
积分
1392

Level 4 (黑子)

10#
 楼主 Author| 发表于 Post on 2020-5-15 03:40:41 | 只看该作者 Only view this author
RockyYoung 发表于 2020-5-13 16:05
楼主你好,lampps里长程力处理如pppm等,在盒子距离内的力,用potentials计算,超出盒子距离的力,采用傅立 ...

Sorry, I do not know. 你说的好复杂啊,我也不太了解。不过好像是可以在预平衡时候不计算长程力以节省计算成本,但具体有何影响,我就不知道了。

5

帖子

0

威望

57

eV
积分
62

Level 2 能力者

11#
发表于 Post on 2021-3-18 19:59:58 | 只看该作者 Only view this author
谢谢!我建模遇到的问题终于解决了!

2

帖子

0

威望

7

eV
积分
9

Level 1 能力者

12#
发表于 Post on 2021-5-12 10:12:51 | 只看该作者 Only view this author
感谢分享

1

帖子

0

威望

69

eV
积分
70

Level 2 能力者

13#
发表于 Post on 2021-10-24 13:55:33 | 只看该作者 Only view this author
本帖最后由 731784671 于 2021-10-24 13:56 编辑

我尝试了一下楼主的办法,没有成功。分享一下我找到的一种解决办法,扩大neighbor bin的大小,我是把2.0改到3.0之后可以正常跑了,
参考网址:httpsLAMMPS / Re: [lammps-users] out of range atoms - cannot compute PPPM (sourceforge.net)

22

帖子

0

威望

343

eV
积分
365

Level 3 能力者

14#
发表于 Post on 2022-4-21 20:42:47 | 只看该作者 Only view this author
It happens when your atoms move too far and cannot be mapped onto the portion of the PPPM grid owned by a processor.  Could be you aren't reneighboring often
enough.  Could be your dynamics is bad and atoms are moving too far.

11

帖子

0

威望

291

eV
积分
302

Level 3 能力者

15#
发表于 Post on 2022-5-30 17:32:23 | 只看该作者 Only view this author
万分感谢,我的模型因为晶胞的单体分子比较大,初始弛豫一直这样报错,成功解决了,谢谢

本版积分规则 Credits rule

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

GMT+8, 2026-1-24 07:37 , Processed in 0.690992 second(s), 31 queries , Gzip On.

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