4
1
mirror of https://github.com/pfloos/quack synced 2024-12-22 20:35:36 +01:00

fix bug in printing qsGW energy after BSE

This commit is contained in:
Pierre-Francois Loos 2019-09-23 13:31:16 +02:00
parent ff82232fe5
commit f17760ce6f

115
extract.sh Executable file
View File

@ -0,0 +1,115 @@
#! /bin/bash
INPUT=$1
echo
echo '******************************************'
echo '*** Extracting information of' $INPUT ' ***'
echo '******************************************'
echo
echo
echo '*** WFT information ***'
grep "Hartree-Fock energy" $INPUT
EHF=`grep "Hartree-Fock energy" $INPUT | cut -f2 -d":"`
grep "MP2 correlation energy" $INPUT
grep "Ec(MP2) =" $INPUT
grep "Ec(CCSD) =" $INPUT
grep "Ec(CCSD(T)) =" $INPUT
echo
echo '*** Gap information: HF, G0F2, GF2, G0W0 & evGW ***'
HF=`grep "HF HOMO-LUMO gap (eV):" $INPUT | cut -f2 -d":"`
G0F2=`grep "GF2 HOMO-LUMO gap (eV):" $INPUT | head -1 | cut -f2 -d":"`
GF2=`grep "GF2 HOMO-LUMO gap (eV):" $INPUT | tail -1 | cut -f2 -d":"`
G0W0=`grep "G0W0 HOMO-LUMO gap (eV):" $INPUT | cut -f2 -d":"`
evGW=`grep "evGW HOMO-LUMO gap (eV):" $INPUT | tail -1 | cut -f2 -d":"`
echo -e "\t" $HF "\t" $G0F2 "\t" $GF2 "\t" $G0W0 "\t" $evGW
echo
echo '*** Ec@G0W0 information: RPA, GM, BSE1 & BSE3 ***'
RPA_G0W0=`grep "RPA@G0W0 correlation energy =" $INPUT| cut -f2 -d"="`
GM_G0W0=`grep "GM@G0W0 correlation energy =" $INPUT| cut -f2 -d"="`
BSE1_G0W0=`grep "BSE@G0W0 correlation energy (singlet)" $INPUT| cut -f2 -d"="`
BSE3_G0W0=`grep "BSE@G0W0 correlation energy (triplet)" $INPUT| cut -f2 -d"="`
echo -e "\t" $RPA_G0W0 "\t" $GM_G0W0 "\t" $BSE1_G0W0 "\t" $BSE3_G0W0
echo
echo '*** Ec@evGW information: RPA, GM, BSE1 & BSE3 ***'
RPA_evGW=`grep "RPA@evGW correlation energy =" $INPUT | tail -1| cut -f2 -d"="`
GM_evGW=`grep "GM@evGW correlation energy =" $INPUT | tail -1 | cut -f2 -d"="`
BSE1_evGW=`grep "BSE@evGW correlation energy (singlet)" $INPUT | cut -f2 -d"="`
BSE3_evGW=`grep "BSE@evGW correlation energy (triplet)" $INPUT | cut -f2 -d"="`
echo -e "\t" $RPA_evGW "\t" $GM_evGW "\t" $BSE1_evGW "\t" $BSE3_evGW
echo
echo '*** CIS and TDHF excitation energy (singlet & triplet) ***'
CIS1_1=`grep "| 1 |" $INPUT | head -1 | cut -f4 -d"|"`
CIS3_1=`grep "| 1 |" $INPUT | head -2 | cut -f4 -d"|" | tail -1`
TDHF1_1=`grep "| 1 |" $INPUT | head -3 | cut -f4 -d"|" | tail -1`
TDHF3_1=`grep "| 1 |" $INPUT | head -4 | cut -f4 -d"|" | tail -1`
echo -e "\t" $CIS1_1 "\t" $CIS3_1 "\t" $TDHF1_1 "\t" $TDHF3_1
CIS1_2=`grep "| 2 |" $INPUT | head -1 | cut -f4 -d"|"`
CIS3_2=`grep "| 2 |" $INPUT | head -2 | cut -f4 -d"|" | tail -1`
TDHF1_2=`grep "| 2 |" $INPUT | head -3 | cut -f4 -d"|" | tail -1`
TDHF3_2=`grep "| 2 |" $INPUT | head -4 | cut -f4 -d"|" | tail -1`
echo -e "\t" $CIS1_2 "\t" $CIS3_2 "\t" $TDHF1_2 "\t" $TDHF3_2
CIS1_3=`grep "| 3 |" $INPUT | head -1 | cut -f4 -d"|"`
CIS3_3=`grep "| 3 |" $INPUT | head -2 | cut -f4 -d"|" | tail -1`
TDHF1_3=`grep "| 3 |" $INPUT | head -3 | cut -f4 -d"|" | tail -1`
TDHF3_3=`grep "| 3 |" $INPUT | head -4 | cut -f4 -d"|" | tail -1`
echo -e "\t" $CIS1_3 "\t" $CIS3_3 "\t" $TDHF1_3 "\t" $TDHF3_3
CIS1_4=`grep "| 4 |" $INPUT | head -1 | cut -f4 -d"|"`
CIS3_4=`grep "| 4 |" $INPUT | head -2 | cut -f4 -d"|" | tail -1`
TDHF1_4=`grep "| 4 |" $INPUT | head -3 | cut -f4 -d"|" | tail -1`
TDHF3_4=`grep "| 4 |" $INPUT | head -4 | cut -f4 -d"|" | tail -1`
echo -e "\t" $CIS1_4 "\t" $CIS3_4 "\t" $TDHF1_4 "\t" $TDHF3_4
CIS1_5=`grep "| 5 |" $INPUT | head -1 | cut -f4 -d"|"`
CIS3_5=`grep "| 5 |" $INPUT | head -2 | cut -f4 -d"|" | tail -1`
TDHF1_5=`grep "| 5 |" $INPUT | head -3 | cut -f4 -d"|" | tail -1`
TDHF3_5=`grep "| 5 |" $INPUT | head -4 | cut -f4 -d"|" | tail -1`
echo -e "\t" $CIS1_5 "\t" $CIS3_5 "\t" $TDHF1_5 "\t" $TDHF3_5
echo
echo '*** BSE@G0W0 and BSE@evGW excitation energy (singlet & triplet) ***'
G0W01_1=`grep "| 1 |" $INPUT | head -6 | cut -f4 -d"|" | tail -1`
G0W03_1=`grep "| 1 |" $INPUT | head -7 | cut -f4 -d"|" | tail -1`
evGW1_1=`grep "| 1 |" $INPUT | tail -2 | head -1 | cut -f4 -d"|"`
evGW3_1=`grep "| 1 |" $INPUT | tail -1 | cut -f4 -d"|"`
echo -e "\t" $G0W01_1 "\t" $G0W03_1 "\t" $evGW1_1 "\t" $evGW3_1
G0W01_2=`grep "| 2 |" $INPUT | head -6 | cut -f4 -d"|" | tail -1`
G0W03_2=`grep "| 2 |" $INPUT | head -7 | cut -f4 -d"|" | tail -1`
evGW1_2=`grep "| 2 |" $INPUT | tail -2 | head -1 | cut -f4 -d"|"`
evGW3_2=`grep "| 2 |" $INPUT | tail -1 | cut -f4 -d"|"`
echo -e "\t" $G0W01_2 "\t" $G0W03_2 "\t" $evGW1_2 "\t" $evGW3_2
G0W01_3=`grep "| 3 |" $INPUT | head -6 | cut -f4 -d"|" | tail -1`
G0W03_3=`grep "| 3 |" $INPUT | head -7 | cut -f4 -d"|" | tail -1`
evGW1_3=`grep "| 3 |" $INPUT | tail -2 | head -1 | cut -f4 -d"|"`
evGW3_3=`grep "| 3 |" $INPUT | tail -1 | cut -f4 -d"|"`
echo -e "\t" $G0W01_3 "\t" $G0W03_3 "\t" $evGW1_3 "\t" $evGW3_3
G0W01_4=`grep "| 4 |" $INPUT | head -6 | cut -f4 -d"|" | tail -1`
G0W03_4=`grep "| 4 |" $INPUT | head -7 | cut -f4 -d"|" | tail -1`
evGW1_4=`grep "| 4 |" $INPUT | tail -2 | head -1 | cut -f4 -d"|"`
evGW3_4=`grep "| 4 |" $INPUT | tail -1 | cut -f4 -d"|"`
echo -e "\t" $G0W01_4 "\t" $G0W03_4 "\t" $evGW1_4 "\t" $evGW3_4
G0W01_5=`grep "| 5 |" $INPUT | head -6 | cut -f4 -d"|" | tail -1`
G0W03_5=`grep "| 5 |" $INPUT | head -7 | cut -f4 -d"|" | tail -1`
evGW1_5=`grep "| 5 |" $INPUT | tail -2 | head -1 | cut -f4 -d"|"`
evGW3_5=`grep "| 5 |" $INPUT | tail -1 | cut -f4 -d"|"`
echo -e "\t" $G0W01_5 "\t" $G0W03_5 "\t" $evGW1_5 "\t" $evGW3_5
echo '*** MATHEMATICA OUTPUT ***'
echo -e "\t" $EHF "\t" $CIS1_1 "\t" $CIS1_2 "\t" $CIS1_3 "\t" $CIS1_4 "\t" $CIS1_5 "\t" $CIS3_1 "\t" $CIS3_2 "\t" $CIS3_3 "\t" $CIS3_4 "\t" $CIS3_5 "\t" $TDHF1_1 "\t" $TDHF1_2 "\t" $TDHF1_3 "\t" $TDHF1_4 "\t" $TDHF1_5 "\t" $TDHF3_1 "\t" $TDHF3_2 "\t" $TDHF3_3 "\t" $TDHF3_4 "\t" $TDHF3_5 "\t" $RPA_G0W0 "\t" $GM_G0W0 "\t" $BSE1_G0W0 "\t" $BSE3_G0W0 "\t" $G0W01_1 "\t" $G0W01_2 "\t" $G0W01_3 "\t" $G0W01_4 "\t" $G0W01_5 "\t" $G0W03_1 "\t" $G0W03_2 "\t" $G0W03_3 "\t" $G0W03_4 "\t" $G0W03_5 "\t" $RPA_evGW "\t" $GM_evGW "\t" $BSE1_evGW "\t" $BSE3_evGW "\t" $evGW1_1 "\t" $evGW1_2 "\t" $evGW1_3 "\t" $evGW1_4 "\t" $evGW1_5 "\t" $evGW3_1 "\t" $evGW3_2 "\t" $evGW3_3 "\t" $evGW3_4 "\t" $evGW3_5
echo '*** DONE ***'