|
本帖最后由 冰释之川 于 2024-11-7 15:52 编辑
在《Multiwfn Updater》http://bbs.keinsci.com/thread-20109-1-1.html 一文中,笔者提供了一键更新Multiwfn的脚本,
但如果要对多台机子的Multiwfn进行更新,还得狂敲好多下键盘,这样的操作属实不太方便。因而在本文中笔者修改了脚本,
并且结合cron服务让Multiwfn能够自动定时更新,从而真正的解放双手!
关于脚本的使用说明:
(1) 确保系统中cron服务处于开启状态:
- # 查看crond是否已启动:
- service crond status
复制代码
(2) 设置cron:
文件末尾添加:
- 0 10 * * * bash /mnt/d/Multiwfn_Linux/Multiwfn_Updater/AutoUpdate4Multiwfn.sh >> /mnt/d/Multiwfn_Linux/Multiwfn_Updater/AutoUpdate4Multiwfn.log
复制代码 代表每天10点利用cron对目标脚本进行更新;这里的脚本路径和输出信息路径需要采用绝对路径。
下图为crontab格式说明:
(3) 在"AutoUpdate4Multiwfn.sh"脚本中,需要自行修改如下参数:
- ################### Basic settings ###################
- Multiwfnpath=/mnt/d/Multiwfn_Linux/Multiwfn_3.8_dev_bin_Linux/Multiwfn
- gaupath=/mnt/d/Gaussian16_Linux/g16/g16
- cubegenpath=/mnt/d/Gaussian16_Linux/g16/cubegen
- formchkpath=/mnt/d/Gaussian16_Linux/g16/formchk
- orca_2mklpath=/mnt/d/ORCA_Linux/orca-5.0.4/orca_2mkl
复制代码
(4) 如果cron正常运行,并且脚本参数正确设置的话,"AutoUpdate4Multiwfn.log"输出文件将会记录每天的更新情况:
- 2023-03-26 13:17:34:
- => Local version of Multiwfn: 3.8(dev) 2023-Mar-11
- => Latest online version of Multiwfn: 3.8(dev) 2023-Mar-26
- => New verison of Multiwfn 3.8(dev) released at 2023-Mar-26 is found!
- => Downloading the latest version of Multiwfn...
- => Multiwfn has been updated to the latest version 3.8(dev) 2023-Mar-26
- => The settings.ini of Multiwfn has been updated!
- ------------- parameters in the updated settings.ini -------------
- iloadGaugeom= 1
- nthreads= 6
- ompstacksize= 2267867272
- gaupath= "/mnt/d/Gaussian16_Linux/g16/g16"
- cubegenpath= "/mnt/d/Gaussian16_Linux/g16/cubegen"
- formchkpath= "/mnt/d/Gaussian16_Linux/g16/formchk"
- orca_2mklpath= "/mnt/d/ORCA_Linux/orca-5.0.4/orca_2mkl"
- isilent= 1
- ------------------------------------------------------------------
- 2023-03-26 13:19:59:
- => Local version of Multiwfn: 3.8(dev) 2023-Mar-26
- => Latest online version of Multiwfn: 3.8(dev) 2023-Mar-26
- => The local version of Multiwfn is already up-to-date!
复制代码
脚本下载地址:
AutoUpdate4Multiwfn.sh
(5.9 KB, 下载次数 Times of downloads: 29)
|
评分 Rate
-
查看全部评分 View all ratings
|