计算化学公社

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

[Gaussian/gview] Gaussian官方: IOp(5/13=1) 不应在任何计算中使用

  [复制链接 Copy URL]

3098

帖子

28

威望

1万

eV
积分
16892

Level 6 (一方通行)

本帖最后由 liyuanhe211 于 2019-12-9 16:15 编辑

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
摘要:Gaussian官方对于IOp(5/13=1)的态度是:IOp(5/13=1)只是debug用的,除了开发者外,不应在任何计算之中使用
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
【此文在标明出处(网址)、且Gaussian回复部分(不包括英语原文)无删改的情况下可任意转载。为防止产生误解,其他情况转载需联系我。】



IOp(5/13=1)是诸多广为谬传的垃圾关键词之中,影响最广、破坏性也几乎最严重的关键词。
近日在群里又有人讨论在几何优化中使用IOp(5/13=1)的合理性,故我向Gaussian Support发了一封邮件,其很快就回复了,其中很多内容主要包括:

  • 在任何计算中不要用IOp(5/13=1)
  • 遇到SCF不收敛时应当检查的错误
  • 解决SCF不收敛的方法

这些与大家的日常提问都有很大关系,我大概翻译了一下,内容如下(原文全文见本文末尾):

----------------------------------------------------------------------------------------------------------------------------------------------------------
我的提问(大意)
----------------------------------------------------------------------------------------------------------------------------------------------------------


        我做几何优化(实际上用的群里另一人的例子),在几何优化的第一步遇到SCF不收敛问题,失败前已收敛到 Convg =1.031E-6,有人说此时使用IOp(5/13=1)可以“跳过”当前步骤、用未收敛波函数估计梯度、最终也可能收敛,这种做法是否合理?

        另外,据我所知,由于使用 IOP(5/13=1) 之后不再提示 SCF 收敛失败,故而有极多的人把 IOP(5/13=1) 当成是“解决”SCF不收敛的方法,甚至用在单点计算中。他们看到 "Normal termination of Gaussian 09" 就感觉万事大吉了,根本不会手动去检查SCF收敛性。所以我建议在后续版本中,使用了 IOP(5/13=1) 时,应在输出结尾之前输出一个巨大的警告,例如:
  1. (Enter /home/gauuser/g09/l9999.exe)
  2. [Archieve & motto]
  3. Job cpu time:       0 days  *********
  4. File lengths (MBytes):   *********


  5. >>>>>>>> IOp(5/13=1) is used and SCF IS NOT CONVERGED. USE THE RESULT WITH CAUTION.


  6. Normal termination of Gaussian 09 at Sun May 22 02:33:01 2016.
复制代码
       并且让GaussView程序读这一警告,在载入Log文件时弹出一个警告窗口告知这件事
----------------------------------------------------------------------------------------------------------------------------------------------------------


----------------------------------------------------------------------------------------------------------------------------------------------------------
Gaussian Support 回复
----------------------------------------------------------------------------------------------------------------------------------------------------------

