计算化学公社

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

[其它量化程序] KST48使用案例教程

[复制链接 Copy URL]

466

帖子

10

威望

6553

eV
积分
7219

Level 6 (一方通行)

BSJ Institute

KST48是一个可调用Gaussian、ORCA、BAGEL的接口程序,用于在各种支持梯度计算的方法下寻找各类势能面的交叉点。关于KST48的基础介绍见:KST48:更强大的MECP程序 - 量子化学 (Quantum Chemistry) - 计算化学公社 (keinsci.com) RimoAccelerator/KST48 (github.com)。本帖给出了一些典型案例,相关文件可以在Github下载。


总论
KST48 只包含一个 .py 文件,安装 Python3 和 Numpy 后可以在任何地方运行。在本教程中,每个任务共享相同的目录结构:在以任务名称命名的目录中,存在程序本体 kst48.py 、输入文件inp 、工作目录 JOBS/ 。有些可能包含 2.sub,这是将作业提交给作者的 HPC 集群的脚本。
输出文件:kst48.out ;记录收敛结构的XXX_A.gjf 等。
本教程包含以下示例:
过渡金属配合物的S/T MECP
TADF分子的S1/T1交叉点
Gaussian ONIOM计算:二氯甲烷中的苯乙烯
ORCA的CASSCF计算:亚甲基卡宾S0/S1
ORCA的SF-TDDFT计算:亚甲基卡宾S/T
ACET

过渡金属配合物的S/T MECP
在本例中,我们将在 PBE0-D3BJ/6-31G(d)/SDD水平上寻找 Pincer-Co配合物的S/T MECP。对于过渡金属配合物、尤其是当其几何形状接近交叉点时,CSS的KS 波函数可能不稳定。因此,我们将在stable模式下运行 KST48,首先对波函数进行自动的稳定性检查。在opt.gjf中,首先优化三重态几何结构作为初始构型。优化后的几何结构(如果 未完成,则为最新几何结构)将通过设置 *geom @opt.log * 由 KST48 读取:

  1. nprocs = 56
  2. mem = 96GB # change this into the maxcore value for orca
  3. method = pbe1pbe em=gd3bj genecp g09default scf=(xqc,maxcycle=64)
  4. td1 =  # keywords for td-dft (only for gaussian; please write it in the tail part for orca)
  5. td2 =
  6. mp2 = false #set true for mp2 or doubly hybrid calculation in gaussian
  7. charge = 0
  8. mult1 = 1
  9. mult2 = 3
  10. mode = stable #normal; stable; read; inter_read; noread

  11. program = gaussian  #gaussian, orca, xtb
  12. gau_comm = 'g16'
  13. orca_comm = '/opt/orca5/orca'
  14. xtb_comm = 'xtb'

  15. *geom
  16. @opt.log
  17. *

  18. *tail1
  19. -C -H -O -N 0
  20. 6-31g(d)
  21. ****
  22. -Co 0
  23. SDD
  24. ****

  25. -Co 0
  26. SDD


  27. *
  28. *tail2
  29. -C -H -O -N 0
  30. 6-31g(d)
  31. ****
  32. -Co 0
  33. SDD
  34. ****

  35. -Co 0
  36. SDD


  37. *
复制代码
在这个任务中,KST48 首先在 pre_A.gjf 和 pre_B.gjf中运行stable=opt,并将稳定的波函数存储为 a.chk 和 b.chk。在这个例子中,即使在 MECP 附近,单重态仍然是CSS,但大多数情况下并不总是如此。因此,始终建议在stable模式下运行程序,或者手动准备稳定的波函数文件并以read模式运行。收敛通常很快(在开发过程中,我很骄傲地发现KST48的优化算法远比PySCF中支持的快)。在本例中,走了41步后达到收敛。


