Example: XCDFT: Charge Separation of an ethylene dimer

Download XCDFT_FDE_ET_ethylene.run

#!/bin/sh

# ==============================================================================================
#
#   Charge Separation Calculation of a ethylene dimer: 
#   C2H4* + C2H4 --> C2H4+ + C2H4-   
#   aimed at:
# 
#   1) calculate site energies and couplings of fde-derived of a localized exciton 
#     (Diabat 1) and charge-separated state (Diabat 2). The exciton is obtained by using 
#     XCDFT method. 
#
#   2) calculate the charge-transfer excitation energy from a two-state model that 
#       includes the two charge-localized states involved in the calculation
#    
#   First the isolated (restricted) neutral fragments are obtained. Symmetry NOSYM is used. 
#   In addition, an isolated unrestricted neutral calculation of the fragment to be excited is performed.
#   Resulting files: t21.iso.rho1, t21.iso.rho2 and gs.t21. Next in the first FDE calculation:
#   state C2H4* (neutral-XCDFT excitation) and C2H4(neutral), resulting files:     
#   fragA1.t21 and fragA2.t21. The freeze and thaw cycles are done manually since
#   open-shell fragments were used. Next in the second FDE calculation: state C2H4+ and C2H4-,
#   resulting files fragB1.t21 and fragB2.t21. Again freeze and thaw cycles are done manually since 
#   open-shell fragments were used.
#   
#   In the final charge separation calculation the ELECTRONTRANSFER block keyword is used.
#   The files fragA1.t21, fragA2.t21, fragB1.t21, and fragB2.t21 must exist and must have these names.
# ===================================================================================================

# ==================================================
#           OBTAIN ISOLATED FRAGMENTS
# ==================================================


$ADFBIN/adf  << eor
Title MODCO: Fragment no.          1; (isolated)

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP 
END

ATOMS
 H         0.930241    1.239503    0.000000
 H        -0.930241    1.239503    0.000000
 C         0.000000    0.667450    0.000000
 C         0.000000   -0.667450    0.000000
 H         0.930241   -1.239503    0.000000
 H        -0.930241   -1.239503    0.000000
END

BASIS
 Type TZP 
 Core None
END
eor

rm logfile
mv TAPE21 t21.iso.rho1

$ADFBIN/adf << eor
Title MODCO: Fragment no.          2; (isolated)

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP 
END

ATOMS
 H         0.930241    1.239503    8.000000
 H        -0.930241    1.239503    8.000000
 C         0.000000    0.667450    8.000000
 C         0.000000   -0.667450    8.000000
 H         0.930241   -1.239503    8.000000
 H        -0.930241   -1.239503    8.000000
END

BASIS
 Type TZP 
 Core None
END
eor

rm logfile
mv TAPE21 t21.iso.rho2

# ==================================================
#       OBTAIN ISOLATED UNRESTRICTED FRAGMENT
# ==================================================
$ADFBIN/adf  << eor
Title  Fragment 1; (isolated_unrestricted)

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP 
END

CHARGE 0 0 
UNRESTRICTED 

ATOMS
 H         0.930241    1.239503    0.000000
 H        -0.930241    1.239503    0.000000
 C         0.000000    0.667450    0.000000
 C         0.000000   -0.667450    0.000000
 H         0.930241   -1.239503    0.000000
 H        -0.930241   -1.239503    0.000000
END

BASIS
 Type TZP 
 Core None
END
eor

rm logfile

# ==================================================
#    RENAME TAPE21 file as gs.t21, as required in 
#    XCDFT methodology.
# ==================================================
mv TAPE21 gs.t21


# ==================================================
#   FIRST FDE CALCULATION: STATE D* (XCDFT) + A
#   note: the freeze and thaw is done manually
#         as we have open-shell fragments
# ==================================================

$ADFBIN/adf << eor
Title MODCO: Fragment no.          1; (polarized)

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP 
END

CDFT
  MAXITER 250
  NCONSTRAINTS 1
  EXCITEDCDFT
  METRIC
  ALLATOMS
  NATOMSPERSET 36
  CONSTRAINTS 1.0 
  INITIALMULTIPLIERS 0.0 
  THRESHOLD 1.0e-9 
  STEPSIZE 0.4 
  PRINT LOW
END

CHARGE 0 0
UNRESTRICTED

FRAGMENTS
  rho1 t21.iso.rho1 
  rho2 t21.iso.rho2 type=fde
END

