计算化学公社

 找回密码 Forget password
 注册 Register

(更新5.0版)Gaussian优化过渡态的监控/诊断小脚本-tsmonitor

查看数: 77919 | 评论数: 52 | 收藏 Add to favorites 104
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2019-7-30 11:02

正文摘要:

本帖最后由 ggdh 于 2021-8-1 17:00 编辑 和本脚本功能类似,但用于orca结果监控的程序见ORCA几何优化的监控/诊断小脚本-orcamonitor 6.0版新特性(先立flag) 目前弄大文件的时候有点慢,6.0版应该会重构部 ...

回复 Reply

wal 发表于 Post on 2025-4-20 11:39:25
mfdsrax2 发表于 2025-4-19 23:14
我在想,能不能做一个简单的,就只需要输出每一步的受力和位移,判断是否满足收敛标准就行了,很多时候不需 ...

你这个直接grep就能实现
mfdsrax2 发表于 Post on 2025-4-19 23:14:27
我在想,能不能做一个简单的,就只需要输出每一步的受力和位移,判断是否满足收敛标准就行了,很多时候不需要关注那么多复杂的东西
ggdh 发表于 Post on 2024-9-15 09:20:02
月时计 发表于 2024-7-24 18:03
代码小白,只是好奇一个问题。如下:柔性扫描→提取最高点生成TS输入文件→过渡态结构优化→优化成功→IRC ...

可以的,更好的方案是 :
提取最高点附近的3-4个结构
同时开展过渡态优化,并且用tsmonitor 监控。
月时计 发表于 Post on 2024-7-24 18:03:50
代码小白,只是好奇一个问题。如下:柔性扫描→提取最高点生成TS输入文件→过渡态结构优化→优化成功→IRC验证,这个流程通过脚本实现过渡态搜索自动化是否有可能?
neocc 发表于 Post on 2022-5-15 23:26:36
本帖最后由 neocc 于 2022-5-16 00:05 编辑

楼主能加入终端绘图功能嚒
我通过gnuplot搞定了无GUI绘图,超算上应该有需求,不知道matplotlib有没有这种能力,要是能搞出smile结构用于TS和scan就更666了


将以下脚本命名为OPT-E-monitor-noGUI.sh
运行时候必须要带上俩参数
如 ./OPT-g16-E-monitor.sh OPT-gaussian.out 10  
表示每10s输出一次优化次数-能量曲线

  1. #!/bin/bash

  2. # $1 = out file
  3. # $2 = delay in seconds

  4. grep 'SCF Done' $1 | awk '{print $5}' |cat -n > $1-data.txt

  5. while :
  6. do
  7. grep 'SCF Done' $1 | awk '{print $5}' |cat -n |tail -1 >> $1-data.txt

  8. gnuplot -p <<EOF
  9. reset session
  10. set term dumb 120,30
  11. set tics nomirror scale 0.5
  12. set grid
  13. set xlabel "steps"
  14. set ylabel "Energy Variation (a.u.)"
  15. unset key
  16. plot '$1-data.txt' u 1:2  w l t "Step-E_{a.u.}"
  17. EOF

  18. sleep $2

  19. done

  20. # chmod +x
复制代码



效果大概是这样的

    -2109.4 +-------------------------------------------------------------------------------------------------------+
                |                :                 :                :                :                 :                |
                |                :                 :                :                :                 :                |
    -2109.6 |+...............:.................:................:................:.................:................|
                |                :                 :                :                :                 :                |
                |*               :                 :                :                :                 :                |
    -2109.8 |*...............:.................:................:................:.................:................|
                | *              :                 :                :                :                 :                |
                | **             :                 :                :                :                 :                |
      -2110  |+.*.............:.................:................:................:.................:................|
                |   **           :                 :                :                :                 :                |
                |    **          :                 :                :                :                 :                |
                |     **         :                 :                :                :                 :                |
    -2110.2 |+.....**........:.................:................:................:.................:................|
                |       **       :                 :                :                :                 :                |
                |        ***     :                 :                :                :                 :                |
    -2110.4 |+.........**....:.................:................:................:.................:................|
                |            *** :                 :                :                :                 :                |
                |              ****                :                :                :                 :                |
    -2110.6 |+...............:******...........:................:................:.................:................|
                |                :     *********   :                :                :                 :                |
                |                :             ****************     :                :                 :                |
    -2110.8 |+...............:.................:...........**************************************************.......|
                |                :                 :                :                :                 :        ****    |
                |                :                 :                :                :                 :                |
      -2111   +-------------------------------------------------------------------------------------------------------+
            0                50               100              150              200               250              300
