18
1
<logfile>
<state>
1
<grid>
10
1 // 1=total 2=local 3=cross
1 // 1=总 2=局部 3=交叉
11
1
# 主逻辑
[main] [主内容]
18
1
${logfile:-} # 输出文件
${state:-1}
1
${grid:-2}
# 空穴-电子分析
[cub]
10
${choice:-1} # 1=total 2=local 3=cross
${choice:-1} # 1=总 2=局部 3=交叉
11
${choice:-1}
[overlap] [重叠]
12
${func:2} # 1=Sm 2=Sr
# 跃迁密度-transdens.cub
[transdens]
13
# ...
# 可以自定义更多
# 退出
[quit] [退出]
0
0
0
q
wfn=*.fchk
[hole-ele]
state 1 状态 1
%process
cub choice 1 选择 1 的 cub
transdens
%command
mkdir -p hole-ele
mv hole.cub hole-ele/${input}_s1_hole.cub
mv electron.cub hole-ele/${input}_s1_ele.cub
end
[hole-ele]
state 2 状态 2
%process
cub
%command
mv hole.cub hole-ele/${input}_s2_hole.cub
mv electron.cub hole-ele/${input}_s2_ele.cub
end
Multiwfn_exec=D:\ChemicalPrograms\Multiwfn_3.8_dev_bin_Win64\Multiwfn.exe
confpath=D:\MyProgram\banewfn\conf
cores=4
# 纯命令行
banewfn hole.inp S1.fchk
# 交互
banewfn hole.inp
banewfn
wfn=*.fchk
[hole-ele]
state 1 状态 1
%process
cub
%command
move hole.cub ${input}_s1_hole.cub
move electron.cub ${input}_s1_ele.cub
end
#!/usr/bin/env banewfn
wfn=*.fchk
[hole-ele]
state 1 状态 1
%process
cub
%command
mv hole.cub ${input}_s1_hole.cub
mv electron.cub ${input}_s1_ele.cub
end
ring=1,3,5
%command
@echo off
echo \#p b3lyp/6-31+G* NMR > template.gjf
echo. >> template.gjf
echo template file >> template.gjf
echo 模板文件 >> template.gjf
echo. >> template.gjf
echo 0 1 >> template.gjf
echo [geometry] >> template.gjf
echo. >> template.gjf
echo. >> template.gjf
end
[aromatic] [芳香族]
%process
gen2dinp ring ${ring}
end
%command
@echo off
if exist template.gjf del template.gjf
如果存在 template.gjf,则删除 template.gjf
setlocal enabledelayedexpansion
for /f "tokens=6,7,8 delims= " %%a in ('findstr /C:"The unit normal vector is " aromatic_${input}.out') do (
for /f "tokens=6,7,8 delims= " a in ('findstr /C:"单位法向量是 " aromatic_${input}.out') do (
set "X=%%a" set "X=a"
set "Y=%%b" set "Y=b"
set "Z=%%c" set "Z=c"
)
set vector=!X!,!Y!,!Z!
echo [aromatic] > nics2.bw
echo %%process >> nics2.bw
echo process >> nics2.bw
echo nics2d ring ${ring} vector !vector! >> nics2.bw
echo wait >> nics2.bw
end

wal 发表于 2025-11-2 11:51
再贴几个例子(11.4更新后这些example已包含在主楼压缩包内) 各位如果用上了欢迎贴出来自己的小脚本呀,虽然 ...
乐平 发表于 2025-11-6 21:13
钟成老师的脚本在 5 年前已经有类似的功能了
http://bbs.keinsci.com/thread-18150-1-1.html
这里只是贴个无依赖的懒狗模式
| 欢迎光临 计算化学公社 (http://bbs.keinsci.com/) | Powered by Discuz! X3.3 |