ATOMS
H         0.930241    1.239503    0.000000   f=rho1
H        -0.930241    1.239503    0.000000   f=rho1
C         0.000000    0.667450    0.000000   f=rho1
C         0.000000   -0.667450    0.000000   f=rho1
H         0.930241   -1.239503    0.000000   f=rho1
H        -0.930241   -1.239503    0.000000   f=rho1
H         0.930241    1.239503    8.000000   f=rho2
H        -0.930241    1.239503    8.000000   f=rho2
C         0.000000    0.667450    8.000000   f=rho2  
C         0.000000   -0.667450    8.000000   f=rho2
H         0.930241   -1.239503    8.000000   f=rho2
H        -0.930241   -1.239503    8.000000   f=rho2
END

ALLOW PARTIALSUPERFRAGS

FDE
  PW91K
  GGAPOTXFD pw91x
  GGAPOTCFD pw91c
END
eor

rm logfile
mv TAPE21 t21.emb.rho1

$ADFBIN/adf << eor
Title MODCO: Fragment no.          2; (polarized)

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP
END

CHARGE 0 0
UNRESTRICTED

FRAGMENTS
  rho1 t21.emb.rho1 subfrag=active type=fde
  rho2 t21.iso.rho2 
END

ATOMS
H         0.930241    1.239503    0.000000   f=rho1
H        -0.930241    1.239503    0.000000   f=rho1
C         0.000000    0.667450    0.000000   f=rho1
C         0.000000   -0.667450    0.000000   f=rho1
H         0.930241   -1.239503    0.000000   f=rho1
H        -0.930241   -1.239503    0.000000   f=rho1
H         0.930241    1.239503    8.000000   f=rho2
H        -0.930241    1.239503    8.000000   f=rho2
C         0.000000    0.667450    8.000000   f=rho2  
C         0.000000   -0.667450    8.000000   f=rho2
H         0.930241   -1.239503    8.000000   f=rho2
H        -0.930241   -1.239503    8.000000   f=rho2
END

ALLOW PARTIALSUPERFRAGS

FDE
  PW91K
  GGAPOTXFD pw91x
  GGAPOTCFD pw91c
END
eor

rm logfile
mv TAPE21 t21.emb.rho2


it=1
while [ $it -le 2 ]; do

$ADFBIN/adf << eor
Title MODCO: Fragment no.          1; relaxed

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP 
END

NumericalQuality Good

CDFT
  MAXITER 250
  NCONSTRAINTS 1
  EXCITEDCDFT
  METRIC
  ALLATOMS
  NATOMSPERSET 36
  CONSTRAINTS 1.0 
  INITIALMULTIPLIERS 0.0 
  THRESHOLD 1.0e-9 
  STEPSIZE 0.4 
  PRINT LOW
END

CHARGE 0 0

UNRESTRICTED

FRAGMENTS
  rho1 t21.iso.rho1 
  rho2 t21.emb.rho2 subfrag=active type=fde
END

restart
  file t21.emb.rho1
end

ATOMS
H         0.930241    1.239503    0.000000   f=rho1
H        -0.930241    1.239503    0.000000   f=rho1
C         0.000000    0.667450    0.000000   f=rho1
C         0.000000   -0.667450    0.000000   f=rho1
H         0.930241   -1.239503    0.000000   f=rho1
H        -0.930241   -1.239503    0.000000   f=rho1
H         0.930241    1.239503    8.000000   f=rho2
H        -0.930241    1.239503    8.000000   f=rho2
C         0.000000    0.667450    8.000000   f=rho2  
C         0.000000   -0.667450    8.000000   f=rho2
H         0.930241   -1.239503    8.000000   f=rho2
H        -0.930241   -1.239503    8.000000   f=rho2
END

ALLOW PARTIALSUPERFRAGS

FDE
  PW91K
  GGAPOTXFD pw91x
  GGAPOTCFD pw91c
  FullGrid
  Energy
END
eor

rm logfile
mv TAPE21 t21.emb.rho1

$ADFBIN/adf << eor
Title MODCO: Fragment no.          2; relaxed

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP 
END

NumericalQuality Good
  
restart
  file t21.emb.rho2
end

CHARGE 0 0
UNRESTRICTED
FRAGMENTS
  rho1 t21.emb.rho1 subfrag=active type=fde
  rho2 t21.iso.rho2 
END