(原文(英文)由Gaussian公司的 Technical Support Zou Lufeng 撰写)



        感谢你的建议,我们会报告给开发人员(对IOp(5/13=1)进行警告)

        使用 IOp(5/13=1) 时,程序不会检查 SCF 收敛性,而使用 SCF 未收敛的波函数继续计算。这会导致结果没有物理意义。这一 IOp 只是开发者 debug 用的,作为用户,不应在任何计算中使用


        一般的说,应该尽量用现成关键词来解决问题,使用IOp时应十分谨慎。

        使用较差 SCF 收敛限 —— 如"SCF(Conver=5)"做计算 —— 是一个常见的错误做法。在几何优化中,这可能导致接近收敛、梯度接近0时,无法提供较为精确地梯度,从而使得几何优化不收敛。一般使用的几何优化收敛限是 10^-4,如果 SCF 收敛至 10^-6,则梯度的精度只有 10^-3 或更低,比收敛限还要高,所以根本不会收敛。即使它(数值巧合?)收敛了,结果也不可靠,不应用在实际计算之中(avoided in “production runs”)。


        只要你遇到了 SCF 收敛问题,应当在输入文件中,用“#P”代替“#”以显示SCF收敛过程
        在尝试下述方法之前,应检查这些可能 SCF 不收敛的错误:几何构型初猜太差,多了/少了 氢原子,电荷/多重度 输入错误,数值精度不够(尤其是在用了弥散函数的时候),等等


        在此之上我们推荐这些解决SCF不收敛的方法,从其语气推测,下面的方法是按照推荐的优先级排序的,可按顺序尝试(包括其互相组合)。这部分与Sob的文章《解决SCF不收敛问题的方法》( http://sobereva.com/61)有很多重复之处,建议先阅读Sob的文章,同时与之重复内容的不再翻译。
  • SCF=NoVarAcc:【首先尝试】(见Sob文章),高斯官方称“这绝对是应该首先尝试的解决方法”

  • Integral=(Acc2E=N):【在有 “非常弥散的基函数” 时使用,Sob建议一般情况下不要使用】增加(双电子?)积分精度,默认积分精度是 10^-10,即此处默认N=10,用户可将其提高至 N=11 或 N=12。由于“非常弥散的函数”涉及小量的计算,应当增加积分精度。

  • Int=Ultrafine:(见Sob文章)增加DFT数值积分精度。注意若在一个任务中使用了这个选项,则应该在相关的所有任务中均使用这个选项。一般来说不需要使用高于Ultrafine的积分精度.

  • SCF=NoIncFock:(见Sob文章)

  • SCF=Fermi:【前述策略失效,且是SCF初期不收敛时使用】使用SCF=Fermi时,程序会动态的使用 Fermi 展宽、Damping、Level shifting 等一系列手段进行 SCF 收敛,程序会自动选用最合适的策略来做。这一手段只在SCF初期有效,且应该在前述各方法均无效的情况下再尝试。

  • SCF=XQC:(见Sob文章)极其慢,但十分 Robust,几乎总是能用 QC 收敛。XQC 默认尝试 64 次常规 SCF 方法之后再做 QC(不是128次),这一次数可以用 SCF=(MaxConventionalCyc=N) 控制。 QC 方法相比其他 SCF 方法更容易收敛到离初猜最近的 SCF 解,这意味着得到的解不一定是稳定解。所以在使用 QC 时应用 Stable=Opt 检查波函数的稳定性,确认 "Stability analysis" 输出中没有 "The wavefunction has an internal instability"。如果发现确实有波函数不稳定问题,应当确认 Stable=Opt 得到的波函数确实是你需要的态,确认后应当在使用 Guess=Read 读取波函数的情况下重新优化结构。下面的 SCF=YQC 和 SCF=XQC 一样都有可能得到非最优解。这在组合方法(如CBS方法)中应尤其注意,用户需要检查组合方法中的每一步都收敛到了最优解。除非(组合方法中的)各不同方法的PES差别很大,否则一般Gaussian不会因为选用方法不同、就收敛到不同的态:但这并不总是成立。所以建议用户在使用这些 SCF 收敛方法的时候,应当通过查看轨道图、检查S^2的值等方法、确认确实得到了所想计算的态。

  • SCF=YQC:在 G09 D.01 新加入的关键词,其使用线性搜索的方法做初步迭代,之后换用标准的 SCF 算法。(与XQC类似)如果上述步骤不收敛,则切换到QC方法。

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

原文:


我的提问:
  1. ***********
  2. *******
  3. I was optimizing the structure in the attachment. The SCF iteration doesn't converge on the first geometry optimization step (Convg =1.031E-6). I was told to use IOp(5/13=1), to use the not converged wavefunction in geometry optimization.

  4. Although IOp(5/13=1) can help one to "skip" the problem, I'm not sure it's a good idea to do that: using IOp(5/13=1) meaning using a [Conv=0.26D-04] SCF result (default SCF maxstep decrease to 64), inaccurate wavefunction might provide erroneous forces, which might cause optimization problem. So generally speaking, is it acceptable to use IOp(5/13=1) in geometry optimization?


  5. P.S., as far as I know, (in China) MANY Gaussian users regard IOp(5/13=1) as a "powerful" way of solving SCF convergence failure in SP calculations like post-HF, TD-DFT calculations. They found that with IOp(5/13=1) they never got L502 failures, so they added it to almost all calculations by default. When they looked at the output file, they found "Normal termination of Gaussian 09", and believed they made it right, without ever checking SCF convergence manually. This actually caused lots of unnoticed erroneous calculation result, especially for beginners.

  6. I suggest, in the later versions, when IOp(5/13=1) is used and SCF has not converged, Gaussian should output a HUGE warning JUST BEFORE "Normal termination", that the result is not "Normal". Something like this:

  7. --------------------------------------------------------------------------------------------
  8. (Enter /home/gauuser/g09/l9999.exe)
  9. [Archieve & motto]
  10. Job cpu time: 0 days *********
  11. File lengths (MBytes): *********


  12. >>>>>>>> IOp(5/13=1) is used and SCF IS NOT CONVERGED. USE THE RESULT WITH CAUTION.


  13. Normal termination of Gaussian 09 at Sun May 22 02:33:01 2016.
  14. --------------------------------------------------------------------------------------------

  15. Also let GaussView read this sentence and pop up a warning Message_Box when loading the output file.

  16. Sincerely,
  17. Li Yuan-He
复制代码


Gaussian的回复(翻译的比较草,若有翻译错误欢迎指出):
  1. Hello Yuanhe,

  2. Thank you for your suggestion, I'll report it to the developers. You're right, IOp(5/13=1) continues calculation even when the SCF is not converged; this option could lead to unphysical results and is for debug test only; it should be avoided in ALL production runs. In general, it is recommend to go with the default options for beginners and the IOps should only be used with caution.

  3. A related common mistake is to use "SCF(Conver=5)" or lower as the result will be unreliable. In fact, it could lead to failure in convergence for geometry optimization as the gradient approaches 0 near stationary points so you need a reasonable accuracy. There are several thresholds used in the geometry optimization and simply lowering the SCF convergence threshold makes it impossible to meet other convergence criteria. The default optimization convergence criteria for gradient is on the order of 10^(-4). However, when SCF energy is converged to 10^(-5), the gradient is only good to 10^(-3) or lower, which is above the optimization convergence threshold, so it cannot converge. Even if it converges, the result is unreliable and should be avoided in production runs.

  4. The SCF convergence problem could result from various reasons, including bad initial geometry, extra/missing hydrogens, wrong charge/multiplicity, and/or insufficient numerical accuracy, especially when diffuse functions are used, etc. Whenever you may expect to have SCF convergence problems, it is recommended to use "#P" instead of "#" so that you can monitor the convergence during each SCF cycle. After checking the possible reasons above, here are a few general guidelines to follow in case of SCF convergence difficulties:

  5. 1) "SCF=NoVarAcc". This one requests the use of full integral accuracy from the first SCF cycle. The default is to use lower accuracy in the first few cycles in interest of speed and then switch to full accuracy as the SCF approaches convergence. In some cases, the initial lower integral accuracy is not good enough and the SCF procedure might do a lot of useless iterations. This option never hurts, it would make the first few cycles a little slower but the overall time may be lower if it takes fewer cycles to get close to convergence, so it is definitely the first thing to try.

  6. 2) Increase integral accuracy. The default thresholds are set for an integral accuracy of 10^-10. In some cases when using very diffuse functions, one might need to use tighter thresholds since there will be very small quantities being computed. The integral accuracy is controlled with "Integral=(Acc2E=N)" in G09. The default is N=10. One may try increasing the accuracy by one or two orders of magnitude (i.e. N=11 or N=12).

  7. 3) Tighten the grid for numerical integration in DFT (This does not apply to non-DFT jobs such as pm6, HF, MP2, etc.). The default ("Fine") grid for numerical integration is adequate for most purposes but in some cases the small numerical noise might make difficult SCF convergence and the SCF procedure takes too many iterations when it is close to convergence. If the problem is with large oscillations in early SCF cycles, this is likely not going to help. One can tighten the grid with "Integral=(Grid=XXXXX)", where XXXXX is the value of the integration grid (see the documentation of the "Integral" keyword for more details). In most cases, tightening the grid to the "Ultrafine" grid is sufficient. Note that using a different integration grid changes the total energy for DFT, so "Integral(Grid=UltraFine)" must be used throughout the study, including geometry optimizations, frequencies and other jobs. So you'll have to reoptimize all the reactants, products, etc, with the new integration grid.

  8. 4) "SCF=NoIncFock". Turning off the incremental Fock formation can help in cases with very diffuse functions. This increases the computational cost of the SCF calculation as it requests the recomputation of the full Fock matrix at each SCF cycle, instead of only doing an incremental Fock formation (default). There is an increase in the cost of the whole SCF procedure since the full Fock matrix is formed at every SCF cycle, but such increase in cost with respect to the default SCF procedure is lower than doing QC SCF.

  9. 5) "SCF=Fermi". This one does a combination of things including Fermi broadening, damping and level shifting, deciding dynamically the most suitable strategy. It can be helpful in cases with oscillations in early cycles of the SCF procedure, but I only recommend it in such cases and when the other options above do not make a difference on the early oscillations.

  10. 6) "SCF=XQC". Turns on the QC SCF procedure after the maximum number of regular SCF cycles have been done without convergence (if the SCF is converged in fewer cycles with the regular SCF procedure, then the QC step is skipped). The maximum number of regular SCF cycles by default is 64, and this can be controlled by "SCF=(MaxConventionalCyc=N)". The QC procedure is much slower than the regular SCF procedure but it is very robust and almost guaranteed to converge to an SCF solution. The "SCF=XQC" option thus provides a fall-back solution when the regular SCF procedure fails to converge. It also has higher chance to converge to the nearest SCF solution (which could be an unstable solution) than the regular SCF procedure, so it is strongly recommended to check for instabilities with a "Stable=Opt" calculation.

  11. In the output, go to the section with "Stability analysis". If you there is NOTHING like "The wavefunction has an internal instability", then you're OK; If not, please check whether the new ground state is the one you're looking for, and if so you will need to re-optimize the structure with the stable wavefunction from the checkpoint file using "Guess=Read".
  12.   
  13. 7)  G09 Rev. D and later add "SCF=YQC" which uses the linear search but switching to the standard algorithm after reaching initial convergence; if it failed to converge, it will switch to the quadratic algorithm again.

  14. As you see, the issue with SCF=XQC is that it will usually converge (or SCF=YQC for G09 Rev. D01 or later); however, it may well not be the desired one or the lowest. In the case of a compound method (like CBS), you have to check the lowest solution is found in each step of the calculation. Often (and again not always), Gaussian will not change states with various methods except in cases where the potential energy surface differs significantly between the methods. Plotting the orbitals, checking the value of S**2 are recommended.

  15. If you continue to have SCF convergence issues, please do not hesitate to let us know and we'll be glad to help.

  16. Lufeng Zou, Ph.D.
  17. Technical Support
  18. Gaussian, Inc.
  19. help@gaussian.com
