Test    : Silicon with EPM (real)
Enabled : Yes

# This file is automatically turned into a corresponding complex version.
# It also should be closely mirrored by the spin-polarized version Si_cplx_spin.test.
# If you change this file, make corresponding changes to that file too, and the
# reference values must be identical.

Executable : epm2bgw.sh
Processors : serial
Output : WFN.out
Input  : WFN.in PIPE

Precision : 6e-15
match ; Eigenvalue  1 at k-pt 1   ; GREP(WFN.out,   "kpoint          1", 2,  1); -0.1283435360829054
match ; Eigenvalue 10 at k-pt 1   ; GREP(WFN.out,   "kpoint          1", 2, 10);  1.3282472551260550
match ; Eigenvalue 18 at k-pt 2   ; GREP(WFN.out,   "kpoint          2", 2, 18);  2.3490532646407310

Output : WFNq.out
Input  : WFNq.in PIPE

match ; Eigenvalue  1 at k-pt 1   ; GREP(WFNq.out,   "kpoint          1", 2,  1); -0.1278872033838455
match ; Eigenvalue  1 at k-pt 2   ; GREP(WFNq.out,   "kpoint          2", 2,  1); -0.1287983831755248
match ; Eigenvalue  4 at k-pt 3   ; GREP(WFNq.out,   "kpoint          3", 2,  4);  0.6800817811482534

Output : WFN_co.out
Input  : WFN_co.in PIPE

match ; Eigenvalue  1 at k-pt 1   ; GREP(WFN_co.out, "kpoint          1", 2,  1); -0.1875783994953054
match ; Eigenvalue  1 at k-pt 3   ; GREP(WFN_co.out, "kpoint          3", 2,  1);  0.1223225560313585
match ; Eigenvalue 18 at k-pt 3   ; GREP(WFN_co.out, "kpoint          3", 2, 18);  2.2892013856110280

Output : WFN_fi.out
Input  : WFN_fi.in PIPE

match ; Eigenvalue  1 at k-pt 1   ; GREP(WFN_fi.out, "kpoint          1", 2, 1);  -0.1699064558009724
match ; Eigenvalue  4 at k-pt 1   ; GREP(WFN_fi.out, "kpoint          1", 2, 4);   0.7222736945499569
match ; Eigenvalue  6 at k-pt 7   ; GREP(WFN_fi.out, "kpoint          7", 2, 6);   1.0573090701231470

Output : WFNq_fi.out
Input  : WFNq_fi.in PIPE

match ; Eigenvalue  1 at k-pt 2   ; GREP(WFNq_fi.out, "kpoint          2", 2, 1);  -0.0628178651675045
match ; Eigenvalue  4 at k-pt 5   ; GREP(WFNq_fi.out, "kpoint          5", 2, 4);   0.5510534752750740
match ; Eigenvalue  3 at k-pt 20  ; GREP(WFNq_fi.out, "kpoint         20", 2, 3);   0.4468196210876209

Copy : kgrid.in

Executable : kgrid.x
Processors : serial
Arguments : kgrid.in kgrid.out kgrid.log

match ; Space group (lattice)       ; GREP(kgrid.log, "symmetries of the Bravais lattice", 3, 2);  225
match ; Space group (crystal)       ; GREP(kgrid.log, "symmetries of the crystal with FFT grid", 3, 2);  227
match ; Number of symmetries        ; GREP(kgrid.log, "symmetries of the crystal with FFT grid", 1, 1);   48
match ; Number of k-points for WFNq ; GREP(kgrid.log, "k-points folded with the symmetries", 1, 1);  10
match ; z-coord of first k-point    ; LINE(kgrid.out,  3, 3);  0.251
match ; Weight  of first k-point    ; LINE(kgrid.out,  3, 4);  1.0
match ; z-coord of last  k-point    ; LINE(kgrid.out, 12, 3);  0.751
match ; Weight  of last  k-point    ; LINE(kgrid.out, 12, 4);  3.0

Executable : wfn_rho_vxc_info.x
Processors : serial
Arguments : WFN > WFN_info.out

match ; Max number of wfn G-vectors ; GREP(WFN_info.out, "Max number of wfn G-vectors", 6, 0); 171
match ; Real-space metric (0, 0)    ; GREP(WFN_info.out, "Metric (real space", 1, 1);          52.646113

Command : cp WFNq WFNq_cp
Executable : wfn_dotproduct.x
Processors : serial
Arguments : B WFNq WFNq_cp > dotproduct.out