ATOMS
H         0.930241    1.239503    0.000000   f=rho1
H        -0.930241    1.239503    0.000000   f=rho1
C         0.000000    0.667450    0.000000   f=rho1
C         0.000000   -0.667450    0.000000   f=rho1
H         0.930241   -1.239503    0.000000   f=rho1
H        -0.930241   -1.239503    0.000000   f=rho1
H         0.930241    1.239503    8.000000   f=rho2
H        -0.930241    1.239503    8.000000   f=rho2
C         0.000000    0.667450    8.000000   f=rho2  
C         0.000000   -0.667450    8.000000   f=rho2
H         0.930241   -1.239503    8.000000   f=rho2
H        -0.930241   -1.239503    8.000000   f=rho2
END

ALLOW PARTIALSUPERFRAGS

FDE
  PW91K
  GGAPOTXFD pw91x
  GGAPOTCFD pw91c
  FullGrid
  Energy
END
eor

rm logfile
mv TAPE21 t21.emb.rho2


it=$(($it+1))
done

# ======================================
# NOW THE TAPE21 FILES MUST BE RENAMED
# 
#  TO: fragA1.t21, fragA2.t21 
#      .... up to a max of fragA999.t21
# AND: fragB1.t21, fragB2.t21 
#      .... up to a max of fragB999.t21 
# ======================================

mv t21.emb.rho1 fragA1.t21
mv t21.emb.rho2 fragA2.t21



# ==================================================
#   SECOND FDE CALCULATION: STATE D+ + A-
#   note: the freeze and thaw is done manually
#         as we have open-shell fragments
# ==================================================

$ADFBIN/adf << eor
Title MODCO: Fragment no.          1; (polarized)

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP 
END

CHARGE 1 -1
UNRESTRICTED

FRAGMENTS
  rho1 t21.iso.rho1 
  rho2 t21.iso.rho2 type=fde
END

ATOMS
H         0.930241    1.239503    0.000000   f=rho1
H        -0.930241    1.239503    0.000000   f=rho1
C         0.000000    0.667450    0.000000   f=rho1
C         0.000000   -0.667450    0.000000   f=rho1
H         0.930241   -1.239503    0.000000   f=rho1
H        -0.930241   -1.239503    0.000000   f=rho1
H         0.930241    1.239503    8.000000   f=rho2
H        -0.930241    1.239503    8.000000   f=rho2
C         0.000000    0.667450    8.000000   f=rho2  
C         0.000000   -0.667450    8.000000   f=rho2
H         0.930241   -1.239503    8.000000   f=rho2
H        -0.930241   -1.239503    8.000000   f=rho2
END

ALLOW PARTIALSUPERFRAGS

FDE
  PW91K
  GGAPOTXFD pw91x
  GGAPOTCFD pw91c
END
eor

rm logfile
mv TAPE21 t21.emb.rho1

$ADFBIN/adf << eor
Title MODCO: Fragment no.          2; (polarized)

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP
END

CHARGE -1  1
UNRESTRICTED

FRAGMENTS
  rho1 t21.emb.rho1 subfrag=active type=fde
  rho2 t21.iso.rho2 
END

ATOMS
H         0.930241    1.239503    0.000000   f=rho1
H        -0.930241    1.239503    0.000000   f=rho1
C         0.000000    0.667450    0.000000   f=rho1
C         0.000000   -0.667450    0.000000   f=rho1
H         0.930241   -1.239503    0.000000   f=rho1
H        -0.930241   -1.239503    0.000000   f=rho1
H         0.930241    1.239503    8.000000   f=rho2
H        -0.930241    1.239503    8.000000   f=rho2
C         0.000000    0.667450    8.000000   f=rho2  
C         0.000000   -0.667450    8.000000   f=rho2
H         0.930241   -1.239503    8.000000   f=rho2
H        -0.930241   -1.239503    8.000000   f=rho2
END

ALLOW PARTIALSUPERFRAGS

FDE
  PW91K
  GGAPOTXFD pw91x
  GGAPOTCFD pw91c
END
eor

rm logfile
mv TAPE21 t21.emb.rho2

it=1
while [ $it -le 2 ]; do

$ADFBIN/adf << eor
Title MODCO: Fragment no.          1; relaxed

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP 
END

NumericalQuality Good

CHARGE 1 -1
UNRESTRICTED

FRAGMENTS
  rho1 t21.iso.rho1 
  rho2 t21.emb.rho2 subfrag=active type=fde
END

restart
  file t21.emb.rho1
end