复制代码

评分 Rate

参与人数
Participants 8
威望 +1 eV +37 收起 理由
Reason
王OldMan + 4 受益匪浅!
lt19930703 + 10
brothers + 5 赞!
我本是个娃娃 + 5 我很赞同
greatzdk + 3 我很赞同
卡开发发 + 5 我很赞同
hcxytpp@163.com + 5 赞!
sobereva + 1

查看全部评分 View all ratings

146

帖子

0

威望

940

eV
积分
1087

Level 4 (黑子)

2#
发表于 Post on 2016-5-25 01:47:48 | 只看该作者 Only view this author
高斯的回复挺详细的嘛

3098

帖子

28

威望

1万

eV
积分
16892

Level 6 (一方通行)

3#
 楼主 Author| 发表于 Post on 2016-5-25 01:55:12 | 只看该作者 Only view this author
北纬18° 发表于 2016-5-25 01:47
高斯的回复挺详细的嘛

每次都又快又详细。很多人其实花钱买了这个服务,但是不用。

3621

帖子

3

威望

1万

eV
积分
18431

Level 6 (一方通行)

第一原理惨品小作坊

4#
发表于 Post on 2016-5-25 07:09:10 | 只看该作者 Only view this author
一般使用的几何优化收敛限是 10^-4,如果 SCF 收敛至 10^-6,则梯度的精度只有 10^-3 或更低,比收敛限还要高,所以根本不会收敛