match ; Overlap ik  1, bands 1 1 ; GREP(dotproduct.out, "k-point      1:", 6,  4); 1.0
match ; Overlap ik  1, bands 3 2 ; GREP(dotproduct.out, "k-point      1:", 6, 12); 0.0
match ; Overlap ik 10, bands 4 4 ; GREP(dotproduct.out, "k-point      4:", 6, 19); 1.0

Executable : degeneracy_check.x
Processors : serial
Arguments : WFN WFN_inner WFN_fi > degeneracy.out

match ; Highest allowed number of bands ; GREP(degeneracy.out, "numbers of bands", 1, 3); 10
match ; Highest allowed number of valence bands ; GREP(degeneracy.out, "numbers of valence bands", 1, 1); 4
match ; Highest allowed number of conduction bands ; GREP(degeneracy.out, "numbers of conduction bands", 1, 2); 6

Executable : degeneracy_check.x
Processors : serial
Arguments : WFNq > degeneracy_q.out

match ; Highest allowed number of bands ; GREP(degeneracy_q.out, "numbers of bands", 1, 2); 2
match ; Highest allowed number of valence bands ; GREP(degeneracy_q.out, "numbers of valence bands", 1, 3); 4

Copy : epsilon.inp
Command : echo "skip_epsilon" >> epsilon.inp

Executable : epsilon.real.x
Processors : 4
Output : eps_static_skip_epsilon.out
Input  : NONE

Precision : 1e-13
match ; Re chi(q1,0,0)       ; LINE(chi_converge.dat, 16, 2) ; -0.71438266E-06
match ; Re chi(q1,Gmax,Gmax) ; LINE(chi_converge.dat, 16, 4) ; -0.17070033E-02
match ; Re chi(q3,0,0)       ; LINE(chi_converge.dat, 50, 2) ; -0.28262692E-01
match ; Re chi(q3,Gmax,Gmax) ; LINE(chi_converge.dat, 50, 4) ; -0.74153363E-03

Command : mv epsilon.log eps_static_skip_epsilon.log

Copy : epsilon.inp
Command : echo "skip_chi" >> epsilon.inp

Executable : epsilon.real.x
Output : eps_static_skip_chi.out
Input  : NONE

Precision : 8e-12
match ; epsilon q1 ; GREP(eps_static_skip_chi.out, "q-pt      1: Head of Epsilon",         7, 0); 16.9619547514149
Precision : 1e-13
match ; eps inv q1 ; GREP(eps_static_skip_chi.out, "q-pt      1: Head of Epsilon Inverse", 8, 0); 0.0650198678428007
match ; epsilon q2 ; GREP(eps_static_skip_chi.out, "q-pt      2: Head of Epsilon",         7, 0); 3.1043208107546914
match ; eps inv q2 ; GREP(eps_static_skip_chi.out, "q-pt      2: Head of Epsilon Inverse", 8, 0); 0.36141535117630236
match ; epsilon q3 ; GREP(eps_static_skip_chi.out, "q-pt      3: Head of Epsilon",         7, 0); 2.8944796695309591
match ; eps inv q3 ; GREP(eps_static_skip_chi.out, "q-pt      3: Head of Epsilon Inverse", 8, 0); 0.36570423105364530
match ; epsilonInv Head      ; GREP(epsilon.log, "inverse epsilon", 7, 1); 0.06501987

Command : mv epsilon.log eps_static_skip_chi.log


#Testing Epsilon restart feature (HDF5 only). Note: for non-HDF5 calculations,
#the code will run these calculation from scratch. So, make sure you always
#grep for the correct q-point here, otherwise you might be matching something
#else!

#Test chi restart, take 1
Copy : epsilon.inp
Command : echo "skip_epsilon" >> epsilon.inp
Command : echo "stop_after_qpt 2" >> epsilon.inp

Executable : epsilon.real.x
Processors : 4
Output : eps_static_skip_epsilon_restart_1.out
Input  : NONE

Precision : 1e-13
match ; Re chi(q1,0,0)       ; GREP(chi_converge.dat, "(qpt 1)", 2, 15) ; -0.71438266E-06
match ; Re chi(q1,Gmax,Gmax) ; GREP(chi_converge.dat, "(qpt 1)", 4, 15) ; -0.17070033E-02
Command : mv epsilon.log eps_static_skip_epsilon_restart_1.log
Command : mv chi_converge.dat chi_converge_skip_epsilon_restart_1.dat


#Test chi restart, take 2
Copy : epsilon.inp
Command : echo "skip_epsilon" >> epsilon.inp
Command : echo "restart" >> epsilon.inp

Executable : epsilon.real.x
Processors : 4
Output : eps_static_skip_epsilon_restart_2.out
Input  : NONE