TADF分子的S1/T1交叉点
2CzPN 是一种常见的 TADF 分子,T1 态可以经过一个MECP重新转换为S1 态。为了找到 S1/T1 MECP,我们可以为态 A 设置 TD-DFT 计算,而只需将态 B 的自旋多重度设置为 3 并进行基态计算。

  1. nprocs = 28
  2. mem = 48GB # change this into the maxcore value for orca
  3. method = 6-31g(d) m062x g09default scf=(xqc,maxcycle=64)
  4. td1 = td # keywords for td-dft (only for gaussian; please write it in the tail part for orca)
  5. td2 =
  6. mp2 = false #set true for mp2 or doubly hybrid calculation in gaussian
  7. charge = 0
  8. mult1 = 1
  9. mult2 = 3
  10. mode = normal #normal; stable; read; inter_read; noread

  11. program = gaussian  #gaussian, orca, xtb
  12. gau_comm = 'g16'
  13. orca_comm = '/opt/orca5/orca'
  14. xtb_comm = 'xtb'
  15. *geom
  16. @opt.log
  17. *

  18. *tail1
  19. *
  20. *tail2
  21. *
复制代码
通过设置 td1 = td,将对态 A(自旋多重度=1)执行 TD-DFT 计算。当然此处可以编写任意关键字,例如 td1 = td(nstates=5,root=2)(然后将能寻找涉及 S2 状态的 MECP)。可以通过设置 td1 和 td2 来类似地寻找诸如 S1/S2 之类的交叉点。此外,由于 td1 和 td2 允许两个状态使用不同的关键字行,因此它可能对 TD-DFT 以外的其他应用场合也非常有用。本例读取了 T1 状态的优化输出文件作为初始几何。经过 100 次迭代后,它已经接近但尚未收敛。因此,将 JOBS/ 目录中的最新 .log 文件复制为 cont.log,并使用以下 inp 文件继续优化:
  1. nprocs = 28
  2. mem = 48GB # change this into the maxcore value for orca
  3. method = 6-31g(d) m062x g09default scf=(xqc,maxcycle=64)
  4. td1 = td # keywords for td-dft (only for gaussian; please write it in the tail part for orca)
  5. td2 =
  6. mp2 = false #set true for mp2 or doubly hybrid calculation in gaussian
  7. charge = 0
  8. mult1 = 1
  9. mult2 = 3
  10. mode = read #normal; stable; read; inter_read; noread

  11. dE_thresh = 0.000050
  12. rms_thresh = 0.0025 # 0.1*default
  13. max_dis_thresh = 0.004 # 0.1*default
  14. max_g_thresh = 0.0007
  15. rms_g_thresh = 0.0005
  16. max_steps = 100
  17. max_step_size = 0.1
  18. reduced_factor = 1 # the gdiis stepsize will be reduced by this factor when rms_gradient is close to converge

  19. program = gaussian  #gaussian, orca, xtb
  20. gau_comm = 'g16'
  21. orca_comm = '/opt/orca5/orca'
  22. xtb_comm = 'xtb'
  23. *geom
  24. @cont.log
  25. *
复制代码
除了几何结构和运行模式之外,这与之前的文件没有区别。这次使用read模式,因为我已经从之前的计算中获得了正确的 a.chk 和 b.chk。
最后它在 20 次迭代内收敛。


Gaussian ONIOM计算:二氯甲烷中的苯乙烯
自 2023 年 10 月版本起,KST48 支持 Gaussian 中的 ONIOM 计算。在此示例中,一个苯乙烯分子位于 15 个 DCM 分子内,我们将寻找 S1/T1 MECP。苯乙烯位于高层,使用 B3LYP-D3BJ/6-31G(d) 方法处理;溶剂分子采用 PM6 方法处理。
如果想要认真进行此类研究,可以使用 packmol 程序构建初始团簇结构。在本教程中,我只是手动制作了一个初始构型,并使用 xtb 程序对其进行了优化。优化后的几何结构存储为 xtbopt.xyz。但ONIOM 计算不支持外部几何文件链接。因此,我们必须设置正确的 .gjf 格式并将几何结构复制到 *geom。请注意,GaussView 生成的几何坐标可能包含列“ 0 ”,必须将其删除。关键字、电荷和自旋多重度由 isONIOM、chargeAndMultForONIOM1和 chargeAndMultForONIOM2 设置。

  1. nprocs = 28
  2. mem = 48gb # change this into the maxcore value for orca
  3. method = scf=(xqc,maxcycle=64)
  4. td1 = oniom(td/b3lyp/em=gd3bj/6-31G(d):pm6)  # keywords for td-dft (only for gaussian; please write it in the tail part for orca)
  5. td2 = oniom(b3lyp/em=gd3bj/6-31G(d):pm6)
  6. mp2 = false #set true for mp2 or doubly hybrid calculation in gaussian
  7. charge = 0
  8. mult1 = 1
  9. mult2 = 3
  10. mode = normal #normal; stable; read; inter_read; noread

  11. program = gaussian  #gaussian, orca, xtb
  12. gau_comm = g16
  13. orca_comm = /opt/orca5/orca
  14. xtb_comm = xtb

  15. isONIOM = true # if you are using the ONIOM feature of Gaussian, set this true.
  16. chargeAndMultForONIOM1 = 0 1 0 1 0 1  #only useful for ONIOM calculation
  17. chargeAndMultForONIOM2 = 0 1 0 3 0 3 #only useful for ONIOM calculation

  18. *geom
  19. C              0.54930783   -0.17331140   -0.17401924 H
  20. ...
  21. *

  22. *tail1
  23. *
  24. *tail2
  25. *
