10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-09-27 03:51:01 +02:00
quantum_package/scripts/qp_e_conv_fci
Anthony Scemama c7894e3419
Toto (#84)
* minor changes in README.rst of many src files

* added ROHF_b2.gms.out

* modified some scripts

* modified README.rst

* modifs in docs/intro

* added qp_e_conv_fci

* changed the doc

* added some README.rst

* modifs in docs

* introduced the sgn grids

* added 21.rsks.bats
2019-01-02 21:48:54 +01:00

68 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
file=$1
out=${file}.conv
Ndet=`grep "N_det =" $file | cut -d "=" -f 2`
Evar=`grep "E =" $file | cut -d "=" -f 2`
EPT2=`grep "E+rPT2 =" $file | cut -d "=" -f 2 | cut -d "+" -f 1`
err=`grep "E+rPT2 =" $file | cut -d "=" -f 2 | cut -d "+" -f 2 | cut -d "/" -f 2 | cut -d " " -f 5`
Ndetarray=[]
j=0
for i in $Ndet
do
Ndetarray[$j]=$i
let "j=j+1"
done
Nmax=${#Ndetarray[*]}
let "Nmax-=1"
Evararray=[]
j=0
for i in $Evar
do
Evararray[$j]=$i
let "j=j+1"
done
EPT2array=[]
j=0
for i in $EPT2
do
EPT2array[$j]=$i
let "j=j+1"
done
errarray=[]
j=0
for i in $err
do
errarray[$j]=$i
let "j=j+1"
done
echo "#Ndet E_var E+PT2 statistical error " > $out
for i in `seq 0 $Nmax`
do
echo ${Ndetarray[$i]} ${Evararray[$i]} ${EPT2array[$i]} ${errarray[$i]} >> $out
done
cat << EOF > ${out}.plt
set term eps
set output "$out.eps"
set log x
set xlabel "Number of determinants"
set ylabel "Total Energy (a.u.)"
plot "$out" w lp title "E_{var}", "$out" u 1:3:4 w errorlines title "E_{var} + PT2"
EOF
gnuplot ${out}.plt