ATOMS
H         0.930241    1.239503    0.000000   f=rho1
H        -0.930241    1.239503    0.000000   f=rho1
C         0.000000    0.667450    0.000000   f=rho1
C         0.000000   -0.667450    0.000000   f=rho1
H         0.930241   -1.239503    0.000000   f=rho1
H        -0.930241   -1.239503    0.000000   f=rho1
H         0.930241    1.239503    8.000000   f=rho2
H        -0.930241    1.239503    8.000000   f=rho2
C         0.000000    0.667450    8.000000   f=rho2  
C         0.000000   -0.667450    8.000000   f=rho2
H         0.930241   -1.239503    8.000000   f=rho2
H        -0.930241   -1.239503    8.000000   f=rho2
END

ALLOW PARTIALSUPERFRAGS

FDE
  PW91K
  GGAPOTXFD pw91x
  GGAPOTCFD pw91c
  FullGrid
  Energy
END
eor

rm logfile
mv TAPE21 t21.emb.rho1

$ADFBIN/adf << eor
Title MODCO: Fragment no.          2; relaxed

EPRINT
  SFO NOEIG NOOVL NOORBPOP
END

NOPRINT BAS FUNCTIONS

SYMMETRY NOSYM

XC
  model SAOP 
END

NumericalQuality Good

restart
  file t21.emb.rho2
end

CHARGE -1  1
UNRESTRICTED
FRAGMENTS
  rho1 t21.emb.rho1 subfrag=active type=fde
  rho2 t21.iso.rho2 
END

ATOMS
H         0.930241    1.239503    0.000000   f=rho1
H        -0.930241    1.239503    0.000000   f=rho1
C         0.000000    0.667450    0.000000   f=rho1
C         0.000000   -0.667450    0.000000   f=rho1
H         0.930241   -1.239503    0.000000   f=rho1
H        -0.930241   -1.239503    0.000000   f=rho1
H         0.930241    1.239503    8.000000   f=rho2
H        -0.930241    1.239503    8.000000   f=rho2
C         0.000000    0.667450    8.000000   f=rho2  
C         0.000000   -0.667450    8.000000   f=rho2
H         0.930241   -1.239503    8.000000   f=rho2
H        -0.930241   -1.239503    8.000000   f=rho2
END

ALLOW PARTIALSUPERFRAGS

FDE
  PW91K
  GGAPOTXFD pw91x
  GGAPOTCFD pw91c
  FullGrid
  Energy
END
eor

rm logfile
mv TAPE21 t21.emb.rho2

it=$(($it+1))
done
# ======================================
# NOW THE TAPE21 FILES MUST BE RENAMED
# 
#  TO: fragA1.t21, fragA2.t21 
#      .... up to a max of fragA999.t21
# AND: fragB1.t21, fragB2.t21 
#      .... up to a max of fragB999.t21 
# ======================================

mv t21.emb.rho1 fragB1.t21
mv t21.emb.rho2 fragB2.t21

# ======================================
# Electron Transfer calculation is next
#
# 1) note the ELECTRONTRANSFER block keyword
# 2) hybrids not supported
# 3) NumericalQuality GOOD is needed for accuracy
# ======================================

$ADFBIN/adf << eor
Title ET calculation at R=0.0 Angstrom

EPRINT
  SFO NOEIG NOOVL NOORBPOP
  SCF NOPOP
END

NOPRINT BAS FUNCTIONS

FRAGMENTS
 rho1 t21.iso.rho1 
 rho2 t21.iso.rho2 
END

ATOMS
 H         0.930241    1.239503    0.000000 f=rho1
 H        -0.930241    1.239503    0.000000 f=rho1
 C         0.000000    0.667450    0.000000 f=rho1
 C         0.000000   -0.667450    0.000000 f=rho1
 H         0.930241   -1.239503    0.000000 f=rho1
 H        -0.930241   -1.239503    0.000000 f=rho1
 H         0.930241    1.239503    8.000000 f=rho2
 H        -0.930241    1.239503    8.000000 f=rho2  
 C         0.000000    0.667450    8.000000 f=rho2
 C         0.000000   -0.667450    8.000000 f=rho2 
 H         0.930241   -1.239503    8.000000 f=rho2
 H        -0.930241   -1.239503    8.000000 f=rho2
END                                                   

NumericalQuality Good

UNRESTRICTED
 
CHARGE 0 0                                                      
XC
  GGA PW91
END

SYMMETRY nosym

SCF
  iterations 0
END

Beckegrid
 Quality Good
END 

ELECTRONTRANSFER
 numfrag 2
END
eor

rm logfile