复制代码
第一次运行在 100 次迭代内未收敛,因此通过将最新结构复制到 inp文件来继续运行。这次,它在 13 次迭代内收敛。


ORCA的CASSCF计算:亚甲基卡宾S0/S1
KST48 支持 ORCA 和 BAGEL 进行多参考计算。对于 CASSCF(2,2) 水平下 CH2 的 S0/S1 交叉点的优化,使用以下输入文件:

  1. nprocs = 28
  2. mem = 1000 # change this into the maxcore value for orca
  3. method =  hf 3-21g
  4. td1 =  # keywords for td-dft (only for gaussian; please write it in the tail part for orca)
  5. td2 =
  6. mp2 = false #set true for mp2 or doubly hybrid calculation in gaussian
  7. charge = 0
  8. mult1 = 1
  9. mult2 = 1
  10. mode = normal #normal; stable; read; inter_read; noread

  11. program = orca  #gaussian, orca, xtb
  12. gau_comm = g16
  13. orca_comm = /opt/orca5/orca
  14. xtb_comm = xtb

  15. *geom
  16. C                  1.40905202    0.37147736    0.00000000
  17. H                  1.76570645   -0.63733264    0.00000000
  18. H                  0.33905202    0.37149055    0.00000000
  19. *

  20. *tail1
  21. % casscf nel 2 norb 2 nroots 2 weights[0] = 1,0
  22. maxiter 200
  23. OrbStep SuperCI_PT # or any other from the list above
  24. SwitchStep DIIS # or any other from the list above
  25. ShiftUp 2.0 # static up-shift the virtual orbitals
  26. ShiftDn 2.0 # static down-shift the internal orbitals
  27. MinShift 0.6 # minimum separation subspaces
  28. end
  29. *
  30. *tail2
  31. % casscf nel 2 norb 2 nroots 2 weights[0] = 0,1
  32. maxiter 200
  33. OrbStep SuperCI_PT # or any other from the list above
  34. SwitchStep DIIS # or any other from the list above
  35. ShiftUp 2.0 # static up-shift the virtual orbitals
  36. ShiftDn 2.0 # static down-shift the internal orbitals
  37. MinShift 0.6 # minimum separation subspaces
  38. end
  39. *
  40. *constr
  41. *
复制代码
由于ORCA的CASSCF 收敛经常出现问题,作为教程,我们采用 3-21G 基组来实现快速收敛。在 *tail1 和 *tail2 部分,可以编写任何控制两个 ORCA 任务的关键字。在此示例中,执行 CASSCF(2,2) 计算以生成 2 个根,用何种电子态计算受力由它们的权重控制。

计算在 22 次迭代内收敛。KST48 将把收敛几何的最新 .inp、.out 和 .xyz 文件复制到当前目录。


