This section gives directives for Hartree-Fock and Kohn-Sham calculations.
Kohn-Sham calculations are activated by invoking the keyword
*.DFT* under ***HAMILTONIAN*.

Open-shell calculations correspond to either
average-of-configurations (*.AOC*) or fractional
occupation (*.FOCC*).
The former is the default for
Hartree-Fock calculations, whereas the latter is default for
Kohn-Sham calculations. Note that average-of-configurations
Kohn-Sham calculations are not well defined.

For each fermion irrep give the number of closed shell electrons.

The specification of the closed shell electrons is simple. For
symmetry groups *without* inversion symmetry, there is only one
fermion irrep, and you need only to specify the number of
electrons.

For symmetry groups *with* inversion symmetry, you need to specify
the distribution of the electrons in the two fermion irreps [Saue2000].

Specification of open shell(s).

For each open shell give the number of electrons and the number of active spinors.

*Short example:*

```
.OPEN SHELL
1
5/0,6
```

1 open shell with 5 electrons in 6 spinors (= 3 Kramers pairs) in irrep 2. Thus, the fractional occupation is 5/6.

The open shell module in DIRAC is based on average-of-configurations [Thyssen1998] . The simplest case is one electron in two spinors (= one Kramers pair). For this special case the average-of-configuration calculation gives the same result as the usual restricted open-shell Hartree-Fock. For all other cases the calculation gives the average energy of many states.

Note that the order of closed and open shells are assumed to be as in the following scheme:

**Virtual orbitals**
Not occupied

...
**Open shell 2**
Fractionally occupied

**Open shell 1**
Fractionally occupied

**Closed shell**

Doubly occupied; that is, the lowest molecular orbitals are doubly occupied, the next ones are occupied with the electrons of open shell no. 1, etc.

Other orderings can be achieved by using *.REORDER MO’S*
and *.OVLSEL*.

To get the energies of the individual states present in the
average-of-configurations, specify *.RESOLVE* (see also
**RESOLVE*).

To get the energies of (some) of the individual states present in
the average of configurations, you can use the
*GOSCIP – COSCI module*, the *DIRRCI – Direct CI module*, or the *LUCITA*.

Occupation of boson irreps in spin-free calculation. For example, for the D2h symmetry eight numbers in subsequent line, for the C2v symmetry there four occupation numbers in line.

Occupation of MJ-splitted fermion irreps (only for the linear symmetry). Next line contains sequence of occupation numbers, see the SCF output for how many.

Average-of-configuration calculation (default for open-shell Hartree-Fock).

Fractional occupation (default for open-shell Kohn-Sham) CLARIFY

*.FOCC* calculations are less memory-intensive than
*.AOC* calculations. In the latter case one additional
AO-Fock matrix is generated for each open shell.

*.FOCC* calculations are therefore an interesting option
for generating start orbitals for MCSCF as well as initial
convergence in open-shell Hartree-Fock.

Program is allowed to change occupation during SCF cycles. This is
deactivated by default. However, the program will still try to do
an automatic initial occupation if neither
*.CLOSED SHELL* nor *.OPEN SHELL* is given.

An SCF-calculation (HF or DFT) may be initiated in four different ways:

- Using
**MO coefficients**from a previous calculation. - Using coefficients obtained by diagonalization of the
one-electron Fock matrix: the
**bare nucleus approach**. - Using the
**two-electron Fock matrix**from a previous calculation; this may be thought of as starting from a converged SCF potential. - Using an
**atomic start**based on densities from atomic SCF runs for the individual centers, see e.g. [vanLenthe2006] .

The default is to start from MO coefficients if the file DFCOEF is present. Otherwise the corrected bare nucleus approach is followed. In all cases linear dependencies are removed in the zeroth iteration.

Switch off the bare nucleus correction. This correction is on per default and improves the screening of the nuclei by estimating two-electron repulsion via nuclear-attraction type integrals:

\[\langle X_{A} \vert \sum_{C} \frac{-Z_{C} \cdot \sum_j a_j e^{(-\alpha^C_j r_{C}^{2})}}{r_{C}} \vert X_{B} \rangle, \ \ \ X = L,S\]