Precision : 1e-13
match ; Re chi(q3,0,0)       ; GREP(chi_converge.dat, "(qpt 3)", 2, 15) ; -0.28262692E-01
match ; Re chi(q3,Gmax,Gmax) ; GREP(chi_converge.dat, "(qpt 3)", 4, 15) ; -0.74153363E-03
Command : mv epsilon.log eps_static_skip_epsilon_restart_2.log
Command : mv chi_converge.dat chi_converge_skip_epsilon_restart_2.dat


#Test eps restart, take 1
Copy : epsilon.inp
Command : echo "skip_chi" >> epsilon.inp
Command : echo "stop_after_qpt 2" >> epsilon.inp

Executable : epsilon.real.x
Output : eps_static_skip_chi_restart_1.out
Input  : NONE

Precision : 8e-12
match ; epsilon q1 ; GREP(eps_static_skip_chi_restart_1.out, "q-pt      1: Head of Epsilon",         7, 0); 16.9619547514149
Precision : 1e-13
match ; eps inv q1 ; GREP(eps_static_skip_chi_restart_1.out, "q-pt      1: Head of Epsilon Inverse", 8, 0); 0.0650198678428007
match ; epsilon q2 ; GREP(eps_static_skip_chi_restart_1.out, "q-pt      2: Head of Epsilon",         7, 0); 3.1043208107546914
match ; eps inv q2 ; GREP(eps_static_skip_chi_restart_1.out, "q-pt      2: Head of Epsilon Inverse", 8, 0); 0.36141535117630236
Command : mv epsilon.log eps_static_skip_chi_restart_1.log


#Test eps restart, take 2
Copy : epsilon.inp
Command : echo "skip_chi" >> epsilon.inp
Command : echo "restart" >> epsilon.inp

Executable : epsilon.real.x
Output : eps_static_skip_chi_restart_2.out
Input  : NONE

Precision : 1e-13
match ; epsilon q3 ; GREP(eps_static_skip_chi_restart_2.out, "q-pt      3: Head of Epsilon",         7, 0); 2.8944796695309591
match ; eps inv q3 ; GREP(eps_static_skip_chi_restart_2.out, "q-pt      3: Head of Epsilon Inverse", 8, 0); 0.36570423105364530
Command : mv epsilon.log eps_static_skip_chi_restart_2.log


# For tricking eps0sym we link eps0mat.h5 to eps0mat
Command : if [ -f eps0mat.h5 ]; then ln -s eps0mat.h5 eps0mat ; fi

# We are not going to use the symmetrized eps0mat. It makes very little difference here.
Executable : eps0sym.real.x
Arguments : eps0mat eps0mat_sym > eps0sym.out

Precision : 0.0011
match ; max symmetry discrepancy ; GREP(eps0sym.out, "The max error in your matrix is", 8, 0); 0.58073E+02

Executable : epsbinasc.real.x
Processors : serial
Output : epsbinasc.out
Input : epsconv_binasc.inp epsconv.inp

Executable : epsascbin.real.x
Output : epsascbin.out
Input : epsconv_ascbin.inp epsconv.inp

Executable : sigma.real.x
Processors : 4
Output : sig_HF.out
Input  : sig_HF.inp sigma.inp

# These numbers should be identical to the full GW Sigma calculation below.
Precision : 2e-6
match ; n2, k1 Exchange             ; GREP(sigma_hp.log, "ik =   1",  4, 4); -13.927243
match ; n5, k2 Exchange             ; GREP(sigma_hp.log, "ik =   2",  4, 7);  -4.778030

Command : mv sigma_hp.log sig_hp_HF.log

Executable : sigma.real.x
Output : sig_COHSEX.out
Input  : sig_COHSEX.inp sigma.inp

match ; n2, k1 Exchange             ; GREP(sigma_hp.log, "ik =   1",  4, 4); -13.927243
match ; n2, k1 Screened Exchange    ; GREP(sigma_hp.log, "ik =   1",  5, 4);   9.258859
match ; n2, k1 Coulomb Hole         ; GREP(sigma_hp.log, "ik =   1",  6, 4);  -8.458621
match ; n2, k1 Linear QP Correction ; GREP(sigma_hp.log, "ik =   1", 10, 4);  -3.091143

match ; n5, k2 Exchange             ; GREP(sigma_hp.log, "ik =   2",  4, 7);  -4.778030
match ; n5, k2 Screened Exchange    ; GREP(sigma_hp.log, "ik =   2",  5, 7);   2.289971
match ; n5, k2 Coulomb Hole         ; GREP(sigma_hp.log, "ik =   2",  6, 7);  -7.746010
match ; n5, k2 Linear QP Correction ; GREP(sigma_hp.log, "ik =   2", 10, 7);   1.755836

