next up previous contents
Next: 3.2 SCF Up: 3. Tutorials Previous: 3. Tutorials

Subsections



3.1 SEWARD -- An Integral Generation Program

\begin{wrapfigure}{l}{25mm}
\begin{center}
\leavevmode
\flowchart{seward}\end{center}\end{wrapfigure}

An ab initio calculation always requires integrals. In the MOLCAS suite of programs, this function is supplied by the SEWARD module. SEWARD computes the one and two electron integrals for the molecule and basis set specified in the SEWARD section of the input. SEWARD can also be used to perform some property expectation calculations on the isolated molecule or on the molecule in a spherical-well potential or in an electric field.

We commence our tutorial by calculating the integrals for a water molecule. The input is given in Figure 3.1. Each MOLCAS module identifies input from a file by the namelist stating the name of the module. In the case of SEWARD, the namelist is
&SEWARD &END
and is the first statement in the file shown in Figure 3.1. More than one module's input may be placed in one file in this fashion.

The first keyword used is TITLe. The lines following the keyword up to, but not including, the next keyword are printed in the SEWARD section of the calculation output and can be as verbose as required (up to ten lines). Further, the first title line is saved in the integral file and appears in any subsequent programs that use the integrals calculated by SEWARD. By convention we shall indent all none keyword entries.

The SYMMetry keyword is followed by the generators for the C$_{2v}$ point group. The specification of the C$_{2v}$ point group given in Table 3.1 is not unique, however, in this tutorial, the generators have been input in the order to reproduce the ordering of character tables. A complete list of symmetry generator input syntax is given in Table 3.1. The symmetry groups available are listed with the symmetry generators defining the group. The MOLCAS keywords required to specify the symmetry groups are also listed. The last column contains the symmetry elements generated by the symmetry generators.

Figure 3.1. Sample input requesting the SEWARD module to calculate the integrals for water in C$_{2v}$ symmetry.

 &SEWARD &END
Title
 Water - A Tutorial
 The integrals of water are calculated using C2v symmetry
Symmetry
 XY Y
*Test

Basis Set
O.ano-s.Pierloot.10s6p3d.2s1p0d.
*O.ano-s.Pierloot.10s6p3d.3s2p1d.
*O.ano-s.Pierloot.10s6p3d.4s3p2d.
 O1 0.0 0.0 0.0 
End of Basis Set

Basis Set
H.ano-s.Pierloot.7s3p.1s0p.
*H.ano-s.Pierloot.7s3p.2s1p.
*H.ano-s.Pierloot.7s3p.3s2p.
 H1 1.4 0.0 1.4 
End of Basis Set

End of Input


Table: Symmetries available in 5.0 including generators, MOLCAS keywords and symmetry elements.
Group Generators MOLCAS Elements
  $g_1$ $g_2$ $g_3$ $g_1$ $g_2$ $g_3$ $E$ $g_1$ $g_2$ $g_1g_2$ $g_3$ $g_1g_3$ $g_2g_3$ $g_1g_2g_3$
$C_1$             $E$              
$C_2$ $C_2$     xy     $E$ $C_2$            
$C_s$ $\sigma$     x     $E$ $\sigma$            
$C_i$ $i$     xyz     $E$ $i$            
$C_{2v}$ $C_2$ $\sigma_v$   xy y   $E$ $C_2$ $\sigma_v$ $\sigma_v'$        
$C_{2h}$ $C_2$ $i$   xy xyz   $E$ $C_2$ $i$ $\sigma_h$        
$D_2$ $C_2^z$ $C_2^y$   xy xz   $E$ $C_2^z$ $C_2^y$ $C_2^x$        
$D_{2h}$ $C_2^z$ $C_2^y$ $i$ xy xz xyz $E$ $C_2^z$ $C_2^y$ $C_2^x$ $i$ $\sigma^{xy}$ $\sigma^{xz}$ $\sigma^{yz}$

For the purposes of the SEWARD modules input, the generator $E$ is assumed. The twofold rotation about the z-axis, C$_{2}$($z$), and the reflection in the xz-plane, $\sigma_v$($xz$), are input as XY and Y respectively. The MOLCAS input can be viewed as symmetry operators that operate on the cartesian elements specified. For example, the reflection in the xz-plane is specified by the input keyword Y which is the cartesian element operated upon by the reflection.

The input used in Figure 3.1 produces the character table in the SEWARD section of the output shown in Figure 3.1. Note that $\sigma_v$($yz$) was produced from the other two generators. The last column contains the basis functions of each irreducible symmetry representation. The totally symmetric $a_1$ irreducible representation has the $z$ basis function listed which is unchanged by any of the symmetry operations.

Figure 3.1. Character Table for C$_{2v}$ from MOLCAS output.

                             E   C2(z) s(xz) s(yz)
                    a1       1     1     1     1  z
                    b1       1    -1     1    -1  x, xz, Ry
                    a2       1     1    -1    -1  xy, Rz, I
                    b2       1    -1    -1     1  y, yz, Rx