The coefficients *a*_{*j*} and the exponents \(\alpha^{C_j}\)
in this expression are chosen according to Slater’s rules to obtain
an approximate atomic electronic density for the initial guess. For
example, with one heavy element and without this correction (that
is, with the bare nucleus Hamiltonian) all electrons will end up on
that heavy element in the initial guess!

Start SCF-iterations from the vector file.

Start SCF-iterations from the two-electron Fock matrix from previous calculation (stored on file DFFCK2).

Start first SCF iteration with a molecular density matrix constructed from atomic densities.
The keyword `ATOMST` is followed by input for each atomic type. The details, orbital occupation strings (see
*Specification of orbital strings* for the syntax) and occupation, ususally correspond to those of the atomic runs,
but the user may modify this at will.
The syntax is explained in the parenthesis “” for each atomic type but we highly recommend to carefully check the tutorial
example *Atomic start guess*:

```
.ATOMST
"SCF coefficients file name (6 characters)" "integer specifying # of occupation patterns, here: 2"
orbital occupation string #1 for type 1
occupation (real*8 value in the range of 0.0d0 - 1.0d0)
orbital occupation string #2 for type 1
occupation (real*8 value in the range of 0.0d0 - 1.0d0)
"SCF coefficients file name (6 characters)" "integer specifying # of occupation patterns, here: 1"
orbital occupation string #1 for type 2
occupation (real*8 value in the range of 0.0d0 - 1.0d0)
...
```

Three different criteria for convergence may be chosen:

- The norm of the DIIS error vector
\(\mathbf{e} = [\mathbf{F}, \mathbf{D}]\) (in MO basis). This
corresponds to the norm of the electronic gradient and is the
recommended convergence criterion. When you are only interested in
the energy
*.EVCCNV*= 1.0D-5 is usually sufficient. For properties and correlated methods you should converge to*.EVCCNV*= 1.0D-9. Large negative energy eigenvalues lead to a loss of precision that might lead to convergence problems. Remember also that a too loose screening threshold (too many integrals neglected) will hinder convergence. You should modify*.SCREEN*under**TWOINT*if you modify*.EVCCNV*or one of the other two convergence criteria. - The difference in total energy between two consecutive iterations.
- The largest absolute difference in the total Fock matrix between two consecutive iterations.

The change in total energy is approximately the square of the largest element in the error vector or the largest change in the Fock matrix. The default is convergence on electronic gradient with 1.0D-6 as threshold. Alternatively, the iterations will stop at the maximum number of iterations.

Sometimes it may happen that the specified convergence criterion is
too tight for the given basis set and/or other input parameters. In
this case one needs to decide whether one should proceed with
post-HF steps (like correlation calculations) or not. The program
decides this by looking at a secondary convergence criterion that
gives the *allowed* convergence. This value is by default the same
as first or *desired* convergence criterion but can be made lower
to make sure that a calculation does not abort when the convergence
is slightly above threshold.

For more detailed help see SCF help on convergence troubleshooting and related pages.

Maximum number of SCF iterations.

*Default:*

```
.MAXITR
50
```

When restarting SCF itrations from previous molecular orbitals file
(DFCMO or formatted DFPCMO), we recommend to decrease maximum
number of iterations together with readjusting desired and allowed
convergence thresholds. By properly set desired and allowed
thresholds one can have exact number of iterations specified by
*.MAXITR*.

Converge on error vector (electronic gradient).

*2 (real) Arguments:*

```
.EVCCNV
desired threshold allowed threshold
```

Threshold for convergence on total energy.

*2 (real) Arguments:*

```
.ERGCNV
desired threshold allowed threshold
```

Converge on largest absolute change in Fock matrix.

*2 (real) Arguments:*

```
.FCKCNV
desired threshold allowed threshold
```

Note that the *allowed* threshold may be omitted. It is then made
equal to the *desired* threshold.

It is imperative to keep the number of SCF iterations at a minimum. This may be achieved by convergence acceleration schemes:

**Damping:**The simplest scheme is damping of the Fock matrix that may remove oscillations. In \(n + 1\) iteration the Fock matrix to be diagonalized is: \(\mathbf{F}\' = (1-c) \mathbf{F}_{n+1} + c \mathbf{F}_n\), where \(c\) is the damping factor.**DIIS:**Direct inversion of iterative subspaces, Refs. [Pulay1980] , [Pulay1982] , [Hamilton1986], may be thought of as generalized damping involving Fock matrices from many iterations. Damping factors are obtained by solving a simple matrix equation involving the B-matrix constructed from error vectors (approximate gradients). Linear dependent columns in the B-matrix is removed.

In DIRAC DIIS takes precedence over damping.

Change the default convergence threshold for initiation of DIIS, based on largest element of error vector.

*Default:*

```
.DIISTH
a very large number
```

Activate DIIS in orthogonal basis (MO) with the error vector as described above.

Activate DALTON-like DIIS using AO-basis. The error vector is

\[{\mathbf{e}}={\mathbf{f}}-{\mathbf{f}}^{\dagger}\]

where the term \(\mathbf{f}\) is given by

\[\mathbf{f}=\mathbf{C}^{\dagger}\cdot\mathbf{S}_{AO}\cdot \left[ \mathbf{D}^{C}_{AO}\cdot\mathbf{F}^{D}_{AO}+\sum_{O\in\mathcal{O}}f_{O}\cdot\mathbf{D}^{O}_{{AO}}\cdot ( \mathbf{F}^{D}_{{AO}}+(a_{O}-1)\mathbf{Q}^{V,O}_{{AO}} ) \right] \mathbf{C}\]

Do not perform DIIS. The default is to activate
*.DIISMO* for closed-shell calculations, and to
activate *.DIISAO* for average-of-configurations
calculations.

Do not perform damping of the Fock matrix. Damping is activated by default, but DIIS takes precedence. In case all columns in the B-matrix is removed by linear dependency, damping is activated.

Activate level shift (for virtual orbitals). Followed by a real argument (level shift).

Activate level shift (for open-shell orbitals). Followed by a real argument (level shift), one line for each open shell {Please give example}.

Convergence can be improved by selection of vectors based on overlap with vectors from a previous iteration. This method may also be used for convergence to some excited state.

If dynamic overlap selection is used, the vector set from the previous iteration is used as the criterion. For the first iteration either restart vectors or vectors generated by the bare nucleus approach (not*recommended) are used.*

If *.NODYNSEL* is given, either the restart vectors
or the bare nucleus vectors are used, i.e. the overlap selection
vectors are *not* updated in each iteration. Please note, that
overlap selection based on vectors from the bare nucleus approach
is not recommended.

Overlap selection is very useful together with
*.REORDER MO’S*.
This will reshuffle the vectors within the restart coefficients.

Example: First one might do a open shell calculation on Boron, this
would give the *P*_{1 / 2} state. But if we restart on the
*P*_{1 / 2} coefficients, interchange the
*p*_{1 / 2} with the *p*_{3 / 2} orbitals, and
request overlap selection, we can converge to the
*P*_{3 / 2} state.

There also exists a keyword for reordering the converged SCF
orbitals. This is useful for reordering the orbitals for the
4-index transformation and subsequent correlation calculations
(CCSD, CI etc.) (see *.POST DHF REORDER MO’S*).

Activate dynamic overlap selection. The default is no overlap selection.

No dynamic update of overlap selection vectors. The default is dynamic update.

The total run time may be reduced significantly by reducing the number of integrals to be processed in each iteration:

**Screening on integrals:**Thresholds may be set to eliminate integrals below the threshold value, see [Saue1997]. . The threshold for LL integrals is set in the basis file, but this threshold may be adjusted for SL and SS integrals by threshold factors set in the***INTEGRALS*section.**Screening on density:**In direct mode further reductions are obtained by screening on the density matrix as well, see Ref. [Saue1997]. This becomes even more effective if one employs*differential densities*, that is \(\Delta \mathbf{D} = \mathbf{D}_{n+1} - \alpha \cdot \mathbf{D}_n\). The default value for \(alpha\) is \(\alpha=\frac{ \mathbf{D}_{n+1} \cdot \mathbf{D}_n }{ \mathbf{D}_{n} \cdot \mathbf{D}_n }\) which corresponds to a Gram-Schmidt orthogonalization. As SCF converges, \(alpha\) goes towards 1, but \(alpha\) can also explicitly be set equal to 1 with*.FIXDIF*.**Neglect of integrals:**The number of integrals to be processed may be reduced even further by adding SL and SS integrals only at an advanced stage in the SCF-iterations, as determined either by the number of iterations or by energy convergence. The latter takes precedence over the former.

Do not perform SCF-iterations with differential density matrix.

*Default:* Use differential density matrix in direct SCF.

Set \(alpha\) equal to 1.

Set threshold for convergence before adding SL and SS integrals to SCF-iterations.

*2 (real) Arguments:*

```
.CNVINT
CNVINT(1) CNVINT(2)
```

Set the number of iterations before adding SL and SS integrals to SCF-iterations.

*Default:*

```
.ITRINT
1 1
```

Specify what two-electron integrals to include (see
*.INTFLG* under ***HAMILTONIAN*).

*Default:* *.INTFLG* from ***HAMILTONIAN*.

General print level for the SCF method. For instance, value of 2 prints eignevalues during each iteration.

*Default:*

```
.PRINT
0
```

Controls the print-out of positive energy and negative energy eigenvalues (1 = on; 0 = off).

*Default:* Only the positive energy eigenvalues are printed.

```
.EIGPRI
1 0
```

In studies of electronic structure it may be of interest to
eliminate or freeze certain orbitals. This option is furthermore
useful for convergence, in particular to excited electronic states.
A simple case is the thallium atom. The ground state
^{2}*P*_{1 / 2} has the electronic configuration
[Xe]|4f^{14}5d^{10}6s^{2}6p^1_{1/2}|. The first excited state
^{2}*P*_{3 / 2} with the electronic configuration
[Xe]4f^{14}5d^{10}6s^{2}6p^1_{3/2}| can easily be accessed by
first calculating the ground state, then eliminating the
6p^1_{1/2}| from the ensuing calculation. In the final
calculation the excited state is relaxed using overlap selection.
The use of frozen orbitals is demonstrated in test/33.frozen: When
the geometry of the water molecule is optimized with the oxygen 1s
and 2s orbitals frozen, a bond angle of 96.242 degrees is found,
contrary to the 90 degrees one might have expected when s-p
hybridization is thus blocked [Kutzelnigg1984].

The elimination of orbitals is achieved by projecting the selected orbitals out of the transformation matrix to orthonormal basis. The selected orbitals can be expressed either in the full molecular basis or in the basis set of the chosen fragment. In the latter case, the same set of fragment orbitals can in the case of atomic fragments be used at different molecular geometries. One may even perform a geometry optimization, but only using the numerical gradient. When freezing orbitals the selected orbitals are first eliminated from the transformation to orthonormal basis, but then reintroduced in the backtransformation step. They will appear in the output with zero orbital eigenvalues. Note that when freezing orbitals the orbitals to be eliminated must be specified as well. The frozen orbitals must be a subset of the eliminated orbitals.

Fragments are defined with respect to the list of
symmetry-independent atoms appearing in the DIRAC basis file:
Consider the water molecule in the full *C*_{2*v*}symmetry. Then there are two fragments: the oxygen atom and the
H_{2} moiety. However, with no symmetry there will be three
fragments: the oxygen atom and the two hydrogen atoms. At the
moment there are no orthonormalization of fragments on different
fragments and so in practice one should only use orbitals from one
fragment.

Eliminate orbitals by projecting them out of the transformation matrix to orthonormal basis.

*Arguments:* Number of fragments (NPRJREF).

Then for each fragment read name PRJFIL of the coefficient file
followed by the number of symmetry-independent nuclei in this
fragment followed by an
*Specification of orbital strings* of
selected orbitals for each fermion irrep.

```
DO J = 1,NPRJREF
READ(LUCMD,'(A6)') PRJFIL(J)
READ(LUCMD,'(I6)') NPRJNUC(J)
READ(LUCMD,'(A72)') (VCPROJ(I,J),I=1,NFSYM)
ENDDO
```

Eliminated/frozen orbitals are given in the fragment basis. Note that the list of fragments is assumed to follow the list of symmetry independent nuclei in the DIRAC basis file.

Freeze orbitals (must only be used in conjunction with
*.PROJECT*).

For each fermion irrep, give an *Specification of orbital strings* of
orbitals to freeze.