Command : mv sigma_hp.log sig_hp_COHSEX.log

Executable : sigma.real.x
Output : sig_COHSEX_offdiag.out
Input  : sig_COHSEX_offdiag.inp sigma.inp

match ; n1 x n1 k1 Exchange         ; GREP(sigma_hp.log, "1   1   3   real",  5, 0); -16.210514
match ; n1 x n1 k1 Screened Exchange; GREP(sigma_hp.log, "1   1   3   real",  6, 0);  11.197461
match ; n1 x n1 k1 Coulomb Hole     ; GREP(sigma_hp.log, "1   1   3   real",  7, 0);  -8.233987
match ; n1 x n5 k1 Exchange         ; GREP(sigma_hp.log, "1   5   3   real",  5, 0);   0.000000
match ; n1 x n5 k1 Screened Exchange; GREP(sigma_hp.log, "1   5   3   real",  6, 0);  -0.000003
match ; n1 x n5 k1 Coulomb Hole     ; GREP(sigma_hp.log, "1   5   3   real",  7, 0);   0.000004
match ; n2 x n5 k1 Exchange         ; GREP(sigma_hp.log, "2   5   3   real",  5, 0);  -1.497140
match ; n2 x n5 k1 Screened Exchange; GREP(sigma_hp.log, "2   5   3   real",  6, 0);   0.770308
match ; n2 x n5 k1 Coulomb Hole     ; GREP(sigma_hp.log, "2   5   3   real",  7, 0);  -0.523302

Processors : serial
Executable : offdiag.real.x
Output : offdiag.out
Input : NONE

# we evaluate at fixed energy, so Sigma is Hermitian and eigenvalues must be real
match ; Eigenvalue 1 Re ; GREP(offdiag.out, "sig(ecor)", 2, 2); -13.488831
match ; Eigenvalue 1 Im ; GREP(offdiag.out, "sig(ecor)", 3, 2);   0.000000
match ; Eigenvalue 5 Re ; GREP(offdiag.out, "sig(ecor)", 2, 6);   1.891962
match ; Eigenvalue 5 Im ; GREP(offdiag.out, "sig(ecor)", 3, 6);   0.000000

Command : mv sigma_hp.log sig_hp_COHSEX_offdiag.log

Processors : 4
Executable : sigma.real.x
Output : sig_GPP.out
Input  : sig_GPP.inp sigma.inp

Precision : 2e-5
match ; k-point 1 z-coordinate      ; GREP(sigma_hp.log, "ik =   1",  5, 0);   0.000000
match ; n2, k1 Initial Eigenvalue   ; GREP(sigma_hp.log, "ik =   1",  2, 4);  10.035862
match ; n2, k1 Exchange             ; GREP(sigma_hp.log, "ik =   1",  4, 4); -13.927243
match ; n2, k1 Screened Exchange    ; GREP(sigma_hp.log, "ik =   1",  5, 4);   9.410191
match ; n2, k1 Coulomb Hole         ; GREP(sigma_hp.log, "ik =   1", 11, 4);  -6.673750
match ; n2, k1 CH + Static Remainder; GREP(sigma_hp.log, "ik =   1",  6, 4);  -7.455258
match ; n2, k1 Linear QP Correction ; GREP(sigma_hp.log, "ik =   1", 10, 4);   0.391096
match ; n2, k1 Znk                  ; GREP(sigma_hp.log, "ik =   1", 15, 4);   0.805589

# offdiagonals
# this is a diagonal actually and must match exactly the unsymmetrized diagonal value
match ; n1 x n1 k1 Exchange         ; GREP(sigma_hp.log, "1   1   1   real",  5, 0); -16.714526
match ; n1 x n1 k1 Screened Exchange; GREP(sigma_hp.log, "1   1   1   real",  6, 0);  12.020598
match ; n1 x n1 k1 Coulomb Hole     ; GREP(sigma_hp.log, "1   1   1   real", 10, 0);  -6.193447
# this is some other offdiagonal
match ; n1 x n8 k1 Exchange         ; GREP(sigma_hp.log, "1   8   1   real",  5, 0);   0.000000
match ; n1 x n8 k1 Screened Exchange; GREP(sigma_hp.log, "1   8   1   real",  6, 0);   0.000140
match ; n1 x n8 k1 Coulomb Hole     ; GREP(sigma_hp.log, "1   8   1   real", 10, 0);  -0.000007
# this one is zero by symmetry
Precision : 1e-6
match ; n2 x n1 k1 Exchange         ; GREP(sigma_hp.log, "2   1   2   real",  5, 0);   0.000000
match ; n2 x n1 k1 Screened Exchange; GREP(sigma_hp.log, "2   1   2   real",  6, 0);   0.000000
match ; n2 x n1 k1 Coulomb Hole     ; GREP(sigma_hp.log, "2   1   2   real", 10, 0);   0.000000