ORCA的SF-TDDFT计算:亚甲基卡宾S/T
在 KST48 中设置 SF-TDDFT 计算没有什么特别之处。在,Minyi Zhang、Chunsen Li 和其他作者的JCTC文章“XMECP: Reaching State-of-the-Art MECP Optimization in Multiscale Complex Systems”(J. Chem. Theory Comput. 2024, 20, 9, 3590–3600)中,他们故意忽略了 KST48 的现有功能,并恶意声称 KST48 不支持 ONIOM 和 SF-TDDFT。在他们给 JCTC 编辑的回复中,他们说“没有人知道如何”使用 KST48。作为回应,我将在此给出一个非常简单的例子。
SF-TDDFT 被认为更适合描述交叉点附近的势能面。以下输入文件用于寻找 CH2 的 S/T 交叉点。

  1. nprocs = 28
  2. mem = 1000 # change this into the maxcore value for orca
  3. method = b3lyp 6-31g(d)
  4. td1 =  # keywords for td-dft (only for gaussian; please write it in the tail part for orca)
  5. td2 =
  6. mp2 = false #set true for mp2 or doubly hybrid calculation in gaussian
  7. charge = 0
  8. mult1 = 3
  9. mult2 = 3
  10. mode = normal #normal; stable; read; inter_read; noread

  11. program = orca  #gaussian, orca, xtb
  12. gau_comm = g16
  13. orca_comm = /opt/orca5/orca
  14. xtb_comm = xtb

  15. *geom
  16. C                  1.40905202    0.37147736    0.00000000
  17. H                  1.76570645   -0.63733264    0.00000000
  18. H                  0.33905202    0.37149055    0.00000000
  19. *

  20. *tail1
  21. %TDDFT SF TRUE
  22. NROOTS 2
  23. IROOT 0
  24. END
  25. *
  26. *tail2
  27. %TDDFT SF TRUE
  28. NROOTS 2
  29. IROOT 1
  30. END
  31. *
复制代码
SF-TDDFT 要求将自旋多重性设置为高自旋状态。在本案例中,两个状态的多重性均为 3。*tail1 和 *tail2 中的 %TDDFT 关键字控制 ORCA 为第 0 和第 1 个状态(在 ORCA 中从 0 开始编号)生成受力。
优化在 13 次迭代内收敛。

ACET
在加成耦合电子转移 (ACET) 反应中,电子转移事件以与亲核加成耦合的方式发生。在许多情况下,它是通过交叉点而不是过渡态发生的。在此示例中,我们将找到以下反应的交叉点:
[Ox] + Cl- + 苯乙烯 → PhCH·CH2Cl + [ox]-
它是以下两个电子态之间的交叉点:
A:[Ox] + (Cl- + 苯乙烯)
B:[Ox]- + (Cl + 苯乙烯)·
本例中,[Ox] 是一种多酸。
这两个态都代表一个稳定的波函数。它们可以通过 Gaussian 的 guess=fragment 关键字获得。在这个例子中,利用a.gjf 和 b.gjf 生成两个初始波函数,而 c.gjf读取 b.chk并优化态 B 以提供交叉点的初始几何构型。剩下的事情就很简单了:让 KST48 在 read模式下读取 c.log 和两个 .chk 文件,在 77 次迭代内收敛。



评分 Rate

参与人数
Participants 1
eV +5 收起 理由
Reason
conanatm + 5 谢谢

查看全部评分 View all ratings

466

帖子

10

威望

6553

eV
积分
7219

Level 6 (一方通行)

BSJ Institute

2#
 楼主 Author| 发表于 Post on 2024-7-18 14:37:37 | 只看该作者 Only view this author
游客,本帖隐藏的内容需要积分高于 150 才可浏览,您当前积分为 0

175

帖子

2

威望

1844

eV
积分
2059

Level 5 (御坂)

