这个脚本用于将Gaussian 09的Hartree-Fock计算的.fchk文件转换到Columbus软件使用的mocoef文件。
需要说明的是,测试工作还不完善,不保证此脚本的正确性。
注意:两个软件所使用的基组以及对称性等等必须完全一致!
#! /usr/bin/perl
# code by luozhen
# ATTENTION: MAKE SURE that the SAME BASIS SET has been used in the two softwares.
# results saved in the file "mocoef"
# you MUST have the access to write in the work directory.
open (Columbus, ">mocoef") or die "Can not create file \"mocoef\"!";
# read input data
# use command as "./hfg09tocol.pl inputfile" in bash shell.
while (<>) {
push @lines, $_;
}
# check necessary info
while ($id < @lines) {
if ($lines[$id] =~ m/Number of electrons.*([0-9][0-9]+)/) {
$count_electrons = $1;
} elsif ($lines[$id] =~ m/basis functions.*([0-9][0-9]+)/) {
$count_basis_func = $1;
} elsif ($lines[$id] =~ m/independent function