match ; k-point 2 z-coordinate      ; GREP(sigma_hp.log, "ik =   2",  5, 0);   0.500000
match ; n5, k2 Initial Eigenvalue   ; GREP(sigma_hp.log, "ik =   2",  2, 7);  11.989902
match ; n5, k2 Exchange             ; GREP(sigma_hp.log, "ik =   2",  4, 7);  -4.778030
match ; n5, k2 Screened Exchange    ; GREP(sigma_hp.log, "ik =   2",  5, 7);   2.700440
match ; n5, k2 Coulomb Hole         ; GREP(sigma_hp.log, "ik =   2", 11, 7);  -6.310024
match ; n5, k2 CH + Static Remainder; GREP(sigma_hp.log, "ik =   2",  6, 7);  -7.042837
match ; n5, k2 Linear QP Correction ; GREP(sigma_hp.log, "ik =   2", 10, 7);   4.691281

Copy : Si.nnkp

Executable : sig2wan.x
Processors : serial
Output : sig2wan.out
Input : sig2wan.inp

match ; number of symmetries       ; GREP(sig2wan.out, "nsym = ", 3, 0) ;   48
Precision : 2e-5
match ; eigenvalue band 2 k 2      ; GREP(Si.eig, "2    2 ", 3, 0)      ;   -5.737492000000
match ; eigenvalue band 3 k 4      ; GREP(Si.eig, "3    4 ", 3, 0)      ;   -0.590781000000
match ; eigenvalue band 1 k 6      ; GREP(Si.eig, "1    6 ", 3, 0)      ;   -7.019531000000

Command : mv sigma_hp.log sig_hp_GPP.log
Command : mv WFN_inner WFN_co

Executable : kernel.real.x
Processors : 4
Output : kernel.out
Input  : kernel.inp

Precision : 1e-10
match ; max head ; GREP(kernel.out, "maximum: head       ", 3); 1.000000000000004
#match ; max wing ; GREP(kernel.out, "         wing       ", 2); 0.088271689456953
#match ; max body ; GREP(kernel.out, "         body       ", 2); 0.661960815982543
match ; max x    ; GREP(kernel.out, "         x          ", 2);  1.150676774895869

Executable : eqp.py
Arguments : eqp1 sig_hp_GPP.log eqp_co.dat > eqp.out 
 
match ; k-point 2 z-coord ; LINE(eqp_co.dat, 10, 3);  0.500
match ; LDA Eigenvalue    ; LINE(eqp_co.dat, 14, 3);  8.767754000
Precision : 2e-5
match ; GW Eigenvalue     ; LINE(eqp_co.dat, 14, 4); -0.590781000

# inteqp. We will not use the result however.
Executable : inteqp.real.x
Output : inteqp.out
Input : inteqp.inp

Precision : 1e-5
match ; Cartesian kx coord  ; LINE(bandstructure.dat,  4, 3);  0.24758
match ; MF Eigenvalue       ; LINE(bandstructure.dat,  4, 6); -0.854680521
match ; GW Eigenvalue       ; LINE(bandstructure.dat,  4, 7); -9.241287654
match ; Difference          ; LINE(bandstructure.dat,  4, 8); -8.386607095
# below must match result in bandstructure.dat!
match ; eqp_q.dat k2 b2 MF  ; LINE(eqp_q.dat,  7, 3);  -0.854680521
match ; eqp_q.dat k2 b2 GW  ; LINE(eqp_q.dat,  7, 4);  -9.241287654
match ; eqp.dat k5 b 1 MF   ; LINE(eqp.dat,   22, 3);  11.894735794
match ; eqp.dat k5 b 1 GW   ; LINE(eqp.dat,   22, 4);   5.103990381

# BSE with velocity operator
Executable : absorption.real.x
Output : absp.out
Input  : absorption.inp

Precision : 0.0001
match ; Number of eigenvalues  ; GREP(eigenvalues.dat, "# neig  = ", 4); 432
match ; Singlet eigenvalue 1           ; LINE(eigenvalues.dat,  5, 1);  0.30625915E+01
Precision : 1e-5
match ; Singlet transition mtxel 1     ; LINE(eigenvalues.dat,  5, 2);  0.47301714E+02
match ; Singlet eigenvalue 10          ; LINE(eigenvalues.dat, 14, 1);  0.39118085E+01
match ; Singlet transition mtxel 10    ; LINE(eigenvalues.dat, 14, 2);  0.44297554E+02
Precision : 1e-10
match ; Sum rule               ; GREP(absp.out, "Sum rule (BSE)", 5);  0.89327974434026669

