计算化学公社
标题: 经验之谈,如何解决:Out of range atoms - cannot compute PPPM [打印本页]
作者Author: SherryLiu 时间: 2019-5-15 06:11
标题: 经验之谈,如何解决:Out of range atoms - cannot compute PPPM
本帖最后由 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后,就没再报错。
(, 下载次数 Times of downloads: 486)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
补更,最近随着慢慢深入了解 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
作者Author: wangyf 时间: 2019-7-30 20:14
楼主 你好 我也遇到了这样的问题 您的意思是应该在初始阶段不使用kspace_style pppm命令吗?
作者Author: SherryLiu 时间: 2019-7-31 03:51
对的 在没平衡之前不使用 kspace_style 的命令
作者Author: wangyf 时间: 2019-7-31 10:03
好的 十分感谢!
作者Author: 梁猫头123 时间: 2019-9-26 19:44
你好,我也遇到了同样的问题,既然kspce +coul /cut 和coul /long效果相同,为什么在没平衡之前不使用kspace命令可以解决这个问题呢?
作者Author: SherryLiu 时间: 2019-10-4 02:43
我也不知道
作者Author: 兽兽果 时间: 2019-11-21 09:02
Sherry,你好,我是小白一个,最近开始学习分子动力学模拟。想向你请教个问题~用lammps提交任务的时候,仅仅是做个npt平衡,任务运行中,没有出现error却自动终止了,我想请问下你出现过这种情况吗?问题出在哪里呢?
作者Author: oldniuniuslober 时间: 2020-3-31 13:29
以前经常遇见这个问题只知道可能是构型的不合理,受教了
作者Author: RockyYoung 时间: 2020-5-13 16:05
楼主你好,lampps里长程力处理如pppm等,在盒子距离内的力,用potentials计算,超出盒子距离的力,采用傅立叶转化在倒空间中计算,在预平衡不计算长程力对结果有影响么?
作者Author: SherryLiu 时间: 2020-5-15 03:40
Sorry, I do not know. 你说的好复杂啊,我也不太了解。不过好像是可以在预平衡时候不计算长程力以节省计算成本,但具体有何影响,我就不知道了。
作者Author: paplika 时间: 2021-3-18 19:59
谢谢!我建模遇到的问题终于解决了!
作者Author: 星星没有九十九 时间: 2021-5-12 10:12
感谢分享
作者Author: 731784671 时间: 2021-10-24 13:55
本帖最后由 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)
作者Author: tuzhidingdong 时间: 2022-4-21 20:42
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.
作者Author: Deathaliveone 时间: 2022-5-30 17:32
万分感谢,我的模型因为晶胞的单体分子比较大,初始弛豫一直这样报错,成功解决了,谢谢
作者Author: ilovelr 时间: 2023-12-19 12:10
我也遇到这个问题,我先用ewald跑一段时间,再用pppm跑就不会报错了
作者Author: 桐桐桐 时间: 2024-5-16 20:19
我的代替不了,显示ERROE:Pair style requires a kspace style,请问有人知道怎么回事吗
作者Author: KCM@SHU 时间: 2024-5-25 11:58
老师您好,我想问一下您说的没有平衡之前不用kspace_style pppm,假如我用NVT系综跑平衡,用NVP系综跑模拟,那我是在NVT的时候不设置kspace_style pppm吗?然后NPT的时候设置,还是老师您的意思是每个系综都要先跑一段时间后等系综平衡了再加kspace_style pppm呢?
作者Author: ljlljl2023 时间: 2024-5-25 17:37
你看看16楼的方法行不行呢
作者Author: 桐桐桐 时间: 2024-6-14 21:30
谢谢您的回复,我没明白怎么先用Ewald跑,或许您可以说的更详细些吗
| 欢迎光临 计算化学公社 (http://bbs.keinsci.com/) |
Powered by Discuz! X3.3 |