3#
发表于 Post on 2024-7-18 15:04:41 | 只看该作者 Only view this author
On behalf of our authors, below is the full version of reply we sent to editorial board on 25/04/2024.
-------------------------------------------------------------------------------------------------------
Dear Prof. Gagliardi,
First and foremost, we would like to express our sincere gratitude to you for selecting our paper to be featured as an ACS Editors' Choice in addition to being published in Journal of Chemical Theory and Computation. It is truly a great honor, and we are thrilled to have our work recognized in such a prestigious manner.
The main purpose of this email is to address the questions raised by Yumiao Ma.
When filling out Table 1, we fully trusted the software/program manuals provided by the strong teams such as Gaussian, ORCA, etc. However, for the sake of thoroughness, we conducted tests on some personally developed programs including KST48 mentioned in Table 1. As limited by length of article, we did not include every reason for the assessments included in Table 1. Here, we would like to provide the following point-to-point reply in order to address the three major concerns raised by Ma.
1. About ONIOM
We noticed that KST48 had claimed to add ONIOM function several months ago. Then, we downloaded KST48 from GitHub and tested the example provided by KST48 (S0-T1 MECP of CH3CH2NO2 including high/medium/low layers). We found that using the same input file provided by KST48, the calculation job failed in 3 steps due to SCF convergence failure. The relevant calculation files can be found in the attached "oniom_test1.zip". Furthermore, we added “SCF(maxcyc=512,xqc)” keyword into the input file, yet the job still showed no convergence trend within 100 steps. These files can be found in the attached "oniom_test2.zip". As such, we believed that KST48 cannot perform ONIOM calculations although the author of KST48 might have tested the example. This is why we marked “no” for KST48 in ONIOM column in Table 1.
2. About spin-flip TD-DFT
Regarding this part, there is no specific explanation in KST48's manual. The author only claims that his/her program can call SF-TD-DFT through "tail1" and "tail2" keywords. That means no one knows how to perform SF-TD-DFT by using KST48. Due to this issue with the program, we were unable to obtain specific results. Even so, we still tried to performed SF-TD-DFT using KST48 based on our knowledge. But the result was not satisfied.
Spin contamination cannot be avoided in spin-flip TD-DFT calculation. Therefore, the main practical issue should be carefully treated is to find the targeted states within involved excited states to calculate the gradient. The strategy used by XMECP is actually same as Q-Chem. Taking S0-S1 MECP as an example, the lowest two excited states with the spin contamination lower than threshold (default: 1.20) will be treated as the targeted states, being accepted for the following gradient calculations. However, we found that KST48 cannot do so. Without such strategy, user need to monitor the optimization process time to time in order to ensure the correct states are selected by “root”. This is why ORCA commonly fails in using SF-TD-DFT to optimize MECP. We suggest future development of KST48 should consider this issue.
Moreover, we have to point out that KST48 has the command problem when working with ORCA to calculate SF-TD-DFT using "tail1" and "tail2" keywords. The code errors include but may not limit to:
1. Error occurs if the absolute path of ORCA executable file contains “program”. Minimum change is to modify line 285 into:
elif “program” in l and “orca_comm” not in l:
       2. With above modification, error still occurs since KST48 requires .out suffix for output files, while the running command of ORCA in KST48 generates .log suffix.
       Based on above tests, we did not further check the source code and we think the claimed capability of SF-TD-DFT with ORCA in KST48 was not tested before its release, and might be just based on Ma’s personal idea. Therefore, we believed that KST48 cannot support SF-TD-DFT and gave a judgment of "no" for KST48 in SF-TD-DFT column in Table 1. All the related files can be found in attached SF-TD-DFT_test.zip.
3. About Gaussian
According to the license required by Gaussian Inc., users should not compare Gaussian with other programs in terms of performance. Here “performance” refers to computation speed, accuracy, etc. While the capabilities of Gaussian are not within such aspect. Whether Gaussian is able to perform MECP optimization at any theoretical levels has already been stated in Gaussian user manual. We just summarized the information which is entirely open to the whole theoretical chemistry society. Therefore, we do not agree with Ma that our review contents in the paper have violated any term required by Gaussian license.
Our paper is not only an introduction article of XMECP program, but also reports new conclusions reached in several biochemical systems. The marks in Table 1 are not intended to criticize anyone or any programs. We suggest Ma spare more time reading “Results and Discussion” section before making his/her conclusion. We think a good paper, or a good program, should raise the general interest of the whole chemical society, providing the convenient tools and the investigation schemes to readers/users. That’s why we used the complicated multiscale examples in our paper to demonstrate that XMECP is trying to reach “state-of-the-art”. We believe our paper has the potential for broad public interest and will be valuable in related fields.
We hope our reply address Ma’s concerns.

Sincerely,

Chunsen Li, on behalf of all authors.
2024.4.25


评分 Rate

参与人数
Participants 6
eV +24 收起 理由
Reason
Osmanthus + 5 牛!
Accelerator + 1 Ridiculous shameless nonsense
wangzuwei + 3 不明觉厉
鬼隐 + 5 好萌好萌好萌!
TretopL + 5 正解
Ru7 + 5 不明觉厉

查看全部评分 View all ratings

1

帖子

0

威望

7

eV
积分
8

Level 1 能力者

4#
发表于 Post on 2024-7-23 16:15:16 | 只看该作者 Only view this author
支持老哥

本版积分规则 Credits rule

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

GMT+8, 2025-8-18 07:20 , Processed in 0.223901 second(s), 30 queries , Gzip On.

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