Visualization of Molecular Orbitals
using MOLDEN


MOLDEN can be used to visualize molecular orbitals in two ways:
1) Reading in all required information from the Gaussian output file

2) Reading in a cube file containing information for only one orbital
The values for a given molecular orbital at regularly spaced points in space can be computed in all three dimensions producing a grid of density values. This grid can be computed in an automated manner with the cube keyword. Together with sensible defaults concerning the grid size and origin this provides a convenient way of producing plots for single molecular orbitals. Please observe that cube files can become quite large.

More recent versions of Gaussian do not fully support the cube keyword anymore. It is then advisable to generate the cubes separately from the formatted checkpoint file using the cubegen utility program. How this can be combined with generation of the formatted checkpoint file is shown below for the example of the allyl cation at the HF/6-31G(d) level using the full PBS job script:

#!/bin/csh
#PBS -l mem=128mb
#PBS -q long
setenv g03root /usr/local
setenv GAUSS_SCRDIR /scratch
setenv GAUSS_EXEDIR /usr/local/g03b3
setenv GAUSS_ARCHDIR /usr/local/g03b3
setenv LD_LIBRARY_PATH "${GAUSS_EXEDIR}:/usr/lib"
cat >$GAUSS_SCRDIR/$PBS_JOBNAME << EOF
%chk=/scratch/allyl.chk
%mem=6000000
#P HF/6-31G(d) scf=(tight) formcheck

HF/6-31G(d) HOMO allyl cation + generation of cube-file

+1 1
H,0,0.,0.,-1.5682867937
C,0,0.,0.,-0.4948409695
C,0,1.1776939788,0.,0.2112484936
C,0,-1.1776939788,0.,0.2112484936
H,0,2.1316522244,0.,-0.2859258635
H,0,1.1894473911,0.,1.2871012074
H,0,-2.1316522244,0.,-0.2859258635
H,0,-1.1894473911,0.,1.2871012074

EOF
touch $PBS_O_WORKDIR/$PBS_JOBNAME.$HOST
/usr/local/g03b3/g03 < $GAUSS_SCRDIR/$PBS_JOBNAME > $GAUSS_SCRDIR/$PBS_JOBNAME.log
mv $GAUSS_SCRDIR/$PBS_JOBNAME.log $PBS_O_WORKDIR/$PBS_JOBNAME.log
mv $GAUSS_SCRDIR/$PBS_JOBNAME.chk $PBS_O_WORKDIR/$PBS_JOBNAME.chk
rm -f $GAUSS_SCRDIR/$PBS_JOBNAME
mv Test.FChk  $PBS_O_WORKDIR/$PBS_JOBNAME.fch
$GAUSS_EXEDIR/cubegen 0 MO=11 $PBS_O_WORKDIR/$PBS_JOBNAME.fch $PBS_O_WORKDIR/$PBS_JOBNAME.cub 0 h
exit
What the additional lines after execution of Gaussian do is move the Gaussian output files from /scratch to the users working directory, move the formatted checkpoint file named "Test.FChk" to a more meaningful name (here: allyl.fch), and then call cubegen to generate the cube file for molecular orbital 11. This latter program accepts six arguments on the command line. The first argument (here: 0) defines the memory allocated to the run. Using the argument of 0 specifies automatic memory allocation. The second argument defines the type of cube plot desired in this run. The particular argument here (MO=11) defines the molecular orbital 11, other numbers indicating other orbitals. The third argument defines the name of the formatted checkpoint file, the fourth argument the name of the cube file, the fifth argument the number of points per side of the cube. Using the argument of 0 at this point again leads to automatic selection of sensible defaults. Finally, the last argument indicates, whether a header (h) is to be included in the cube file. If this is not desired, the last argument must be n.
The above job script assumes that the name of the script itself is "allyl". For other names to work, the name of the checkpoint file must be altered.

last changes: 12.01.2005, HZ
questions & comments to: zipse@cup.uni-muenchen.de