其实如果知道Helleman-Feynman定理的话,这个也很容易想通。

不得不吐个槽,vasp默认就是类似IOp(5/13=1)这样的效果,如果第一步SCF没有正确收敛(或者收敛精度不足够高),可能会导致结构弛豫无法收敛,或者结构弛豫与自洽过程得到的能量、磁矩等差距甚大。
日常打哑谜&&探寻更多可能。
原理问题不公开讨论,非商业性质讨论欢迎私聊。
本周忙

49

帖子

0

威望

799

eV
积分
848

Level 4 (黑子)

5#
发表于 Post on 2016-5-25 07:53:27 | 只看该作者 Only view this author
找gaussian help邹博士中文就行,他中文也很好的呀,这样就不用翻译了

1102

帖子

18

威望

6643

eV
积分
8105

Level 6 (一方通行)

計算化学の社畜

6#
发表于 Post on 2016-5-25 08:32:36 | 只看该作者 Only view this author
Integral=(Acc2E=N)   好像没见过……  
Stand on the shoulders of giants

3098

帖子

28

威望

1万

eV
积分
16892

Level 6 (一方通行)

7#
 楼主 Author| 发表于 Post on 2016-5-25 09:37:58 | 只看该作者 Only view this author
melotus 发表于 2016-5-25 07:53
找gaussian help邹博士中文就行,他中文也很好的呀,这样就不用翻译了