Command : echo "spin_triplet" >> absorption.inp
Executable : absorption.real.x
Output : absp_triplet.out
Input : NONE

Precision : 0.0001
match ; Number of eigenvalues  ; GREP(eigenvalues.dat, "# neig  = ", 4); 432
match ; Triplet eigenvalue 1           ; LINE(eigenvalues.dat,  5, 1);  0.29016622E+01
match ; Triplet transition mtxel 1     ; LINE(eigenvalues.dat,  5, 2);  0.55399901E+02
match ; Triplet eigenvalue 12          ; LINE(eigenvalues.dat, 16, 1);  0.39630220E+01
match ; Triplet transition mtxel 12    ; LINE(eigenvalues.dat, 16, 2);  0.11588415E+01
Precision : 1e-10
match ; Sum rule               ; GREP(absp.out, "Sum rule (BSE)", 5);  0.89327974434026
# the eigenvalues must be the same as the spin-polarized calculation,
# but the transition matrix element rule will be similar to the singlet one since it is fake.
# It seems the sum rule should be identical to the singlet one.

# BSE with momentum operator
# The eigenvalues would be identical to velocity operator in q->0 limit, and the transition
# matrix elements should be very close, since EPM is a local potential.
Executable : absorption.real.x
Output : absp_mom.out
Input  : absp_mom.inp absorption.inp

Precision : 0.0001
match ; Number of eigenvalues  ; GREP(eigenvalues.dat, "# neig  = ", 4); 432
match ; Singlet eigenvalue 1           ; LINE(eigenvalues.dat,  5, 1);  0.30633178E+01
Precision : 1e-5
match ; Singlet transition mtxel 1     ; LINE(eigenvalues.dat,  5, 2);  0.46229418E+02
match ; Singlet eigenvalue 10          ; LINE(eigenvalues.dat, 14, 1);  0.39129537E+01
match ; Singlet transition mtxel 10    ; LINE(eigenvalues.dat, 14, 2);  0.43692003E+02
Precision : 1e-10
match ; Sum rule               ; GREP(absp_mom.out, "Sum rule (BSE)", 5);  0.89212179555472459

# BSE with momentum operator cell averaging
Executable : absorption.real.x
Output : absp_mom_ca.out
Input  : absp_mom_ca.inp absorption.inp

Precision : 0.0001
match ; Number of eigenvalues  ; GREP(eigenvalues.dat, "# neig  = ", 4); 432
match ; Singlet eigenvalue 1           ; LINE(eigenvalues.dat,  5, 1);  0.30494173E+01
Precision : 1e-5
match ; Singlet transition mtxel 1     ; LINE(eigenvalues.dat,  5, 2);  0.47528716E+02
match ; Singlet eigenvalue 10          ; LINE(eigenvalues.dat, 14, 1);  0.39043611E+01
match ; Singlet transition mtxel 10    ; LINE(eigenvalues.dat, 14, 2);  0.44233787E+02
Precision : 1e-10
match ; Sum rule               ; GREP(absp_mom_ca.out, "Sum rule (BSE)", 5);  0.88647915396322507

Executable : absorption.real.x
Output : absp_haydock.out
Input : absp_haydock.inp absorption.inp

Precision : 2e-8
match ; Static epsilon 1 ; GREP(absorption_eh.dat, " 0.000000000 ", 3);  15.533196743
match ; Peak   epsilon 2 ; GREP(absorption_eh.dat, " 3.850000000 ", 2); 43.015415557
match ; Peak   epsilon 1 ; GREP(absorption_eh.dat, " 3.850000000 ", 3); 0.309200047

Executable : bsebinasc.real.x
Processors : serial
Arguments : .asc > bsebinasc.out

Executable : bseascbin.real.x
Processors : serial
Arguments : .asc > bseascbin.out

Command : mv WFNq_fi WFNq_fi_orig


# Full frequency

Command : mv WFN_co WFN_inner

Executable : epsilon.real.x
Processors : 4
Output : eps_ff.out
Input  : eps_ff.inp epsilon.inp

