Frozen orbitals¶
DIRAC allows the freezing (or elimination) of orbitals during Hartree-Fock or Kohn-Sham calculations. We shall illustrate this functionality using bonding in the water molecule as an example and essentially reproducing a calculation reported by Jarvie and co-workers in 1973 [Jarvie1973].
The water molecule has a bond angle of 104.5
Jarvie and co-workers therefore proposed to freeze the oxygen
Atomic calculation¶
First we need an oxygen
**DIRAC
.TITLE
Oxygen atom
.WAVE F
.ANALYZE
**WAVE FUNCTIONS
.SCF
*SCF
.CLOSED SHELL
4
.OPEN SHELL
1
4/6
**ANALYZE
.MULPOP
*END OF
and O.mol
INTGRL
Water
C 1 2 X Y
8. 1
O 0.0D0 0.0D0 0.0D0
LARGE BASIS cc-pVDZ
FINISH
Our plan now is to import this orbital into a subsequent molecular calculation. There is, however, one important restriction: The atomic calculation has to be carried out in the same symmetry as the molecular one, which in this case will be
pam --inp=O --mol=O --get "DFCOEF=cf.O"
Geometry optimization with frozen orbitals: how it works¶
For the molecular calculation we use the input files H2O.inp
**DIRAC
.TITLE
Water molecule.
.OPTIMI
*OPTIMI
.NUMGRA
**WAVE FUNCTIONS
.SCF
*SCF
.CLOSED SHELL
10
.OWNBAS
.PROJEC
1
DFOXXX
1
2
.FROZEN
2
*END OF
and H2O.mol
INTGRL
Water
C 2 2 X Y
8. 1
O .0000000000 0.0000000000 -.2249058930
LARGE BASIS cc-pVDZ
1. 1
H 1.4523499293 .0000000000 .8996235720
LARGE BASIS cc-pVDZ
FINISH
The latter file specifies the experimental geometry of water with bond angle 104.5
Now let us look at the specification of the frozen orbital: We have to tell DIRAC that the orbital was not calculated in
the full molecular basis, rather using only the basis of the oxygen atom. This information is indicated by the keyword
.OWNBAS. Next, we have to tell where to find the orbital. This is specified using the keyword .PROJECT
and its arguments. The oxygen
For each fragment we now have to specify the name of the fragment file. As seen in the FORTRAN snippet in the manual under the .PROJECT keyword, the fragment file should be given a six-character name, so we in this case choose DFOXXX. When the fragment has been calculated in its own basis, as specified by the .OWNBAS keyword, we specify it by indicating the number of symmetry-independent nuclei it contains. Let us see how this works: Going back to the molecular input file H2O.mol file we see that it gives the coordinate of one oxygen atom and one hydrogen atom. We do not need to specify the coordinates of the second hydrogen atom because it is then known from symmetry. The two hydrogen atoms are symmetry-dependent and have to be treated together as a fragment. We have, however, selected the oxygen atom as our fragment and specify that our fragment consists of a singe symmetry-independent center. Oxygen will be chosen since it comes first in the molecular input file.
We now have to specify what orbital(s) to select on the fragment file. This is done through an orbital string (see the section
Specification of orbital strings). The oxygen atom has five occupied orbitals and the
Now we have to understand the .FROZEN keyword. This will take a little bit more theory: At each iteration in the SCF-cycle we have to solve the generalized eigenvalue equation
where
where
Since the matrix
This is a normal eigenvalue problem and it suffices now to give the transformed Fock matrix
This diagonalization procedure is repeated in each iteration of the SCF-cycle and provides the optimization of the molecular orbitals.
The freezing of orbitals is done in the following manner: The imported fragment orbitals are projected out of the
transformation matrix
In the present case we do not want to delete the oxygen
Geometry optimization of the water molecule with a frozen oxygen 2s orbital¶
We run the geometry optmization with the command:
pam --inp=H2O --mol=H2O --put "cf.O=DFOXXX"
After optimization we find that the bond distance is 0.972 Å and the bond angle 95.9