中文描述学术问题累死了。

1552

帖子

2

威望

6243

eV
积分
7835

Level 6 (一方通行)

给dalao们倒茶

8#
发表于 Post on 2016-5-25 10:36:20 | 只看该作者 Only view this author
唉,一看见iop(5/13=1)我就有罪恶感,刚上研究生的时候我遇到了此问题,老师让我查iop手册,第一个就定位到了iop(5/13=1),后来因为它我计算出来了一个老师没有收敛的体系,我被表扬,而师姐被狠狠的批评,唉,现在想想感觉打脸,对不起那个师姐,罪过,罪过,看来今天我得发个微信致歉一番。Li老师这个绝对是权威了,因为是高斯的原厂回复,不过真不太知道这个命令怎么来进行debug。BTW:SCF收敛和后面那个Force,Displacement收敛有什么不同之处;-V/T是什么?

SCF.jpg (56.82 KB, 下载次数 Times of downloads: 69)

SCF的图

SCF的图

RMS.jpg (73.46 KB, 下载次数 Times of downloads: 70)

几何优化收敛

几何优化收敛
淡泊以明志,宁静以致远。

3098

帖子

28

威望

1万

eV
积分
16892

Level 6 (一方通行)

9#
 楼主 Author| 发表于 Post on 2016-5-25 10:40:29 | 只看该作者 Only view this author
978142355 发表于 2016-5-25 10:36
唉,一看见iop(5/13=1)我就有罪恶感,刚上研究生的时候我遇到了此问题,老师让我查iop手册,第一个就定位到 ...

几何优化的收敛循环(四个Yes)中的每一步(每一个点),都要走一次完整的SCF循环。即Force,Displacement是大循环、SCF是小循环。