Precision : 4e-12
match ; ret Re eps q1          ; GREP(eps_ff.out, "q-pt      1: Retarded Head of Epsilon",          8, 0); 7.47530571237935
Precision : 1e-13
match ; ret Im eps q1          ; GREP(eps_ff.out, "q-pt      1: Retarded Head of Epsilon",          9, 0); 0.0
match ; ret Re epsinv q1       ; GREP(eps_ff.out, "q-pt      1: Retarded Head of Epsilon Inverse",  9, 0); 0.143379135635558
match ; ret Im epsinv q1       ; GREP(eps_ff.out, "q-pt      1: Retarded Head of Epsilon Inverse", 10, 0); 0.0

Precision : 1e-5
match ; epsilon    Head 30.0 eV Re ; LINE(EpsDyn, 9, 2) ; 0.645807
match ; epsilon    Head 30.0 eV Im ; LINE(EpsDyn, 9, 3) ; 0.134043
match ; epsilonInv Head 30.0 eV Re ; LINE(EpsInvDyn, 21, 2) ; 1.393469
match ; epsilonInv Head 30.0 eV Im ; LINE(EpsInvDyn, 21, 3) ; -0.360050

Command : mv epsilon.log eps_ff.log

Executable : sigma.real.x
Processors : 4
Output : sig_ff.out
Input  : sig_ff.inp sigma.inp

Precision : 2e-5
match ; n2, k1 Initial Eigenvalue   ; GREP(sigma_hp.log, "ik =   1",  2, 6);  10.035862
match ; n2, k1 Exchange             ; GREP(sigma_hp.log, "ik =   1",  4, 6); -13.927243
match ; n2, k1 Screened Exchange    ; GREP(sigma_hp.log, "ik =   1",  5, 6);   8.559355
match ; n2, k1 Coulomb Hole         ; GREP(sigma_hp.log, "ik =   1", 11, 6);  -4.825068
match ; n2, k1 Imag SX              ; GREP(sigma_hp.log, "ik =   1",  1, 7);   1.289698
match ; n2, k1 Imag CH              ; GREP(sigma_hp.log, "ik =   1",  2, 7);  -2.220994

# offdiagonals
# this is a diagonal actually and must match exactly the unsymmetrized diagonal value
match ; n1 x n1 k1 Exchange         ; GREP(sigma_hp.log, "1   1   1   real",  5, 0); -16.714526
match ; n1 x n1 k1 Screened Exchange; GREP(sigma_hp.log, "1   1   1   real",  6, 0);  11.100142
match ; n1 x n1 k1 Coulomb Hole     ; GREP(sigma_hp.log, "1   1   1   real", 10, 0);  -5.509516
match ; n1 x n1 k1 Imag SX          ; GREP(sigma_hp.log, "1   1   1   imag",  6, 0);   6.878241
match ; n1 x n1 k1 Imag CH          ; GREP(sigma_hp.log, "1   1   1   imag",  7, 0);  -5.929173
# this is some other offdiagonal
match ; n1 x n8 k1 Exchange         ; GREP(sigma_hp.log, "1   8   1   real",  5, 0);   0.000000
match ; n1 x n8 k1 Screened Exchange; GREP(sigma_hp.log, "1   8   1   real",  6, 0);  -0.000001
match ; n1 x n8 k1 Coulomb Hole     ; GREP(sigma_hp.log, "1   8   1   real", 10, 0);  -0.000002
match ; n1 x n8 k1 Imag SX          ; GREP(sigma_hp.log, "1   8   1   imag",  6, 0);   0.000000
match ; n1 x n8 k1 Imag CH          ; GREP(sigma_hp.log, "1   8   1   imag",  7, 0);  -0.000001
# this one is zero by symmetry
Precision : 1e-6
match ; n2 x n1 k1 Exchange         ; GREP(sigma_hp.log, "2   1   2   real",  5, 0);   0.000000
match ; n2 x n1 k1 Screened Exchange; GREP(sigma_hp.log, "2   1   2   real",  6, 0);   0.000000
match ; n2 x n1 k1 Imag SX          ; GREP(sigma_hp.log, "2   1   2   imag",  6, 0);   0.000000
match ; n2 x n1 k1 Coulomb Hole     ; GREP(sigma_hp.log, "2   1   2   real", 10, 0);   0.000000
match ; n2 x n1 k1 Imag CH          ; GREP(sigma_hp.log, "2   1   2   imag",  7, 0);   0.000000

Command : mv sigma_hp.log sig_hp_ff.log

Command : ln -s WFN_inner WFN_outer

#Test for full-frequency with ggpsum set to 2. The numbers are slightly different due
#to the fact that W(G,G') is slightly asymmetric in the wings because V(0) is averaged
#in Sigma but not in Epsilon.

Executable : sigma.real.x
Processors : 4
Output : sig_ff.out
Input  : sig_ff_ggp2.inp sigma.inp

