Example: Troubleshooting SCF convergence: Ti2O4

Download SCF_Ti2O4.run

#! /bin/sh

# One can run into SCF convergence problems when calculating certain types of
# systems. Some of the notorious examples are transition metal oxides and
# lanthanide compounds. Below, several approaches to solving the SCF convergence
# problem are demonstrated.


$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (default case)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End

SCF
 Converge 1.0e-6 1.0e-6
End

eor

rm logfile
mv TAPE21 SCF_Ti2O4_default.t21

$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (default case)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End

SCF
 AccelerationMethod MESA
 Converge 1.0e-6 1.0e-6
End

eor

rm logfile
mv TAPE21 SCF_Ti2O4_MultiLIST.t21

$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (LISTb by Alex Wang)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End

SCF
 Converge 1.0e-6 1.0e-6
 AccelerationMethod LISTb
End

eor

rm logfile
mv TAPE21 SCF_Ti2O4_LISTb.t21

$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (LISTf by Alex Wang)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End

SCF
 Converge 1.0e-6 1.0e-6
 AccelerationMethod LISTf
End

eor

rm logfile
mv TAPE21 SCF_Ti2O4_LISTf.t21

$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (fDIIS by Alex Wang)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End

SCF
 Converge 1.0e-6 1.0e-6
 AccelerationMethod fDIIS
End

eor

rm logfile
mv TAPE21 SCF_Ti2O4_fDIIS.t21


# A-DIIS method. The A-DIIS method combines the strength of the ARH and DIIS
# methods. It does not require energy evaluation so it is much cheaper than the
# ARH and Energy-DIIS methods.


$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (A-DIIS by Hu and Yang)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End

Occupations KeepOrbitals=100

SCF
 Iterations 300
 Mixing 0.05
 AccelerationMethod ADIIS
 Converge 1.0e-6 1.0e-6
End

eor

rm logfile
mv TAPE21 SCF_Ti2O4_adiis.t21


# This example uses the LISTi method. LISTi is very
# similar to the usual DIIS but typically it performs much better. It is also
# computationally less expensive and scales better in parallel even though DIIS
# is rarely a scaling bottleneck. 


$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (LISTi)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End

SCF
 Iterations 300
 AccelerationMethod LISTi
End

eor

rm logfile
mv TAPE21 SCF_Ti2O4_LISTi.t21


# This example uses the Augmented Roothaan-Hall (ARH) method. 
# The basic idea of this method is that the density matrix is
# optimized directly to minimize the total energy. Important: the ARH method can
# be used with SYMMETRY NOSYM only. 


$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (Augmented Roothaan-Hall)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End

! Important: the ARH method can be used with SYMMETRY NOSYM only
Symmetry NOSYM

SCF
 Iterations 300
 Mixing 0.05
 ARH
 End
End

eor

rm logfile
mv TAPE21 SCF_Ti2O4_ARH.t21


# This is an extension to the so-called 'electron smearing' method.
# In this method, the electrons are distributed among orbitals around Fermi-
# level using a pseudo-thermal distribution function. Although the result with
# fractional occupation number has no physical sense, the method can be used to
# achieve integer occupation numbers by reducing the smearing parameter step-
# wise. 
# A few notes:

# You can specify up to ten comma-delimited values after Smear= (no spaces are
# allowed). ADF will start from the first value and try to converge SCF using
# it. If it succeeds, the next value will be picked and so on.

# Because the whole process may require many cycles to converge it is important
# to set the number of SCF cycles to a large value to avoid a premature
# termination.


$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (Smear)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End
DEBUG DIIS SDIIS
SCF
  Iterations 300
  OLDSCF
End

Occupations Smear=0.2,0.1,0.07,0.05,0.03,0.02,0.01,0.007,0.005,0.001

eor

rm logfile
mv TAPE21 SCF_Ti2O4_smear.t21

# This example demonstrates the use of the Occupations Steep= option (see
# the User's Guide for details). 

# One difference is, obviously, in the Occupations keyword. The other difference
# is more subtle. For stable convergence, it is often essential to switch off
# DIIS and set the mixing parameter to a low value. Of course, it will make
# convergence quite (sometimes very) slow. Ultimately you should get either an
# aufbau configuration or a configuration with exactly degenerate HOMO. In this
# example, the result is an aufbau solution.

# Both methods should, in principle, give the same result, which is the case in
# this example.


$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (Steep)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End

SCF
 Iterations 300
 Mixing 0.05
 DIIS N=0
End

Occupations Steep=0.5,0.3 

eor

rm logfile
mv TAPE21 SCF_Ti2O4_steep.t21


# This example uses the so called Energy-DIIS method. Please note that similar
# to ARH and unlike the standard SCF procedure in ADF this method requires
# energy evaluation at each SCF cycle, which makes it significantly slower
# compared to energy-free SCF.


$ADFBIN/adf -n1 <<eor
Title Ti2O4 SCF aid test (Energy-DIIS)
Atoms
  Ti  1.730   0.000   0.000
  Ti -1.730   0.000   0.000
  O   0.000   1.224   0.000
  O   0.000  -1.224   0.000
  O   3.850   0.000   0.000
  O  -3.850   0.000   0.000
End
XC
 GGA Becke Perdew
End
Basis
 Type DZ
 Core Small
 CreateOutput none
End

SCF
 Iterations 300
 Mixing 0.05
 EDIIS
 Converge 1.0e-6 1.0e-6
End

eor

rm logfile
mv TAPE21 SCF_Ti2O4_ediis.t21