We use the TEST keyword to tell SEWARD to just read the input so we can check it for mistakes. This is commented out by placing a `*' in the first column.

The molecule is defined using the cartesian coordinates of each atom and the basis set for each center. The oxygen basis set we have chosen is the small Atomic Natural Orbitals (ANO) basis. There are three contractions of the basis included in the file (and commented out according to the desired calculation) which can be considered the minimal, double zeta with polarization and lastly triple zeta with polarization. The oxygen is labeled `O1' and the cartesian coordinates follow on the same line. The units are, by default, bohr but adding `$\backslash$angstrom' to the end of the line changes the units to Ångström. Both the basis set and atom coordinates are couched in a BASIs Set ... END of Basis Set keyword grouping.

The same procedure is followed for the hydrogen but as we have symmetry defined we need only define one hydrogen atom in the $xz$-plane and the other is generated by the symmetry generators as can be seen from a sample output in Figure 3.1. The second atomic center labeled `H1' is the generated center.

Figure 3.1. Atomic centers generated by C$_{2v}$ symmetry generators.

     Center  Label                x              y              z      
        1      O1              .000000        .000000        .000000  
        2      H1             1.400000        .000000       1.400000 
        3      H1            -1.400000        .000000       1.400000

3.1.0.1 Running SEWARD

We pause to talk about running the input file created to calculate the integrals for a water molecule.

Firstly, we require a shell script to simplify the use of temporary directories and linking of important files. Our example is written in Korn shell as indicated by the first line in Figure 3.1. The internal MOLCAS scripts are written in Korn shell so it is often simpler to use the same scripting for user scripts but an other should work equally well.

Figure 3.1. Shell script, seward.cmd, for running SEWARD.

#!/bin/ksh
#
# set up some variables
#
set -v
export Project=water
export WorkDir=/temp2/$LOGNAME/$Project
export InputDir=$PWD
export MOLCAS=/a/molcas.4
mkdir $WorkDir
trap 'exit' ERR
cd $WorkDir
#
ln -sf $MOLCAS/bin/BASLIB BASLIB
ln -sf $MOLCAS/shell/molcas.shell molcas
#
molcas run seward    $InputDir/seward.input
#
cd $InputDir
rm -r $WorkDir
#
exit

After setting verbose mode (set -v), we define some shell variables using the export command. The first variable, $Project, is used by MOLCAS to name various temporary files. The second, $WorkDir, is the temporary directory for the integral files. This is usually on a large disk, which is often different from the current disk. Using a separate directory also makes cleaning up after the calculation easier. In this case the working directory is named using the login name of the user, $LOGNAME and the $Project variable. The variable $MOLCAS needs to be defined for the internal working of MOLCAS. It may be defined in a login executed script (.profile) or in each command file. We define the input directory and create the working directory. Before moving to the working directory we have a shell command which halts the shell script if there is an error. This is useful later when we wish to run a sequence of programs each of which rely on the previous calculation. It can, however, cause problems by leaving files in the working directory which may need to be removed before the next calculation which is performed at the end of the script file by the rm -r command and will not be executed when an error aborts the script.

The links (using the command ln -sf is force a symbolic link) to the basis set file (BASLIB) and the master MOLCAS shell script (molcas.shell) are required to provide access to them from the working directory. If the MOLCAS program is properly installed none of them are necessary though. The SEWARD module is run using the molcas run command. After the calculation we return to the input directory and remove the temporary work directory.

This script can be run on a UNIX machine using the nohup command nohup seward.cmd at the UNIX prompt where seward.cmd is the shell script file displayed in Figure 3.1. Note that the script needs to be user executable (use chmod u+x seward.cmd). The output is usually stored in nohup.out. There exist more sophisticated methods of running the script but nohup is almost universal.

An alternative to the use of one script for each calculation is to use the AUTOMOLCAS utility (see section 3.23).

3.1.0.2 SEWARD Output

The SEWARD output contains the symmetry character table, basis set information and input atomic centres as well as the atomic centres generated by the symmetry generators. The basis set information lists the exponents and contraction coefficients as well as the type of gaussian functions (cartesian, spherical or contaminated) used.

The inter-nuclear distances and valence bond angles (including dihedral angles) are displayed after the basis set information. There is a keyword, RTRN, which is used to increase the threshold for printing of bond lengths, bond angles and dihedral angles from the default of 3.5 au. Inertia and rigid-rotor analysis is also included in the output along with the timing information.

A section of the output that is useful for determining the input to the MOLCAS module SCF is the symmetry adapted basis functions which appears near the end of the SEWARD portion of the output. This is covered in more detail in the SCF tutorial.

The integrals produced by the SEWARD module are stored in two files in the working directory. They are ascribed the FORTRAN names ONEINT and ORDINT which are automatically symbolically linked by the MOLCAS script to the file names $Project.OneInt and $Project.OrdInt, respectively or more specifically, in our case, water.OneInt and water.OrdInt, respectively. The default name for each symbolical name is contained in the corresponding program files of the directory $MOLCAS/shell. The ONEINT file contains the one-electron integrals and auxiliary information such as geometry and basis set information and the nuclear potential energy. The ORDINT contains the ordered and packed two-electron integrals. Both files are used by later MOLCAS program modules.

Another file produced by the SEWARD module is the COMFILE which in our case is linked to water.ComFile. This is the general MOLCAS communications file for transferring data between the various MOLCAS program modules. Many of the program modules add data to the COMFILE which can be used in still other modules.


next up previous contents
Next: 3.2 SCF Up: 3. Tutorials Previous: 3. Tutorials
(C) Lund University, 2000

Back to Molcas home