Precision : 2e-5
match ; n2, k1 Initial Eigenvalue   ; GREP(sigma_hp.log, "ik =   1",  2, 6);  10.035862
match ; n2, k1 Exchange             ; GREP(sigma_hp.log, "ik =   1",  4, 6); -13.927243
match ; n2, k1 Screened Exchange    ; GREP(sigma_hp.log, "ik =   1",  5, 6);   8.559359
match ; n2, k1 Coulomb Hole         ; GREP(sigma_hp.log, "ik =   1",  6, 6);  -4.825069
match ; n2, k1 Imag SX              ; GREP(sigma_hp.log, "ik =   1",  1, 7);   1.289699
match ; n2, k1 Imag CH              ; GREP(sigma_hp.log, "ik =   1",  2, 7);  -2.220995

# supposed to be equal to above due to degeneracy and band-averaging
match ; n3, k1 Initial Eigenvalue   ; GREP(sigma_hp.log, "ik =   1",  2, 8);  10.035862
match ; n3, k1 Exchange             ; GREP(sigma_hp.log, "ik =   1",  4, 8); -13.927243
match ; n3, k1 Screened Exchange    ; GREP(sigma_hp.log, "ik =   1",  5, 8);   8.559359
match ; n3, k1 Coulomb Hole         ; GREP(sigma_hp.log, "ik =   1",  6, 8);  -4.825069
match ; n3, k1 Imag SX              ; GREP(sigma_hp.log, "ik =   1",  1, 9);   1.289699
match ; n3, k1 Imag CH              ; GREP(sigma_hp.log, "ik =   1",  2, 9);  -2.220995

Command : mv sigma_hp.log sig_hp_ff_ggp2.log

Executable : epsilon.real.x
Processors : 4
Output : eps_ff_elements.out
Input  : eps_ff_elements.inp epsilon.inp

Precision : 4e-12
match ; ret Re eps q1          ; GREP(eps_ff_elements.out, "q-pt      1: Retarded Head of Epsilon",          8, 0); 7.47530571237935
Precision : 1e-13
match ; ret Im eps q1          ; GREP(eps_ff_elements.out, "q-pt      1: Retarded Head of Epsilon",          9, 0); 0.0
match ; ret Re epsinv q1       ; GREP(eps_ff_elements.out, "q-pt      1: Retarded Head of Epsilon Inverse",  9, 0); 0.143379135635558
match ; ret Im epsinv q1       ; GREP(eps_ff_elements.out, "q-pt      1: Retarded Head of Epsilon Inverse", 10, 0); 0.0

Precision : 1e-5
match ; epsilon    Head 30.0 eV Re ; LINE(EpsDyn, 9, 2) ; 0.645807
match ; epsilon    Head 30.0 eV Im ; LINE(EpsDyn, 9, 3) ; 0.134043
match ; epsilonInv Head 30.0 eV Re ; LINE(EpsInvDyn, 21, 2) ; 1.393469
match ; epsilonInv Head 30.0 eV Im ; LINE(EpsInvDyn, 21, 3) ; -0.360050

Command : mv epsilon.log eps_ff_elements.log

Executable : epsilon.real.x
Processors : 4
Output : eps_ff1_elements.out
Input  : eps_ff1_elements.inp epsilon.inp

Precision : 4e-12
match ; ret Re eps q1          ; GREP(eps_ff1_elements.out, "q-pt      1: Retarded Head of Epsilon",          8, 0); 7.40118943397643
Precision : 1e-13
match ; ret Im eps q1          ; GREP(eps_ff1_elements.out, "q-pt      1: Retarded Head of Epsilon",          9, 0); 0.0
match ; ret Re epsinv q1       ; GREP(eps_ff1_elements.out, "q-pt      1: Retarded Head of Epsilon Inverse",  9, 0); 0.144811192937705
match ; ret Im epsinv q1       ; GREP(eps_ff1_elements.out, "q-pt      1: Retarded Head of Epsilon Inverse", 10, 0); 0.0

Precision : 1e-5
match ; epsilon    Head 30.0 eV Re ; LINE(EpsDyn, 21, 2) ; 0.681210
match ; epsilon    Head 30.0 eV Im ; LINE(EpsDyn, 21, 3) ; 0.155351
match ; epsilonInv Head 30.0 eV Re ; LINE(EpsInvDyn, 9, 2) ; 1.480033
match ; epsilonInv Head 30.0 eV Im ; LINE(EpsInvDyn, 9, 3) ; -0.357544

Command : mv epsilon.log eps_ff1_elements.log
Command : mv EpsDyn EpsDyn_ff1_elements
Command : mv EpsInvDyn EpsInvDyn_ff1_elements
