计算化学公社

标题: 求助关于使用Gaussian16结合sobMECP进行极小能量交叉点搜索的问题 [打印本页]

作者
Author:
R.F.    时间: 2024-9-13 00:11
标题: 求助关于使用Gaussian16结合sobMECP进行极小能量交叉点搜索的问题
各位老师们,我想请教关于使用Gaussian16结合sobMECP进行极小能量交叉点搜索出现的问题,sobMECP脚本在Gaussian16下运行(搜索前已经按照博文http://sobereva.com/286对程序相关细节进行了改写),问题可能出在extract_gradient,没有提取到正确的数据,以下是改过的的源代码,程序依旧无法正确运行,请问是否有不妥之处
#!/bin/bash

natom=numatom

if ls | grep -q 'ProgFile'; then
    echo 'ProgFile Exists - OK'
else
    echo 'ProgFile missing'
    exit 1
fi

if ls | grep -q 'Job0_A.gjf'; then
    echo 'First Input OK'
else
    echo 'First Input Missing'
    exit 1
fi

if ! ls | grep -q 'JOBS'; then
    mkdir JOBS
fi

# 如果需要保留 ReportFile 的旧内容,取消以下注释
# if [ -f "ReportFile" ]; then
#     cat ReportFile >> reportfile_old
# fi

# 如果需要创建 ReportFile 并添加日期,取消以下注释
# date > ReportFile

rm -f traj.xyz

num=0
while [ $num -lt 100 ]; do
    echo "numatom" >> traj.xyz
    echo "Step $num" >> traj.xyz
    # Remove space lines
    awk 'NF' geom >> traj.xyz
    ./sub_script "Job$num" $natom
    mv -f "Job$num_A.gjf" "Job$num_A.log" JOBS/
    mv -f "Job$num_B.gjf" "Job$num_B.log" JOBS/

    if grep -q 'CONVERGED' ReportFile; then
        echo "MECP optimization has converged at Step $num"
        date >> ReportFile
        exit
    else
        echo "Step Number $num -- MECP not yet converged"
    fi

    if grep -q 'ERROR' ReportFile; then
        echo 'An error has occurred, possibly in the Gaussian Job'
        exit
    fi

    num=$((num + 1))
    cat Input_Header_A geom Input_Tail > "Job$num_A.gjf"
    cat Input_Header_B geom Input_Tail > "Job$num_B.gjf"
done





欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3