-V/T是维里定理检查,Exact wavefunction应该接近2,不过用处不大。

评分 Rate

参与人数
Participants 1
eV +1 收起 理由
Reason
sobereva + 1

查看全部评分 View all ratings

2479

帖子

11

威望

6864

eV
积分
9563

Level 6 (一方通行)

10#
发表于 Post on 2016-5-25 11:34:25 | 只看该作者 Only view this author
这算是给我的身边所有使用这个iop的人一记响亮的耳光

431

帖子

0

威望

7289

eV
积分
7720

Level 6 (一方通行)

11#
发表于 Post on 2016-5-25 18:53:24 | 只看该作者 Only view this author
不晓得有多少用了该IOP的结果发出来了?

3098

帖子

28

威望

1万

eV
积分
16892

Level 6 (一方通行)

12#
 楼主 Author| 发表于 Post on 2016-5-25 19:14:36 | 只看该作者 Only view this author
yflchx 发表于 2016-5-25 18:53
不晓得有多少用了该IOP的结果发出来了?

我还见过国内某知名大学的SI里光明正大的写着自己用了IOp(5/13=1)

1552

帖子

2

威望

6243

eV
积分
7835

Level 6 (一方通行)

给dalao们倒茶

13#
发表于 Post on 2016-5-25 20:09:52 | 只看该作者 Only view this author
liyuanhe211 发表于 2016-5-25 10:40
几何优化的收敛循环(四个Yes)中的每一步(每一个点),都要走一次完整的SCF循环。即Force,Displacemen ...

恩,找到且理解了Li老师所说的意思,谢谢。另外里面我看写了SCF收敛限,那里建议的是小于10D-08就可以了,我看了里面4次迭代都小于这个收敛限。我的疑惑是:1.应用iop(5/13=1)的话,是不是这个东西一直没在收敛限里面?2.正常做优化的话,是不是SCF满足收敛的同时,后面那些也得都为yes?(以前做的计算中,SCF我都未检查过,趁着Li老师的这个话题,我正好更新一下观念)
淡泊以明志,宁静以致远。

3098

帖子

28

威望

1万

eV
积分
16892

Level 6 (一方通行)

14#
 楼主 Author| 发表于 Post on 2016-5-25 20:14:21 | 只看该作者 Only view this author
978142355 发表于 2016-5-25 20:09
恩,找到且理解了Li老师所说的意思,谢谢。另外里面我看写了SCF收敛限,那里建议的是小于10D-08就可以了 ...

上面强调清楚了,不要说“4次迭代都小于这个收敛限”,要分清(指明)几何优化的迭代和SCF迭代;用了IOp(5/13=1)时,SCF在64次以内没有收敛,则会使用未收敛的结果继续计算(不使用时,128次不收敛的话会直接报错退出);如果SCF在64次迭代之内就收敛了,则和不用IOp(5/13=1)是一样的。

并非都需要是yes,可参考:
Gaussian中几何优化收敛后Freq时出现NO或虚频的原因和解决方法
http://sobereva.com/278

评分 Rate

参与人数
Participants 1
eV +1 收起 理由
Reason
sobereva + 1

查看全部评分 View all ratings

1552

帖子

2

威望

6243

eV
积分
7835

Level 6 (一方通行)

给dalao们倒茶

15#
发表于 Post on 2016-5-25 23:07:56 | 只看该作者 Only view this author
liyuanhe211 发表于 2016-5-25 20:14
上面强调清楚了,不要说“4次迭代都小于这个收敛限”,要分清(指明)几何优化的迭代和SCF迭代;用了IOp( ...

哦,原来是这样啊。我前面想说的是SCF的迭代,我看我那个分子(CH4),4次是都低于收敛限,而几何优化的迭代则在第4次才都是yes。谢谢Li老师热心而又细致的讲解,受益匪浅。
淡泊以明志,宁静以致远。

本版积分规则 Credits rule

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

GMT+8, 2024-11-24 15:12 , Processed in 0.188700 second(s), 25 queries , Gzip On.

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