Example: Spin-unrestricted Fragments: H2

Download UnrFrag_H2.run

#! /bin/sh

# This is a small but important example to illustrate what goes into an accurate
# calculation of the 'true' bond energy of a molecule. The (ADF-specific)
# problem is that in a straightforward molecular calculation, the bond energy is
# computed as the energy difference between at the one hand the molecule, and at
# the other hand the isolated spherically symmetric spin-restricted atoms.
# This spherically symmetric spin-restricted reference (comparison) state is usually
# not the physical ground state of the reference system (isolated atoms) and
# hence the computed energy difference has no direct relation to experimental
# data. To account for the true atomic ground states, one has to add correction
# terms. Study this sample carefully to make sure that you fully understand the
# steps to take and consult the User's Guide for details. See also the this
# document for a discussion of multiplet states.

# See also the example, SD_Cr(NH3)6.

# The H2 case consists of a sequence of simple calculations to demonstrate the
# Unrestricted Fragments options.
# In the first part real spin-unrestricted fragments are used.
# In the second part simulate spin-unrestricted fragments are used.

# Unrestricted fragments
# ======================

# If one uses unrestricted fragments one needs to calculate the unrestricted
# H atom twice, one in which the 1s alpha orbital is occupied, and one in which
# the 1s beta orbital is occupied.

$ADFBIN/adf <<eor
  EPRINT
    SFO eig ovl
  END
  Atoms
    H  0.0 0.0 0.0
  End
  Basis
    Type DZP
    CreateOutput None
  End
  Unrestricted
  Charge 0 1
eor
mv TAPE21 H_A.t21
rm logfile

$ADFBIN/adf <<eor
  EPRINT
    SFO eig ovl
  END
  Atoms
    H  0.0 0.0 0.0
  End
  Basis
    Type DZP
    CreateOutput None
  End
  Unrestricted
  Charge 0 -1
eor
mv TAPE21 H_B.t21
rm logfile

$ADFBIN/adf <<eor
  title   H2 from unrestricted fragments
  EPRINT
    SFO eig ovl
  END
  ATOMS
    H   0   0   0.375  f=H_A
    H   0   0  -0.375  f=H_B
  end
  fragments
    H_A  H_A.t21
    H_B  H_B.t21
  end
  UnrestrictedFragments
  Unrestricted
  charge  0 0
eor
rm TAPE21 logfile

# In the unrestricted fragment different numbers of spin-alpha and spin-beta electrons usually
# result in different spatial orbitals and different energy eigenvalues for
# spin-alpha and spin-beta when you go to self-consistency.
# For H2 calculated from real unrestricted fragments this will mean that the SFO analysis of
# the H2 molecular orbitals looks a bit unsymmetric.
# However, if one simulates the unrestricted fragments with the key FRAGOCCUPATIONS
# the SFO analysis for H2 will be symmetric.


# Simulated unrestricted fragments with the key FRAGOCCUPATIONS
# =============================================================

# In this approach spin-restricted fragments are used, in which
# one has the same spatial orbitals and energy eigenvalues for
# spin-alpha and spin-beta.
# The energy difference between an unrestricted
# fragment as it is used with the key FRAGOCCUPATIONS and a self-consistent
# unrestricted fragment is computed. This turns out to be quite small,
# confirming that this approach with simulated unrestricted fragments,
# although not formally exact, is also adequate for practical purposes.

$ADFBIN/adf -n1 <<eor
  create H    file=$ADFRESOURCES/DZP/H
eor
mv TAPE21 t21H

$ADFBIN/adf <<eor
  title H unrestr., not self-consistent (as used in unr.frag. calcs)
  EPRINT
    SFO eig ovl
  END
  scf
    iterations 0  ! prohibit relaxation
  end
  unrestricted
  charge 0 1   !  if not specified up and down electrons
  !               will both get 0.5 electron: in fact restricted
  fragments
    H  t21H
  end
  atoms
    H 0 0 0
  end
eor
rm TAPE21 logfile

