Thanks to Jordi, we could find a solution to this gaussian bug: (I wanted to parametrize a compound with iop(6/33=2) which has been deleted in our marc g09 version)
http://ambermd.org/bugfixesat.html
Gaussian 09 fix
In Gaussian09 rev B.01, the facility to write out the electrostatic potential on a grid of points was inadvertently deleted. This means that antechamber and resp jobs won't work as they should. Fernando Clemente of Gaussian has kindly provided a script to work around the problem. Download the fixreadinesp.sh file, and follow the instructions there. (Note: you will have to make the script executable by typing chmod +x fixreadinesp.sh.)
#!/bin/bash
######################################################################
#
# "fixreadinesp.awk" by Fernando R. Clemente (Gaussian, Inc.)
#
# Workaround for G09 rev. B.01 not printing the list of
# electrostatic potential values at the grid points in
# "Pop=ESP" jobs with "IOp(6/33=2)":
#
# 1) Run the "Pop=ESP" jobs with "IOp(6/33=2)" as you would
# normally do.
# 2) Run this script on the output of job 1) and redirect to
# a new Gaussian input file. This will extract the list of
# grid points and setup a new job in which this list is given
# explicitly in the input file. This second Gaussian job
# uses the results saved in the checkpoint file of job 1),
# so the QM calculation does not need to be redone. Example:
#
# fixreadinesp.sh output.log > readincenters.com
#
# 3) Run the new Gaussian job with the generated input file in
# step 2) in order to obtain a G09 output file that contains
# the values of the electrostatic potential at each grid point.
#
# 4) Re-run this script on the G09 output file generated by step 3)
# to fix the format so "espgen" is able to read this type of
# Gaussian output file. Example:
#
# fixreadinesp.sh readincenters.log > fixed.log
#
# This final Gaussian output file should work with "espgen".
#
######################################################################
#
# Extracts list of grid points from a G09 output file
# and sets up an Gaussian input file to re-run the job
# with the list of points given explicitly.
#
if [ "$(grep "Charges from ESP fit" ${1})" != "" ] ; then
printf "%s\n" "$(grep -i "%chk=" ${1})"
printf "#p geom=allcheck chkbas guess=(read,only) density=check\n"
printf "nosymm prop=(potential,read) pop=minimal\n\n"
grep "ESP Fit Center" ${1} | cut -c32- -
printf "\n"
else
# Fixes the output of a G09 job with
# read-in values to make "espgen" be
# able to recognize the list of centers
# and the electrostatic potential values.
awk '
{
if ($0 ~ /Electric Field/) {
while ($0 !~ /Atom/) { print $0 ; getline }
while ($0 ~ /Atom/) { print $0 ; getline }
while ($0 !~ /^ ------/) {
CENTERID=$1
OLDSTR=sprintf("%i ",CENTERID)
NEWSTR=sprintf("%i Fit",CENTERID)
sub(OLDSTR,NEWSTR,$0)
print $0
getline
}
}
sub(/Read-in Center/,"ESP Fit Center",$0)
print $0
}' ${1}
fi
######################################################################
#!/bin/bash
######################################################################
#
# "fixreadinesp.awk" by Fernando R. Clemente (Gaussian, Inc.)
#
# Workaround for G09 rev. B.01 not printing the list of
# electrostatic potential values at the grid points in
# "Pop=ESP" jobs with "IOp(6/33=2)":
#
# 1) Run the "Pop=ESP" jobs with "IOp(6/33=2)" as you would
# normally do.
# 2) Run this script on the output of job 1) and redirect to
# a new Gaussian input file. This will extract the list of
# grid points and setup a new job in which this list is given
# explicitly in the input file. This second Gaussian job
# uses the results saved in the checkpoint file of job 1),
# so the QM calculation does not need to be redone. Example:
#
# fixreadinesp.sh output.log > readincenters.com
#
# 3) Run the new Gaussian job with the generated input file in
# step 2) in order to obtain a G09 output file that contains
# the values of the electrostatic potential at each grid point.
#
# 4) Re-run this script on the G09 output file generated by step 3)
# to fix the format so "espgen" is able to read this type of
# Gaussian output file. Example:
#
# fixreadinesp.sh readincenters.log > fixed.log
#
# This final Gaussian output file should work with "espgen".
#
######################################################################
#
# Extracts list of grid points from a G09 output file
# and sets up an Gaussian input file to re-run the job
# with the list of points given explicitly.
#
if [ "$(grep "Charges from ESP fit" ${1})" != "" ] ; then
printf "%s\n" "$(grep -i "%chk=" ${1})"
printf "#p geom=allcheck chkbas guess=(read,only) density=check\n"
printf "nosymm prop=(potential,read) pop=minimal\n\n"
grep "ESP Fit Center" ${1} | cut -c32- -
printf "\n"
else
# Fixes the output of a G09 job with
# read-in values to make "espgen" be
# able to recognize the list of centers
# and the electrostatic potential values.
awk '
{
if ($0 ~ /Electric Field/) {
while ($0 !~ /Atom/) { print $0 ; getline }
while ($0 ~ /Atom/) { print $0 ; getline }
while ($0 !~ /^ ------/) {
CENTERID=$1
OLDSTR=sprintf("%i ",CENTERID)
NEWSTR=sprintf("%i Fit",CENTERID)
sub(OLDSTR,NEWSTR,$0)
print $0
getline
}
}
sub(/Read-in Center/,"ESP Fit Center",$0)
print $0
}' ${1}
fi
######################################################################