wzkchem5 发表于 Post on 2022-1-11 16:00:07
ymc1582 发表于 2022-1-11 07:49
请问:优化过渡态过程中,可不可以从中途提取一个结构并保存为gjf文件继续进行续算?(晚上电脑会关机,担 ...

可以
ymc1582 发表于 Post on 2022-1-11 14:49:54
请问:优化过渡态过程中,可不可以从中途提取一个结构并保存为gjf文件继续进行续算?(晚上电脑会关机,担心完不成计算任务)
ggdh 发表于 Post on 2021-11-24 16:51:09
本帖最后由 ggdh 于 2021-11-24 17:00 编辑
elvisng 发表于 2021-11-24 13:53
尝试了一下用 IRC 生成 gjf 的功能, 但不太成功。请问一下可能是什么问题? 输入和输出如下:

$ tsm -e "r ...
IRC.log 可能有问题导致无法正确识别其中内容。
方便的话 加QQ:32589927 把IRC.log 传给我诊断一下bug?
elvisng 发表于 Post on 2021-11-24 13:53:40
尝试了一下用 IRC 生成 gjf 的功能, 但不太成功。请问一下可能是什么问题? 输入和输出如下:

$ tsm -e "r1-20 f1-20"  -K  "m062x 6-311g**"  IRC.log

1 step job detected. Unit for energy is kCal/mol
IRC job detected
TSM_GEOM/TSM_GEOM_r1 dose not exist.
TSM_GEOM/TSM_GEOM_r2 dose not exist.
TSM_GEOM/TSM_GEOM_r3 dose not exist.
TSM_GEOM/TSM_GEOM_r4 dose not exist.
TSM_GEOM/TSM_GEOM_r5 dose not exist.
TSM_GEOM/TSM_GEOM_r6 dose not exist.
TSM_GEOM/TSM_GEOM_r7 dose not exist.
TSM_GEOM/TSM_GEOM_r8 dose not exist.
TSM_GEOM/TSM_GEOM_r9 dose not exist.
TSM_GEOM/TSM_GEOM_r10 dose not exist.
TSM_GEOM/TSM_GEOM_r11 dose not exist.
TSM_GEOM/TSM_GEOM_r12 dose not exist.
TSM_GEOM/TSM_GEOM_r13 dose not exist.
TSM_GEOM/TSM_GEOM_r14 dose not exist.
TSM_GEOM/TSM_GEOM_r15 dose not exist.
TSM_GEOM/TSM_GEOM_r16 dose not exist.
TSM_GEOM/TSM_GEOM_r17 dose not exist.
TSM_GEOM/TSM_GEOM_r18 dose not exist.
TSM_GEOM/TSM_GEOM_r19 dose not exist.
TSM_GEOM/TSM_GEOM_r20 dose not exist.
TSM_GEOM/TSM_GEOM_f1 dose not exist.
TSM_GEOM/TSM_GEOM_f2 dose not exist.
TSM_GEOM/TSM_GEOM_f3 dose not exist.
TSM_GEOM/TSM_GEOM_f4 dose not exist.
TSM_GEOM/TSM_GEOM_f5 dose not exist.
TSM_GEOM/TSM_GEOM_f6 dose not exist.
TSM_GEOM/TSM_GEOM_f7 dose not exist.
TSM_GEOM/TSM_GEOM_f8 dose not exist.
TSM_GEOM/TSM_GEOM_f9 dose not exist.
TSM_GEOM/TSM_GEOM_f10 dose not exist.
TSM_GEOM/TSM_GEOM_f11 dose not exist.
TSM_GEOM/TSM_GEOM_f12 dose not exist.
TSM_GEOM/TSM_GEOM_f13 dose not exist.
TSM_GEOM/TSM_GEOM_f14 dose not exist.
TSM_GEOM/TSM_GEOM_f15 dose not exist.
TSM_GEOM/TSM_GEOM_f16 dose not exist.
TSM_GEOM/TSM_GEOM_f17 dose not exist.
TSM_GEOM/TSM_GEOM_f18 dose not exist.
TSM_GEOM/TSM_GEOM_f19 dose not exist.
TSM_GEOM/TSM_GEOM_f20 dose not exist.
sn  scf  RE  dE  MaxF*10  RMSF*10
Normal termination of Gaussian 16 at Fri Nov 12 14:05:56 2021.
冰释之川 发表于 Post on 2021-8-2 16:33:49
ggdh 发表于 2021-8-2 15:46
分析IRC的速度好像没变?你看看是不是这样,因为IRC那部分是纯awk写的。

我用跑TS的输出文件测试了一下,速度似乎慢了一些;IRC还行。、
ggdh 发表于 Post on 2021-8-2 15:46:04
冰释之川 发表于 2021-8-1 18:39
功能越来越强大了,不过好像同样大小的输出文件用5.0版比4.0老版分析慢了不少

分析IRC的速度好像没变?你看看是不是这样,因为IRC那部分是纯awk写的。
冰释之川 发表于 Post on 2021-8-1 18:39:39
ggdh 发表于 2021-8-1 14:48
5.0发布啦,这次加了两个硬核功能,对找过渡态都有用(不忘初心)
代码越写越大(其实也才500行。。 ...

功能越来越强大了,不过好像同样大小的输出文件用5.0版比4.0老版分析慢了不少
ggdh 发表于 Post on 2021-8-1 14:48:07
5.0发布啦,这次加了两个硬核功能,对找过渡态都有用(不忘初心
代码越写越大(其实也才500行。。。。),这次终于开始加入函数方便管理。
部分代码用awk重构了,awk还是强大灵活,shell的终极解决方案。

评分 Rate

参与人数
Participants 1
eV +5 收起 理由
Reason
冰释之川 + 5 太强了……

查看全部评分 View all ratings

yaoYC 发表于 Post on 2021-6-22 09:08:07
wzkchem5 发表于 2021-6-21 17:47
是不是第一步都没有算完?

并不是,已经有SCF Done了

评分 Rate

参与人数
Participants 1
eV +2 收起 理由
Reason
ggdh + 2 可以把log文件发我看看 qq:32589927

查看全部评分 View all ratings

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

GMT+8, 2025-8-13 03:41 , Processed in 0.195114 second(s), 32 queries , Gzip On.

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