# By setting the scf iterations to zero (a value of one (1) would give the same
# result) we prevent cycling to self-consistency. The energy of the 'final' one-
# electron orbitals is consequently computed in the start-up potential, i.e. the
# field of the restricted (basic) atom, where spin-alpha and spin-beta are equally
# occupied, in this case by 0.5 electron each. The not-self-consistent,
# unrestricted H atom is precisely the 'unrestricted' fragment as it can be used
# in an adf calculation with the FRAGOCCUPATIONS key. The fragment file must be
# the TAPE21 result file from a restricted run, but at start-up you can specify
# that the Fragment Orbitals are, for purposes of reference and comparison,
# occupied in an unrestricted way in the final molecule.

# A calculation that uses restricted fragments right away computes the bonding
# energy relative to the restricted fragments. The difference between using
# restricted and unrestricted fragments is the 'bonding' energy computed in the
# run above.

$ADFBIN/adf <<eor
  title  H  unr. self-consistent from unr.0
  EPRINT
    SFO eig ovl
  END
  unrestricted
  charge 0  1
  fragoccupations
    H
      s  1 // 0
    subend
  end
  Atoms
    H  0 0 0
  end
  fragments
    H         t21H
  end
eor
rm TAPE21 logfile

# Here we start with the unrestricted fragment and relax to self-consistency.
# The 'bonding energy', i.e. the relaxation energy, is very small, demonstrating
# that using non-self-consistent unrestricted fragments involves only a small
# error (which, moreover, can be computed as shown here).

# The key UnRestricted sets the spin-unrestricted mode. The key Charge is used
# to specify a net total charge of zero and a net total spin polarization by an
# excess of 1.0 spin-alpha electrons over spin-beta.

$ADFBIN/adf <<eor
  title   H2 restricted, from restricted fragments
  EPRINT
    SFO eig ovl
  END
  ATOMS
    H   0  0   0.375
    H   0  0  -0.375
  end
  fragments
    H   t21H
  end
eor
rm TAPE21 logfile

# This is the simplest approach, using restricted fragments. The bonding energy
# must be corrected because the reference (restricted H atoms, with 0.5
# electrons in spin-alpha and 0.5 in spin-beta) is far from the true H-atom
# ground state: see the previous runs on the single H atom.

$ADFBIN/adf <<eor
  title   H2 from simulated unrestricted fragments using the FRAGOCCUPATIONS key
  EPRINT
    SFO eig ovl
  END
  ATOMS
    H.1   0   0   0.375            
    H.2   0   0  -0.375
  end
  fragments !  two different fragment types are necessary
    !            because the two atoms get different FragOccupations
    !            (see below), while the key FragOc.. addresses 
    !            only fragmentTYPES
    H.1  t21H
    H.2  t21H
  end
  charge  0
  IrrepOccupations
    sigma   2  !  specify the state (not always
               !  necessary)
  end
  fragoccupations
    H.1
      s  1 // 0
    subend
    H.2
      s  0 // 1
    subend
  end
  modifystartpotential
    H.1  1 // 0    !  this helps SCF start-up
    H.2  0 // 1    !  but is here not necessary
  end
eor
rm TAPE21 logfile

# This should be a fair approximation (in the LDA model) to the bonding energy
# of H2 with respect to the unrestricted H atoms. The difference between the
# bonding energies of this and the previous run should be very close to the
# energy of the not-self-consistent unrestricted H-atom with respect to the
# restricted basic atom.

# == Excited state ==

$ADFBIN/adf <<eor
  title   H2  excited 
  EPRINT
    SFO eig ovl
  END
  ATOMS
    H    0 .0     0.375            
    H    0 .0    -0.375
  end
  fragments
    H    t21H
  end
  fragoccupations
    H
      s  1 // 0
    subend
  end
  unrestricted
  charge 0  2
  IrrepOccupations
    sigma.g   1 // 0
    sigma.u   1 // 0
  end
eor

# Finally the calculation of an excited state, with respect to unrestricted
# fragments. The excitation energy is obtained by comparing the energy with the
# energy of the ground state calculation. This difference compares reasonably,
# but not accurately, to the difference in one-electron ground state energies of
# the involved orbitals (Koopman's theorem).

# Note that excitation energies can also be calculated with Time-Dependent DFT,
# using the RESPONSE module of ADF. See related sample runs.