diff --git a/Be2_cc-pvtz/compute_NPE.pl b/Be2_cc-pvtz/compute_NPE.pl new file mode 100755 index 0000000..9a74955 --- /dev/null +++ b/Be2_cc-pvtz/compute_NPE.pl @@ -0,0 +1,98 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use List::Util qw(min max); + +my $case = $ARGV[0]; +my $xcut = $ARGV[1]; + +my(@files,@index,$outfile); + +if($case==1){ +@files = qw( pes_rhf.dat pes_CIo1.dat pes_CIo1.5.dat pes_CIo2.dat pes_CIo2.5.dat pes_CIo3.dat pes_CIo3.5.dat pes_CIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_CIo.dat"; +} +elsif($case==2){ +@files = qw( pes_rhf.dat pes_ooCIo1.dat pes_ooCIo1.5.dat pes_ooCIo2.dat pes_ooCIo2.5.dat pes_ooCIo3.dat pes_ooCIo3.5.dat pes_ooCIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_ooCIo.dat"; +} +elsif($case==3){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_CISD.dat pes_CISDT.dat pes_CISDTQ.dat); +@index = qw( 0 1 2 3 4); +$outfile = "stat_CI.dat"; +} +elsif($case==4){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_ooCISD.dat pes_ooCISDT.dat); +@index = qw( 0 1 2 3); +$outfile = "stat_ooCI.dat"; +} +else{ +print "case variable not recognized \n"; +die; +} + +my $fci_file = 'pes_fci.dat'; + +my $n_files = @files; + +my (@x0, @y0); +my ($x, $y, $dy); +my ($i, $n); + +$n=0; +open(Fi, '<', $fci_file) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $n++; + $x0[$n] = $line[0]; + $y0[$n] = $line[1]; + if($x0[$n]>$xcut){last}; + } +close(Fi); + + if(-e $outfile){unlink $outfile}; + + open(Fo, '>>', $outfile) or die $!; + for ( my $j = 0; $j < $n_files; $j++ ){ + + if(-e $files[$j]){ + + my $maxy = -1e99; + my $miny = 1e99; + + # my $m=0; + # open(Fi, '<', $files[$j]) or die $!; + # while(){ + # $m++; + # } + # close(Fi); + + # if($m==$n){ + my $m=0; + open(Fi, '<', $files[$j]) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $m++; + $x = $line[0]; + $y = $line[1]; + $dy = $y - $y0[$m]; + $maxy = max($maxy,$dy); + $miny = min($miny,$dy); + if($x==$xcut){last}; + } + close(Fi); + + if($x==$xcut){ + my $npe = $maxy - $miny; + my $closeness = $maxy + $miny; + print Fo "$index[$j] $npe $closeness $maxy $miny \n"; + } + # } + + } + + } + close(Fo); diff --git a/Be2_cc-pvtz/cp_to_manuscript.sh b/Be2_cc-pvtz/cp_to_manuscript.sh new file mode 100755 index 0000000..a4382c5 --- /dev/null +++ b/Be2_cc-pvtz/cp_to_manuscript.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mol='be2' + +path='/home/fabris/ongoing_projects/seniority/Manuscript' + +cp plot_pes.pdf $path/${mol}_pes.pdf +cp plot_error.pdf $path/${mol}_pes_error.pdf +cp plot_stat.pdf $path/${mol}_pes_stat.pdf +cp xe.pdf $path/${mol}_xe.pdf diff --git a/Be2_cc-pvtz/fit_eq.gnu b/Be2_cc-pvtz/fit_eq.gnu new file mode 100644 index 0000000..6237556 --- /dev/null +++ b/Be2_cc-pvtz/fit_eq.gnu @@ -0,0 +1,301 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[2.0:10.0] +xmin=2.10 +xmax=2.60 + +# VIEW 1: +#set yrange[-29.256:-29.238] +set yrange[-29.26:-29.1] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 9 dt 1 lw 2 linecolor rgb "violet" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 +set style line 15 dt 2 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel "Distance ({\305})" +set ylabel 'Energy (Hartree)' + +# check if file exists +file_exists(file) = int(system("[ -f '".file."' ] && echo '1' || echo '0'")) +D0=0.0;a0=2.0;xe0=1.0;C0=0.0 +D1=0.0;a1=2.0;xe1=1.0;C1=0.0 +D2=0.0;a2=2.0;xe2=1.0;C2=0.0 +D3=0.0;a3=2.0;xe3=1.0;C3=0.0 +D4=0.0;a4=2.0;xe4=1.0;C4=0.0 +D5=0.0;a5=2.0;xe5=1.0;C5=0.0 +D6=0.0;a6=2.0;xe6=1.0;C6=0.0 +D7=0.0;a7=2.0;xe7=1.0;C7=0.0 +D8=0.0;a8=2.0;xe8=1.0;C8=0.0 +D9=0.0;a9=2.0;xe9=1.0;C9=0.0 +D10=0.0;a10=2.0;xe10=1.0;C10=0.0 +D11=0.0;a11=2.0;xe11=1.0;C11=0.0 +D12=0.0;a12=2.0;xe12=1.0;C12=0.0 +D13=0.0;a13=2.0;xe13=1.0;C13=0.0 +D14=0.0;a14=2.0;xe14=1.0;C14=0.0 +D15=0.0;a15=2.0;xe15=1.0;C15=0.0 +D16=0.0;a16=2.0;xe16=1.0;C16=0.0 +D17=0.0;a17=2.0;xe17=1.0;C17=0.0 +D18=0.0;a18=2.0;xe18=1.0;C18=0.0 + +# function for fitting + +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +filename='pes_fci.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a0=2.0; xe0=STATS_pos_min_y; C0=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D0=last_y-C0 +fit [xmin:xmax] [*:*] f0(x) filename u 1:($2) via D0,a0,xe0,C0 +} + +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +filename='pes_rhf.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a1=2.0; xe1=STATS_pos_min_y; C1=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D1=last_y-C1 +fit [xmin:xmax] [*:*] f1(x) filename u 1:($2) via D1,a1,xe1,C1 +} + +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +filename='pes_CISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a2=2.0; xe2=STATS_pos_min_y; C2=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D2=last_y-C2 +fit [xmin:xmax] [*:*] f2(x) filename u 1:($2) via D2,a2,xe2,C2 +} + +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +filename='pes_CISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a3=2.0; xe3=STATS_pos_min_y; C3=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D3=last_y-C3 +fit [xmin:xmax] [*:*] f3(x) filename u 1:($2) via D3,a3,xe3,C3 +} + +f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +filename='pes_CISDTQ.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a4=2.0; xe4=STATS_pos_min_y; C4=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D4=last_y-C4 +fit [xmin:xmax] [*:*] f4(x) filename u 1:($2) via D4,a4,xe4,C4 +} + +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +filename='pes_CIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a5=2.0; xe5=STATS_pos_min_y; C5=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D5=last_y-C5 +print D4, a5, xe5, C5 +fit [xmin:xmax] [*:*] f5(x) filename u 1:($2) via D5,a5,xe5,C5 +} + +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +filename='pes_CIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a6=2.0; xe6=STATS_pos_min_y; C6=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D6=last_y-C6 +fit [xmin:xmax] [*:*] f6(x) filename u 1:($2) via D6,a6,xe6,C6 +} + +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +filename='pes_CIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a7=2.0; xe7=STATS_pos_min_y; C7=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D7=last_y-C7 +fit [xmin:xmax] [*:*] f7(x) filename u 1:($2) via D7,a7,xe7,C7 +} + +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +filename='pes_CIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a8=2.0; xe8=STATS_pos_min_y; C8=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D8=last_y-C8 +fit [xmin:xmax] [*:*] f8(x) filename u 1:($2) via D8,a8,xe8,C8 +} + +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +filename='pes_CIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a9=2.0; xe9=STATS_pos_min_y; C9=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D9=last_y-C9 +fit [xmin:xmax] [*:*] f9(x) filename u 1:($2) via D9,a9,xe9,C9 +} + +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +filename='pes_CIo3.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a10=2.0; xe10=STATS_pos_min_y; C10=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D10=last_y-C10 +fit [xmin:xmax] [*:*] f10(x) filename u 1:($2) via D10,a10,xe10,C10 +} + +f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +filename='pes_CIo4.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a11=2.0; xe11=STATS_pos_min_y; C11=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D11=last_y-C11 +fit [xmin:xmax] [*:*] f11(x) filename u 1:($2) via D11,a11,xe11,C11 +} + +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +filename='pes_ooCISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a12=2.0; xe12=STATS_pos_min_y; C12=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D12=last_y-C12 +fit [xmin:xmax] [*:*] f12(x) filename u 1:($2) via D12,a12,xe12,C12 +} + +f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +filename='pes_ooCISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a13=2.0; xe13=STATS_pos_min_y; C13=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D13=last_y-C13 +fit [xmin:xmax] [*:*] f13(x) filename u 1:($2) via D13,a13,xe13,C13 +} + +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +filename='pes_ooCIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a14=2.0; xe14=STATS_pos_min_y; C14=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D14=last_y-C14 +fit [xmin:xmax] [*:*] f14(x) filename u 1:($2) via D14,a14,xe14,C14 +} + +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +filename='pes_ooCIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a15=2.0; xe15=STATS_pos_min_y; C15=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D15=last_y-C15 +fit [xmin:xmax] [*:*] f15(x) filename u 1:($2) via D15,a15,xe15,C15 +} + +f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +filename='pes_ooCIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a16=2.0; xe16=STATS_pos_min_y; C16=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D16=last_y-C16 +fit [xmin:xmax] [*:*] f16(x) filename u 1:($2) via D16,a16,xe16,C16 +} + +f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +filename='pes_ooCIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a17=2.0; xe17=STATS_pos_min_y; C17=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D17=last_y-C17 +fit [xmin:xmax] [*:*] f17(x) filename u 1:($2) via D17,a17,xe17,C17 +} + +f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +filename='pes_ooCIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a18=2.0; xe18=STATS_pos_min_y; C18=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D18=last_y-C18 +fit [xmin:xmax] [*:*] f18(x) filename u 1:($2) via D18,a18,xe18,C18 +} + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CISDTQ.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_CIo3.dat' w lp ls 4 notitle, \ + 'pes_CIo3.5.dat' w lp ls 5 notitle, \ + 'pes_CIo4.dat' w lp ls 4 notitle, \ + 'pes_ooCISD.dat' w lp ls 13 notitle, \ + 'pes_ooCISDT.dat' w lp ls 13 notitle, \ + 'pes_ooCIo1.dat' w lp ls 14 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo2.dat' w lp ls 14 notitle, \ + 'pes_ooCIo2.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo3.dat' w lp ls 14 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f4(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f11(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f13(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle, \ + [xmin:xmax] f16(x) w l ls 9 notitle, \ + [xmin:xmax] f17(x) w l ls 9 notitle, \ + [xmin:xmax] f18(x) w l ls 9 notitle + +################################################################################### +################################################################################### + +pause -1 diff --git a/Be2_cc-pvtz/fit_eq.sh b/Be2_cc-pvtz/fit_eq.sh new file mode 100755 index 0000000..020ed9b --- /dev/null +++ b/Be2_cc-pvtz/fit_eq.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +if [ -f "fit.log" ]; then + rm "fit.log" +fi + +gnuplot fit_eq.gnu + +grep ^xe fit.log | grep = | sed 's/=//g' | cut -c -30 | + sed 's/xe0 /FCI /g' | + sed 's/xe1 /RHF /g' | + sed 's/xe2 /hfCISD /g' | + sed 's/xe3 /hfCISDT /g' | + sed 's/xe4 /hfCISDTQ /g' | + sed 's/xe5 /hfCIo1 /g' | + sed 's/xe6 /hfCIo1.5 /g' | + sed 's/xe7 /hfCIo2 /g' | + sed 's/xe8 /hfCIo2.5 /g' | + sed 's/xe9 /hfCIo3 /g' | + sed 's/xe10/hfCIo3.5 /g' | + sed 's/xe11/hfCIo4 /g' | + sed 's/xe12/ooCISD /g' | + sed 's/xe13/ooCISDT /g' | + sed 's/xe14/ooCIo1 /g' | + sed 's/xe15/ooCIo1.5 /g' | + sed 's/xe16/ooCIo2 /g' | + sed 's/xe17/ooCIo2.5 /g' | + sed 's/xe18/ooCIo3 /g' > xe.dat + + +grep 'FCI' xe.dat | sed 's/FCI/-0.1 /g' > xe_FCI.dat +grep 'FCI' xe.dat | sed 's/FCI/4.1 /g' >> xe_FCI.dat + +#grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CI.dat +#grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_CI.dat +grep 'hfCISD ' xe.dat | sed 's/hfCISD/2 /g' > xe_CI.dat +grep 'hfCISDT ' xe.dat | sed 's/hfCISDT/3 /g' >> xe_CI.dat +grep 'hfCISDTQ' xe.dat | sed 's/hfCISDTQ/4 /g' >> xe_CI.dat + +#grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCI.dat +#grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_ooCI.dat +grep 'ooCISD ' xe.dat | sed 's/ooCISD/2 /g' > xe_ooCI.dat +grep 'ooCISDT' xe.dat | sed 's/ooCISDT/3 /g' >> xe_ooCI.dat + +#grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CIo.dat +grep 'hfCIo1 ' xe.dat | sed 's/hfCIo1/1 /g' > xe_CIo.dat +grep 'hfCIo1.5' xe.dat | sed 's/hfCIo1.5/1.5 /g' >> xe_CIo.dat +grep 'hfCIo2 ' xe.dat | sed 's/hfCIo2/2 /g' >> xe_CIo.dat +grep 'hfCIo2.5' xe.dat | sed 's/hfCIo2.5/2.5 /g' >> xe_CIo.dat +grep 'hfCIo3 ' xe.dat | sed 's/hfCIo3/3 /g' >> xe_CIo.dat +grep 'hfCIo3.5' xe.dat | sed 's/hfCIo3.5/3.5 /g' >> xe_CIo.dat +grep 'hfCIo4 ' xe.dat | sed 's/hfCIo4/4 /g' >> xe_CIo.dat + +#grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCIo.dat +grep 'ooCIo1 ' xe.dat | sed 's/ooCIo1/1 /g' > xe_ooCIo.dat +grep 'ooCIo1.5' xe.dat | sed 's/ooCIo1.5/1.5 /g' >> xe_ooCIo.dat +grep 'ooCIo2 ' xe.dat | sed 's/ooCIo2/2 /g' >> xe_ooCIo.dat +grep 'ooCIo2.5' xe.dat | sed 's/ooCIo2.5/2.5 /g' >> xe_ooCIo.dat +grep 'ooCIo3 ' xe.dat | sed 's/ooCIo3/3 /g' >> xe_ooCIo.dat + +#epspdf fit_eq.eps +#okular fit_eq.pdf diff --git a/Be2_cc-pvtz/plot.gnu b/Be2_cc-pvtz/plot.gnu new file mode 100644 index 0000000..d610da2 --- /dev/null +++ b/Be2_cc-pvtz/plot.gnu @@ -0,0 +1,57 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot.eps' + +set format y "10^{%T}" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +#r=2.3 angs + +efci=-29.25540426 + +set xrange[-0.1:4.1] +set yrange[1e-5:1] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 2 +set logscale y + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Energy error (Hartree)' + +plot 'r2.3_ciexc.dat' u 1:($2-efci) w lp ls 3 notitle, \ + 'r2.3_cio.dat' u 1:($2-efci) w lp ls 4 notitle + +unset ylabel +#unset ytics +unset label + +plot 'r2.3_oociexc.dat' u 1:($2-efci) w lp ls 13 notitle, \ + 'r2.3_oocio.dat' u 1:($2-efci) w lp ls 14 notitle diff --git a/Be2_cc-pvtz/plot.sh b/Be2_cc-pvtz/plot.sh new file mode 100755 index 0000000..f9f68b6 --- /dev/null +++ b/Be2_cc-pvtz/plot.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot.gnu +epspdf plot.eps +okular plot.pdf diff --git a/Be2_cc-pvtz/plot_1.gnu b/Be2_cc-pvtz/plot_1.gnu new file mode 100644 index 0000000..918e1b8 --- /dev/null +++ b/Be2_cc-pvtz/plot_1.gnu @@ -0,0 +1,54 @@ +#!/bin/gnuplot + +#r=2.3 angs + +efci=-29.25540426 + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,18' linewidth 2 +set output 'plot.eps' + +xmin=-0.1 +xmax=3.5 +ymin=0.0 +ymax=1.0 + +set grid + +#set format y "%.0e*10^{%T}" +set format y "10^{%T}" + +#set xrange[-0.1:3.1] +set xrange[-0.1:4.1] +#set yrange[0.0:0.2] + +set logscale y +set yrange[1e-5:1] +#set yrange[1e-4:1.0] + +#set xrange[1.9:3.1] +#set yrange[0.0:0.006] + +set style line 1 dt 1 lw 1 linecolor rgb "gray60" pt 13 ps 1.75 +set style line 3 dt 1 lw 1 linecolor rgb "light-red" pt 13 ps 1.75 +set style line 4 dt 1 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 +set style line 5 dt 2 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 + +set style line 11 dt 1 lw 1.5 linecolor rgb "gray60" +set style line 13 dt 2 lw 1.5 linecolor rgb "light-red" pt 7 ps 1.75 +set style line 14 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 +set style line 15 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 + +set xlabel 'Computational scaling' +set ylabel 'Energy error (Hartree)' + +plot 'r2.3_ciexc.dat' u 1:($2-efci) w lp ls 3 notitle, \ + 'r2.3_oociexc.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'r2.3_oociexc.dat' u 1:($2-efci) w lp ls 13 notitle, \ + 'r2.3_cio.dat' u 1:($2-efci) w lp ls 4 notitle, \ + 'r2.3_oocio.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'r2.3_oocio.dat' u 1:($2-efci) w lp ls 14 notitle + +#pause -1 diff --git a/Be2_cc-pvtz/plot_error.sh b/Be2_cc-pvtz/plot_error.sh new file mode 100755 index 0000000..86447b8 --- /dev/null +++ b/Be2_cc-pvtz/plot_error.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_error.gnu +epspdf plot_error.eps +okular plot_error.pdf diff --git a/Be2_cc-pvtz/plot_error_1.gnu b/Be2_cc-pvtz/plot_error_1.gnu new file mode 100644 index 0000000..5b700b0 --- /dev/null +++ b/Be2_cc-pvtz/plot_error_1.gnu @@ -0,0 +1,64 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_error.png' + +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,16' linewidth 2 +set output 'plot_error.eps' + +xmin=2.0 +xmax=10.0 +ymin=0.0 +ymax=0.15 + +set xrange[2.0:10.0] +# VIEW 1 +#set logscale y +# VIEW 1 +#set yrange[0.0:0.15] +# VIEW 2 +set yrange[0.0:0.02] + +set style line 1 dt 1 lw 2 linecolor rgb "gray" +set style line 2 dt 1 lw 2 linecolor rgb "black" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" +set style line 6 dt 1 lw 2 linecolor rgb "orange" +set style line 7 dt 2 lw 2 linecolor rgb "orange" + +set style line 13 dt 1 lw 2 linecolor rgb "red" +set style line 14 dt 1 lw 2 linecolor rgb "forest-green" +set style line 15 dt 2 lw 2 linecolor rgb "forest-green" + + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy error (Hartree)' + +plot '< paste pes_fci.dat pes_rhf.dat' using 1:($4-$2) w l ls 1 notitle, \ + '< paste pes_fci.dat pes_s4.e2.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_s6.e3.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_s8.e4.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_CIo1.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo1.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo2.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_CIo2.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo3.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_CIo3.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo4.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_ooCISD.dat' using 1:($4-$2) w l ls 13 notitle, \ + '< paste pes_fci.dat pes_ooCIo1.dat' using 1:($4-$2) w l ls 15 notitle, \ + '< paste pes_fci.dat pes_ooCIo1.5.dat' using 1:($4-$2) w l ls 15 notitle, \ + '< paste pes_fci.dat pes_ooCIo2.dat' using 1:($4-$2) w l ls 14 notitle, \ + '< paste pes_fci.dat pes_fci.dat' using 1:($4-$2) w l ls 2 notitle +# '< paste pes_fci.dat pes_pccd.dat' using 1:($4-$2) w l ls 6 notitle, \ +# '< paste pes_fci.dat pes_s0.e2.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e2.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e3.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s4.e3.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s0.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s4.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ + +#pause -1 diff --git a/Be2_cc-pvtz/plot_pes.sh b/Be2_cc-pvtz/plot_pes.sh new file mode 100755 index 0000000..86f7778 --- /dev/null +++ b/Be2_cc-pvtz/plot_pes.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +gnuplot plot_pes.gnu +#gnuplot plot_pes_view2.gnu +epspdf plot_pes.eps +okular plot_pes.pdf diff --git a/Be2_cc-pvtz/plot_pes_1.gnu b/Be2_cc-pvtz/plot_pes_1.gnu new file mode 100644 index 0000000..6cae90d --- /dev/null +++ b/Be2_cc-pvtz/plot_pes_1.gnu @@ -0,0 +1,99 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' + +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,16' linewidth 2 +set output 'plot_pes.eps' + +xmin=2.0 +xmax=10.0 +ymin=-29.256 +ymax=-29.235 + + +set xrange[2.0:10.0] +# VIEW 1: +#set yrange[-29.26:-29.1] +# VIEW 2: +set yrange[-29.256:-29.235] + + +set style line 1 dt 1 lw 2 linecolor rgb "gray" +set style line 2 dt 1 lw 2 linecolor rgb "black" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" +set style line 6 dt 1 lw 2 linecolor rgb "orange" +set style line 7 dt 2 lw 2 linecolor rgb "orange" + +set style line 13 dt 1 lw 2 linecolor rgb "red" +set style line 14 dt 1 lw 2 linecolor rgb "forest-green" +set style line 15 dt 2 lw 2 linecolor rgb "forest-green" + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy (Hartree)' + +# get the relation of x- and y-range +dx = xmax-xmin +dy = ymax-ymin +s1 = dx/dy +# get ratio of axes +s2 = 3.0/5.3 +# helper function for getting the rotation angle of the labels in degree +deg(x) = x/pi*180.0 +r(x) = deg(atan(s1*s2*x)) +# function for fitting +f(x) = a*x+b + +#fit [2.5:3.0] [*:*] f(x) 'pes_rhf.dat' u 1:($2) via a,b +#set label 1 'RHF' at 1.3,-99.90 rotate by r(a) center tc ls 1 #font 'Verdana,20' + +fit [2.7:3.0] [*:*] f(x) 'pes_s4.e2.dat' u 1:($2) via a,b +set label 2 'CISD' at 2.8,-29.240 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [3.0:4.0] [*:*] f(x) 'pes_s6.e3.dat' u 1:($2) via a,b +set label 3 'CISDT' at 3.5,-29.2418 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [3.7:4.3] [*:*] f(x) 'pes_s8.e4.dat' u 1:($2) via a,b +set label 4 'CISDTQ' at 4.0,-29.2492 rotate by r(a) center tc ls 3 #font 'Verdana,20' + +fit [5.0:7.0] [*:*] f(x) 'pes_CIo2.dat' u 1:($2) via a,b +set label 12 'CIo2' at 6.0,-29.2408 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [5.0:7.0] [*:*] f(x) 'pes_CIo3.dat' u 1:($2) via a,b +set label 13 'CIo3' at 6.0,-29.2465 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [5.0:7.0] [*:*] f(x) 'pes_CIo4.dat' u 1:($2) via a,b +set label 14 'CIo4' at 6.0,-29.2485 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [7.0:9.0] [*:*] f(x) 'pes_fci.dat' u 1:($2) via a,b +set label 20 'FCI' at 8.0,-29.24829 rotate by r(a) center tc ls 2 #font 'Verdana,20' + + +plot 'pes_rhf.dat' w l ls 1 notitle, \ + 'pes_s4.e2.dat' w l ls 3 notitle, \ + 'pes_s6.e3.dat' w l ls 3 notitle, \ + 'pes_CIo1.dat' w l ls 5 notitle, \ + 'pes_CIo1.5.dat' w l ls 5 notitle, \ + 'pes_CIo2.dat' w l ls 4 notitle, \ + 'pes_CIo2.5.dat' w l ls 5 notitle, \ + 'pes_CIo3.dat' w l ls 4 notitle, \ + 'pes_s8.e4.dat' w l ls 3 notitle, \ + 'pes_CIo4.dat' w l ls 4 notitle, \ + 'pes_ooCIo1.dat' w l ls 15 notitle, \ + 'pes_ooCISD.dat' w l ls 13 notitle, \ + 'pes_ooCIo1.5.dat' w l ls 15 notitle, \ + 'pes_ooCIo2.dat' w l ls 14 notitle, \ + 'pes_ooCIo2.5.dat' w l ls 15 notitle, \ + 'pes_ooCIo3.dat' w l ls 14 notitle, \ + 'pes_fci.dat' w l ls 2 notitle +# 'pes_pccd.dat' w l ls 6 notitle, \ +# 'pes_ccsd.dat' w l ls 6 notitle, \ +# 'pes_ccsdt.dat' w l ls 6 notitle, \ +# 'pes_g14.dat' w l ls 5 notitle, \ +# 'pes_s0.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e3.dat' w l ls 1 notitle, \ +# 'pes_s4.e3.dat' w l ls 1 notitle, \ +# 'pes_s0.e4.dat' w l ls 1 notitle, \ +# 'pes_s2.e4.dat' w l ls 1 notitle, \ +# 'pes_s4.e4.dat' w l ls 1 notitle, \ + +#pause -1 diff --git a/Be2_cc-pvtz/plot_pes_view2.gnu b/Be2_cc-pvtz/plot_pes_view2.gnu new file mode 100644 index 0000000..7317a0d --- /dev/null +++ b/Be2_cc-pvtz/plot_pes_view2.gnu @@ -0,0 +1,116 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_pes.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +set xrange[2.0:10.0] +xmin=2.0 +xmax=10.0 + +# VIEW 1: +set yrange[-29.256:-29.235] +ymin=-29.256 +ymax=-29.235 + +# VIEW 2: +set yrange[-29.26:-29.12] +ymin=-29.26 +ymax=-29.12 + +################################################################################### +################################################################################### + +set format y "%.2f" + +if (!exists("MP_LEFT")) MP_LEFT = 0.20 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.97 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.05 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 3 dt 1 lw 3 linecolor rgb "light-red" +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" +set style line 5 dt 2 lw 3 linecolor rgb "sea-green" +set style line 6 dt 1 lw 3 linecolor rgb "orange" +set style line 7 dt 2 lw 3 linecolor rgb "orange" + +set xlabel "Distance ({\305})" +set ylabel 'Energy (Hartree)' + +# get the relation of x- and y-range +dx = xmax-xmin +dy = ymax-ymin +s1 = dx/dy +# get ratio of axes +#s2 = 3.0/5.3 +s2 = 5.3/5.3#/2 +# helper function for getting the rotation angle of the labels in degree +deg(x) = x/pi*180.0 +r(x) = deg(atan(s1*s2*x)) +# function for fitting +f(x) = a*x+b + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +#fit [2.7:3.0] [*:*] f(x) 'pes_CISD.dat' u 1:($2) via a,b +#set label 2 'CISD' at 2.8,-29.240 rotate by r(a) center tc ls 3 #font 'Verdana,20' +#fit [3.0:4.0] [*:*] f(x) 'pes_CISDT.dat' u 1:($2) via a,b +#set label 3 'CISDT' at 3.5,-29.2418 rotate by r(a) center tc ls 3 #font 'Verdana,20' +#fit [3.7:4.3] [*:*] f(x) 'pes_CISDTQ.dat' u 1:($2) via a,b +#set label 4 'CISDTQ' at 4.0,-29.2492 rotate by r(a) center tc ls 3 #font 'Verdana,20' +#fit [5.0:7.0] [*:*] f(x) 'pes_CIo2.dat' u 1:($2) via a,b +#set label 12 'CIo2' at 7.0,-29.2408 rotate by r(a) center tc ls 4 #font 'Verdana,20' +#fit [5.0:7.0] [*:*] f(x) 'pes_CIo3.dat' u 1:($2) via a,b +#set label 13 'CIo3' at 7.0,-29.2465 rotate by r(a) center tc ls 4 #font 'Verdana,20' +#fit [5.0:7.0] [*:*] f(x) 'pes_CIo4.dat' u 1:($2) via a,b +#set label 14 'CIo4' at 6.0,-29.2485 rotate by r(a) center tc ls 4 #font 'Verdana,20' +#fit [7.0:9.0] [*:*] f(x) 'pes_fci.dat' u 1:($2) via a,b +#set label 20 'FCI' at 8.0,-29.24829 rotate by r(a) center tc ls 2 #font 'Verdana,20' + +plot 'pes_rhf.dat' w l ls 1 notitle, \ + 'pes_CISD.dat' w l ls 3 notitle, \ + 'pes_CISDT.dat' w l ls 3 notitle, \ + 'pes_CIo1.dat' w l ls 4 notitle, \ + 'pes_CIo1.5.dat' w l ls 5 notitle, \ + 'pes_CIo2.dat' w l ls 4 notitle, \ + 'pes_CIo2.5.dat' w l ls 5 notitle, \ + 'pes_CIo3.dat' w l ls 4 notitle, \ + 'pes_fci.dat' w l ls 2 notitle +# 'pes_CISDTQ.dat' w l ls 3 notitle, \ +# 'pes_CIo4.dat' w l ls 4 notitle, \ + +unset label +unset ylabel +set format y "" + +plot 'pes_rhf.dat' w l ls 1 notitle, \ + 'pes_ooCISD.dat' w l ls 3 notitle, \ + 'pes_ooCISDT.dat' w l ls 3 notitle, \ + 'pes_ooCIo1.dat' w l ls 4 notitle, \ + 'pes_ooCIo1.5.dat' w l ls 5 notitle, \ + 'pes_ooCIo2.dat' w l ls 4 notitle, \ + 'pes_ooCIo2.5.dat' w l ls 5 notitle, \ + 'pes_ooCIo3.dat' w l ls 4 notitle, \ + 'pes_fci.dat' w l ls 2 notitle + +################################################################################### +################################################################################### + diff --git a/Be2_cc-pvtz/plot_stat.gnu b/Be2_cc-pvtz/plot_stat.gnu new file mode 100644 index 0000000..4d608a9 --- /dev/null +++ b/Be2_cc-pvtz/plot_stat.gnu @@ -0,0 +1,51 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat.eps' + +set format y "10^{%T}" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] +set yrange[1e-5:1e-1] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 1 +set logscale y + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CI.dat' u 1:($2) w lp ls 3 notitle, \ + 'stat_CIo.dat' u 1:($2) w lp ls 4 notitle + +unset ylabel +unset label + +plot 'stat_ooCI.dat' u 1:($2) w lp ls 13 notitle, \ + 'stat_ooCIo.dat' u 1:($2) w lp ls 14 notitle diff --git a/Be2_cc-pvtz/plot_stat.sh b/Be2_cc-pvtz/plot_stat.sh new file mode 100755 index 0000000..0319a62 --- /dev/null +++ b/Be2_cc-pvtz/plot_stat.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +./compute_NPE.pl 1 10.0 +./compute_NPE.pl 2 10.0 +./compute_NPE.pl 3 10.0 +./compute_NPE.pl 4 10.0 + +gnuplot plot_stat.gnu +epspdf plot_stat.eps +okular plot_stat.pdf diff --git a/Be2_cc-pvtz/xe.gnu b/Be2_cc-pvtz/xe.gnu new file mode 100644 index 0000000..6db5cdd --- /dev/null +++ b/Be2_cc-pvtz/xe.gnu @@ -0,0 +1,70 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'xe.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] + +# VIEW 1: +set yrange[2.20:2.50] +set format y "%.2f" +################################################################################### +################################################################################### + +set xtics 1 +#set ytics 0.02 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.15 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" + +set style line 3 dt 1 lw 3 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel "Equilibrium distance ({\305})" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_CI.dat' w lp ls 3 notitle, \ + 'xe_CIo.dat' w lp ls 4 notitle#, \ +# 'xe_ooCI.dat' w lp ls 13 notitle, \ +# 'xe_ooCIo.dat' w lp ls 14 notitle + +unset ylabel +unset label +set format y "" + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_ooCI.dat' w lp ls 13 notitle, \ + 'xe_ooCIo.dat' w lp ls 14 notitle + +################################################################################### +################################################################################### + +#pause -1 diff --git a/Be2_cc-pvtz/xe.sh b/Be2_cc-pvtz/xe.sh new file mode 100755 index 0000000..2896546 --- /dev/null +++ b/Be2_cc-pvtz/xe.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot xe.gnu +epspdf xe.eps +okular xe.pdf diff --git a/F2_cc-pvdz/compute_NPE.pl b/F2_cc-pvdz/compute_NPE.pl new file mode 100755 index 0000000..9a74955 --- /dev/null +++ b/F2_cc-pvdz/compute_NPE.pl @@ -0,0 +1,98 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use List::Util qw(min max); + +my $case = $ARGV[0]; +my $xcut = $ARGV[1]; + +my(@files,@index,$outfile); + +if($case==1){ +@files = qw( pes_rhf.dat pes_CIo1.dat pes_CIo1.5.dat pes_CIo2.dat pes_CIo2.5.dat pes_CIo3.dat pes_CIo3.5.dat pes_CIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_CIo.dat"; +} +elsif($case==2){ +@files = qw( pes_rhf.dat pes_ooCIo1.dat pes_ooCIo1.5.dat pes_ooCIo2.dat pes_ooCIo2.5.dat pes_ooCIo3.dat pes_ooCIo3.5.dat pes_ooCIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_ooCIo.dat"; +} +elsif($case==3){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_CISD.dat pes_CISDT.dat pes_CISDTQ.dat); +@index = qw( 0 1 2 3 4); +$outfile = "stat_CI.dat"; +} +elsif($case==4){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_ooCISD.dat pes_ooCISDT.dat); +@index = qw( 0 1 2 3); +$outfile = "stat_ooCI.dat"; +} +else{ +print "case variable not recognized \n"; +die; +} + +my $fci_file = 'pes_fci.dat'; + +my $n_files = @files; + +my (@x0, @y0); +my ($x, $y, $dy); +my ($i, $n); + +$n=0; +open(Fi, '<', $fci_file) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $n++; + $x0[$n] = $line[0]; + $y0[$n] = $line[1]; + if($x0[$n]>$xcut){last}; + } +close(Fi); + + if(-e $outfile){unlink $outfile}; + + open(Fo, '>>', $outfile) or die $!; + for ( my $j = 0; $j < $n_files; $j++ ){ + + if(-e $files[$j]){ + + my $maxy = -1e99; + my $miny = 1e99; + + # my $m=0; + # open(Fi, '<', $files[$j]) or die $!; + # while(){ + # $m++; + # } + # close(Fi); + + # if($m==$n){ + my $m=0; + open(Fi, '<', $files[$j]) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $m++; + $x = $line[0]; + $y = $line[1]; + $dy = $y - $y0[$m]; + $maxy = max($maxy,$dy); + $miny = min($miny,$dy); + if($x==$xcut){last}; + } + close(Fi); + + if($x==$xcut){ + my $npe = $maxy - $miny; + my $closeness = $maxy + $miny; + print Fo "$index[$j] $npe $closeness $maxy $miny \n"; + } + # } + + } + + } + close(Fo); diff --git a/F2_cc-pvdz/cp_to_manuscript.sh b/F2_cc-pvdz/cp_to_manuscript.sh new file mode 100755 index 0000000..0a4f70f --- /dev/null +++ b/F2_cc-pvdz/cp_to_manuscript.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mol='f2' + +path='/home/fabris/ongoing_projects/seniority/Manuscript' + +cp plot_pes.pdf $path/${mol}_pes.pdf +cp plot_error.pdf $path/${mol}_pes_error.pdf +cp plot_stat.pdf $path/${mol}_pes_stat.pdf +cp xe.pdf $path/${mol}_xe.pdf diff --git a/F2_cc-pvdz/fit_eq.gnu b/F2_cc-pvdz/fit_eq.gnu new file mode 100644 index 0000000..373e165 --- /dev/null +++ b/F2_cc-pvdz/fit_eq.gnu @@ -0,0 +1,299 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[0.95:8.0] +xmin=1.25 +xmax=1.65 + +# VIEW 1: +set yrange[-199.11:-198.6] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 9 dt 1 lw 2 linecolor rgb "violet" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 +set style line 15 dt 2 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel "Distance ({\305})" +set ylabel 'Energy (Hartree)' + +# check if file exists +file_exists(file) = int(system("[ -f '".file."' ] && echo '1' || echo '0'")) +D0=0.0;a0=1.0;xe0=1.0;C0=0.0 +D1=0.0;a1=1.0;xe1=1.0;C1=0.0 +D2=0.0;a2=1.0;xe2=1.0;C2=0.0 +D3=0.0;a3=1.0;xe3=1.0;C3=0.0 +D4=0.0;a4=1.0;xe4=1.0;C4=0.0 +D5=0.0;a5=1.0;xe5=1.0;C5=0.0 +D6=0.0;a6=1.0;xe6=1.0;C6=0.0 +D7=0.0;a7=1.0;xe7=1.0;C7=0.0 +D8=0.0;a8=1.0;xe8=1.0;C8=0.0 +D9=0.0;a9=1.0;xe9=1.0;C9=0.0 +D10=0.0;a10=1.0;xe10=1.0;C10=0.0 +D11=0.0;a11=1.0;xe11=1.0;C11=0.0 +D12=0.0;a12=1.0;xe12=1.0;C12=0.0 +D13=0.0;a13=1.0;xe13=1.0;C13=0.0 +D14=0.0;a14=1.0;xe14=1.0;C14=0.0 +D15=0.0;a15=1.0;xe15=1.0;C15=0.0 +D16=0.0;a16=1.0;xe16=1.0;C16=0.0 +D17=0.0;a17=1.0;xe17=1.0;C17=0.0 +D18=0.0;a18=1.0;xe18=1.0;C18=0.0 + +# function for fitting + +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +filename='pes_fci.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a0=1.0; xe0=STATS_pos_min_y; C0=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D0=last_y-C0 +fit [xmin:xmax] [*:*] f0(x) filename u 1:($2) via D0,a0,xe0,C0 +} + +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +filename='pes_rhf.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a1=1.0; xe1=STATS_pos_min_y; C1=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D1=last_y-C1 +fit [xmin:xmax] [*:*] f1(x) filename u 1:($2) via D1,a1,xe1,C1 +} + +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +filename='pes_CISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a2=1.0; xe2=STATS_pos_min_y; C2=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D2=last_y-C2 +fit [xmin:xmax] [*:*] f2(x) filename u 1:($2) via D2,a2,xe2,C2 +} + +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +filename='pes_CISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a3=1.0; xe3=STATS_pos_min_y; C3=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D3=last_y-C3 +fit [xmin:xmax] [*:*] f3(x) filename u 1:($2) via D3,a3,xe3,C3 +} + +f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +filename='pes_CISDTQ.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a4=1.0; xe4=STATS_pos_min_y; C4=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D4=last_y-C4 +fit [xmin:xmax] [*:*] f4(x) filename u 1:($2) via D4,a4,xe4,C4 +} + +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +filename='pes_CIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a5=1.0; xe5=STATS_pos_min_y; C5=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D5=last_y-C5 +fit [xmin:xmax] [*:*] f5(x) filename u 1:($2) via D5,a5,xe5,C5 +} + +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +filename='pes_CIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a6=1.0; xe6=STATS_pos_min_y; C6=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D6=last_y-C6 +fit [xmin:xmax] [*:*] f6(x) filename u 1:($2) via D6,a6,xe6,C6 +} + +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +filename='pes_CIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a7=1.0; xe7=STATS_pos_min_y; C7=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D7=last_y-C7 +fit [xmin:xmax] [*:*] f7(x) filename u 1:($2) via D7,a7,xe7,C7 +} + +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +filename='pes_CIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a8=1.0; xe8=STATS_pos_min_y; C8=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D8=last_y-C8 +fit [xmin:xmax] [*:*] f8(x) filename u 1:($2) via D8,a8,xe8,C8 +} + +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +filename='pes_CIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a9=1.0; xe9=STATS_pos_min_y; C9=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D9=last_y-C9 +fit [xmin:xmax] [*:*] f9(x) filename u 1:($2) via D9,a9,xe9,C9 +} + +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +filename='pes_CIo3.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a10=1.0; xe10=STATS_pos_min_y; C10=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D10=last_y-C10 +fit [xmin:xmax] [*:*] f10(x) filename u 1:($2) via D10,a10,xe10,C10 +} + +f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +filename='pes_CIo4.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a11=1.0; xe11=STATS_pos_min_y; C11=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D11=last_y-C11 +fit [xmin:xmax] [*:*] f11(x) filename u 1:($2) via D11,a11,xe11,C11 +} + +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +filename='pes_ooCISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a12=1.0; xe12=STATS_pos_min_y; C12=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D12=last_y-C12 +fit [xmin:xmax] [*:*] f12(x) filename u 1:($2) via D12,a12,xe12,C12 +} + +f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +filename='pes_ooCISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a13=1.0; xe13=STATS_pos_min_y; C13=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D13=last_y-C13 +fit [xmin:xmax] [*:*] f13(x) filename u 1:($2) via D13,a13,xe13,C13 +} + +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +filename='pes_ooCIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a14=1.0; xe14=STATS_pos_min_y; C14=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D14=last_y-C14 +fit [xmin:xmax] [*:*] f14(x) filename u 1:($2) via D14,a14,xe14,C14 +} + +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +filename='pes_ooCIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a15=1.0; xe15=STATS_pos_min_y; C15=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D15=last_y-C15 +fit [xmin:xmax] [*:*] f15(x) filename u 1:($2) via D15,a15,xe15,C15 +} + +f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +filename='pes_ooCIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a16=1.0; xe16=STATS_pos_min_y; C16=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D16=last_y-C16 +fit [xmin:xmax] [*:*] f16(x) filename u 1:($2) via D16,a16,xe16,C16 +} + +f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +filename='pes_ooCIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a17=1.0; xe17=STATS_pos_min_y; C17=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D17=last_y-C17 +fit [xmin:xmax] [*:*] f17(x) filename u 1:($2) via D17,a17,xe17,C17 +} + +f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +filename='pes_ooCIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a18=1.0; xe18=STATS_pos_min_y; C18=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D18=last_y-C18 +fit [xmin:xmax] [*:*] f18(x) filename u 1:($2) via D18,a18,xe18,C18 +} + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CISDTQ.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_CIo3.dat' w lp ls 4 notitle, \ + 'pes_CIo3.5.dat' w lp ls 5 notitle, \ + 'pes_CIo4.dat' w lp ls 4 notitle, \ + 'pes_ooCISD.dat' w lp ls 13 notitle, \ + 'pes_ooCISDT.dat' w lp ls 13 notitle, \ + 'pes_ooCIo1.dat' w lp ls 14 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo2.dat' w lp ls 14 notitle, \ + 'pes_ooCIo2.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo3.dat' w lp ls 14 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f4(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f11(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f13(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle, \ + [xmin:xmax] f16(x) w l ls 9 notitle, \ + [xmin:xmax] f17(x) w l ls 9 notitle, \ + [xmin:xmax] f18(x) w l ls 9 notitle + +################################################################################### +################################################################################### + +pause -1 diff --git a/F2_cc-pvdz/fit_eq.sh b/F2_cc-pvdz/fit_eq.sh new file mode 100755 index 0000000..753c081 --- /dev/null +++ b/F2_cc-pvdz/fit_eq.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +if [ -f "fit.log" ]; then + rm "fit.log" +fi + +gnuplot fit_eq.gnu + +grep ^xe fit.log | grep = | sed 's/=//g' | cut -c -30 | + sed 's/xe0 /FCI /g' | + sed 's/xe1 /RHF /g' | + sed 's/xe2 /hfCISD /g' | + sed 's/xe3 /hfCISDT /g' | + sed 's/xe4 /hfCISDTQ /g' | + sed 's/xe5 /hfCIo1 /g' | + sed 's/xe6 /hfCIo1.5 /g' | + sed 's/xe7 /hfCIo2 /g' | + sed 's/xe8 /hfCIo2.5 /g' | + sed 's/xe9 /hfCIo3 /g' | + sed 's/xe10/hfCIo3.5 /g' | + sed 's/xe11/hfCIo4 /g' | + sed 's/xe12/ooCISD /g' | + sed 's/xe13/ooCISDT /g' | + sed 's/xe14/ooCIo1 /g' | + sed 's/xe15/ooCIo1.5 /g' | + sed 's/xe16/ooCIo2 /g' | + sed 's/xe17/ooCIo2.5 /g' | + sed 's/xe18/ooCIo3 /g' > xe.dat + + +grep 'FCI' xe.dat | sed 's/FCI/-0.1 /g' > xe_FCI.dat +grep 'FCI' xe.dat | sed 's/FCI/4.1 /g' >> xe_FCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_CI.dat +grep 'hfCISD ' xe.dat | sed 's/hfCISD/2 /g' >> xe_CI.dat +grep 'hfCISDT ' xe.dat | sed 's/hfCISDT/3 /g' >> xe_CI.dat +grep 'hfCISDTQ' xe.dat | sed 's/hfCISDTQ/4 /g' >> xe_CI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_ooCI.dat +grep 'ooCISD ' xe.dat | sed 's/ooCISD/2 /g' >> xe_ooCI.dat +grep 'ooCISDT' xe.dat | sed 's/ooCISDT/3 /g' >> xe_ooCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CIo.dat +grep 'hfCIo1 ' xe.dat | sed 's/hfCIo1/1 /g' >> xe_CIo.dat +grep 'hfCIo1.5' xe.dat | sed 's/hfCIo1.5/1.5 /g' >> xe_CIo.dat +grep 'hfCIo2 ' xe.dat | sed 's/hfCIo2/2 /g' >> xe_CIo.dat +grep 'hfCIo2.5' xe.dat | sed 's/hfCIo2.5/2.5 /g' >> xe_CIo.dat +grep 'hfCIo3 ' xe.dat | sed 's/hfCIo3/3 /g' >> xe_CIo.dat +grep 'hfCIo3.5' xe.dat | sed 's/hfCIo3.5/3.5 /g' >> xe_CIo.dat +grep 'hfCIo4 ' xe.dat | sed 's/hfCIo4/4 /g' >> xe_CIo.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCIo.dat +grep 'ooCIo1 ' xe.dat | sed 's/ooCIo1/1 /g' >> xe_ooCIo.dat +grep 'ooCIo1.5' xe.dat | sed 's/ooCIo1.5/1.5 /g' >> xe_ooCIo.dat +grep 'ooCIo2 ' xe.dat | sed 's/ooCIo2/2 /g' >> xe_ooCIo.dat +grep 'ooCIo2.5' xe.dat | sed 's/ooCIo2.5/2.5 /g' >> xe_ooCIo.dat +grep 'ooCIo3 ' xe.dat | sed 's/ooCIo3/3 /g' >> xe_ooCIo.dat + +#epspdf fit_eq.eps +#okular fit_eq.pdf diff --git a/F2_cc-pvdz/plot.gnu b/F2_cc-pvdz/plot.gnu new file mode 100644 index 0000000..f004c51 --- /dev/null +++ b/F2_cc-pvdz/plot.gnu @@ -0,0 +1,56 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot.eps' + +set format y "10^{%T}" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +#r=1.45 angs +efci=-199.10042765 + +set xrange[-0.1:4.1] +set yrange[1e-3:1] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 2 +set logscale y + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Energy error (Hartree)' + +plot 'r1.45_ciexc.dat' u 1:($2-efci) w lp ls 3 notitle, \ + 'r1.45_cio.dat' u 1:($2-efci) w lp ls 4 notitle + +unset ylabel +#unset ytics +unset label + +plot 'r1.45_oociexc.dat' u 1:($2-efci) w lp ls 13 notitle, \ + 'r1.45_oocio.dat' u 1:($2-efci) w lp ls 14 notitle diff --git a/F2_cc-pvdz/plot.sh b/F2_cc-pvdz/plot.sh new file mode 100755 index 0000000..f9f68b6 --- /dev/null +++ b/F2_cc-pvdz/plot.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot.gnu +epspdf plot.eps +okular plot.pdf diff --git a/F2_cc-pvdz/plot_NPE.gnu b/F2_cc-pvdz/plot_NPE.gnu new file mode 100644 index 0000000..5df6328 --- /dev/null +++ b/F2_cc-pvdz/plot_NPE.gnu @@ -0,0 +1,71 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_error.png' + +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +#set output 'plot_error.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +xmin=0.95 +xmax=8.0 +#set xrange[0.95:5.0] +set xrange[0.95:8.0] + +ymin=1.0e-3 +ymax=1.0 +# VIEW 1 +#set logscale y +#set yrange[1.0e-3:1.0] +# VIEW 2 +set yrange[0.0:0.35] +# VIEW 3 +#set yrange[0.0:0.15] +# VIEW 4 +#set yrange[0.0:0.02] + +################################################################################### +################################################################################### + +set format y "%.2f" + +if (!exists("MP_LEFT")) MP_LEFT = 0.15 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.98 +if (!exists("MP_xGAP")) MP_xGAP = 0.06 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 3 dt 1 lw 3 linecolor rgb "light-red" +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" +set style line 5 dt 2 lw 3 linecolor rgb "sea-green" +set style line 6 dt 1 lw 3 linecolor rgb "orange" +set style line 7 dt 2 lw 3 linecolor rgb "orange" + +set xlabel "Distance ({\305})" +set ylabel 'Energy error (Hartree)' + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +#stats "< paste pes_fci.dat pes_rhf.dat" u 1:($4-$2) nooutput +stats "< paste pes_fci.dat pes_rhf.dat" #u ($4-$2) nooutput + +print STATS_OUTOFRANGE_x +print STATS_RECORDS_x +print STATS_MIN_y +print STATS_MAX_y + +################################################################################### +################################################################################### diff --git a/F2_cc-pvdz/plot_error.sh b/F2_cc-pvdz/plot_error.sh new file mode 100755 index 0000000..86447b8 --- /dev/null +++ b/F2_cc-pvdz/plot_error.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_error.gnu +epspdf plot_error.eps +okular plot_error.pdf diff --git a/F2_cc-pvdz/plot_pes.sh b/F2_cc-pvdz/plot_pes.sh new file mode 100755 index 0000000..2aa451d --- /dev/null +++ b/F2_cc-pvdz/plot_pes.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_pes.gnu +epspdf plot_pes.eps +okular plot_pes.pdf diff --git a/F2_cc-pvdz/plot_pes_1.gnu b/F2_cc-pvdz/plot_pes_1.gnu new file mode 100644 index 0000000..5d69ad5 --- /dev/null +++ b/F2_cc-pvdz/plot_pes_1.gnu @@ -0,0 +1,100 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' + +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,16' linewidth 2 +set output 'plot_pes.eps' + +xmin=0.95 +xmax=10.0 +#ymin=-199.15 +ymin=-199.11 +ymax=--198.6 +#ymax=--198.9 + +#set xrange[0.95:6.0] +set xrange[0.95:10.0] +# VIEW 1: +#set yrange[-199.11:-198.90] +# VIEW 2: +set yrange[-199.11:-198.6] + +set style line 1 dt 1 lw 2 linecolor rgb "gray" +set style line 2 dt 1 lw 2 linecolor rgb "black" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" +set style line 6 dt 1 lw 2 linecolor rgb "orange" +set style line 7 dt 2 lw 2 linecolor rgb "orange" + +set style line 13 dt 1 lw 2 linecolor rgb "red" +set style line 14 dt 1 lw 2 linecolor rgb "forest-green" +set style line 15 dt 2 lw 2 linecolor rgb "forest-green" + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy (Hartree)' + +# get the relation of x- and y-range +dx = xmax-xmin +dy = ymax-ymin +s1 = dx/dy +# get ratio of axes +s2 = 3.0/5.3 +# helper function for getting the rotation angle of the labels in degree +deg(x) = x/pi*180.0 +r(x) = deg(atan(s1*s2*x)) +# function for fitting +f(x) = a*x+b + +fit [1.6:2.0] [*:*] f(x) 'pes_rhf.dat' u 1:($2) via a,b +#set label 1 'RHF' at 1.8,-198.60 rotate by r(a) center tc ls 1 #font 'Verdana,20' + +fit [5.0:7.0] [*:*] f(x) 'pes_s4.e2.dat' u 1:($2) via a,b +set label 2 'CISD' at 5.0,-198.91 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [5.0:7.0] [*:*] f(x) 'pes_s6.e3.dat' u 1:($2) via a,b +set label 3 'CISDT' at 5.0,-198.95 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [5.0:7.0] [*:*] f(x) 'pes_s8.e4.dat' u 1:($2) via a,b +set label 4 'CISDTQ' at 5.0,-199.037 rotate by r(a) center tc ls 3 #font 'Verdana,20' + +fit [7.0:9.0] [*:*] f(x) 'pes_CIo2.dat' u 1:($2) via a,b +set label 12 'CIo2' at 7.0,-198.923 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [7.0:9.0] [*:*] f(x) 'pes_CIo3.dat' u 1:($2) via a,b +set label 13 'CIo3' at 7.0,-199.037 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [7.0:9.0] [*:*] f(x) 'pes_CIo4.dat' u 1:($2) via a,b +set label 14 'CIo4' at 7.0,-199.062 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [7.0:9.0] [*:*] f(x) 'pes_fci.dat' u 1:($2) via a,b +set label 20 'FCI' at 9.0,-199.062 rotate by r(a) center tc ls 2 #font 'Verdana,20' + + +plot 'pes_rhf.dat' w l ls 1 notitle, \ + 'pes_s4.e2.dat' w l ls 3 notitle, \ + 'pes_s6.e3.dat' w l ls 3 notitle, \ + 'pes_s8.e4.dat' w l ls 3 notitle, \ + 'pes_CIo1.dat' w l ls 5 notitle, \ + 'pes_CIo1.5.dat' w l ls 5 notitle, \ + 'pes_CIo2.dat' w l ls 4 notitle, \ + 'pes_CIo2.5.dat' w l ls 5 notitle, \ + 'pes_CIo3.dat' w l ls 4 notitle, \ + 'pes_CIo3.5.dat' w l ls 5 notitle, \ + 'pes_CIo4.dat' w l ls 4 notitle, \ + 'pes_ooCISD.dat' w l ls 13 notitle, \ + 'pes_ooCIo1.dat' w l ls 15 notitle, \ + 'pes_ooCIo1.5.dat' w l ls 15 notitle, \ + 'pes_ooCIo2.dat' w l ls 14 notitle, \ + 'pes_ooCIo2.5.dat' w l ls 15 notitle, \ + 'pes_fci.dat' w l ls 2 notitle +# 'pes_ooCIo1.5.dat' w l ls 15 notitle, \ +# 'pes_pccd.dat' w l ls 6 notitle, \ +# 'pes_ccsd.dat' w l ls 6 notitle, \ +# 'pes_ccsdt.dat' w l ls 6 notitle, \ +# 'pes_s0.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e3.dat' w l ls 1 notitle, \ +# 'pes_s4.e3.dat' w l ls 1 notitle, \ +# 'pes_s0.e4.dat' w l ls 1 notitle, \ +# 'pes_s2.e4.dat' w l ls 1 notitle, \ +# 'pes_s4.e4.dat' w l ls 1 notitle, \ + +#pause -1 diff --git a/F2_cc-pvdz/plot_stat.gnu b/F2_cc-pvdz/plot_stat.gnu new file mode 100644 index 0000000..f091491 --- /dev/null +++ b/F2_cc-pvdz/plot_stat.gnu @@ -0,0 +1,51 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat.eps' + +set format y "10^{%T}" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] +set yrange[1e-3:1] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 1 +set logscale y + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CI.dat' u 1:($2) w lp ls 3 notitle, \ + 'stat_CIo.dat' u 1:($2) w lp ls 4 notitle + +unset ylabel +unset label + +plot 'stat_ooCI.dat' u 1:($2) w lp ls 13 notitle, \ + 'stat_ooCIo.dat' u 1:($2) w lp ls 14 notitle diff --git a/F2_cc-pvdz/plot_stat.sh b/F2_cc-pvdz/plot_stat.sh new file mode 100755 index 0000000..cc7e7e0 --- /dev/null +++ b/F2_cc-pvdz/plot_stat.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +./compute_NPE.pl 1 8.0 +./compute_NPE.pl 2 8.0 +./compute_NPE.pl 3 8.0 +./compute_NPE.pl 4 8.0 + +gnuplot plot_stat.gnu +epspdf plot_stat.eps +okular plot_stat.pdf diff --git a/F2_cc-pvdz/xe.gnu b/F2_cc-pvdz/xe.gnu new file mode 100644 index 0000000..34eeb52 --- /dev/null +++ b/F2_cc-pvdz/xe.gnu @@ -0,0 +1,70 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'xe.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] + +# VIEW 1: +set yrange[1.34:1.50] +set format y "%.2f" +################################################################################### +################################################################################### + +set xtics 1 +set ytics 0.02 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.15 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" + +set style line 3 dt 1 lw 3 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel "Equilibrium distance ({\305})" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_CI.dat' w lp ls 3 notitle, \ + 'xe_CIo.dat' w lp ls 4 notitle#, \ +# 'xe_ooCI.dat' w lp ls 13 notitle, \ +# 'xe_ooCIo.dat' w lp ls 14 notitle + +unset ylabel +unset label +set format y "" + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_ooCI.dat' w lp ls 13 notitle, \ + 'xe_ooCIo.dat' w lp ls 14 notitle + +################################################################################### +################################################################################### + +#pause -1 diff --git a/F2_cc-pvdz/xe.sh b/F2_cc-pvdz/xe.sh new file mode 100755 index 0000000..2896546 --- /dev/null +++ b/F2_cc-pvdz/xe.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot xe.gnu +epspdf xe.eps +okular xe.pdf diff --git a/F2_cc-pvtz/plot.sh b/F2_cc-pvtz/plot.sh new file mode 100755 index 0000000..f9f68b6 --- /dev/null +++ b/F2_cc-pvtz/plot.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot.gnu +epspdf plot.eps +okular plot.pdf diff --git a/F2_cc-pvtz/plot_pes.sh b/F2_cc-pvtz/plot_pes.sh new file mode 100755 index 0000000..2aa451d --- /dev/null +++ b/F2_cc-pvtz/plot_pes.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_pes.gnu +epspdf plot_pes.eps +okular plot_pes.pdf diff --git a/F2_cc-pvtz/plot_pes_1.gnu b/F2_cc-pvtz/plot_pes_1.gnu new file mode 100644 index 0000000..1a8294a --- /dev/null +++ b/F2_cc-pvtz/plot_pes_1.gnu @@ -0,0 +1,85 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,16' linewidth 2 +set output 'plot_pes.eps' + +xmin=0.95 +xmax=10.0 +ymin=-199.35 +ymax=--199.00 + +#set xrange[0.95:6.0] +set xrange[0.95:10.0] +# VIEW 1: +#set yrange[-199.35:-198.75] +# VIEW 2: +set yrange[-199.35:-199.00] + +set style line 1 dt 1 lw 2 linecolor rgb "gray" +set style line 2 dt 1 lw 2 linecolor rgb "black" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" +set style line 6 dt 1 lw 2 linecolor rgb "orange" +set style line 7 dt 2 lw 2 linecolor rgb "orange" + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy (Hartree)' + +# get the relation of x- and y-range +dx = xmax-xmin +dy = ymax-ymin +s1 = dx/dy +# get ratio of axes +s2 = 3.0/5.3 +# helper function for getting the rotation angle of the labels in degree +deg(x) = x/pi*180.0 +r(x) = deg(atan(s1*s2*x)) +# function for fitting +f(x) = a*x+b + +fit [1.6:2.0] [*:*] f(x) 'pes_rhf.dat' u 1:($2) via a,b +#set label 1 'RHF' at 1.8,-198.60 rotate by r(a) center tc ls 1 #font 'Verdana,20' + +fit [5.0:7.0] [*:*] f(x) 'pes_s4.e2.dat' u 1:($2) via a,b +set label 2 'CISD' at 5.0,-198.91 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [5.0:7.0] [*:*] f(x) 'pes_s6.e3.dat' u 1:($2) via a,b +set label 3 'CISDT' at 5.0,-198.95 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [5.0:7.0] [*:*] f(x) 'pes_s8.e4.dat' u 1:($2) via a,b +set label 4 'CISDTQ' at 5.0,-199.037 rotate by r(a) center tc ls 3 #font 'Verdana,20' + +fit [7.0:9.0] [*:*] f(x) 'pes_CIo2.dat' u 1:($2) via a,b +set label 12 'CIo2' at 7.0,-198.923 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [7.0:9.0] [*:*] f(x) 'pes_CIo3.dat' u 1:($2) via a,b +set label 13 'CIo3' at 7.0,-199.037 rotate by r(a) center tc ls 4 #font 'Verdana,20' +#fit [7.0:9.0] [*:*] f(x) 'pes_CIo4.dat' u 1:($2) via a,b +#set label 14 'CIo4' at 7.0,-199.062 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [7.0:9.0] [*:*] f(x) 'pes_fci.dat' u 1:($2) via a,b +set label 20 'FCI' at 9.0,-199.062 rotate by r(a) center tc ls 2 #font 'Verdana,20' + + +plot 'pes_rhf.dat' w l ls 1 notitle, \ + 'pes_s4.e2.dat' w l ls 3 notitle, \ + 'pes_s6.e3.dat' w l ls 3 notitle, \ + 'pes_s8.e4.dat' w l ls 3 notitle, \ + 'pes_CIo1.dat' w l ls 5 notitle, \ + 'pes_CIo1.5.dat' w l ls 5 notitle, \ + 'pes_CIo2.dat' w l ls 4 notitle, \ + 'pes_CIo2.5.dat' w l ls 5 notitle, \ + 'pes_CIo3.dat' w l ls 4 notitle, \ + 'pes_CIo3.5.dat' w l ls 5 notitle, \ + 'pes_CIo4.dat' w l ls 4 notitle, \ + 'pes_fci.dat' w l ls 2 notitle +# 'pes_pccd.dat' w l ls 6 notitle, \ +# 'pes_s0.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e3.dat' w l ls 1 notitle, \ +# 'pes_s4.e3.dat' w l ls 1 notitle, \ +# 'pes_s0.e4.dat' w l ls 1 notitle, \ +# 'pes_s2.e4.dat' w l ls 1 notitle, \ +# 'pes_s4.e4.dat' w l ls 1 notitle, \ + +#pause -1 diff --git a/H2O_cc-pvdz/compute_NPE.pl b/H2O_cc-pvdz/compute_NPE.pl new file mode 100755 index 0000000..9a74955 --- /dev/null +++ b/H2O_cc-pvdz/compute_NPE.pl @@ -0,0 +1,98 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use List::Util qw(min max); + +my $case = $ARGV[0]; +my $xcut = $ARGV[1]; + +my(@files,@index,$outfile); + +if($case==1){ +@files = qw( pes_rhf.dat pes_CIo1.dat pes_CIo1.5.dat pes_CIo2.dat pes_CIo2.5.dat pes_CIo3.dat pes_CIo3.5.dat pes_CIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_CIo.dat"; +} +elsif($case==2){ +@files = qw( pes_rhf.dat pes_ooCIo1.dat pes_ooCIo1.5.dat pes_ooCIo2.dat pes_ooCIo2.5.dat pes_ooCIo3.dat pes_ooCIo3.5.dat pes_ooCIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_ooCIo.dat"; +} +elsif($case==3){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_CISD.dat pes_CISDT.dat pes_CISDTQ.dat); +@index = qw( 0 1 2 3 4); +$outfile = "stat_CI.dat"; +} +elsif($case==4){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_ooCISD.dat pes_ooCISDT.dat); +@index = qw( 0 1 2 3); +$outfile = "stat_ooCI.dat"; +} +else{ +print "case variable not recognized \n"; +die; +} + +my $fci_file = 'pes_fci.dat'; + +my $n_files = @files; + +my (@x0, @y0); +my ($x, $y, $dy); +my ($i, $n); + +$n=0; +open(Fi, '<', $fci_file) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $n++; + $x0[$n] = $line[0]; + $y0[$n] = $line[1]; + if($x0[$n]>$xcut){last}; + } +close(Fi); + + if(-e $outfile){unlink $outfile}; + + open(Fo, '>>', $outfile) or die $!; + for ( my $j = 0; $j < $n_files; $j++ ){ + + if(-e $files[$j]){ + + my $maxy = -1e99; + my $miny = 1e99; + + # my $m=0; + # open(Fi, '<', $files[$j]) or die $!; + # while(){ + # $m++; + # } + # close(Fi); + + # if($m==$n){ + my $m=0; + open(Fi, '<', $files[$j]) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $m++; + $x = $line[0]; + $y = $line[1]; + $dy = $y - $y0[$m]; + $maxy = max($maxy,$dy); + $miny = min($miny,$dy); + if($x==$xcut){last}; + } + close(Fi); + + if($x==$xcut){ + my $npe = $maxy - $miny; + my $closeness = $maxy + $miny; + print Fo "$index[$j] $npe $closeness $maxy $miny \n"; + } + # } + + } + + } + close(Fo); diff --git a/H2O_cc-pvdz/cp_to_manuscript.sh b/H2O_cc-pvdz/cp_to_manuscript.sh new file mode 100755 index 0000000..7c5f6c6 --- /dev/null +++ b/H2O_cc-pvdz/cp_to_manuscript.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mol='h2o' + +path='/home/fabris/ongoing_projects/seniority/Manuscript' + +cp plot_pes.pdf $path/${mol}_pes.pdf +cp plot_error.pdf $path/${mol}_pes_error.pdf +cp plot_stat.pdf $path/${mol}_pes_stat.pdf +cp xe.pdf $path/${mol}_xe.pdf diff --git a/H2O_cc-pvdz/fit_eq.gnu b/H2O_cc-pvdz/fit_eq.gnu new file mode 100644 index 0000000..eaf38b1 --- /dev/null +++ b/H2O_cc-pvdz/fit_eq.gnu @@ -0,0 +1,299 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[0.6:7.0] +xmin=0.80 +xmax=1.15 + +# VIEW 1: +set yrange[-76.30:-75.60] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 9 dt 1 lw 2 linecolor rgb "violet" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 +set style line 15 dt 2 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel "Distance ({\305})" +set ylabel 'Energy (Hartree)' + +# check if file exists +file_exists(file) = int(system("[ -f '".file."' ] && echo '1' || echo '0'")) +D0=0.0;a0=1.0;xe0=1.0;C0=0.0 +D1=0.0;a1=1.0;xe1=1.0;C1=0.0 +D2=0.0;a2=1.0;xe2=1.0;C2=0.0 +D3=0.0;a3=1.0;xe3=1.0;C3=0.0 +D4=0.0;a4=1.0;xe4=1.0;C4=0.0 +D5=0.0;a5=1.0;xe5=1.0;C5=0.0 +D6=0.0;a6=1.0;xe6=1.0;C6=0.0 +D7=0.0;a7=1.0;xe7=1.0;C7=0.0 +D8=0.0;a8=1.0;xe8=1.0;C8=0.0 +D9=0.0;a9=1.0;xe9=1.0;C9=0.0 +D10=0.0;a10=1.0;xe10=1.0;C10=0.0 +D11=0.0;a11=1.0;xe11=1.0;C11=0.0 +D12=0.0;a12=1.0;xe12=1.0;C12=0.0 +D13=0.0;a13=1.0;xe13=1.0;C13=0.0 +D14=0.0;a14=1.0;xe14=1.0;C14=0.0 +D15=0.0;a15=1.0;xe15=1.0;C15=0.0 +D16=0.0;a16=1.0;xe16=1.0;C16=0.0 +D17=0.0;a17=1.0;xe17=1.0;C17=0.0 +D18=0.0;a18=1.0;xe18=1.0;C18=0.0 + +# function for fitting + +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +filename='pes_fci.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a0=2.0; xe0=STATS_pos_min_y; C0=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D0=last_y-C0 +fit [xmin:xmax] [*:*] f0(x) filename u 1:($2) via D0,a0,xe0,C0 +} + +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +filename='pes_rhf.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a1=2.0; xe1=STATS_pos_min_y; C1=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D1=last_y-C1 +fit [xmin:xmax] [*:*] f1(x) filename u 1:($2) via D1,a1,xe1,C1 +} + +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +filename='pes_CISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a2=2.0; xe2=STATS_pos_min_y; C2=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D2=last_y-C2 +fit [xmin:xmax] [*:*] f2(x) filename u 1:($2) via D2,a2,xe2,C2 +} + +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +filename='pes_CISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a3=2.0; xe3=STATS_pos_min_y; C3=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D3=last_y-C3 +fit [xmin:xmax] [*:*] f3(x) filename u 1:($2) via D3,a3,xe3,C3 +} + +f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +filename='pes_CISDTQ.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a4=2.0; xe4=STATS_pos_min_y; C4=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D4=last_y-C4 +fit [xmin:xmax] [*:*] f4(x) filename u 1:($2) via D4,a4,xe4,C4 +} + +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +filename='pes_CIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a5=2.0; xe5=STATS_pos_min_y; C5=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D5=last_y-C5 +fit [xmin:xmax] [*:*] f5(x) filename u 1:($2) via D5,a5,xe5,C5 +} + +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +filename='pes_CIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a6=2.0; xe6=STATS_pos_min_y; C6=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D6=last_y-C6 +fit [xmin:xmax] [*:*] f6(x) filename u 1:($2) via D6,a6,xe6,C6 +} + +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +filename='pes_CIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a7=2.0; xe7=STATS_pos_min_y; C7=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D7=last_y-C7 +fit [xmin:xmax] [*:*] f7(x) filename u 1:($2) via D7,a7,xe7,C7 +} + +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +filename='pes_CIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a8=2.0; xe8=STATS_pos_min_y; C8=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D8=last_y-C8 +fit [xmin:xmax] [*:*] f8(x) filename u 1:($2) via D8,a8,xe8,C8 +} + +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +filename='pes_CIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a9=2.0; xe9=STATS_pos_min_y; C9=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D9=last_y-C9 +fit [xmin:xmax] [*:*] f9(x) filename u 1:($2) via D9,a9,xe9,C9 +} + +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +filename='pes_CIo3.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a10=2.0; xe10=STATS_pos_min_y; C10=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D10=last_y-C10 +fit [xmin:xmax] [*:*] f10(x) filename u 1:($2) via D10,a10,xe10,C10 +} + +f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +filename='pes_CIo4.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a11=2.0; xe11=STATS_pos_min_y; C11=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D11=last_y-C11 +fit [xmin:xmax] [*:*] f11(x) filename u 1:($2) via D11,a11,xe11,C11 +} + +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +filename='pes_ooCISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a12=2.0; xe12=STATS_pos_min_y; C12=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D12=last_y-C12 +fit [xmin:xmax] [*:*] f12(x) filename u 1:($2) via D12,a12,xe12,C12 +} + +f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +filename='pes_ooCISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a13=2.0; xe13=STATS_pos_min_y; C13=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D13=last_y-C13 +fit [xmin:xmax] [*:*] f13(x) filename u 1:($2) via D13,a13,xe13,C13 +} + +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +filename='pes_ooCIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a14=2.0; xe14=STATS_pos_min_y; C14=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D14=last_y-C14 +fit [xmin:xmax] [*:*] f14(x) filename u 1:($2) via D14,a14,xe14,C14 +} + +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +filename='pes_ooCIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a15=2.0; xe15=STATS_pos_min_y; C15=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D15=last_y-C15 +fit [xmin:xmax] [*:*] f15(x) filename u 1:($2) via D15,a15,xe15,C15 +} + +f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +filename='pes_ooCIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a16=2.0; xe16=STATS_pos_min_y; C16=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D16=last_y-C16 +fit [xmin:xmax] [*:*] f16(x) filename u 1:($2) via D16,a16,xe16,C16 +} + +f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +filename='pes_ooCIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a17=2.0; xe17=STATS_pos_min_y; C17=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D17=last_y-C17 +fit [xmin:xmax] [*:*] f17(x) filename u 1:($2) via D17,a17,xe17,C17 +} + +f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +filename='pes_ooCIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a18=2.0; xe18=STATS_pos_min_y; C18=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D18=last_y-C18 +fit [xmin:xmax] [*:*] f18(x) filename u 1:($2) via D18,a18,xe18,C18 +} + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CISDTQ.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_CIo3.dat' w lp ls 4 notitle, \ + 'pes_CIo3.5.dat' w lp ls 5 notitle, \ + 'pes_CIo4.dat' w lp ls 4 notitle, \ + 'pes_ooCISD.dat' w lp ls 13 notitle, \ + 'pes_ooCISDT.dat' w lp ls 13 notitle, \ + 'pes_ooCIo1.dat' w lp ls 14 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo2.dat' w lp ls 14 notitle, \ + 'pes_ooCIo2.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo3.dat' w lp ls 14 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f4(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f11(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f13(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle, \ + [xmin:xmax] f16(x) w l ls 9 notitle, \ + [xmin:xmax] f17(x) w l ls 9 notitle, \ + [xmin:xmax] f18(x) w l ls 9 notitle + +################################################################################### +################################################################################### + +pause -1 diff --git a/H2O_cc-pvdz/fit_eq.sh b/H2O_cc-pvdz/fit_eq.sh new file mode 100755 index 0000000..753c081 --- /dev/null +++ b/H2O_cc-pvdz/fit_eq.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +if [ -f "fit.log" ]; then + rm "fit.log" +fi + +gnuplot fit_eq.gnu + +grep ^xe fit.log | grep = | sed 's/=//g' | cut -c -30 | + sed 's/xe0 /FCI /g' | + sed 's/xe1 /RHF /g' | + sed 's/xe2 /hfCISD /g' | + sed 's/xe3 /hfCISDT /g' | + sed 's/xe4 /hfCISDTQ /g' | + sed 's/xe5 /hfCIo1 /g' | + sed 's/xe6 /hfCIo1.5 /g' | + sed 's/xe7 /hfCIo2 /g' | + sed 's/xe8 /hfCIo2.5 /g' | + sed 's/xe9 /hfCIo3 /g' | + sed 's/xe10/hfCIo3.5 /g' | + sed 's/xe11/hfCIo4 /g' | + sed 's/xe12/ooCISD /g' | + sed 's/xe13/ooCISDT /g' | + sed 's/xe14/ooCIo1 /g' | + sed 's/xe15/ooCIo1.5 /g' | + sed 's/xe16/ooCIo2 /g' | + sed 's/xe17/ooCIo2.5 /g' | + sed 's/xe18/ooCIo3 /g' > xe.dat + + +grep 'FCI' xe.dat | sed 's/FCI/-0.1 /g' > xe_FCI.dat +grep 'FCI' xe.dat | sed 's/FCI/4.1 /g' >> xe_FCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_CI.dat +grep 'hfCISD ' xe.dat | sed 's/hfCISD/2 /g' >> xe_CI.dat +grep 'hfCISDT ' xe.dat | sed 's/hfCISDT/3 /g' >> xe_CI.dat +grep 'hfCISDTQ' xe.dat | sed 's/hfCISDTQ/4 /g' >> xe_CI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_ooCI.dat +grep 'ooCISD ' xe.dat | sed 's/ooCISD/2 /g' >> xe_ooCI.dat +grep 'ooCISDT' xe.dat | sed 's/ooCISDT/3 /g' >> xe_ooCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CIo.dat +grep 'hfCIo1 ' xe.dat | sed 's/hfCIo1/1 /g' >> xe_CIo.dat +grep 'hfCIo1.5' xe.dat | sed 's/hfCIo1.5/1.5 /g' >> xe_CIo.dat +grep 'hfCIo2 ' xe.dat | sed 's/hfCIo2/2 /g' >> xe_CIo.dat +grep 'hfCIo2.5' xe.dat | sed 's/hfCIo2.5/2.5 /g' >> xe_CIo.dat +grep 'hfCIo3 ' xe.dat | sed 's/hfCIo3/3 /g' >> xe_CIo.dat +grep 'hfCIo3.5' xe.dat | sed 's/hfCIo3.5/3.5 /g' >> xe_CIo.dat +grep 'hfCIo4 ' xe.dat | sed 's/hfCIo4/4 /g' >> xe_CIo.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCIo.dat +grep 'ooCIo1 ' xe.dat | sed 's/ooCIo1/1 /g' >> xe_ooCIo.dat +grep 'ooCIo1.5' xe.dat | sed 's/ooCIo1.5/1.5 /g' >> xe_ooCIo.dat +grep 'ooCIo2 ' xe.dat | sed 's/ooCIo2/2 /g' >> xe_ooCIo.dat +grep 'ooCIo2.5' xe.dat | sed 's/ooCIo2.5/2.5 /g' >> xe_ooCIo.dat +grep 'ooCIo3 ' xe.dat | sed 's/ooCIo3/3 /g' >> xe_ooCIo.dat + +#epspdf fit_eq.eps +#okular fit_eq.pdf diff --git a/H2O_cc-pvdz/plot_error.sh b/H2O_cc-pvdz/plot_error.sh new file mode 100755 index 0000000..86447b8 --- /dev/null +++ b/H2O_cc-pvdz/plot_error.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_error.gnu +epspdf plot_error.eps +okular plot_error.pdf diff --git a/H2O_cc-pvdz/plot_error_1.gnu b/H2O_cc-pvdz/plot_error_1.gnu new file mode 100644 index 0000000..93e10ef --- /dev/null +++ b/H2O_cc-pvdz/plot_error_1.gnu @@ -0,0 +1,46 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_error.png' + +set xrange[0.6:7.0] +# VIEW 1 +#set logscale y +#set yrange[1.0e-4:2.0] +# VIEW 2 +set yrange[0.0:0.5] + +set style line 1 dt 1 lw 1 linecolor rgb "gray" +set style line 2 dt 1 lw 1 linecolor rgb "red" +set style line 3 dt 1 lw 1 linecolor rgb "green" +set style line 4 dt 1 lw 1 linecolor rgb "blue" +set style line 5 dt 2 lw 1 linecolor rgb "blue" +set style line 6 dt 1 lw 1 linecolor rgb "orange" + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy error (Hartree)' + +plot '< paste pes_fci.dat pes_rhf.dat' using 1:($4-$2) w l ls 1 notitle, \ + '< paste pes_fci.dat pes_s4.e2.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_s6.e3.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_s8.e4.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_s10.e5.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_s12.e6.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_CIo1.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo1.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo2.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_CIo2.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo3.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_CIo3.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo4.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_pccd.dat' using 1:($4-$2) w l ls 6 notitle, \ + '< paste pes_fci.dat pes_fci.dat' using 1:($4-$2) w l ls 2 notitle +# '< paste pes_fci.dat pes_s0.e2.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e2.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e3.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s4.e3.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s0.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s4.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ + +pause -1 diff --git a/H2O_cc-pvdz/plot_pes.sh b/H2O_cc-pvdz/plot_pes.sh new file mode 100755 index 0000000..2aa451d --- /dev/null +++ b/H2O_cc-pvdz/plot_pes.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_pes.gnu +epspdf plot_pes.eps +okular plot_pes.pdf diff --git a/H2O_cc-pvdz/plot_pes_1.gnu b/H2O_cc-pvdz/plot_pes_1.gnu new file mode 100644 index 0000000..1b5aae4 --- /dev/null +++ b/H2O_cc-pvdz/plot_pes_1.gnu @@ -0,0 +1,55 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' + +set xrange[0.6:7.0] +set yrange[-76.30:-75.60] +# ZOOM: +#set xrange[0.95:1.35] +#set yrange[-109.29:-109.20] + +set style line 1 dt 1 lw 1 linecolor rgb "gray" +set style line 2 dt 1 lw 1 linecolor rgb "red" +set style line 3 dt 1 lw 1 linecolor rgb "green" +set style line 4 dt 1 lw 1 linecolor rgb "blue" +set style line 5 dt 2 lw 1 linecolor rgb "blue" +set style line 6 dt 1 lw 1 linecolor rgb "orange" + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy (Hartree)' + +plot 'pes_rhf.dat' w l ls 1 notitle, \ + 'pes_s4.e2.dat' w l ls 3 notitle, \ + 'pes_s6.e3.dat' w l ls 3 notitle, \ + 'pes_s8.e4.dat' w l ls 3 notitle, \ + 'pes_s10.e5.dat' w l ls 3 notitle, \ + 'pes_s12.e6.dat' w l ls 3 notitle, \ + 'pes_CIo1.dat' w l ls 5 notitle, \ + 'pes_CIo1.5.dat' w l ls 5 notitle, \ + 'pes_CIo2.dat' w l ls 4 notitle, \ + 'pes_CIo2.5.dat' w l ls 5 notitle, \ + 'pes_CIo3.dat' w l ls 4 notitle, \ + 'pes_CIo3.5.dat' w l ls 5 notitle, \ + 'pes_CIo4.dat' w l ls 4 notitle, \ + 'pes_pccd.dat' w l ls 6 notitle, \ + 'pes_fci.dat' w l ls 2 notitle +# 'pes_s0.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e3.dat' w l ls 1 notitle, \ +# 'pes_s4.e3.dat' w l ls 1 notitle, \ +# 'pes_s0.e4.dat' w l ls 1 notitle, \ +# 'pes_s2.e4.dat' w l ls 1 notitle, \ +# 'pes_s4.e4.dat' w l ls 1 notitle, \ +# 'pes_s2.e5.dat' w l ls 1 notitle, \ +# 'pes_s4.e5.dat' w l ls 1 notitle, \ +# 'pes_s6.e5.dat' w l ls 1 notitle, \ +# 'pes_s8.e5.dat' w l ls 1 notitle, \ +# 'pes_s0.e6.dat' w l ls 1 notitle, \ +# 'pes_s2.e6.dat' w l ls 1 notitle, \ +# 'pes_s4.e6.dat' w l ls 1 notitle, \ +# 'pes_s6.e6.dat' w l ls 1 notitle, \ +# 'pes_s8.e6.dat' w l ls 1 notitle, \ +# 'pes_s10.e6.dat' w l ls 1 notitle, \ + +pause -1 diff --git a/H2O_cc-pvdz/plot_stat.gnu b/H2O_cc-pvdz/plot_stat.gnu new file mode 100644 index 0000000..f091491 --- /dev/null +++ b/H2O_cc-pvdz/plot_stat.gnu @@ -0,0 +1,51 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat.eps' + +set format y "10^{%T}" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] +set yrange[1e-3:1] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 1 +set logscale y + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CI.dat' u 1:($2) w lp ls 3 notitle, \ + 'stat_CIo.dat' u 1:($2) w lp ls 4 notitle + +unset ylabel +unset label + +plot 'stat_ooCI.dat' u 1:($2) w lp ls 13 notitle, \ + 'stat_ooCIo.dat' u 1:($2) w lp ls 14 notitle diff --git a/H2O_cc-pvdz/plot_stat.sh b/H2O_cc-pvdz/plot_stat.sh new file mode 100755 index 0000000..137666a --- /dev/null +++ b/H2O_cc-pvdz/plot_stat.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +./compute_NPE.pl 1 7.0 +./compute_NPE.pl 2 7.0 +./compute_NPE.pl 3 7.0 +./compute_NPE.pl 4 7.0 + +gnuplot plot_stat.gnu +epspdf plot_stat.eps +okular plot_stat.pdf diff --git a/H2O_cc-pvdz/xe.gnu b/H2O_cc-pvdz/xe.gnu new file mode 100644 index 0000000..62339b6 --- /dev/null +++ b/H2O_cc-pvdz/xe.gnu @@ -0,0 +1,70 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'xe.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] + +# VIEW 1: +set yrange[0.94:0.97] +set format y "%.2f" +################################################################################### +################################################################################### + +set xtics 1 +set ytics 0.01 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.15 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" + +set style line 3 dt 1 lw 3 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel "Equilibrium distance ({\305})" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_CI.dat' w lp ls 3 notitle, \ + 'xe_CIo.dat' w lp ls 4 notitle#, \ +# 'xe_ooCI.dat' w lp ls 13 notitle, \ +# 'xe_ooCIo.dat' w lp ls 14 notitle + +unset ylabel +unset label +set format y "" + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_ooCI.dat' w lp ls 13 notitle, \ + 'xe_ooCIo.dat' w lp ls 14 notitle + +################################################################################### +################################################################################### + +#pause -1 diff --git a/H2O_cc-pvdz/xe.sh b/H2O_cc-pvdz/xe.sh new file mode 100755 index 0000000..2896546 --- /dev/null +++ b/H2O_cc-pvdz/xe.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot xe.gnu +epspdf xe.eps +okular xe.pdf diff --git a/H4_cc-pvdz/compute_NPE.pl b/H4_cc-pvdz/compute_NPE.pl new file mode 100755 index 0000000..9a74955 --- /dev/null +++ b/H4_cc-pvdz/compute_NPE.pl @@ -0,0 +1,98 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use List::Util qw(min max); + +my $case = $ARGV[0]; +my $xcut = $ARGV[1]; + +my(@files,@index,$outfile); + +if($case==1){ +@files = qw( pes_rhf.dat pes_CIo1.dat pes_CIo1.5.dat pes_CIo2.dat pes_CIo2.5.dat pes_CIo3.dat pes_CIo3.5.dat pes_CIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_CIo.dat"; +} +elsif($case==2){ +@files = qw( pes_rhf.dat pes_ooCIo1.dat pes_ooCIo1.5.dat pes_ooCIo2.dat pes_ooCIo2.5.dat pes_ooCIo3.dat pes_ooCIo3.5.dat pes_ooCIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_ooCIo.dat"; +} +elsif($case==3){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_CISD.dat pes_CISDT.dat pes_CISDTQ.dat); +@index = qw( 0 1 2 3 4); +$outfile = "stat_CI.dat"; +} +elsif($case==4){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_ooCISD.dat pes_ooCISDT.dat); +@index = qw( 0 1 2 3); +$outfile = "stat_ooCI.dat"; +} +else{ +print "case variable not recognized \n"; +die; +} + +my $fci_file = 'pes_fci.dat'; + +my $n_files = @files; + +my (@x0, @y0); +my ($x, $y, $dy); +my ($i, $n); + +$n=0; +open(Fi, '<', $fci_file) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $n++; + $x0[$n] = $line[0]; + $y0[$n] = $line[1]; + if($x0[$n]>$xcut){last}; + } +close(Fi); + + if(-e $outfile){unlink $outfile}; + + open(Fo, '>>', $outfile) or die $!; + for ( my $j = 0; $j < $n_files; $j++ ){ + + if(-e $files[$j]){ + + my $maxy = -1e99; + my $miny = 1e99; + + # my $m=0; + # open(Fi, '<', $files[$j]) or die $!; + # while(){ + # $m++; + # } + # close(Fi); + + # if($m==$n){ + my $m=0; + open(Fi, '<', $files[$j]) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $m++; + $x = $line[0]; + $y = $line[1]; + $dy = $y - $y0[$m]; + $maxy = max($maxy,$dy); + $miny = min($miny,$dy); + if($x==$xcut){last}; + } + close(Fi); + + if($x==$xcut){ + my $npe = $maxy - $miny; + my $closeness = $maxy + $miny; + print Fo "$index[$j] $npe $closeness $maxy $miny \n"; + } + # } + + } + + } + close(Fo); diff --git a/H4_cc-pvdz/cp_to_manuscript.sh b/H4_cc-pvdz/cp_to_manuscript.sh new file mode 100755 index 0000000..e1eabdc --- /dev/null +++ b/H4_cc-pvdz/cp_to_manuscript.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mol='h4' + +path='/home/fabris/ongoing_projects/seniority/Manuscript' + +cp plot_pes.pdf $path/${mol}_pes.pdf +cp plot_error.pdf $path/${mol}_pes_error.pdf +cp plot_stat.pdf $path/${mol}_pes_stat.pdf +cp xe.pdf $path/${mol}_xe.pdf diff --git a/H4_cc-pvdz/fit_diss.gnu b/H4_cc-pvdz/fit_diss.gnu new file mode 100644 index 0000000..b4d490f --- /dev/null +++ b/H4_cc-pvdz/fit_diss.gnu @@ -0,0 +1,425 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +xmin=1.45 +xmax=1.95 + +x2min=7.0 +x2max=10.0 + +#set xrange[1.0:3.0] +set xrange[1.0:10.0] + +# VIEW 1: +set yrange[-2.3:-1.7] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 3 dt 1 lw 3 linecolor rgb "light-red" +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" +set style line 5 dt 2 lw 3 linecolor rgb "sea-green" +set style line 6 dt 1 lw 3 linecolor rgb "orange" +set style line 7 dt 2 lw 3 linecolor rgb "orange" +set style line 9 dt 1 lw 2 linecolor rgb "violet" + +set xlabel "Distance (a_{0})" +set ylabel 'Energy (Hartree)' + +# check if file exists +file_exists(file) = int(system("[ -f '".file."' ] && echo '1' || echo '0'")) +D0=0.0;a0=1.0;xe0=1.0;C0=0.0 +D1=0.0;a1=1.0;xe1=1.0;C1=0.0 +D2=0.0;a2=1.0;xe2=1.0;C2=0.0 +D3=0.0;a3=1.0;xe3=1.0;C3=0.0 +D4=0.0;a4=1.0;xe4=1.0;C4=0.0 +D5=0.0;a5=1.0;xe5=1.0;C5=0.0 +D6=0.0;a6=1.0;xe6=1.0;C6=0.0 +D7=0.0;a7=1.0;xe7=1.0;C7=0.0 +D8=0.0;a8=1.0;xe8=1.0;C8=0.0 +D9=0.0;a9=1.0;xe9=1.0;C9=0.0 +D10=0.0;a10=1.0;xe10=1.0;C10=0.0 +D11=0.0;a11=1.0;xe11=1.0;C11=0.0 +D12=0.0;a12=1.0;xe12=1.0;C12=0.0 +D13=0.0;a13=1.0;xe13=1.0;C13=0.0 +D14=0.0;a14=1.0;xe14=1.0;C14=0.0 +D15=0.0;a15=1.0;xe15=1.0;C15=0.0 +D16=0.0;a16=1.0;xe16=1.0;C16=0.0 +D17=0.0;a17=1.0;xe17=1.0;C17=0.0 +D18=0.0;a18=1.0;xe18=1.0;C18=0.0 + +M0=0.0;b0=1.0;xe0=1.0;N0=0.0 +M1=0.0;b1=1.0;xe1=1.0;N1=0.0 +M2=0.0;b2=1.0;xe2=1.0;N2=0.0 +M3=0.0;b3=1.0;xe3=1.0;N3=0.0 +M4=0.0;b4=1.0;xe4=1.0;N4=0.0 +M5=0.0;b5=1.0;xe5=1.0;N5=0.0 +M6=0.0;b6=1.0;xe6=1.0;N6=0.0 +M7=0.0;b7=1.0;xe7=1.0;N7=0.0 +M8=0.0;b8=1.0;xe8=1.0;N8=0.0 +M9=0.0;b9=1.0;xe9=1.0;N9=0.0 +M10=0.0;b10=1.0;xe10=1.0;N10=0.0 +M11=0.0;b11=1.0;xe11=1.0;N11=0.0 +M12=0.0;b12=1.0;xe12=1.0;N12=0.0 +M13=0.0;b13=1.0;xe13=1.0;N13=0.0 +M14=0.0;b14=1.0;xe14=1.0;N14=0.0 +M15=0.0;b15=1.0;xe15=1.0;N15=0.0 +M16=0.0;b16=1.0;xe16=1.0;N16=0.0 +M17=0.0;b17=1.0;xe17=1.0;N17=0.0 +M18=0.0;b18=1.0;xe18=1.0;N18=0.0 + + +# function for fitting + +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +g0(x) = M0*(1-exp(-b0*(x-xd0)))**2+N0 +filename='pes_fci.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a0=1.0; xe0=STATS_pos_min_y; C0=STATS_min_y +b0=1.0; xd0=STATS_pos_min_y; N0=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D0=last_y-C0 +M0=last_y-N0 +fit [xmin:xmax] [*:*] f0(x) filename u 1:($2) via D0,a0,xe0,C0 +fit [x2min:x2max] [*:*] g0(x) filename u 1:($2) via M0,b0,xd0,N0 +} + +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +g1(x) = M1*(1-exp(-b1*(x-xd1)))**2+N1 +filename='pes_rhf.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a1=1.0; xe1=STATS_pos_min_y; C1=STATS_min_y +b1=1.0; xd1=STATS_pos_min_y; N1=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D1=last_y-C1 +M1=last_y-N1 +fit [xmin:xmax] [*:*] f1(x) filename u 1:($2) via D1,a1,xe1,C1 +fit [x2min:x2max] [*:*] g1(x) filename u 1:($2) via M1,b1,xd1,N1 +} + +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +#g2(x) = M2*(1-exp(-b2*(x-xd2)))**2+N2 +g2(x) = -2.0*M2*exp(-b2*(x-xd2))+N2 +#g2(x) = -2.0*M2*exp(-b2*x)+N2 +filename='pes_CISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a2=1.0; xe2=STATS_pos_min_y; C2=STATS_min_y +b2=1.0; xd2=STATS_pos_min_y; N2=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D2=last_y-C2 +M2=last_y-N2 +fit [xmin:xmax] [*:*] f2(x) filename u 1:($2) via D2,a2,xe2,C2 +#fit [x2min:x2max] [*:*] g2(x) filename u 1:($2) via M2,b2,xd2,N2 +fit [x2min:x2max] [*:*] g2(x) filename u 1:($2) via M2,b2,N2 +} + +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +g3(x) = M3*(1-exp(-b3*(x-xd3)))**2+N3 +filename='pes_CISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a3=1.0; xe3=STATS_pos_min_y; C3=STATS_min_y +b3=1.0; xd3=STATS_pos_min_y; N3=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D3=last_y-C3 +M3=last_y-N3 +fit [xmin:xmax] [*:*] f3(x) filename u 1:($2) via D3,a3,xe3,C3 +fit [x2min:x2max] [*:*] g3(x) filename u 1:($2) via M3,b3,xd3,N3 +} + +f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +g4(x) = M4*(1-exp(-b4*(x-xd4)))**2+N4 +filename='pes_CISDTQ.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a4=1.0; xe4=STATS_pos_min_y; C4=STATS_min_y +b4=1.0; xd4=STATS_pos_min_y; N4=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D4=last_y-C4 +M4=last_y-N4 +fit [xmin:xmax] [*:*] f4(x) filename u 1:($2) via D4,a4,xe4,C4 +fit [x2min:x2max] [*:*] g4(x) filename u 1:($2) via M4,b4,xd4,N4 +} + +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +g5(x) = M5*(1-exp(-b5*(x-xd5)))**2+N5 +filename='pes_CIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a5=1.0; xe5=STATS_pos_min_y; C5=STATS_min_y +b5=1.0; xd5=STATS_pos_min_y; N5=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D5=last_y-C5 +M5=last_y-N5 +fit [xmin:xmax] [*:*] f5(x) filename u 1:($2) via D5,a5,xe5,C5 +fit [x2min:x2max] [*:*] g5(x) filename u 1:($2) via M5,b5,xd5,N5 +} + +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +g6(x) = M6*(1-exp(-b6*(x-xd6)))**2+N6 +filename='pes_CIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a6=1.0; xe6=STATS_pos_min_y; C6=STATS_min_y +b6=1.0; xd6=STATS_pos_min_y; N6=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D6=last_y-C6 +M6=last_y-N6 +fit [xmin:xmax] [*:*] f6(x) filename u 1:($2) via D6,a6,xe6,C6 +fit [x2min:x2max] [*:*] g6(x) filename u 1:($2) via M6,b6,xd6,N6 +} + +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +g7(x) = M7*(1-exp(-b7*(x-xd7)))**2+N7 +filename='pes_CIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a7=1.0; xe7=STATS_pos_min_y; C7=STATS_min_y +b7=1.0; xd7=STATS_pos_min_y; N7=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D7=last_y-C7 +M7=last_y-N7 +fit [xmin:xmax] [*:*] f7(x) filename u 1:($2) via D7,a7,xe7,C7 +fit [x2min:x2max] [*:*] g7(x) filename u 1:($2) via M7,b7,xd7,N7 +} + +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +g8(x) = M8*(1-exp(-b8*(x-xd8)))**2+N8 +filename='pes_CIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a8=1.0; xe8=STATS_pos_min_y; C8=STATS_min_y +b8=1.0; xd8=STATS_pos_min_y; N8=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D8=last_y-C8 +M8=last_y-N8 +fit [xmin:xmax] [*:*] f8(x) filename u 1:($2) via D8,a8,xe8,C8 +fit [x2min:x2max] [*:*] g8(x) filename u 1:($2) via M8,b8,xd8,N8 +} + +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +g9(x) = M9*(1-exp(-b9*(x-xd9)))**2+N9 +filename='pes_CIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a9=1.0; xe9=STATS_pos_min_y; C9=STATS_min_y +b9=1.0; xd9=STATS_pos_min_y; N9=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D9=last_y-C9 +M9=last_y-N9 +fit [xmin:xmax] [*:*] f9(x) filename u 1:($2) via D9,a9,xe9,C9 +fit [x2min:x2max] [*:*] g9(x) filename u 1:($2) via M9,b9,xd9,N9 +} + +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +g10(x) = M10*(1-exp(-b10*(x-xd10)))**2+N10 +filename='pes_CIo3.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a10=1.0; xe10=STATS_pos_min_y; C10=STATS_min_y +b10=1.0; xd10=STATS_pos_min_y; N10=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D10=last_y-C10 +M10=last_y-N10 +fit [xmin:xmax] [*:*] f10(x) filename u 1:($2) via D10,a10,xe10,C10 +fit [x2min:x2max] [*:*] g10(x) filename u 1:($2) via M10,b10,xd10,N10 +} + +f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +g11(x) = M11*(1-exp(-b11*(x-xd11)))**2+N11 +filename='pes_CIo4.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a11=1.0; xe11=STATS_pos_min_y; C11=STATS_min_y +b11=1.0; xd11=STATS_pos_min_y; N11=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D11=last_y-C11 +M11=last_y-N11 +fit [xmin:xmax] [*:*] f11(x) filename u 1:($2) via D11,a11,xe11,C11 +fit [x2min:x2max] [*:*] g11(x) filename u 1:($2) via M11,b11,xd11,N11 +} + +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +g12(x) = M12*(1-exp(-b12*(x-xd12)))**2+N12 +filename='pes_ooCISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a12=1.0; xe12=STATS_pos_min_y; C12=STATS_min_y +b12=1.0; xd12=STATS_pos_min_y; N12=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D12=last_y-C12 +M12=last_y-N12 +fit [xmin:xmax] [*:*] f12(x) filename u 1:($2) via D12,a12,xe12,C12 +fit [x2min:x2max] [*:*] g12(x) filename u 1:($2) via M12,b12,xd12,N12 +} + +f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +g13(x) = M13*(1-exp(-b13*(x-xd13)))**2+N13 +filename='pes_ooCISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a13=1.0; xe13=STATS_pos_min_y; C13=STATS_min_y +b13=1.0; xd13=STATS_pos_min_y; N13=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D13=last_y-C13 +M13=last_y-N13 +fit [xmin:xmax] [*:*] f13(x) filename u 1:($2) via D13,a13,xe13,C13 +fit [x2min:x2max] [*:*] g13(x) filename u 1:($2) via M13,b13,xd13,N13 +} + +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +g14(x) = M14*(1-exp(-b14*(x-xd14)))**2+N14 +filename='pes_ooCIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a14=1.0; xe14=STATS_pos_min_y; C14=STATS_min_y +b14=1.0; xd14=STATS_pos_min_y; N14=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D14=last_y-C14 +M14=last_y-N14 +fit [xmin:xmax] [*:*] f14(x) filename u 1:($2) via D14,a14,xe14,C14 +fit [x2min:x2max] [*:*] g14(x) filename u 1:($2) via M14,b14,xd14,N14 +} + +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +g15(x) = M15*(1-exp(-b15*(x-xd15)))**2+N15 +filename='pes_ooCIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a15=1.0; xe15=STATS_pos_min_y; C15=STATS_min_y +b15=1.0; xd15=STATS_pos_min_y; N15=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D15=last_y-C15 +M15=last_y-N15 +fit [xmin:xmax] [*:*] f15(x) filename u 1:($2) via D15,a15,xe15,C15 +fit [x2min:x2max] [*:*] g15(x) filename u 1:($2) via M15,b15,xd15,N15 +} + +f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +g16(x) = M16*(1-exp(-b16*(x-xd16)))**2+N16 +filename='pes_ooCIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a16=1.0; xe16=STATS_pos_min_y; C16=STATS_min_y +b16=1.0; xd16=STATS_pos_min_y; N16=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D16=last_y-C16 +M16=last_y-N16 +fit [xmin:xmax] [*:*] f16(x) filename u 1:($2) via D16,a16,xe16,C16 +fit [x2min:x2max] [*:*] g16(x) filename u 1:($2) via M16,b16,xd16,N16 +} + +f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +g17(x) = M17*(1-exp(-b17*(x-xd17)))**2+N17 +filename='pes_ooCIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a17=1.0; xe17=STATS_pos_min_y; C17=STATS_min_y +b17=1.0; xd17=STATS_pos_min_y; N17=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D17=last_y-C17 +M17=last_y-N17 +fit [xmin:xmax] [*:*] f17(x) filename u 1:($2) via D17,a17,xe17,C17 +fit [x2min:x2max] [*:*] g17(x) filename u 1:($2) via M17,b17,xd17,N17 +} + +f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +g18(x) = M18*(1-exp(-b18*(x-xd18)))**2+N18 +filename='pes_ooCIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a18=1.0; xe18=STATS_pos_min_y; C18=STATS_min_y +b18=1.0; xd18=STATS_pos_min_y; N18=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D18=last_y-C18 +M18=last_y-N18 +fit [xmin:xmax] [*:*] f18(x) filename u 1:($2) via D18,a18,xe18,C18 +fit [x2min:x2max] [*:*] g18(x) filename u 1:($2) via M18,b18,xd18,N18 +} + + + + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CISDTQ.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_CIo3.dat' w lp ls 4 notitle, \ + 'pes_CIo3.5.dat' w lp ls 5 notitle, \ + 'pes_CIo4.dat' w lp ls 4 notitle, \ + 'pes_ooCISD.dat' w lp ls 3 notitle, \ + 'pes_ooCISDT.dat' w lp ls 3 notitle, \ + 'pes_ooCIo1.dat' w lp ls 4 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 5 notitle, \ + 'pes_ooCIo2.dat' w lp ls 4 notitle, \ + 'pes_ooCIo2.5.dat' w lp ls 5 notitle, \ + 'pes_ooCIo3.dat' w lp ls 4 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f4(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f11(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f13(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle, \ + [xmin:xmax] f16(x) w l ls 9 notitle, \ + [xmin:xmax] f17(x) w l ls 9 notitle, \ + [xmin:xmax] f18(x) w l ls 9 notitle, \ + [x2min:2*x2max] g0(x) w l ls 9 notitle, \ + [x2min:2*x2max] g1(x) w l ls 9 notitle, \ + [x2min:2*x2max] g2(x) w l ls 9 notitle, \ + [x2min:2*x2max] g3(x) w l ls 9 notitle, \ + [x2min:2*x2max] g4(x) w l ls 9 notitle, \ + [x2min:2*x2max] g5(x) w l ls 9 notitle, \ + [x2min:2*x2max] g6(x) w l ls 9 notitle, \ + [x2min:2*x2max] g7(x) w l ls 9 notitle, \ + [x2min:2*x2max] g8(x) w l ls 9 notitle, \ + [x2min:2*x2max] g9(x) w l ls 9 notitle, \ + [x2min:2*x2max] g10(x) w l ls 9 notitle, \ + [x2min:2*x2max] g11(x) w l ls 9 notitle, \ + [x2min:2*x2max] g12(x) w l ls 9 notitle, \ + [x2min:2*x2max] g13(x) w l ls 9 notitle, \ + [x2min:2*x2max] g14(x) w l ls 9 notitle, \ + [x2min:2*x2max] g15(x) w l ls 9 notitle, \ + [x2min:2*x2max] g16(x) w l ls 9 notitle, \ + [x2min:2*x2max] g17(x) w l ls 9 notitle, \ + [x2min:2*x2max] g18(x) w l ls 9 notitle#, \ + +################################################################################### +################################################################################### + +pause -1 diff --git a/H4_cc-pvdz/fit_eq.gnu b/H4_cc-pvdz/fit_eq.gnu new file mode 100644 index 0000000..afcf47f --- /dev/null +++ b/H4_cc-pvdz/fit_eq.gnu @@ -0,0 +1,303 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +xmin=1.45 +xmax=1.95 +#xmin=1.55 +#xmax=1.85 + +#set xrange[1.0:3.0] +set xrange[1.0:10.0] + +# VIEW 1: +set yrange[-2.3:-1.7] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 9 dt 1 lw 2 linecolor rgb "violet" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 +set style line 15 dt 2 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel "Distance (a_{0})" +set ylabel 'Energy (Hartree)' + +# check if file exists +file_exists(file) = int(system("[ -f '".file."' ] && echo '1' || echo '0'")) +D0=0.0;a0=1.0;xe0=1.0;C0=0.0 +D1=0.0;a1=1.0;xe1=1.0;C1=0.0 +D2=0.0;a2=1.0;xe2=1.0;C2=0.0 +D3=0.0;a3=1.0;xe3=1.0;C3=0.0 +D4=0.0;a4=1.0;xe4=1.0;C4=0.0 +D5=0.0;a5=1.0;xe5=1.0;C5=0.0 +D6=0.0;a6=1.0;xe6=1.0;C6=0.0 +D7=0.0;a7=1.0;xe7=1.0;C7=0.0 +D8=0.0;a8=1.0;xe8=1.0;C8=0.0 +D9=0.0;a9=1.0;xe9=1.0;C9=0.0 +D10=0.0;a10=1.0;xe10=1.0;C10=0.0 +D11=0.0;a11=1.0;xe11=1.0;C11=0.0 +D12=0.0;a12=1.0;xe12=1.0;C12=0.0 +D13=0.0;a13=1.0;xe13=1.0;C13=0.0 +D14=0.0;a14=1.0;xe14=1.0;C14=0.0 +D15=0.0;a15=1.0;xe15=1.0;C15=0.0 +D16=0.0;a16=1.0;xe16=1.0;C16=0.0 +D17=0.0;a17=1.0;xe17=1.0;C17=0.0 +D18=0.0;a18=1.0;xe18=1.0;C18=0.0 + +# function for fitting + +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +filename='pes_fci.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a0=1.0; xe0=STATS_pos_min_y; C0=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D0=last_y-C0 +fit [xmin:xmax] [*:*] f0(x) filename u 1:($2) via D0,a0,xe0,C0 +} + +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +filename='pes_rhf.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a1=1.0; xe1=STATS_pos_min_y; C1=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D1=last_y-C1 +fit [xmin:xmax] [*:*] f1(x) filename u 1:($2) via D1,a1,xe1,C1 +} + +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +filename='pes_CISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a2=1.0; xe2=STATS_pos_min_y; C2=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D2=last_y-C2 +fit [xmin:xmax] [*:*] f2(x) filename u 1:($2) via D2,a2,xe2,C2 +} + +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +filename='pes_CISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a3=1.0; xe3=STATS_pos_min_y; C3=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D3=last_y-C3 +fit [xmin:xmax] [*:*] f3(x) filename u 1:($2) via D3,a3,xe3,C3 +} + +f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +filename='pes_CISDTQ.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a4=1.0; xe4=STATS_pos_min_y; C4=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D4=last_y-C4 +fit [xmin:xmax] [*:*] f4(x) filename u 1:($2) via D4,a4,xe4,C4 +} + +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +filename='pes_CIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a5=1.0; xe5=STATS_pos_min_y; C5=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D5=last_y-C5 +fit [xmin:xmax] [*:*] f5(x) filename u 1:($2) via D5,a5,xe5,C5 +} + +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +filename='pes_CIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a6=1.0; xe6=STATS_pos_min_y; C6=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D6=last_y-C6 +fit [xmin:xmax] [*:*] f6(x) filename u 1:($2) via D6,a6,xe6,C6 +} + +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +filename='pes_CIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a7=1.0; xe7=STATS_pos_min_y; C7=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D7=last_y-C7 +fit [xmin:xmax] [*:*] f7(x) filename u 1:($2) via D7,a7,xe7,C7 +} + +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +filename='pes_CIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a8=1.0; xe8=STATS_pos_min_y; C8=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D8=last_y-C8 +fit [xmin:xmax] [*:*] f8(x) filename u 1:($2) via D8,a8,xe8,C8 +} + +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +filename='pes_CIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a9=1.0; xe9=STATS_pos_min_y; C9=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D9=last_y-C9 +fit [xmin:xmax] [*:*] f9(x) filename u 1:($2) via D9,a9,xe9,C9 +} + +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +filename='pes_CIo3.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a10=1.0; xe10=STATS_pos_min_y; C10=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D10=last_y-C10 +fit [xmin:xmax] [*:*] f10(x) filename u 1:($2) via D10,a10,xe10,C10 +} + +f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +filename='pes_CIo4.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a11=1.0; xe11=STATS_pos_min_y; C11=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D11=last_y-C11 +fit [xmin:xmax] [*:*] f11(x) filename u 1:($2) via D11,a11,xe11,C11 +} + +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +filename='pes_ooCISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a12=1.0; xe12=STATS_pos_min_y; C12=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D12=last_y-C12 +fit [xmin:xmax] [*:*] f12(x) filename u 1:($2) via D12,a12,xe12,C12 +} + +f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +filename='pes_ooCISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a13=1.0; xe13=STATS_pos_min_y; C13=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D13=last_y-C13 +fit [xmin:xmax] [*:*] f13(x) filename u 1:($2) via D13,a13,xe13,C13 +} + +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +filename='pes_ooCIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a14=1.0; xe14=STATS_pos_min_y; C14=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D14=last_y-C14 +fit [xmin:xmax] [*:*] f14(x) filename u 1:($2) via D14,a14,xe14,C14 +} + +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +filename='pes_ooCIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a15=1.0; xe15=STATS_pos_min_y; C15=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D15=last_y-C15 +fit [xmin:xmax] [*:*] f15(x) filename u 1:($2) via D15,a15,xe15,C15 +} + +f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +filename='pes_ooCIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a16=1.0; xe16=STATS_pos_min_y; C16=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D16=last_y-C16 +fit [xmin:xmax] [*:*] f16(x) filename u 1:($2) via D16,a16,xe16,C16 +} + +f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +filename='pes_ooCIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a17=1.0; xe17=STATS_pos_min_y; C17=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D17=last_y-C17 +fit [xmin:xmax] [*:*] f17(x) filename u 1:($2) via D17,a17,xe17,C17 +} + +f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +filename='pes_ooCIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a18=1.0; xe18=STATS_pos_min_y; C18=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D18=last_y-C18 +fit [xmin:xmax] [*:*] f18(x) filename u 1:($2) via D18,a18,xe18,C18 +} + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CISDTQ.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_CIo3.dat' w lp ls 4 notitle, \ + 'pes_CIo3.5.dat' w lp ls 5 notitle, \ + 'pes_CIo4.dat' w lp ls 4 notitle, \ + 'pes_ooCISD.dat' w lp ls 13 notitle, \ + 'pes_ooCISDT.dat' w lp ls 13 notitle, \ + 'pes_ooCIo1.dat' w lp ls 14 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo2.dat' w lp ls 14 notitle, \ + 'pes_ooCIo2.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo3.dat' w lp ls 14 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f4(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f11(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f13(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle, \ + [xmin:xmax] f16(x) w l ls 9 notitle, \ + [xmin:xmax] f17(x) w l ls 9 notitle, \ + [xmin:xmax] f18(x) w l ls 9 notitle + +################################################################################### +################################################################################### + +pause -1 diff --git a/H4_cc-pvdz/fit_eq.sh b/H4_cc-pvdz/fit_eq.sh new file mode 100755 index 0000000..753c081 --- /dev/null +++ b/H4_cc-pvdz/fit_eq.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +if [ -f "fit.log" ]; then + rm "fit.log" +fi + +gnuplot fit_eq.gnu + +grep ^xe fit.log | grep = | sed 's/=//g' | cut -c -30 | + sed 's/xe0 /FCI /g' | + sed 's/xe1 /RHF /g' | + sed 's/xe2 /hfCISD /g' | + sed 's/xe3 /hfCISDT /g' | + sed 's/xe4 /hfCISDTQ /g' | + sed 's/xe5 /hfCIo1 /g' | + sed 's/xe6 /hfCIo1.5 /g' | + sed 's/xe7 /hfCIo2 /g' | + sed 's/xe8 /hfCIo2.5 /g' | + sed 's/xe9 /hfCIo3 /g' | + sed 's/xe10/hfCIo3.5 /g' | + sed 's/xe11/hfCIo4 /g' | + sed 's/xe12/ooCISD /g' | + sed 's/xe13/ooCISDT /g' | + sed 's/xe14/ooCIo1 /g' | + sed 's/xe15/ooCIo1.5 /g' | + sed 's/xe16/ooCIo2 /g' | + sed 's/xe17/ooCIo2.5 /g' | + sed 's/xe18/ooCIo3 /g' > xe.dat + + +grep 'FCI' xe.dat | sed 's/FCI/-0.1 /g' > xe_FCI.dat +grep 'FCI' xe.dat | sed 's/FCI/4.1 /g' >> xe_FCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_CI.dat +grep 'hfCISD ' xe.dat | sed 's/hfCISD/2 /g' >> xe_CI.dat +grep 'hfCISDT ' xe.dat | sed 's/hfCISDT/3 /g' >> xe_CI.dat +grep 'hfCISDTQ' xe.dat | sed 's/hfCISDTQ/4 /g' >> xe_CI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_ooCI.dat +grep 'ooCISD ' xe.dat | sed 's/ooCISD/2 /g' >> xe_ooCI.dat +grep 'ooCISDT' xe.dat | sed 's/ooCISDT/3 /g' >> xe_ooCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CIo.dat +grep 'hfCIo1 ' xe.dat | sed 's/hfCIo1/1 /g' >> xe_CIo.dat +grep 'hfCIo1.5' xe.dat | sed 's/hfCIo1.5/1.5 /g' >> xe_CIo.dat +grep 'hfCIo2 ' xe.dat | sed 's/hfCIo2/2 /g' >> xe_CIo.dat +grep 'hfCIo2.5' xe.dat | sed 's/hfCIo2.5/2.5 /g' >> xe_CIo.dat +grep 'hfCIo3 ' xe.dat | sed 's/hfCIo3/3 /g' >> xe_CIo.dat +grep 'hfCIo3.5' xe.dat | sed 's/hfCIo3.5/3.5 /g' >> xe_CIo.dat +grep 'hfCIo4 ' xe.dat | sed 's/hfCIo4/4 /g' >> xe_CIo.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCIo.dat +grep 'ooCIo1 ' xe.dat | sed 's/ooCIo1/1 /g' >> xe_ooCIo.dat +grep 'ooCIo1.5' xe.dat | sed 's/ooCIo1.5/1.5 /g' >> xe_ooCIo.dat +grep 'ooCIo2 ' xe.dat | sed 's/ooCIo2/2 /g' >> xe_ooCIo.dat +grep 'ooCIo2.5' xe.dat | sed 's/ooCIo2.5/2.5 /g' >> xe_ooCIo.dat +grep 'ooCIo3 ' xe.dat | sed 's/ooCIo3/3 /g' >> xe_ooCIo.dat + +#epspdf fit_eq.eps +#okular fit_eq.pdf diff --git a/H4_cc-pvdz/fit_eq_0.gnu b/H4_cc-pvdz/fit_eq_0.gnu new file mode 100644 index 0000000..845ce33 --- /dev/null +++ b/H4_cc-pvdz/fit_eq_0.gnu @@ -0,0 +1,167 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +xmin=1.45 +xmax=1.95 + +#set xrange[1.0:3.0] +#set xrange[1.0:10.0] + +# VIEW 1: +#set yrange[-2.3:-1.7] +#set yrange[-2.3:-2.1] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 3 dt 1 lw 3 linecolor rgb "light-red" +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" +set style line 5 dt 2 lw 3 linecolor rgb "sea-green" +set style line 6 dt 1 lw 3 linecolor rgb "orange" +set style line 7 dt 2 lw 3 linecolor rgb "orange" +set style line 9 dt 1 lw 2 linecolor rgb "violet" + +set xlabel "Distance ({\305})" +set ylabel 'Energy (Hartree)' + +# function for fitting + +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +filename='pes_fci.dat' +stats filename using 1:2 nooutput +print STATS_records +a0=1.0; xe0=STATS_pos_min_y; C0=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +print last_y +D0=last_y-C0 +fit [xmin:xmax] [*:*] f0(x) filename u 1:($2) via D0,a0,xe0,C0 + +#D0=0.25; a0=1.0; xe0=1.7; C0=-2.0 +#fit [xmin:xmax] [*:*] f0(x) 'pes_fci.dat' u 1:($2) via D0,a0,xe0,C0 +# +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +D1=0.25; a1=1.0; xe1=1.7; C1=-2.0 +fit [xmin:xmax] [*:*] f1(x) 'pes_rhf.dat' u 1:($2) via D1,a1,xe1,C1 +# +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +D2=0.25; a2=1.0; xe2=1.7; C2=-2.0 +fit [xmin:xmax] [*:*] f2(x) 'pes_CISD.dat' u 1:($2) via D2,a2,xe2,C2 +# +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +D3=0.25; a3=1.0; xe3=1.7; C3=-2.0 +fit [xmin:xmax] [*:*] f3(x) 'pes_CISDT.dat' u 1:($2) via D3,a3,xe3,C3 +# +#f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +#D4=0.25; a4=1.0; xe4=1.7; C4=-2.0 +#fit [xmin:xmax] [*:*] f4(x) 'pes_CISDTQ.dat' u 1:($2) via D4,a4,xe4,C4 +# +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +D5=0.25; a5=1.0; xe5=1.7; C5=-2.0 +fit [xmin:xmax] [*:*] f5(x) 'pes_CIo1.dat' u 1:($2) via D5,a5,xe5,C5 +# +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +D6=0.25; a6=1.0; xe6=1.7; C6=-2.0 +fit [xmin:xmax] [*:*] f6(x) 'pes_CIo1.5.dat' u 1:($2) via D6,a6,xe6,C6 +# +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +D7=0.25; a7=1.0; xe7=1.7; C7=-2.0 +fit [xmin:xmax] [*:*] f7(x) 'pes_CIo2.dat' u 1:($2) via D7,a7,xe7,C7 +# +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +D8=0.25; a8=1.0; xe8=1.7; C8=-2.0 +fit [xmin:xmax] [*:*] f8(x) 'pes_CIo2.5.dat' u 1:($2) via D8,a8,xe8,C8 +# +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +D9=0.25; a9=1.0; xe9=1.7; C9=-2.0 +fit [xmin:xmax] [*:*] f9(x) 'pes_CIo3.dat' u 1:($2) via D9,a9,xe9,C9 +# +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +D10=0.25; a10=1.0; xe10=1.7; C10=-2.0 +fit [xmin:xmax] [*:*] f10(x) 'pes_CIo3.5.dat' u 1:($2) via D10,a10,xe10,C10 +# +#f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +#D11=0.25; a11=1.0; xe11=1.7; C11=-2.0 +#fit [xmin:xmax] [*:*] f11(x) 'pes_CIo4.dat' u 1:($2) via D11,a11,xe11,C11 +# +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +D12=0.25; a12=1.0; xe12=1.7; C12=-2.0 +fit [xmin:xmax] [*:*] f12(x) 'pes_ooCISD.dat' u 1:($2) via D12,a12,xe12,C12 +# +#f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +#D13=0.25; a13=1.0; xe13=1.7; C13=-2.0 +#fit [xmin:xmax] [*:*] f13(x) 'pes_ooCISDT.dat' u 1:($2) via D13,a13,xe13,C13 +# +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +D14=0.25; a14=1.0; xe14=1.7; C14=-2.0 +fit [xmin:xmax] [*:*] f14(x) 'pes_ooCIo1.dat' u 1:($2) via D14,a14,xe14,C14 +# +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +D15=0.25; a15=1.0; xe15=1.7; C15=-2.0 +fit [xmin:xmax] [*:*] f15(x) 'pes_ooCIo1.5.dat' u 1:($2) via D15,a15,xe15,C15 +# +#f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +#D16=0.25; a16=1.0; xe16=1.7; C16=-2.0 +#fit [xmin:xmax] [*:*] f16(x) 'pes_ooCIo2.dat' u 1:($2) via D16,a16,xe16,C16 +# +#f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +#D17=0.25; a17=1.0; xe17=1.7; C17=-2.0 +#fit [xmin:xmax] [*:*] f17(x) 'pes_ooCIo2.5.dat' u 1:($2) via D17,a17,xe17,C17 +# +#f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +#D18=0.25; a18=1.0; xe18=1.7; C18=-2.0 +#fit [xmin:xmax] [*:*] f18(x) 'pes_ooCIo3.dat' u 1:($2) via D18,a18,xe18,C18 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_ooCISD.dat' w lp ls 3 notitle, \ + 'pes_ooCIo1.dat' w lp ls 4 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 5 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle#, \ +# 'pes_ooCIo2.dat' w lp ls 4 notitle, \ +# [xmin:xmax] f4(x) w l ls 9 notitle, \ +# [xmin:xmax] f11(x) w l ls 9 notitle, \ +# [xmin:xmax] f13(x) w l ls 9 notitle, \ +# [xmin:xmax] f16(x) w l ls 9 notitle, \ +# [xmin:xmax] f17(x) w l ls 9 notitle, \ +# [xmin:xmax] f18(x) w l ls 9 notitle#, \ + +################################################################################### +################################################################################### + +pause -1 diff --git a/H4_cc-pvdz/plot_eq.sh b/H4_cc-pvdz/plot_eq.sh new file mode 100755 index 0000000..6d67960 --- /dev/null +++ b/H4_cc-pvdz/plot_eq.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +grep ^xe fit.log | grep = | sed 's/=//g' | cut -c -30 | + sed 's/xe0 /FCI /g' | + sed 's/xe1 /RHF /g' | + sed 's/xe2 /SD /g' | + sed 's/xe3 /SDT /g' | + sed 's/xe4 /SDTQ /g' | + sed 's/xe5 /o1 /g' | + sed 's/xe6 /o1.5 /g' | + sed 's/xe7 /o2 /g' | + sed 's/xe8 /o2.5 /g' | + sed 's/xe9 /o3 /g' | + sed 's/xe10/o3.5 /g' | + sed 's/xe11/o4 /g' | + sed 's/xe12/ooSD /g' | + sed 's/xe13/ooSDT /g' | + sed 's/xe14/ooo1 /g' | + sed 's/xe15/ooo1.5/g' | + sed 's/xe16/ooo2 /g' | + sed 's/xe17/ooo2.5/g' | + sed 's/xe18/ooo3 /g' #| + diff --git a/H4_cc-pvdz/plot_error.sh b/H4_cc-pvdz/plot_error.sh new file mode 100755 index 0000000..86447b8 --- /dev/null +++ b/H4_cc-pvdz/plot_error.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_error.gnu +epspdf plot_error.eps +okular plot_error.pdf diff --git a/H4_cc-pvdz/plot_pes.sh b/H4_cc-pvdz/plot_pes.sh new file mode 100755 index 0000000..2aa451d --- /dev/null +++ b/H4_cc-pvdz/plot_pes.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_pes.gnu +epspdf plot_pes.eps +okular plot_pes.pdf diff --git a/H4_cc-pvdz/plot_stat.gnu b/H4_cc-pvdz/plot_stat.gnu new file mode 100644 index 0000000..ec7814f --- /dev/null +++ b/H4_cc-pvdz/plot_stat.gnu @@ -0,0 +1,51 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat.eps' + +set format y "10^{%T}" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] +set yrange[1e-4:1] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 1 +set logscale y + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CI.dat' u 1:($2) w lp ls 3 notitle, \ + 'stat_CIo.dat' u 1:($2) w lp ls 4 notitle + +unset ylabel +unset label + +plot 'stat_ooCI.dat' u 1:($2) w lp ls 13 notitle, \ + 'stat_ooCIo.dat' u 1:($2) w lp ls 14 notitle diff --git a/H4_cc-pvdz/plot_stat.sh b/H4_cc-pvdz/plot_stat.sh new file mode 100755 index 0000000..0319a62 --- /dev/null +++ b/H4_cc-pvdz/plot_stat.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +./compute_NPE.pl 1 10.0 +./compute_NPE.pl 2 10.0 +./compute_NPE.pl 3 10.0 +./compute_NPE.pl 4 10.0 + +gnuplot plot_stat.gnu +epspdf plot_stat.eps +okular plot_stat.pdf diff --git a/H4_cc-pvdz/xe.gnu b/H4_cc-pvdz/xe.gnu new file mode 100644 index 0000000..b9d671c --- /dev/null +++ b/H4_cc-pvdz/xe.gnu @@ -0,0 +1,68 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'xe.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] + +# VIEW 1: +set yrange[1.67:1.71] +set format y "%.2f" +################################################################################### +################################################################################### + +set xtics 1 +set ytics 0.01 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.15 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" + +set style line 3 dt 1 lw 3 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel "Equilibrium distance (a_{0})" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_CI.dat' w lp ls 3 notitle, \ + 'xe_CIo.dat' w lp ls 4 notitle + +unset ylabel +unset label +set format y "" + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_ooCI.dat' w lp ls 13 notitle, \ + 'xe_ooCIo.dat' w lp ls 14 notitle + +################################################################################### +################################################################################### + +#pause -1 diff --git a/H4_cc-pvdz/xe.sh b/H4_cc-pvdz/xe.sh new file mode 100755 index 0000000..2896546 --- /dev/null +++ b/H4_cc-pvdz/xe.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot xe.gnu +epspdf xe.eps +okular xe.pdf diff --git a/H8_cc-pvdz/compute_NPE.pl b/H8_cc-pvdz/compute_NPE.pl new file mode 100755 index 0000000..9a74955 --- /dev/null +++ b/H8_cc-pvdz/compute_NPE.pl @@ -0,0 +1,98 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use List::Util qw(min max); + +my $case = $ARGV[0]; +my $xcut = $ARGV[1]; + +my(@files,@index,$outfile); + +if($case==1){ +@files = qw( pes_rhf.dat pes_CIo1.dat pes_CIo1.5.dat pes_CIo2.dat pes_CIo2.5.dat pes_CIo3.dat pes_CIo3.5.dat pes_CIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_CIo.dat"; +} +elsif($case==2){ +@files = qw( pes_rhf.dat pes_ooCIo1.dat pes_ooCIo1.5.dat pes_ooCIo2.dat pes_ooCIo2.5.dat pes_ooCIo3.dat pes_ooCIo3.5.dat pes_ooCIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_ooCIo.dat"; +} +elsif($case==3){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_CISD.dat pes_CISDT.dat pes_CISDTQ.dat); +@index = qw( 0 1 2 3 4); +$outfile = "stat_CI.dat"; +} +elsif($case==4){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_ooCISD.dat pes_ooCISDT.dat); +@index = qw( 0 1 2 3); +$outfile = "stat_ooCI.dat"; +} +else{ +print "case variable not recognized \n"; +die; +} + +my $fci_file = 'pes_fci.dat'; + +my $n_files = @files; + +my (@x0, @y0); +my ($x, $y, $dy); +my ($i, $n); + +$n=0; +open(Fi, '<', $fci_file) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $n++; + $x0[$n] = $line[0]; + $y0[$n] = $line[1]; + if($x0[$n]>$xcut){last}; + } +close(Fi); + + if(-e $outfile){unlink $outfile}; + + open(Fo, '>>', $outfile) or die $!; + for ( my $j = 0; $j < $n_files; $j++ ){ + + if(-e $files[$j]){ + + my $maxy = -1e99; + my $miny = 1e99; + + # my $m=0; + # open(Fi, '<', $files[$j]) or die $!; + # while(){ + # $m++; + # } + # close(Fi); + + # if($m==$n){ + my $m=0; + open(Fi, '<', $files[$j]) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $m++; + $x = $line[0]; + $y = $line[1]; + $dy = $y - $y0[$m]; + $maxy = max($maxy,$dy); + $miny = min($miny,$dy); + if($x==$xcut){last}; + } + close(Fi); + + if($x==$xcut){ + my $npe = $maxy - $miny; + my $closeness = $maxy + $miny; + print Fo "$index[$j] $npe $closeness $maxy $miny \n"; + } + # } + + } + + } + close(Fo); diff --git a/H8_cc-pvdz/cp_to_manuscript.sh b/H8_cc-pvdz/cp_to_manuscript.sh new file mode 100755 index 0000000..44ae838 --- /dev/null +++ b/H8_cc-pvdz/cp_to_manuscript.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mol='h8' + +path='/home/fabris/ongoing_projects/seniority/Manuscript' + +cp plot_pes.pdf $path/${mol}_pes.pdf +cp plot_error.pdf $path/${mol}_pes_error.pdf +cp plot_stat.pdf $path/${mol}_pes_stat.pdf +cp xe.pdf $path/${mol}_xe.pdf diff --git a/H8_cc-pvdz/fit_eq.gnu b/H8_cc-pvdz/fit_eq.gnu new file mode 100644 index 0000000..6726bf1 --- /dev/null +++ b/H8_cc-pvdz/fit_eq.gnu @@ -0,0 +1,301 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +xmin=1.55 +xmax=2.05 + +#set xrange[1.0:3.0] +set xrange[1.0:10.0] + +# VIEW 1: +set yrange[-4.6:-3.0] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 9 dt 1 lw 2 linecolor rgb "violet" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 +set style line 15 dt 2 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel "Distance (a_{0})" +set ylabel 'Energy (Hartree)' + +# check if file exists +file_exists(file) = int(system("[ -f '".file."' ] && echo '1' || echo '0'")) +D0=0.0;a0=1.0;xe0=1.0;C0=0.0 +D1=0.0;a1=1.0;xe1=1.0;C1=0.0 +D2=0.0;a2=1.0;xe2=1.0;C2=0.0 +D3=0.0;a3=1.0;xe3=1.0;C3=0.0 +D4=0.0;a4=1.0;xe4=1.0;C4=0.0 +D5=0.0;a5=1.0;xe5=1.0;C5=0.0 +D6=0.0;a6=1.0;xe6=1.0;C6=0.0 +D7=0.0;a7=1.0;xe7=1.0;C7=0.0 +D8=0.0;a8=1.0;xe8=1.0;C8=0.0 +D9=0.0;a9=1.0;xe9=1.0;C9=0.0 +D10=0.0;a10=1.0;xe10=1.0;C10=0.0 +D11=0.0;a11=1.0;xe11=1.0;C11=0.0 +D12=0.0;a12=1.0;xe12=1.0;C12=0.0 +D13=0.0;a13=1.0;xe13=1.0;C13=0.0 +D14=0.0;a14=1.0;xe14=1.0;C14=0.0 +D15=0.0;a15=1.0;xe15=1.0;C15=0.0 +D16=0.0;a16=1.0;xe16=1.0;C16=0.0 +D17=0.0;a17=1.0;xe17=1.0;C17=0.0 +D18=0.0;a18=1.0;xe18=1.0;C18=0.0 + +# function for fitting + +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +filename='pes_fci.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a0=1.0; xe0=STATS_pos_min_y; C0=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D0=last_y-C0 +fit [xmin:xmax] [*:*] f0(x) filename u 1:($2) via D0,a0,xe0,C0 +} + +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +filename='pes_rhf.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a1=1.0; xe1=STATS_pos_min_y; C1=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D1=last_y-C1 +fit [xmin:xmax] [*:*] f1(x) filename u 1:($2) via D1,a1,xe1,C1 +} + +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +filename='pes_CISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a2=1.0; xe2=STATS_pos_min_y; C2=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D2=last_y-C2 +fit [xmin:xmax] [*:*] f2(x) filename u 1:($2) via D2,a2,xe2,C2 +} + +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +filename='pes_CISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a3=1.0; xe3=STATS_pos_min_y; C3=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D3=last_y-C3 +fit [xmin:xmax] [*:*] f3(x) filename u 1:($2) via D3,a3,xe3,C3 +} + +f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +filename='pes_CISDTQ.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a4=1.0; xe4=STATS_pos_min_y; C4=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D4=last_y-C4 +fit [xmin:xmax] [*:*] f4(x) filename u 1:($2) via D4,a4,xe4,C4 +} + +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +filename='pes_CIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a5=1.0; xe5=STATS_pos_min_y; C5=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D5=last_y-C5 +fit [xmin:xmax] [*:*] f5(x) filename u 1:($2) via D5,a5,xe5,C5 +} + +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +filename='pes_CIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a6=1.0; xe6=STATS_pos_min_y; C6=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D6=last_y-C6 +fit [xmin:xmax] [*:*] f6(x) filename u 1:($2) via D6,a6,xe6,C6 +} + +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +filename='pes_CIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a7=1.0; xe7=STATS_pos_min_y; C7=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D7=last_y-C7 +fit [xmin:xmax] [*:*] f7(x) filename u 1:($2) via D7,a7,xe7,C7 +} + +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +filename='pes_CIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a8=1.0; xe8=STATS_pos_min_y; C8=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D8=last_y-C8 +fit [xmin:xmax] [*:*] f8(x) filename u 1:($2) via D8,a8,xe8,C8 +} + +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +filename='pes_CIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a9=1.0; xe9=STATS_pos_min_y; C9=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D9=last_y-C9 +fit [xmin:xmax] [*:*] f9(x) filename u 1:($2) via D9,a9,xe9,C9 +} + +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +filename='pes_CIo3.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a10=1.0; xe10=STATS_pos_min_y; C10=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D10=last_y-C10 +fit [xmin:xmax] [*:*] f10(x) filename u 1:($2) via D10,a10,xe10,C10 +} + +f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +filename='pes_CIo4.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a11=1.0; xe11=STATS_pos_min_y; C11=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D11=last_y-C11 +fit [xmin:xmax] [*:*] f11(x) filename u 1:($2) via D11,a11,xe11,C11 +} + +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +filename='pes_ooCISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a12=1.0; xe12=STATS_pos_min_y; C12=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D12=last_y-C12 +fit [xmin:xmax] [*:*] f12(x) filename u 1:($2) via D12,a12,xe12,C12 +} + +f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +filename='pes_ooCISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a13=1.0; xe13=STATS_pos_min_y; C13=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D13=last_y-C13 +fit [xmin:xmax] [*:*] f13(x) filename u 1:($2) via D13,a13,xe13,C13 +} + +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +filename='pes_ooCIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a14=1.0; xe14=STATS_pos_min_y; C14=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D14=last_y-C14 +fit [xmin:xmax] [*:*] f14(x) filename u 1:($2) via D14,a14,xe14,C14 +} + +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +filename='pes_ooCIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a15=1.0; xe15=STATS_pos_min_y; C15=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D15=last_y-C15 +fit [xmin:xmax] [*:*] f15(x) filename u 1:($2) via D15,a15,xe15,C15 +} + +f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +filename='pes_ooCIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a16=1.0; xe16=STATS_pos_min_y; C16=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D16=last_y-C16 +fit [xmin:xmax] [*:*] f16(x) filename u 1:($2) via D16,a16,xe16,C16 +} + +f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +filename='pes_ooCIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a17=1.0; xe17=STATS_pos_min_y; C17=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D17=last_y-C17 +fit [xmin:xmax] [*:*] f17(x) filename u 1:($2) via D17,a17,xe17,C17 +} + +f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +filename='pes_ooCIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a18=1.0; xe18=STATS_pos_min_y; C18=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D18=last_y-C18 +fit [xmin:xmax] [*:*] f18(x) filename u 1:($2) via D18,a18,xe18,C18 +} + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CISDTQ.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_CIo3.dat' w lp ls 4 notitle, \ + 'pes_CIo3.5.dat' w lp ls 5 notitle, \ + 'pes_CIo4.dat' w lp ls 4 notitle, \ + 'pes_ooCISD.dat' w lp ls 13 notitle, \ + 'pes_ooCISDT.dat' w lp ls 13 notitle, \ + 'pes_ooCIo1.dat' w lp ls 14 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo2.dat' w lp ls 14 notitle, \ + 'pes_ooCIo2.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo3.dat' w lp ls 14 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f4(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f11(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f13(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle, \ + [xmin:xmax] f16(x) w l ls 9 notitle, \ + [xmin:xmax] f17(x) w l ls 9 notitle, \ + [xmin:xmax] f18(x) w l ls 9 notitle + +################################################################################### +################################################################################### + +pause -1 diff --git a/H8_cc-pvdz/fit_eq.sh b/H8_cc-pvdz/fit_eq.sh new file mode 100755 index 0000000..753c081 --- /dev/null +++ b/H8_cc-pvdz/fit_eq.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +if [ -f "fit.log" ]; then + rm "fit.log" +fi + +gnuplot fit_eq.gnu + +grep ^xe fit.log | grep = | sed 's/=//g' | cut -c -30 | + sed 's/xe0 /FCI /g' | + sed 's/xe1 /RHF /g' | + sed 's/xe2 /hfCISD /g' | + sed 's/xe3 /hfCISDT /g' | + sed 's/xe4 /hfCISDTQ /g' | + sed 's/xe5 /hfCIo1 /g' | + sed 's/xe6 /hfCIo1.5 /g' | + sed 's/xe7 /hfCIo2 /g' | + sed 's/xe8 /hfCIo2.5 /g' | + sed 's/xe9 /hfCIo3 /g' | + sed 's/xe10/hfCIo3.5 /g' | + sed 's/xe11/hfCIo4 /g' | + sed 's/xe12/ooCISD /g' | + sed 's/xe13/ooCISDT /g' | + sed 's/xe14/ooCIo1 /g' | + sed 's/xe15/ooCIo1.5 /g' | + sed 's/xe16/ooCIo2 /g' | + sed 's/xe17/ooCIo2.5 /g' | + sed 's/xe18/ooCIo3 /g' > xe.dat + + +grep 'FCI' xe.dat | sed 's/FCI/-0.1 /g' > xe_FCI.dat +grep 'FCI' xe.dat | sed 's/FCI/4.1 /g' >> xe_FCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_CI.dat +grep 'hfCISD ' xe.dat | sed 's/hfCISD/2 /g' >> xe_CI.dat +grep 'hfCISDT ' xe.dat | sed 's/hfCISDT/3 /g' >> xe_CI.dat +grep 'hfCISDTQ' xe.dat | sed 's/hfCISDTQ/4 /g' >> xe_CI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_ooCI.dat +grep 'ooCISD ' xe.dat | sed 's/ooCISD/2 /g' >> xe_ooCI.dat +grep 'ooCISDT' xe.dat | sed 's/ooCISDT/3 /g' >> xe_ooCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CIo.dat +grep 'hfCIo1 ' xe.dat | sed 's/hfCIo1/1 /g' >> xe_CIo.dat +grep 'hfCIo1.5' xe.dat | sed 's/hfCIo1.5/1.5 /g' >> xe_CIo.dat +grep 'hfCIo2 ' xe.dat | sed 's/hfCIo2/2 /g' >> xe_CIo.dat +grep 'hfCIo2.5' xe.dat | sed 's/hfCIo2.5/2.5 /g' >> xe_CIo.dat +grep 'hfCIo3 ' xe.dat | sed 's/hfCIo3/3 /g' >> xe_CIo.dat +grep 'hfCIo3.5' xe.dat | sed 's/hfCIo3.5/3.5 /g' >> xe_CIo.dat +grep 'hfCIo4 ' xe.dat | sed 's/hfCIo4/4 /g' >> xe_CIo.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCIo.dat +grep 'ooCIo1 ' xe.dat | sed 's/ooCIo1/1 /g' >> xe_ooCIo.dat +grep 'ooCIo1.5' xe.dat | sed 's/ooCIo1.5/1.5 /g' >> xe_ooCIo.dat +grep 'ooCIo2 ' xe.dat | sed 's/ooCIo2/2 /g' >> xe_ooCIo.dat +grep 'ooCIo2.5' xe.dat | sed 's/ooCIo2.5/2.5 /g' >> xe_ooCIo.dat +grep 'ooCIo3 ' xe.dat | sed 's/ooCIo3/3 /g' >> xe_ooCIo.dat + +#epspdf fit_eq.eps +#okular fit_eq.pdf diff --git a/H8_cc-pvdz/plot_error.sh b/H8_cc-pvdz/plot_error.sh new file mode 100755 index 0000000..86447b8 --- /dev/null +++ b/H8_cc-pvdz/plot_error.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_error.gnu +epspdf plot_error.eps +okular plot_error.pdf diff --git a/H8_cc-pvdz/plot_pes.sh b/H8_cc-pvdz/plot_pes.sh new file mode 100755 index 0000000..2aa451d --- /dev/null +++ b/H8_cc-pvdz/plot_pes.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_pes.gnu +epspdf plot_pes.eps +okular plot_pes.pdf diff --git a/H8_cc-pvdz/plot_stat.gnu b/H8_cc-pvdz/plot_stat.gnu new file mode 100644 index 0000000..d6c925c --- /dev/null +++ b/H8_cc-pvdz/plot_stat.gnu @@ -0,0 +1,53 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat.eps' + + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] +set yrange[0.0:0.6] +#set yrange[1e-1:1] +#set logscale y +#set format y "10^{%T}" + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 1 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CI.dat' u 1:($2) w lp ls 3 notitle, \ + 'stat_CIo.dat' u 1:($2) w lp ls 4 notitle + +unset ylabel +unset label +set format y "" + +plot 'stat_ooCI.dat' u 1:($2) w lp ls 13 notitle, \ + 'stat_ooCIo.dat' u 1:($2) w lp ls 14 notitle diff --git a/H8_cc-pvdz/plot_stat.sh b/H8_cc-pvdz/plot_stat.sh new file mode 100755 index 0000000..fab981e --- /dev/null +++ b/H8_cc-pvdz/plot_stat.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +./compute_NPE.pl 1 6.0 +./compute_NPE.pl 2 6.0 +./compute_NPE.pl 3 6.0 +./compute_NPE.pl 4 6.0 + +gnuplot plot_stat.gnu +epspdf plot_stat.eps +okular plot_stat.pdf diff --git a/H8_cc-pvdz/xe.gnu b/H8_cc-pvdz/xe.gnu new file mode 100644 index 0000000..7e3d01e --- /dev/null +++ b/H8_cc-pvdz/xe.gnu @@ -0,0 +1,68 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'xe.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] + +# VIEW 1: +set yrange[1.77:1.81] +set format y "%.2f" +################################################################################### +################################################################################### + +set xtics 1 +set ytics 0.01 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.15 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" + +set style line 3 dt 1 lw 3 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel "Equilibrium distance (a_{0})" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_CI.dat' w lp ls 3 notitle, \ + 'xe_CIo.dat' w lp ls 4 notitle + +unset ylabel +unset label +set format y "" + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_ooCI.dat' w lp ls 13 notitle, \ + 'xe_ooCIo.dat' w lp ls 14 notitle + +################################################################################### +################################################################################### + +#pause -1 diff --git a/H8_cc-pvdz/xe.sh b/H8_cc-pvdz/xe.sh new file mode 100755 index 0000000..2896546 --- /dev/null +++ b/H8_cc-pvdz/xe.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot xe.gnu +epspdf xe.eps +okular xe.pdf diff --git a/HF_cc-pvdz/compute_NPE.pl b/HF_cc-pvdz/compute_NPE.pl new file mode 100755 index 0000000..9a74955 --- /dev/null +++ b/HF_cc-pvdz/compute_NPE.pl @@ -0,0 +1,98 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use List::Util qw(min max); + +my $case = $ARGV[0]; +my $xcut = $ARGV[1]; + +my(@files,@index,$outfile); + +if($case==1){ +@files = qw( pes_rhf.dat pes_CIo1.dat pes_CIo1.5.dat pes_CIo2.dat pes_CIo2.5.dat pes_CIo3.dat pes_CIo3.5.dat pes_CIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_CIo.dat"; +} +elsif($case==2){ +@files = qw( pes_rhf.dat pes_ooCIo1.dat pes_ooCIo1.5.dat pes_ooCIo2.dat pes_ooCIo2.5.dat pes_ooCIo3.dat pes_ooCIo3.5.dat pes_ooCIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_ooCIo.dat"; +} +elsif($case==3){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_CISD.dat pes_CISDT.dat pes_CISDTQ.dat); +@index = qw( 0 1 2 3 4); +$outfile = "stat_CI.dat"; +} +elsif($case==4){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_ooCISD.dat pes_ooCISDT.dat); +@index = qw( 0 1 2 3); +$outfile = "stat_ooCI.dat"; +} +else{ +print "case variable not recognized \n"; +die; +} + +my $fci_file = 'pes_fci.dat'; + +my $n_files = @files; + +my (@x0, @y0); +my ($x, $y, $dy); +my ($i, $n); + +$n=0; +open(Fi, '<', $fci_file) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $n++; + $x0[$n] = $line[0]; + $y0[$n] = $line[1]; + if($x0[$n]>$xcut){last}; + } +close(Fi); + + if(-e $outfile){unlink $outfile}; + + open(Fo, '>>', $outfile) or die $!; + for ( my $j = 0; $j < $n_files; $j++ ){ + + if(-e $files[$j]){ + + my $maxy = -1e99; + my $miny = 1e99; + + # my $m=0; + # open(Fi, '<', $files[$j]) or die $!; + # while(){ + # $m++; + # } + # close(Fi); + + # if($m==$n){ + my $m=0; + open(Fi, '<', $files[$j]) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $m++; + $x = $line[0]; + $y = $line[1]; + $dy = $y - $y0[$m]; + $maxy = max($maxy,$dy); + $miny = min($miny,$dy); + if($x==$xcut){last}; + } + close(Fi); + + if($x==$xcut){ + my $npe = $maxy - $miny; + my $closeness = $maxy + $miny; + print Fo "$index[$j] $npe $closeness $maxy $miny \n"; + } + # } + + } + + } + close(Fo); diff --git a/HF_cc-pvdz/cp_to_manuscript.sh b/HF_cc-pvdz/cp_to_manuscript.sh new file mode 100755 index 0000000..59eb28c --- /dev/null +++ b/HF_cc-pvdz/cp_to_manuscript.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mol='hf' + +path='/home/fabris/ongoing_projects/seniority/Manuscript' + +cp plot_pes.pdf $path/${mol}_pes.pdf +cp plot_error.pdf $path/${mol}_pes_error.pdf +cp plot_stat.pdf $path/${mol}_pes_stat.pdf +cp xe.pdf $path/${mol}_xe.pdf diff --git a/HF_cc-pvdz/fit_eq.gnu b/HF_cc-pvdz/fit_eq.gnu new file mode 100644 index 0000000..f204451 --- /dev/null +++ b/HF_cc-pvdz/fit_eq.gnu @@ -0,0 +1,300 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +xmin=0.80 +xmax=1.10 + +set xrange[0.5:6.0] + +# VIEW 1: +set yrange[-100.25:-99.85] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 9 dt 1 lw 2 linecolor rgb "violet" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 +set style line 15 dt 2 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel "Distance ({\305})" +set ylabel 'Energy (Hartree)' + +# check if file exists +file_exists(file) = int(system("[ -f '".file."' ] && echo '1' || echo '0'")) +D0=0.0;a0=1.0;xe0=1.0;C0=0.0 +D1=0.0;a1=1.0;xe1=1.0;C1=0.0 +D2=0.0;a2=1.0;xe2=1.0;C2=0.0 +D3=0.0;a3=1.0;xe3=1.0;C3=0.0 +D4=0.0;a4=1.0;xe4=1.0;C4=0.0 +D5=0.0;a5=1.0;xe5=1.0;C5=0.0 +D6=0.0;a6=1.0;xe6=1.0;C6=0.0 +D7=0.0;a7=1.0;xe7=1.0;C7=0.0 +D8=0.0;a8=1.0;xe8=1.0;C8=0.0 +D9=0.0;a9=1.0;xe9=1.0;C9=0.0 +D10=0.0;a10=1.0;xe10=1.0;C10=0.0 +D11=0.0;a11=1.0;xe11=1.0;C11=0.0 +D12=0.0;a12=1.0;xe12=1.0;C12=0.0 +D13=0.0;a13=1.0;xe13=1.0;C13=0.0 +D14=0.0;a14=1.0;xe14=1.0;C14=0.0 +D15=0.0;a15=1.0;xe15=1.0;C15=0.0 +D16=0.0;a16=1.0;xe16=1.0;C16=0.0 +D17=0.0;a17=1.0;xe17=1.0;C17=0.0 +D18=0.0;a18=1.0;xe18=1.0;C18=0.0 + +# function for fitting + +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +filename='pes_fci.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a0=1.0; xe0=STATS_pos_min_y; C0=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D0=last_y-C0 +fit [xmin:xmax] [*:*] f0(x) filename u 1:($2) via D0,a0,xe0,C0 +} + +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +filename='pes_rhf.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a1=1.0; xe1=STATS_pos_min_y; C1=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D1=last_y-C1 +fit [xmin:xmax] [*:*] f1(x) filename u 1:($2) via D1,a1,xe1,C1 +} + +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +filename='pes_CISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a2=1.0; xe2=STATS_pos_min_y; C2=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D2=last_y-C2 +fit [xmin:xmax] [*:*] f2(x) filename u 1:($2) via D2,a2,xe2,C2 +} + +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +filename='pes_CISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a3=1.0; xe3=STATS_pos_min_y; C3=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D3=last_y-C3 +fit [xmin:xmax] [*:*] f3(x) filename u 1:($2) via D3,a3,xe3,C3 +} + +f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +filename='pes_CISDTQ.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a4=1.0; xe4=STATS_pos_min_y; C4=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D4=last_y-C4 +fit [xmin:xmax] [*:*] f4(x) filename u 1:($2) via D4,a4,xe4,C4 +} + +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +filename='pes_CIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a5=1.0; xe5=STATS_pos_min_y; C5=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D5=last_y-C5 +fit [xmin:xmax] [*:*] f5(x) filename u 1:($2) via D5,a5,xe5,C5 +} + +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +filename='pes_CIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a6=1.0; xe6=STATS_pos_min_y; C6=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D6=last_y-C6 +fit [xmin:xmax] [*:*] f6(x) filename u 1:($2) via D6,a6,xe6,C6 +} + +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +filename='pes_CIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a7=1.0; xe7=STATS_pos_min_y; C7=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D7=last_y-C7 +fit [xmin:xmax] [*:*] f7(x) filename u 1:($2) via D7,a7,xe7,C7 +} + +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +filename='pes_CIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a8=1.0; xe8=STATS_pos_min_y; C8=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D8=last_y-C8 +fit [xmin:xmax] [*:*] f8(x) filename u 1:($2) via D8,a8,xe8,C8 +} + +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +filename='pes_CIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a9=1.0; xe9=STATS_pos_min_y; C9=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D9=last_y-C9 +fit [xmin:xmax] [*:*] f9(x) filename u 1:($2) via D9,a9,xe9,C9 +} + +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +filename='pes_CIo3.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a10=1.0; xe10=STATS_pos_min_y; C10=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D10=last_y-C10 +fit [xmin:xmax] [*:*] f10(x) filename u 1:($2) via D10,a10,xe10,C10 +} + +f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +filename='pes_CIo4.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a11=1.0; xe11=STATS_pos_min_y; C11=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D11=last_y-C11 +fit [xmin:xmax] [*:*] f11(x) filename u 1:($2) via D11,a11,xe11,C11 +} + +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +filename='pes_ooCISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a12=1.0; xe12=STATS_pos_min_y; C12=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D12=last_y-C12 +fit [xmin:xmax] [*:*] f12(x) filename u 1:($2) via D12,a12,xe12,C12 +} + +f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +filename='pes_ooCISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a13=1.0; xe13=STATS_pos_min_y; C13=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D13=last_y-C13 +fit [xmin:xmax] [*:*] f13(x) filename u 1:($2) via D13,a13,xe13,C13 +} + +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +filename='pes_ooCIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a14=1.0; xe14=STATS_pos_min_y; C14=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D14=last_y-C14 +fit [xmin:xmax] [*:*] f14(x) filename u 1:($2) via D14,a14,xe14,C14 +} + +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +filename='pes_ooCIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a15=1.0; xe15=STATS_pos_min_y; C15=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D15=last_y-C15 +fit [xmin:xmax] [*:*] f15(x) filename u 1:($2) via D15,a15,xe15,C15 +} + +f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +filename='pes_ooCIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a16=1.0; xe16=STATS_pos_min_y; C16=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D16=last_y-C16 +fit [xmin:xmax] [*:*] f16(x) filename u 1:($2) via D16,a16,xe16,C16 +} + +f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +filename='pes_ooCIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a17=1.0; xe17=STATS_pos_min_y; C17=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D17=last_y-C17 +fit [xmin:xmax] [*:*] f17(x) filename u 1:($2) via D17,a17,xe17,C17 +} + +f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +filename='pes_ooCIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a18=1.0; xe18=STATS_pos_min_y; C18=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D18=last_y-C18 +fit [xmin:xmax] [*:*] f18(x) filename u 1:($2) via D18,a18,xe18,C18 +} + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CISDTQ.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_CIo3.dat' w lp ls 4 notitle, \ + 'pes_CIo3.5.dat' w lp ls 5 notitle, \ + 'pes_CIo4.dat' w lp ls 4 notitle, \ + 'pes_ooCISD.dat' w lp ls 13 notitle, \ + 'pes_ooCISDT.dat' w lp ls 13 notitle, \ + 'pes_ooCIo1.dat' w lp ls 14 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo2.dat' w lp ls 14 notitle, \ + 'pes_ooCIo2.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo3.dat' w lp ls 14 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f4(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f11(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f13(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle, \ + [xmin:xmax] f16(x) w l ls 9 notitle, \ + [xmin:xmax] f17(x) w l ls 9 notitle, \ + [xmin:xmax] f18(x) w l ls 9 notitle + +################################################################################### +################################################################################### + +pause -1 diff --git a/HF_cc-pvdz/fit_eq.sh b/HF_cc-pvdz/fit_eq.sh new file mode 100755 index 0000000..753c081 --- /dev/null +++ b/HF_cc-pvdz/fit_eq.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +if [ -f "fit.log" ]; then + rm "fit.log" +fi + +gnuplot fit_eq.gnu + +grep ^xe fit.log | grep = | sed 's/=//g' | cut -c -30 | + sed 's/xe0 /FCI /g' | + sed 's/xe1 /RHF /g' | + sed 's/xe2 /hfCISD /g' | + sed 's/xe3 /hfCISDT /g' | + sed 's/xe4 /hfCISDTQ /g' | + sed 's/xe5 /hfCIo1 /g' | + sed 's/xe6 /hfCIo1.5 /g' | + sed 's/xe7 /hfCIo2 /g' | + sed 's/xe8 /hfCIo2.5 /g' | + sed 's/xe9 /hfCIo3 /g' | + sed 's/xe10/hfCIo3.5 /g' | + sed 's/xe11/hfCIo4 /g' | + sed 's/xe12/ooCISD /g' | + sed 's/xe13/ooCISDT /g' | + sed 's/xe14/ooCIo1 /g' | + sed 's/xe15/ooCIo1.5 /g' | + sed 's/xe16/ooCIo2 /g' | + sed 's/xe17/ooCIo2.5 /g' | + sed 's/xe18/ooCIo3 /g' > xe.dat + + +grep 'FCI' xe.dat | sed 's/FCI/-0.1 /g' > xe_FCI.dat +grep 'FCI' xe.dat | sed 's/FCI/4.1 /g' >> xe_FCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_CI.dat +grep 'hfCISD ' xe.dat | sed 's/hfCISD/2 /g' >> xe_CI.dat +grep 'hfCISDT ' xe.dat | sed 's/hfCISDT/3 /g' >> xe_CI.dat +grep 'hfCISDTQ' xe.dat | sed 's/hfCISDTQ/4 /g' >> xe_CI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_ooCI.dat +grep 'ooCISD ' xe.dat | sed 's/ooCISD/2 /g' >> xe_ooCI.dat +grep 'ooCISDT' xe.dat | sed 's/ooCISDT/3 /g' >> xe_ooCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CIo.dat +grep 'hfCIo1 ' xe.dat | sed 's/hfCIo1/1 /g' >> xe_CIo.dat +grep 'hfCIo1.5' xe.dat | sed 's/hfCIo1.5/1.5 /g' >> xe_CIo.dat +grep 'hfCIo2 ' xe.dat | sed 's/hfCIo2/2 /g' >> xe_CIo.dat +grep 'hfCIo2.5' xe.dat | sed 's/hfCIo2.5/2.5 /g' >> xe_CIo.dat +grep 'hfCIo3 ' xe.dat | sed 's/hfCIo3/3 /g' >> xe_CIo.dat +grep 'hfCIo3.5' xe.dat | sed 's/hfCIo3.5/3.5 /g' >> xe_CIo.dat +grep 'hfCIo4 ' xe.dat | sed 's/hfCIo4/4 /g' >> xe_CIo.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCIo.dat +grep 'ooCIo1 ' xe.dat | sed 's/ooCIo1/1 /g' >> xe_ooCIo.dat +grep 'ooCIo1.5' xe.dat | sed 's/ooCIo1.5/1.5 /g' >> xe_ooCIo.dat +grep 'ooCIo2 ' xe.dat | sed 's/ooCIo2/2 /g' >> xe_ooCIo.dat +grep 'ooCIo2.5' xe.dat | sed 's/ooCIo2.5/2.5 /g' >> xe_ooCIo.dat +grep 'ooCIo3 ' xe.dat | sed 's/ooCIo3/3 /g' >> xe_ooCIo.dat + +#epspdf fit_eq.eps +#okular fit_eq.pdf diff --git a/HF_cc-pvdz/plot.gnu b/HF_cc-pvdz/plot.gnu new file mode 100644 index 0000000..698ddf7 --- /dev/null +++ b/HF_cc-pvdz/plot.gnu @@ -0,0 +1,54 @@ +#!/bin/gnuplot + +#r=0.9 angs + +efci=-100.22817351 + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,18' linewidth 2 +set output 'plot.eps' + +xmin=-0.1 +xmax=3.5 +ymin=0.0 +ymax=0.2 + +set grid + +#set format y "%.0e*10^{%T}" +set format y "10^{%T}" + +#set xrange[-0.1:3.1] +set xrange[-0.1:4.1] +#set yrange[0.0:0.2] + +set logscale y +set yrange[1e-4:0.3] +#set yrange[1e-4:1.0] + +#set xrange[1.9:3.1] +#set yrange[0.0:0.006] + +set style line 1 dt 1 lw 1 linecolor rgb "gray60" pt 13 ps 1.75 +set style line 3 dt 1 lw 1 linecolor rgb "light-red" pt 13 ps 1.75 +set style line 4 dt 1 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 +set style line 5 dt 2 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 + +set style line 11 dt 1 lw 1.5 linecolor rgb "gray60" +set style line 13 dt 2 lw 1.5 linecolor rgb "light-red" pt 7 ps 1.75 +set style line 14 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 +set style line 15 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 + +set xlabel 'Computational scaling' +set ylabel 'Energy error (Hartree)' + +plot 'r0.9_ciexc.dat' u 1:($2-efci) w lp ls 3 notitle, \ + 'r0.9_oociexc.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'r0.9_oociexc.dat' u 1:($2-efci) w lp ls 13 notitle, \ + 'r0.9_cio.dat' u 1:($2-efci) w lp ls 4 notitle, \ + 'r0.9_oocio.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'r0.9_oocio.dat' u 1:($2-efci) w lp ls 14 notitle + +#pause -1 diff --git a/HF_cc-pvdz/plot.sh b/HF_cc-pvdz/plot.sh new file mode 100755 index 0000000..f9f68b6 --- /dev/null +++ b/HF_cc-pvdz/plot.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot.gnu +epspdf plot.eps +okular plot.pdf diff --git a/HF_cc-pvdz/plot_close.gnu b/HF_cc-pvdz/plot_close.gnu new file mode 100644 index 0000000..32dd9af --- /dev/null +++ b/HF_cc-pvdz/plot_close.gnu @@ -0,0 +1,51 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_close.eps' + +set format y "10^{%T}" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] +set yrange[1e-4:1] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 2 +set logscale y + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CI.dat' u 1:($3) w lp ls 3 notitle, \ + 'stat_CIo.dat' u 1:($3) w lp ls 4 notitle + +unset ylabel +unset label + +plot 'stat_ooCI.dat' u 1:($3) w lp ls 13 notitle, \ + 'stat_ooCIo.dat' u 1:($3) w lp ls 14 notitle diff --git a/HF_cc-pvdz/plot_close.sh b/HF_cc-pvdz/plot_close.sh new file mode 100755 index 0000000..cb95335 --- /dev/null +++ b/HF_cc-pvdz/plot_close.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +./compute_NPE.pl 1 6.0 +./compute_NPE.pl 2 6.0 +./compute_NPE.pl 3 6.0 +./compute_NPE.pl 4 6.0 + +gnuplot plot_close.gnu +epspdf plot_close.eps +okular plot_close.pdf diff --git a/HF_cc-pvdz/plot_error.sh b/HF_cc-pvdz/plot_error.sh new file mode 100755 index 0000000..86447b8 --- /dev/null +++ b/HF_cc-pvdz/plot_error.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_error.gnu +epspdf plot_error.eps +okular plot_error.pdf diff --git a/HF_cc-pvdz/plot_error_1.gnu b/HF_cc-pvdz/plot_error_1.gnu new file mode 100644 index 0000000..66f26fd --- /dev/null +++ b/HF_cc-pvdz/plot_error_1.gnu @@ -0,0 +1,68 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_error.png' +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,16' linewidth 2 +set output 'plot_error.eps' + +xmin=0.5 +xmax=6.0 +ymin=1.0e-3 +ymax=1.0 + +set xrange[0.5:6.0] + +# VIEW 1 +set logscale y +set yrange[1.0e-3:1.0] +# VIEW 2 +#set yrange[0.0:0.5] +# VIEW 3 +#set yrange[0.0:0.08] +# VIEW 4 +#set yrange[0.0:0.005] + +set style line 1 dt 1 lw 2 linecolor rgb "gray" +set style line 2 dt 1 lw 2 linecolor rgb "black" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" +set style line 6 dt 1 lw 2 linecolor rgb "orange" +set style line 7 dt 2 lw 2 linecolor rgb "orange" + +set style line 13 dt 1 lw 2 linecolor rgb "red" +set style line 14 dt 1 lw 2 linecolor rgb "forest-green" +set style line 15 dt 2 lw 2 linecolor rgb "forest-green" + + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy error (Hartree)' + +plot '< paste pes_fci.dat pes_rhf.dat' using 1:($4-$2) w l ls 1 notitle, \ + '< paste pes_fci.dat pes_s4.e2.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_s6.e3.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_CIo1.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo1.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo2.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_CIo2.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo3.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_ooCISD.dat' using 1:($4-$2) w l ls 13 notitle, \ + '< paste pes_fci.dat pes_ooCISDT.dat' using 1:($4-$2) w l ls 13 notitle, \ + '< paste pes_fci.dat pes_ooCIo1.dat' using 1:($4-$2) w l ls 15 notitle, \ + '< paste pes_fci.dat pes_ooCIo1.5.dat' using 1:($4-$2) w l ls 15 notitle, \ + '< paste pes_fci.dat pes_ooCIo2.dat' using 1:($4-$2) w l ls 14 notitle, \ + '< paste pes_fci.dat pes_fci.dat' using 1:($4-$2) w l ls 2 notitle +# '< paste pes_fci.dat pes_s8.e4.dat' using 1:($4-$2) w l ls 3 notitle, \ +# '< paste pes_fci.dat pes_CIo3.5.dat' using 1:($4-$2) w l ls 5 notitle, \ +# '< paste pes_fci.dat pes_CIo4.dat' using 1:($4-$2) w l ls 4 notitle, \ +# '< paste pes_fci.dat pes_pccd.dat' using 1:($4-$2) w l ls 6 notitle, \ +# '< paste pes_fci.dat pes_s0.e2.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e2.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e3.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s4.e3.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s0.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s4.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ + +#pause -1 diff --git a/HF_cc-pvdz/plot_pes.sh b/HF_cc-pvdz/plot_pes.sh new file mode 100755 index 0000000..2aa451d --- /dev/null +++ b/HF_cc-pvdz/plot_pes.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_pes.gnu +epspdf plot_pes.eps +okular plot_pes.pdf diff --git a/HF_cc-pvdz/plot_pes_1.gnu b/HF_cc-pvdz/plot_pes_1.gnu new file mode 100644 index 0000000..731dab6 --- /dev/null +++ b/HF_cc-pvdz/plot_pes_1.gnu @@ -0,0 +1,102 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,18' linewidth 2 +set output 'plot_pes.eps' + +xmin=0.5 +xmax=6.0 +ymin=-100.25 +ymax=-99.85 + + +set xrange[0.5:6.0] +set yrange[-100.25:-99.85] +# ZOOM: +#set xrange[2.0:12.0] +#set yrange[-100.05:-99.94] + +set style line 1 dt 1 lw 1 linecolor rgb "gray60" +set style line 2 dt 1 lw 2 linecolor rgb "black" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" +set style line 5 dt 1 lw 1 linecolor rgb "sea-green" +set style line 6 dt 1 lw 2 linecolor rgb "orange" +set style line 7 dt 2 lw 2 linecolor rgb "orange" + +set style line 11 dt 1 lw 2 linecolor rgb "gray60" +set style line 13 dt 2 lw 2 linecolor rgb "light-red" +set style line 14 dt 2 lw 2 linecolor rgb "sea-green" +set style line 15 dt 2 lw 1 linecolor rgb "sea-green" + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy (Hartree)' + +# get the relation of x- and y-range +dx = xmax-xmin +dy = ymax-ymin +s1 = dx/dy +# get ratio of axes +s2 = 3.0/5.3 +# helper function for getting the rotation angle of the labels in degree +deg(x) = x/pi*180.0 +r(x) = deg(atan(s1*s2*x)) +# function for fitting +f(x) = a*x+b + +fit [1.0:1.5] [*:*] f(x) 'pes_rhf.dat' u 1:($2) via a,b +set label 1 'RHF' at 1.3,-99.90 rotate by r(a) center tc ls 1 #font 'Verdana,20' + +fit [2.5:3.5] [*:*] f(x) 'pes_s4.e2.dat' u 1:($2) via a,b +set label 2 'CISD' at 3.0,-99.95 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [2.5:3.5] [*:*] f(x) 'pes_s6.e3.dat' u 1:($2) via a,b +set label 3 'CISDT' at 3.0,-100.010 rotate by r(a) center tc ls 3 #font 'Verdana,20' +#fit [2.5:3.5] [*:*] f(x) 'pes_s8.e4.dat' u 1:($2) via a,b +#set label 4 'CISDTQ' at 3.0,-100.040 rotate by r(a) center tc ls 3 #font 'Verdana,20' + +fit [3.0:5.0] [*:*] f(x) 'pes_CIo2.dat' u 1:($2) via a,b +set label 12 'CIo2' at 4.0,-99.962 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [3.0:5.0] [*:*] f(x) 'pes_CIo3.dat' u 1:($2) via a,b +set label 13 'CIo3' at 4.0,-100.015 rotate by r(a) center tc ls 4 #font 'Verdana,20' +#fit [7.0:9.0] [*:*] f(x) 'pes_CIo4.dat' u 1:($2) via a,b +#set label 14 'CIo4' at 5.0,-100.040 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [4.0:6.0] [*:*] f(x) 'pes_fci.dat' u 1:($2) via a,b +set label 20 'FCI' at 5.0,-100.037 rotate by r(a) center tc ls 2 #font 'Verdana,20' + + +plot 'pes_rhf.dat' w l ls 1 notitle, \ + 'pes_s4.e2.dat' w l ls 3 notitle, \ + 'pes_s6.e3.dat' w l ls 3 notitle, \ + 'pes_CIo1.dat' w l ls 5 notitle, \ + 'pes_CIo1.5.dat' w l ls 5 notitle, \ + 'pes_CIo2.dat' w l ls 4 notitle, \ + 'pes_CIo2.5.dat' w l ls 5 notitle, \ + 'pes_CIo3.dat' w l ls 4 notitle, \ + 'pes_ooCISD.dat' w l ls 11 notitle, \ + 'pes_ooCISDT.dat' w l ls 11 notitle, \ + 'pes_ooCIo1.dat' w l ls 1 notitle, \ + 'pes_ooCIo1.5.dat' w l ls 1 notitle, \ + 'pes_ooCIo2.dat' w l ls 11 notitle, \ + 'pes_ooCISD.dat' w l ls 13 notitle, \ + 'pes_ooCISDT.dat' w l ls 13 notitle, \ + 'pes_ooCIo1.dat' w l ls 15 notitle, \ + 'pes_ooCIo1.5.dat' w l ls 15 notitle, \ + 'pes_ooCIo2.dat' w l ls 14 notitle, \ + 'pes_fci.dat' w l ls 2 notitle +# 'pes_ccsd.dat' w l ls 6 notitle, \ +# 'pes_pccd.dat' w l ls 6 notitle, \ +# 'pes_ccsdt.dat' w l ls 6 notitle, \ +# 'pes_CIo3.5.dat' w l ls 5 notitle, \ +# 'pes_s8.e4.dat' w l ls 3 notitle, \ +# 'pes_CIo4.dat' w l ls 4 notitle, \ +# 'pes_s0.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e3.dat' w l ls 1 notitle, \ +# 'pes_s4.e3.dat' w l ls 1 notitle, \ +# 'pes_s0.e4.dat' w l ls 1 notitle, \ +# 'pes_s2.e4.dat' w l ls 1 notitle, \ +# 'pes_s4.e4.dat' w l ls 1 notitle, \ + +#pause -1 diff --git a/HF_cc-pvdz/plot_stat.gnu b/HF_cc-pvdz/plot_stat.gnu new file mode 100644 index 0000000..ec7814f --- /dev/null +++ b/HF_cc-pvdz/plot_stat.gnu @@ -0,0 +1,51 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat.eps' + +set format y "10^{%T}" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] +set yrange[1e-4:1] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 1 +set logscale y + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CI.dat' u 1:($2) w lp ls 3 notitle, \ + 'stat_CIo.dat' u 1:($2) w lp ls 4 notitle + +unset ylabel +unset label + +plot 'stat_ooCI.dat' u 1:($2) w lp ls 13 notitle, \ + 'stat_ooCIo.dat' u 1:($2) w lp ls 14 notitle diff --git a/HF_cc-pvdz/plot_stat.sh b/HF_cc-pvdz/plot_stat.sh new file mode 100755 index 0000000..7df7142 --- /dev/null +++ b/HF_cc-pvdz/plot_stat.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +./compute_NPE.pl 1 6.0 +./compute_NPE.pl 2 6.0 +./compute_NPE.pl 3 6.0 +./compute_NPE.pl 4 6.0 + +gnuplot plot_stat.gnu +epspdf plot_stat.eps +okular plot_stat.pdf diff --git a/HF_cc-pvdz/xe.gnu b/HF_cc-pvdz/xe.gnu new file mode 100644 index 0000000..977d909 --- /dev/null +++ b/HF_cc-pvdz/xe.gnu @@ -0,0 +1,68 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'xe.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] + +# VIEW 1: +set yrange[0.89:0.93] +set format y "%.2f" +################################################################################### +################################################################################### + +set xtics 1 +set ytics 0.01 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.15 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" + +set style line 3 dt 1 lw 3 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel "Equilibrium distance ({\305})" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_CI.dat' w lp ls 3 notitle, \ + 'xe_CIo.dat' w lp ls 4 notitle + +unset ylabel +unset label +set format y "" + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_ooCI.dat' w lp ls 13 notitle, \ + 'xe_ooCIo.dat' w lp ls 14 notitle + +################################################################################### +################################################################################### + +#pause -1 diff --git a/HF_cc-pvdz/xe.sh b/HF_cc-pvdz/xe.sh new file mode 100755 index 0000000..2896546 --- /dev/null +++ b/HF_cc-pvdz/xe.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot xe.gnu +epspdf xe.eps +okular xe.pdf diff --git a/Manuscript/table_CIo.pdf b/Manuscript/table_CIo.pdf new file mode 100644 index 0000000..8abd857 Binary files /dev/null and b/Manuscript/table_CIo.pdf differ diff --git a/Manuscript/table_exc_full.pdf b/Manuscript/table_exc_full.pdf new file mode 100644 index 0000000..bcdf69f Binary files /dev/null and b/Manuscript/table_exc_full.pdf differ diff --git a/Manuscript/table_sen_full.pdf b/Manuscript/table_sen_full.pdf new file mode 100644 index 0000000..a525cf4 Binary files /dev/null and b/Manuscript/table_sen_full.pdf differ diff --git a/N2_cc-pvdz/compute_NPE.pl b/N2_cc-pvdz/compute_NPE.pl new file mode 100755 index 0000000..9a74955 --- /dev/null +++ b/N2_cc-pvdz/compute_NPE.pl @@ -0,0 +1,98 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use List::Util qw(min max); + +my $case = $ARGV[0]; +my $xcut = $ARGV[1]; + +my(@files,@index,$outfile); + +if($case==1){ +@files = qw( pes_rhf.dat pes_CIo1.dat pes_CIo1.5.dat pes_CIo2.dat pes_CIo2.5.dat pes_CIo3.dat pes_CIo3.5.dat pes_CIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_CIo.dat"; +} +elsif($case==2){ +@files = qw( pes_rhf.dat pes_ooCIo1.dat pes_ooCIo1.5.dat pes_ooCIo2.dat pes_ooCIo2.5.dat pes_ooCIo3.dat pes_ooCIo3.5.dat pes_ooCIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_ooCIo.dat"; +} +elsif($case==3){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_CISD.dat pes_CISDT.dat pes_CISDTQ.dat); +@index = qw( 0 1 2 3 4); +$outfile = "stat_CI.dat"; +} +elsif($case==4){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_ooCISD.dat pes_ooCISDT.dat); +@index = qw( 0 1 2 3); +$outfile = "stat_ooCI.dat"; +} +else{ +print "case variable not recognized \n"; +die; +} + +my $fci_file = 'pes_fci.dat'; + +my $n_files = @files; + +my (@x0, @y0); +my ($x, $y, $dy); +my ($i, $n); + +$n=0; +open(Fi, '<', $fci_file) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $n++; + $x0[$n] = $line[0]; + $y0[$n] = $line[1]; + if($x0[$n]>$xcut){last}; + } +close(Fi); + + if(-e $outfile){unlink $outfile}; + + open(Fo, '>>', $outfile) or die $!; + for ( my $j = 0; $j < $n_files; $j++ ){ + + if(-e $files[$j]){ + + my $maxy = -1e99; + my $miny = 1e99; + + # my $m=0; + # open(Fi, '<', $files[$j]) or die $!; + # while(){ + # $m++; + # } + # close(Fi); + + # if($m==$n){ + my $m=0; + open(Fi, '<', $files[$j]) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $m++; + $x = $line[0]; + $y = $line[1]; + $dy = $y - $y0[$m]; + $maxy = max($maxy,$dy); + $miny = min($miny,$dy); + if($x==$xcut){last}; + } + close(Fi); + + if($x==$xcut){ + my $npe = $maxy - $miny; + my $closeness = $maxy + $miny; + print Fo "$index[$j] $npe $closeness $maxy $miny \n"; + } + # } + + } + + } + close(Fo); diff --git a/N2_cc-pvdz/cp_to_manuscript.sh b/N2_cc-pvdz/cp_to_manuscript.sh new file mode 100755 index 0000000..94686a0 --- /dev/null +++ b/N2_cc-pvdz/cp_to_manuscript.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mol='n2' + +path='/home/fabris/ongoing_projects/seniority/Manuscript' + +cp plot_pes.pdf $path/${mol}_pes.pdf +cp plot_error.pdf $path/${mol}_pes_error.pdf +cp plot_stat.pdf $path/${mol}_pes_stat.pdf +cp xe.pdf $path/${mol}_xe.pdf diff --git a/N2_cc-pvdz/fit_eq.gnu b/N2_cc-pvdz/fit_eq.gnu new file mode 100644 index 0000000..0b59b97 --- /dev/null +++ b/N2_cc-pvdz/fit_eq.gnu @@ -0,0 +1,299 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[0.7:4.0] +xmin=0.95 +xmax=1.30 + +# VIEW 1: +set yrange[-109.30:-108.30] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 9 dt 1 lw 2 linecolor rgb "violet" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 +set style line 15 dt 2 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel "Distance ({\305})" +set ylabel 'Energy (Hartree)' + +# check if file exists +file_exists(file) = int(system("[ -f '".file."' ] && echo '1' || echo '0'")) +D0=0.0;a0=1.0;xe0=1.0;C0=0.0 +D1=0.0;a1=1.0;xe1=1.0;C1=0.0 +D2=0.0;a2=1.0;xe2=1.0;C2=0.0 +D3=0.0;a3=1.0;xe3=1.0;C3=0.0 +D4=0.0;a4=1.0;xe4=1.0;C4=0.0 +D5=0.0;a5=1.0;xe5=1.0;C5=0.0 +D6=0.0;a6=1.0;xe6=1.0;C6=0.0 +D7=0.0;a7=1.0;xe7=1.0;C7=0.0 +D8=0.0;a8=1.0;xe8=1.0;C8=0.0 +D9=0.0;a9=1.0;xe9=1.0;C9=0.0 +D10=0.0;a10=1.0;xe10=1.0;C10=0.0 +D11=0.0;a11=1.0;xe11=1.0;C11=0.0 +D12=0.0;a12=1.0;xe12=1.0;C12=0.0 +D13=0.0;a13=1.0;xe13=1.0;C13=0.0 +D14=0.0;a14=1.0;xe14=1.0;C14=0.0 +D15=0.0;a15=1.0;xe15=1.0;C15=0.0 +D16=0.0;a16=1.0;xe16=1.0;C16=0.0 +D17=0.0;a17=1.0;xe17=1.0;C17=0.0 +D18=0.0;a18=1.0;xe18=1.0;C18=0.0 + +# function for fitting + +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +filename='pes_fci.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a0=1.0; xe0=STATS_pos_min_y; C0=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D0=last_y-C0 +fit [xmin:xmax] [*:*] f0(x) filename u 1:($2) via D0,a0,xe0,C0 +} + +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +filename='pes_rhf.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a1=1.0; xe1=STATS_pos_min_y; C1=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D1=last_y-C1 +fit [xmin:xmax] [*:*] f1(x) filename u 1:($2) via D1,a1,xe1,C1 +} + +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +filename='pes_CISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a2=1.0; xe2=STATS_pos_min_y; C2=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D2=last_y-C2 +fit [xmin:xmax] [*:*] f2(x) filename u 1:($2) via D2,a2,xe2,C2 +} + +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +filename='pes_CISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a3=1.0; xe3=STATS_pos_min_y; C3=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D3=last_y-C3 +fit [xmin:xmax] [*:*] f3(x) filename u 1:($2) via D3,a3,xe3,C3 +} + +f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +filename='pes_CISDTQ.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a4=1.0; xe4=STATS_pos_min_y; C4=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D4=last_y-C4 +fit [xmin:xmax] [*:*] f4(x) filename u 1:($2) via D4,a4,xe4,C4 +} + +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +filename='pes_CIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a5=1.0; xe5=STATS_pos_min_y; C5=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D5=last_y-C5 +fit [xmin:xmax] [*:*] f5(x) filename u 1:($2) via D5,a5,xe5,C5 +} + +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +filename='pes_CIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a6=1.0; xe6=STATS_pos_min_y; C6=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D6=last_y-C6 +fit [xmin:xmax] [*:*] f6(x) filename u 1:($2) via D6,a6,xe6,C6 +} + +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +filename='pes_CIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a7=1.0; xe7=STATS_pos_min_y; C7=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D7=last_y-C7 +fit [xmin:xmax] [*:*] f7(x) filename u 1:($2) via D7,a7,xe7,C7 +} + +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +filename='pes_CIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a8=1.0; xe8=STATS_pos_min_y; C8=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D8=last_y-C8 +fit [xmin:xmax] [*:*] f8(x) filename u 1:($2) via D8,a8,xe8,C8 +} + +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +filename='pes_CIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a9=1.0; xe9=STATS_pos_min_y; C9=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D9=last_y-C9 +fit [xmin:xmax] [*:*] f9(x) filename u 1:($2) via D9,a9,xe9,C9 +} + +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +filename='pes_CIo3.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a10=1.0; xe10=STATS_pos_min_y; C10=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D10=last_y-C10 +fit [xmin:xmax] [*:*] f10(x) filename u 1:($2) via D10,a10,xe10,C10 +} + +f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +filename='pes_CIo4.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a11=1.0; xe11=STATS_pos_min_y; C11=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D11=last_y-C11 +fit [xmin:xmax] [*:*] f11(x) filename u 1:($2) via D11,a11,xe11,C11 +} + +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +filename='pes_ooCISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a12=1.0; xe12=STATS_pos_min_y; C12=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D12=last_y-C12 +fit [xmin:xmax] [*:*] f12(x) filename u 1:($2) via D12,a12,xe12,C12 +} + +f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +filename='pes_ooCISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a13=1.0; xe13=STATS_pos_min_y; C13=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D13=last_y-C13 +fit [xmin:xmax] [*:*] f13(x) filename u 1:($2) via D13,a13,xe13,C13 +} + +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +filename='pes_ooCIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a14=1.0; xe14=STATS_pos_min_y; C14=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D14=last_y-C14 +fit [xmin:xmax] [*:*] f14(x) filename u 1:($2) via D14,a14,xe14,C14 +} + +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +filename='pes_ooCIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a15=1.0; xe15=STATS_pos_min_y; C15=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D15=last_y-C15 +fit [xmin:xmax] [*:*] f15(x) filename u 1:($2) via D15,a15,xe15,C15 +} + +f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +filename='pes_ooCIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a16=1.0; xe16=STATS_pos_min_y; C16=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D16=last_y-C16 +fit [xmin:xmax] [*:*] f16(x) filename u 1:($2) via D16,a16,xe16,C16 +} + +f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +filename='pes_ooCIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a17=1.0; xe17=STATS_pos_min_y; C17=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D17=last_y-C17 +fit [xmin:xmax] [*:*] f17(x) filename u 1:($2) via D17,a17,xe17,C17 +} + +f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +filename='pes_ooCIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a18=1.0; xe18=STATS_pos_min_y; C18=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D18=last_y-C18 +fit [xmin:xmax] [*:*] f18(x) filename u 1:($2) via D18,a18,xe18,C18 +} + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CISDTQ.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_CIo3.dat' w lp ls 4 notitle, \ + 'pes_CIo3.5.dat' w lp ls 5 notitle, \ + 'pes_CIo4.dat' w lp ls 4 notitle, \ + 'pes_ooCISD.dat' w lp ls 13 notitle, \ + 'pes_ooCISDT.dat' w lp ls 13 notitle, \ + 'pes_ooCIo1.dat' w lp ls 14 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo2.dat' w lp ls 14 notitle, \ + 'pes_ooCIo2.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo3.dat' w lp ls 14 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f4(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f11(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f13(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle, \ + [xmin:xmax] f16(x) w l ls 9 notitle, \ + [xmin:xmax] f17(x) w l ls 9 notitle, \ + [xmin:xmax] f18(x) w l ls 9 notitle + +################################################################################### +################################################################################### + +pause -1 diff --git a/N2_cc-pvdz/fit_eq.sh b/N2_cc-pvdz/fit_eq.sh new file mode 100755 index 0000000..753c081 --- /dev/null +++ b/N2_cc-pvdz/fit_eq.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +if [ -f "fit.log" ]; then + rm "fit.log" +fi + +gnuplot fit_eq.gnu + +grep ^xe fit.log | grep = | sed 's/=//g' | cut -c -30 | + sed 's/xe0 /FCI /g' | + sed 's/xe1 /RHF /g' | + sed 's/xe2 /hfCISD /g' | + sed 's/xe3 /hfCISDT /g' | + sed 's/xe4 /hfCISDTQ /g' | + sed 's/xe5 /hfCIo1 /g' | + sed 's/xe6 /hfCIo1.5 /g' | + sed 's/xe7 /hfCIo2 /g' | + sed 's/xe8 /hfCIo2.5 /g' | + sed 's/xe9 /hfCIo3 /g' | + sed 's/xe10/hfCIo3.5 /g' | + sed 's/xe11/hfCIo4 /g' | + sed 's/xe12/ooCISD /g' | + sed 's/xe13/ooCISDT /g' | + sed 's/xe14/ooCIo1 /g' | + sed 's/xe15/ooCIo1.5 /g' | + sed 's/xe16/ooCIo2 /g' | + sed 's/xe17/ooCIo2.5 /g' | + sed 's/xe18/ooCIo3 /g' > xe.dat + + +grep 'FCI' xe.dat | sed 's/FCI/-0.1 /g' > xe_FCI.dat +grep 'FCI' xe.dat | sed 's/FCI/4.1 /g' >> xe_FCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_CI.dat +grep 'hfCISD ' xe.dat | sed 's/hfCISD/2 /g' >> xe_CI.dat +grep 'hfCISDT ' xe.dat | sed 's/hfCISDT/3 /g' >> xe_CI.dat +grep 'hfCISDTQ' xe.dat | sed 's/hfCISDTQ/4 /g' >> xe_CI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_ooCI.dat +grep 'ooCISD ' xe.dat | sed 's/ooCISD/2 /g' >> xe_ooCI.dat +grep 'ooCISDT' xe.dat | sed 's/ooCISDT/3 /g' >> xe_ooCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CIo.dat +grep 'hfCIo1 ' xe.dat | sed 's/hfCIo1/1 /g' >> xe_CIo.dat +grep 'hfCIo1.5' xe.dat | sed 's/hfCIo1.5/1.5 /g' >> xe_CIo.dat +grep 'hfCIo2 ' xe.dat | sed 's/hfCIo2/2 /g' >> xe_CIo.dat +grep 'hfCIo2.5' xe.dat | sed 's/hfCIo2.5/2.5 /g' >> xe_CIo.dat +grep 'hfCIo3 ' xe.dat | sed 's/hfCIo3/3 /g' >> xe_CIo.dat +grep 'hfCIo3.5' xe.dat | sed 's/hfCIo3.5/3.5 /g' >> xe_CIo.dat +grep 'hfCIo4 ' xe.dat | sed 's/hfCIo4/4 /g' >> xe_CIo.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCIo.dat +grep 'ooCIo1 ' xe.dat | sed 's/ooCIo1/1 /g' >> xe_ooCIo.dat +grep 'ooCIo1.5' xe.dat | sed 's/ooCIo1.5/1.5 /g' >> xe_ooCIo.dat +grep 'ooCIo2 ' xe.dat | sed 's/ooCIo2/2 /g' >> xe_ooCIo.dat +grep 'ooCIo2.5' xe.dat | sed 's/ooCIo2.5/2.5 /g' >> xe_ooCIo.dat +grep 'ooCIo3 ' xe.dat | sed 's/ooCIo3/3 /g' >> xe_ooCIo.dat + +#epspdf fit_eq.eps +#okular fit_eq.pdf diff --git a/N2_cc-pvdz/plot.gnu b/N2_cc-pvdz/plot.gnu new file mode 100644 index 0000000..1f20155 --- /dev/null +++ b/N2_cc-pvdz/plot.gnu @@ -0,0 +1,54 @@ +#!/bin/gnuplot + +#r=1.1 angs + +efci=-109.27724761 + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,18' linewidth 2 +set output 'plot.eps' + +xmin=-0.1 +xmax=3.5 +ymin=0.0 +ymax=1.0 + +set grid + +#set format y "%.0e*10^{%T}" +set format y "10^{%T}" + +#set xrange[-0.1:3.1] +set xrange[-0.1:5.1] +#set yrange[0.0:0.2] + +set logscale y +set yrange[1e-5:1] +#set yrange[1e-4:1.0] + +#set xrange[1.9:3.1] +#set yrange[0.0:0.006] + +set style line 1 dt 1 lw 1 linecolor rgb "gray60" pt 13 ps 1.75 +set style line 3 dt 1 lw 1 linecolor rgb "light-red" pt 13 ps 1.75 +set style line 4 dt 1 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 +set style line 5 dt 2 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 + +set style line 11 dt 1 lw 1.5 linecolor rgb "gray60" +set style line 13 dt 2 lw 1.5 linecolor rgb "light-red" pt 7 ps 1.75 +set style line 14 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 +set style line 15 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 + +set xlabel 'Computational scaling' +set ylabel 'Energy error (Hartree)' + +plot 'r1.1_ciexc.dat' u 1:($2-efci) w lp ls 3 notitle, \ + 'r1.1_oociexc.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'r1.1_oociexc.dat' u 1:($2-efci) w lp ls 13 notitle, \ + 'r1.1_cio.dat' u 1:($2-efci) w lp ls 4 notitle, \ + 'r1.1_oocio.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'r1.1_oocio.dat' u 1:($2-efci) w lp ls 14 notitle + +#pause -1 diff --git a/N2_cc-pvdz/plot.sh b/N2_cc-pvdz/plot.sh new file mode 100755 index 0000000..f9f68b6 --- /dev/null +++ b/N2_cc-pvdz/plot.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot.gnu +epspdf plot.eps +okular plot.pdf diff --git a/N2_cc-pvdz/plot_error.sh b/N2_cc-pvdz/plot_error.sh new file mode 100755 index 0000000..86447b8 --- /dev/null +++ b/N2_cc-pvdz/plot_error.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_error.gnu +epspdf plot_error.eps +okular plot_error.pdf diff --git a/N2_cc-pvdz/plot_error_1.gnu b/N2_cc-pvdz/plot_error_1.gnu new file mode 100644 index 0000000..8525543 --- /dev/null +++ b/N2_cc-pvdz/plot_error_1.gnu @@ -0,0 +1,48 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_error.png' + +set xrange[0.7:4.0] +# VIEW 1 +#set logscale y +#set yrange[1.0e-4:2.0] +# VIEW 2 +set yrange[0.0:0.5] + +set style line 1 dt 1 lw 1 linecolor rgb "gray" +set style line 2 dt 1 lw 1 linecolor rgb "red" +set style line 3 dt 1 lw 1 linecolor rgb "green" +set style line 4 dt 1 lw 1 linecolor rgb "blue" +set style line 5 dt 2 lw 1 linecolor rgb "blue" +set style line 6 dt 1 lw 1 linecolor rgb "orange" + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy error (Hartree)' + +plot '< paste pes_fci.dat pes_rhf.dat' using 1:($4-$2) w l ls 1 notitle, \ + '< paste pes_fci.dat pes_s4.e2.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_s6.e3.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_s8.e4.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_s10.e5.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_CIo1.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo1.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo2.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_CIo2.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo3.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_CIo3.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo4.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_CIo4.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo5.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_fci.dat' using 1:($4-$2) w l ls 2 notitle +# '< paste pes_fci.dat pes_s12.e6.dat' using 1:($4-$2) w l ls 3 notitle, \ +# '< paste pes_fci.dat pes_pccd.dat' using 1:($4-$2) w l ls 6 notitle, \ +# '< paste pes_fci.dat pes_s0.e2.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e2.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e3.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s4.e3.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s0.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s4.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ + +pause -1 diff --git a/N2_cc-pvdz/plot_pes.sh b/N2_cc-pvdz/plot_pes.sh new file mode 100755 index 0000000..2aa451d --- /dev/null +++ b/N2_cc-pvdz/plot_pes.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_pes.gnu +epspdf plot_pes.eps +okular plot_pes.pdf diff --git a/N2_cc-pvdz/plot_pes_1.gnu b/N2_cc-pvdz/plot_pes_1.gnu new file mode 100644 index 0000000..5f413ca --- /dev/null +++ b/N2_cc-pvdz/plot_pes_1.gnu @@ -0,0 +1,106 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 1200,800 enhanced font 'Verdana,18' +#set output 'plot_pes.png' + +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,18' linewidth 2 +set output 'plot_pes.eps' + +xmin=0.7 +xmax=4.0 +ymin=-109.30 +ymax=-108.30 + +set xrange[0.7:4.0] +#set yrange[-109.30:-108.60] +set yrange[-109.30:-108.30] +# ZOOM: +#set xrange[0.95:1.35] +#set yrange[-109.29:-109.20] + +set style line 1 dt 1 lw 2 linecolor rgb "gray" +set style line 2 dt 1 lw 2 linecolor rgb "black" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" +set style line 13 dt 1 lw 3 linecolor rgb "light-red" +set style line 14 dt 1 lw 3 linecolor rgb "sea-green" +set style line 15 dt 2 lw 3 linecolor rgb "sea-green" +set style line 6 dt 1 lw 2 linecolor rgb "orange" +set style line 7 dt 2 lw 2 linecolor rgb "orange" + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy (Hartree)' + +# get the relation of x- and y-range +dx = xmax-xmin +dy = ymax-ymin +s1 = dx/dy +# get ratio of axes +s2 = 3.0/5.3 +# helper function for getting the rotation angle of the labels in degree +deg(x) = x/pi*180.0 +r(x) = deg(atan(s1*s2*x)) +# function for fitting +f(x) = a*x+b + +fit [1.7:1.8] [*:*] f(x) 'pes_rhf.dat' u 1:($2) via a,b +set label 1 'RHF' at 1.75,-108.42 rotate by r(a) center tc ls 1 #font 'Verdana,20' +fit [2.9:3.1] [*:*] f(x) 'pes_s4.e2.dat' u 1:($2) via a,b +set label 2 'CISD' at 3.0,-108.53 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [2.9:3.1] [*:*] f(x) 'pes_s6.e3.dat' u 1:($2) via a,b +set label 3 'CISDT' at 3.0,-108.595 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [2.9:3.1] [*:*] f(x) 'pes_s8.e4.dat' u 1:($2) via a,b +set label 4 'CISDTQ' at 3.0,-108.840 rotate by r(a) center tc ls 3 #font 'Verdana,20' + +fit [3.6:3.8] [*:*] f(x) 'pes_CIo2.dat' u 1:($2) via a,b +set label 12 'CIo2' at 3.7,-108.625 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [3.6:3.8] [*:*] f(x) 'pes_CIo3.dat' u 1:($2) via a,b +set label 13 'CIo3' at 3.7,-108.830 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [3.0:4.0] [*:*] f(x) 'pes_CIo4.dat' u 1:($2) via a,b +set label 14 'CIo4' at 3.7,-108.920 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [3.0:4.0] [*:*] f(x) 'pes_fci.dat' u 1:($2) via a,b +set label 20 'FCI' at 3.7,-108.980 rotate by r(a) center tc ls 2 #font 'Verdana,20' + + +plot 'pes_rhf.dat' w l ls 1 notitle, \ + 'pes_s4.e2.dat' w l ls 3 notitle, \ + 'pes_s6.e3.dat' w l ls 3 notitle, \ + 'pes_s8.e4.dat' w l ls 3 notitle, \ + 'pes_CIo1.dat' w l ls 5 notitle, \ + 'pes_CIo1.5.dat' w l ls 5 notitle, \ + 'pes_CIo2.dat' w l ls 4 notitle, \ + 'pes_CIo2.5.dat' w l ls 5 notitle, \ + 'pes_CIo3.dat' w l ls 4 notitle, \ + 'pes_CIo3.5.dat' w l ls 5 notitle, \ + 'pes_CIo4.dat' w l ls 4 notitle, \ + 'pes_ooCIo1.dat' w l ls 2 notitle, \ + 'pes_fci.dat' w l ls 2 notitle +# 'pes_pccd.dat' w l ls 6 notitle, \ +# 'pes_ccsd.dat' w l ls 6 notitle, \ +# 'pes_ccsd_t.dat' w l ls 6 notitle, \ +# 'pes_ooCIo2.dat' w l ls 2 notitle, \ +# 'pes_ooCISD.dat' w l ls 2 notitle, \ +# 'pes_s10.e5.dat' w l ls 3 notitle, \ +# 'pes_CIo4.5.dat' w l ls 5 notitle, \ +# 'pes_CIo5.dat' w l ls 4 notitle, \ +# 'pes_s0.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e3.dat' w l ls 1 notitle, \ +# 'pes_s4.e3.dat' w l ls 1 notitle, \ +# 'pes_s0.e4.dat' w l ls 1 notitle, \ +# 'pes_s2.e4.dat' w l ls 1 notitle, \ +# 'pes_s4.e4.dat' w l ls 1 notitle, \ +# 'pes_s2.e5.dat' w l ls 1 notitle, \ +# 'pes_s4.e5.dat' w l ls 1 notitle, \ +# 'pes_s6.e5.dat' w l ls 1 notitle, \ +# 'pes_s8.e5.dat' w l ls 1 notitle, \ +# 'pes_s0.e6.dat' w l ls 1 notitle, \ +# 'pes_s2.e6.dat' w l ls 1 notitle, \ +# 'pes_s4.e6.dat' w l ls 1 notitle, \ +# 'pes_s6.e6.dat' w l ls 1 notitle, \ +# 'pes_s8.e6.dat' w l ls 1 notitle, \ +# 'pes_s10.e6.dat' w l ls 1 notitle, \ + +#pause -1 diff --git a/N2_cc-pvdz/plot_r4.gnu b/N2_cc-pvdz/plot_r4.gnu new file mode 100644 index 0000000..16fe2eb --- /dev/null +++ b/N2_cc-pvdz/plot_r4.gnu @@ -0,0 +1,54 @@ +#!/bin/gnuplot + +#r=4.0 angs + +efci=-108.95747887 + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,18' linewidth 2 +set output 'plot_r4.eps' + +xmin=-0.1 +xmax=3.5 +ymin=0.0 +ymax=1.0 + +set grid + +#set format y "%.0e*10^{%T}" +set format y "10^{%T}" + +#set xrange[-0.1:3.1] +set xrange[-0.1:5.1] +#set yrange[0.0:0.2] + +set logscale y +set yrange[1e-2:2] +#set yrange[1e-4:1.0] + +#set xrange[1.9:3.1] +#set yrange[0.0:0.006] + +set style line 1 dt 1 lw 1 linecolor rgb "gray60" pt 13 ps 1.75 +set style line 3 dt 1 lw 1 linecolor rgb "light-red" pt 13 ps 1.75 +set style line 4 dt 1 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 +set style line 5 dt 2 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 + +set style line 11 dt 1 lw 1.5 linecolor rgb "gray60" +set style line 13 dt 2 lw 1.5 linecolor rgb "light-red" pt 7 ps 1.75 +set style line 14 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 +set style line 15 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 + +set xlabel 'Computational scaling' +set ylabel 'Energy error (Hartree)' + +plot 'r4_ciexc.dat' u 1:($2-efci) w lp ls 3 notitle, \ + 'r4_oociexc.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'r4_oociexc.dat' u 1:($2-efci) w lp ls 13 notitle, \ + 'r4_cio.dat' u 1:($2-efci) w lp ls 4 notitle, \ + 'r4_oocio.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'r4_oocio.dat' u 1:($2-efci) w lp ls 14 notitle + +#pause -1 diff --git a/N2_cc-pvdz/plot_r4.sh b/N2_cc-pvdz/plot_r4.sh new file mode 100755 index 0000000..f58ad82 --- /dev/null +++ b/N2_cc-pvdz/plot_r4.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_r4.gnu +epspdf plot_r4.eps +okular plot_r4.pdf diff --git a/N2_cc-pvdz/plot_stat.gnu b/N2_cc-pvdz/plot_stat.gnu new file mode 100644 index 0000000..a92f261 --- /dev/null +++ b/N2_cc-pvdz/plot_stat.gnu @@ -0,0 +1,51 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat.eps' + +set format y "10^{%T}" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] +set yrange[1e-2:1] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 1 +set logscale y + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CI.dat' u 1:($2) w lp ls 3 notitle, \ + 'stat_CIo.dat' u 1:($2) w lp ls 4 notitle + +unset ylabel +unset label + +plot 'stat_ooCI.dat' u 1:($2) w lp ls 13 notitle, \ + 'stat_ooCIo.dat' u 1:($2) w lp ls 14 notitle diff --git a/N2_cc-pvdz/plot_stat.sh b/N2_cc-pvdz/plot_stat.sh new file mode 100755 index 0000000..c6d49b4 --- /dev/null +++ b/N2_cc-pvdz/plot_stat.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +./compute_NPE.pl 1 4.0 +./compute_NPE.pl 2 4.0 +./compute_NPE.pl 3 4.0 +./compute_NPE.pl 4 4.0 + +gnuplot plot_stat.gnu +epspdf plot_stat.eps +okular plot_stat.pdf diff --git a/N2_cc-pvdz/xe.gnu b/N2_cc-pvdz/xe.gnu new file mode 100644 index 0000000..90c837c --- /dev/null +++ b/N2_cc-pvdz/xe.gnu @@ -0,0 +1,70 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'xe.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] + +# VIEW 1: +set yrange[1.07:1.13] +set format y "%.2f" +################################################################################### +################################################################################### + +set xtics 1 +set ytics 0.01 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.15 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" + +set style line 3 dt 1 lw 3 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel "Equilibrium distance ({\305})" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_CI.dat' w lp ls 3 notitle, \ + 'xe_CIo.dat' w lp ls 4 notitle#, \ +# 'xe_ooCI.dat' w lp ls 13 notitle, \ +# 'xe_ooCIo.dat' w lp ls 14 notitle + +unset ylabel +unset label +set format y "" + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_ooCI.dat' w lp ls 13 notitle, \ + 'xe_ooCIo.dat' w lp ls 14 notitle + +################################################################################### +################################################################################### + +#pause -1 diff --git a/N2_cc-pvdz/xe.sh b/N2_cc-pvdz/xe.sh new file mode 100755 index 0000000..2896546 --- /dev/null +++ b/N2_cc-pvdz/xe.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot xe.gnu +epspdf xe.eps +okular xe.pdf diff --git a/Ne_cc-pvtz/plot.gnu b/Ne_cc-pvtz/plot.gnu new file mode 100644 index 0000000..a2cb7e8 --- /dev/null +++ b/Ne_cc-pvtz/plot.gnu @@ -0,0 +1,51 @@ +#!/bin/gnuplot + +efci=-128.67902506 + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,18' linewidth 2 +set output 'plot.eps' + +xmin=-0.1 +xmax=3.5 +ymin=0.0 +ymax=0.2 + +set grid + +#set format y "%.0e*10^{%T}" +set format y "10^{%T}" + +set xrange[-0.1:4.1] +#set yrange[0.0:0.2] + +set logscale y +set yrange[1e-6:0.3] +#set yrange[1e-4:1.0] + +#set xrange[1.9:3.1] +#set yrange[0.0:0.006] + +set style line 1 dt 1 lw 1 linecolor rgb "gray60" pt 13 ps 1.75 +set style line 3 dt 1 lw 1 linecolor rgb "light-red" pt 13 ps 1.75 +set style line 4 dt 1 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 +set style line 5 dt 2 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 + +set style line 11 dt 1 lw 1.5 linecolor rgb "gray60" +set style line 13 dt 2 lw 1.5 linecolor rgb "light-red" pt 7 ps 1.75 +set style line 14 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 +set style line 15 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 + +set xlabel 'Computational scaling' +set ylabel 'Energy error (Hartree)' + +plot 'ciexc.dat' u 1:($2-efci) w lp ls 3 notitle, \ + 'oociexc.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'oociexc.dat' u 1:($2-efci) w lp ls 13 notitle, \ + 'cio.dat' u 1:($2-efci) w lp ls 4 notitle, \ + 'oocio.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'oocio.dat' u 1:($2-efci) w lp ls 14 notitle + +#pause -1 diff --git a/Ne_cc-pvtz/plot.sh b/Ne_cc-pvtz/plot.sh new file mode 100755 index 0000000..f9f68b6 --- /dev/null +++ b/Ne_cc-pvtz/plot.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot.gnu +epspdf plot.eps +okular plot.pdf diff --git a/all/plot_stat_1.gnu b/all/plot_stat_1.gnu new file mode 100644 index 0000000..a30769d --- /dev/null +++ b/all/plot_stat_1.gnu @@ -0,0 +1,73 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 2.65,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat_1.eps' + + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.4:7.7] +#set yrange[1e-3:1] +#set logscale y +#set format y "10^{%T}" +set yrange[0.0:0.9] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 2 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.25 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.15 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.00 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,1 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +#set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +#set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +#set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +#set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set style line 3 lc rgb "light-red" +set style line 4 lc rgb "sea-green" + +set style fill solid +set boxwidth 0.3 +s=0.35 + +set xtics ( \ +"Be_{2}" 0.0, \ +"ethylene" 1.0, \ +"F_{2}" 2.0, \ +"H_{2}O" 3.0, \ +"H_{4}" 4.0, \ +"H_{8}" 5.0, \ +"HF" 6.0, \ +"N_{2}" 7.0) \ +rotate by 90 right + +set ytics rotate by 90 right + +#plot "data.dat" every ::0::0 using 1:3:xtic(2) with boxes ls 1, \ +# "data.dat" every ::1::2 using 1:3:xtic(2) with boxes ls 2 + +#set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_rhf.dat' u ($0):($2) w boxes ls 3 notitle, \ + 'stat_CIo1.dat' u ($0+s):($2) w boxes ls 4 notitle + +unset ylabel +unset label + diff --git a/all/plot_stat_1.sh b/all/plot_stat_1.sh new file mode 100755 index 0000000..ba0f76a --- /dev/null +++ b/all/plot_stat_1.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_stat_1.gnu +epspdf plot_stat_1.eps +okular plot_stat_1.pdf diff --git a/all/plot_stat_2.gnu b/all/plot_stat_2.gnu new file mode 100644 index 0000000..1653ebb --- /dev/null +++ b/all/plot_stat_2.gnu @@ -0,0 +1,75 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat_2.eps' + + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.4:7.7] +#set yrange[1e-3:1] +#set logscale y +#set format y "10^{%T}" +set yrange[0.0:0.5] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 2 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.15 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +#set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +#set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +#set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +#set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set style line 3 lc rgb "light-red" +set style line 4 lc rgb "sea-green" + +set style fill solid 0.9 +set boxwidth 0.3 +s=0.35 + +set xtics ( \ +"Be_{2}" 0.0, \ +"ethylene" 1.0, \ +"F_{2}" 2.0, \ +"H_{2}O" 3.0, \ +"H_{4}" 4.0, \ +"H_{8}" 5.0, \ +"HF" 6.0, \ +"N_{2}" 7.0) \ +rotate by 90 right + +set ytics rotate by 90 right + +#plot "data.dat" every ::0::0 using 1:3:xtic(2) with boxes ls 1, \ +# "data.dat" every ::1::2 using 1:3:xtic(2) with boxes ls 2 + +#set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CISD.dat' u ($0):($2) w boxes ls 3 notitle, \ + 'stat_CIo2.dat' u ($0+s):($2) w boxes ls 4 notitle + +unset ylabel +unset label + +plot 'stat_ooCISD.dat' u ($0):($2) w boxes ls 3 notitle, \ + 'stat_ooCIo2.dat' u ($0+s):($2) w boxes ls 4 notitle diff --git a/all/plot_stat_2.sh b/all/plot_stat_2.sh new file mode 100755 index 0000000..27e413f --- /dev/null +++ b/all/plot_stat_2.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_stat_2.gnu +epspdf plot_stat_2.eps +okular plot_stat_2.pdf diff --git a/all/plot_stat_2_closeness.gnu b/all/plot_stat_2_closeness.gnu new file mode 100644 index 0000000..95f0c4e --- /dev/null +++ b/all/plot_stat_2_closeness.gnu @@ -0,0 +1,75 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat_2_closeness.eps' + + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.4:7.7] +#set yrange[1e-3:1] +#set logscale y +#set format y "10^{%T}" +set yrange[0.0:0.5] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 2 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.15 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +#set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +#set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +#set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +#set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set style line 3 lc rgb "light-red" +set style line 4 lc rgb "sea-green" + +set style fill solid +set boxwidth 0.3 +s=0.35 + +set xtics ( \ +"Be_{2}" 0.0, \ +"ethylene" 1.0, \ +"F_{2}" 2.0, \ +"H_{2}O" 3.0, \ +"H_{4}" 4.0, \ +"H_{8}" 5.0, \ +"HF" 6.0, \ +"N_{2}" 7.0) \ +rotate by 90 right + +set ytics rotate by 90 right + +#plot "data.dat" every ::0::0 using 1:3:xtic(2) with boxes ls 1, \ +# "data.dat" every ::1::2 using 1:3:xtic(2) with boxes ls 2 + +#set xlabel 'Computational scaling' +set ylabel 'Closeness error (Hartree)' + +plot 'stat_CISD.dat' u ($0):($3) w boxes ls 3 notitle, \ + 'stat_CIo2.dat' u ($0+s):($3) w boxes ls 4 notitle + +unset ylabel +unset label + +plot 'stat_ooCISD.dat' u ($0):($3) w boxes ls 3 notitle, \ + 'stat_ooCIo2.dat' u ($0+s):($3) w boxes ls 4 notitle diff --git a/all/plot_stat_2_closeness.sh b/all/plot_stat_2_closeness.sh new file mode 100755 index 0000000..a082f0f --- /dev/null +++ b/all/plot_stat_2_closeness.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_stat_2_closeness.gnu +epspdf plot_stat_2_closeness.eps +okular plot_stat_2_closeness.pdf diff --git a/all/plot_stat_3.gnu b/all/plot_stat_3.gnu new file mode 100644 index 0000000..5a312b9 --- /dev/null +++ b/all/plot_stat_3.gnu @@ -0,0 +1,73 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 2.65,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat_3.eps' + + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.4:7.7] +#set yrange[1e-3:1] +#set logscale y +#set format y "10^{%T}" +set yrange[0.0:0.5] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 2 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.25 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.15 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,1 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +#set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +#set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +#set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +#set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set style line 3 lc rgb "light-red" +set style line 4 lc rgb "sea-green" + +set style fill solid +set boxwidth 0.3 +s=0.35 + +set xtics ( \ +"Be_{2}" 0.0, \ +"ethylene" 1.0, \ +"F_{2}" 2.0, \ +"H_{2}O" 3.0, \ +"H_{4}" 4.0, \ +"H_{8}" 5.0, \ +"HF" 6.0, \ +"N_{2}" 7.0) \ +rotate by 90 right + +set ytics rotate by 90 right + +#plot "data.dat" every ::0::0 using 1:3:xtic(2) with boxes ls 1, \ +# "data.dat" every ::1::2 using 1:3:xtic(2) with boxes ls 2 + +#set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CISDT.dat' u ($0):($2) w boxes ls 3 notitle, \ + 'stat_CIo3.dat' u ($0+s):($2) w boxes ls 4 notitle + +#unset ylabel +#unset label + diff --git a/all/plot_stat_3.sh b/all/plot_stat_3.sh new file mode 100755 index 0000000..d3961bb --- /dev/null +++ b/all/plot_stat_3.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_stat_3.gnu +epspdf plot_stat_3.eps +okular plot_stat_3.pdf diff --git a/all/stat_CISD.dat b/all/stat_CISD.dat new file mode 100644 index 0000000..0cc7584 --- /dev/null +++ b/all/stat_CISD.dat @@ -0,0 +1,8 @@ +2 0.00858233000000297 0.0262095499999973 0.0173959400000001 0.00881360999999714 # Be +2 0.24325322 0.295059719999998 0.269156469999999 0.0259032499999989 # et +2 0.122002959999975 0.163188520000006 0.14259573999999 0.0205927800000154 # F2 +2 0.133779029999985 0.147979089999993 0.140879059999989 0.0071000300000037 # H2O +2 0.0389259899999996 0.04125881 0.0400923999999998 0.00116641000000017 # H4 +2 0.33735963 0.352779809999999 0.34506972 0.00771008999999978 # H8 +2 0.0725293199999868 0.0846932600000088 0.0786112899999978 0.00608197000001098 # HF +2 0.458730219999993 0.485847600000014 0.472288910000003 0.0135586900000106 # N2 diff --git a/all/stat_CISDT.dat b/all/stat_CISDT.dat new file mode 100644 index 0000000..a75bb17 --- /dev/null +++ b/all/stat_CISDT.dat @@ -0,0 +1,8 @@ +3 0.00315309000000141 0.019113149999999 0.0111331200000002 0.00798002999999881 # Be2 +3 0.183071040000002 0.222840559999995 0.202955799999998 0.0198847599999965 # et +3 0.0841256499999758 0.118932470000004 0.10152905999999 0.0174034100000142 # F2 +3 0.0640254999999996 0.0743389400000041 0.0691822200000018 0.00515672000000222 # H2O +3 0.0273926599999996 0.0280082599999998 0.0277004599999997 0.00030780000000008 # H4 +#3 0.33373286 0.34450284 0.33911785 0.00538499000000003 # H8 +3 0.0417049999999932 0.051136679999999 0.0464208399999961 0.00471584000000291 # HF +3 0.39258873 0.411569130000004 0.402078930000002 0.00949020000000189 # N2 diff --git a/all/stat_CIo1.dat b/all/stat_CIo1.dat new file mode 100644 index 0000000..b336fe3 --- /dev/null +++ b/all/stat_CIo1.dat @@ -0,0 +1,8 @@ +1 0.00715022000000332 0.172831579999997 0.0899909000000001 0.0828406799999968 # Be2 +1 0.103322129999995 0.601840209999992 0.352581169999993 0.249259039999998 # et +1 0.0122087899999883 0.615032110000016 0.313620450000002 0.301411660000014 # F2 +1 0.122177120000003 0.416611899999992 0.269394509999998 0.147217389999994 # H2O +1 0.2148311 0.30412972 0.25948041 0.0446493100000001 # H4 +1 0.52697453 0.79385675 0.66041564 0.13344111 # H8 +1 0.0277662700000008 0.315402590000019 0.17158443000001 0.143818160000009 # Hf +1 0.442888029999992 0.818113530000019 0.630500780000006 0.187612750000014 # N2 diff --git a/all/stat_CIo2.dat b/all/stat_CIo2.dat new file mode 100644 index 0000000..f2b8018 --- /dev/null +++ b/all/stat_CIo2.dat @@ -0,0 +1,8 @@ +2 0.00647896000000259 0.0216995400000002 0.0140892500000014 0.0076102899999988 # Be2 +2 0.165449560000013 0.215256740000001 0.190353150000007 0.0249035899999939 # et +2 0.109349469999984 0.148297769999999 0.128823619999991 0.0194741500000077 # F2 +2 0.124507170000015 0.137031390000004 0.13076928000001 0.00626210999999444 # H2O +2 0.0123970799999999 0.0139007599999998 0.0131489199999999 0.000751839999999948 # H4 +2 0.31795562 0.33191544 0.32493553 0.00697990999999965 # H8 +2 0.0518967399999894 0.0622111200000006 0.057053929999995 0.00515719000000558 # HF +2 0.304932319999992 0.32981298 0.317372649999996 0.012440330000004 # N2 diff --git a/all/stat_CIo3.dat b/all/stat_CIo3.dat new file mode 100644 index 0000000..e5e0554 --- /dev/null +++ b/all/stat_CIo3.dat @@ -0,0 +1,7 @@ +3 0.000506339999997607 0.00212970000000112 0.00131801999999936 0.000811680000001758 # Be2 +3 0.0567518699999994 0.0836156499999845 0.0701837599999919 0.0134318899999926 # et +3 0.00305417999999236 0.0242420399999901 0.0136481099999912 0.0105939299999989 # F2 +3 0.0390774699999952 0.0437587899999983 0.0414181299999967 0.00234066000000155 # H2O +3 0.000268419999999603 0.000215520000000025 0.000241969999999814 -2.64499999997891e-05 # H4 +3 0.00213768999999786 0.00605267000001675 0.0040951800000073 0.00195749000000944 # HF +3 0.101855049999983 0.11165385000001 0.106754449999997 0.00489940000001354 # N2 diff --git a/all/stat_ooCISD.dat b/all/stat_ooCISD.dat new file mode 100644 index 0000000..64206b7 --- /dev/null +++ b/all/stat_ooCISD.dat @@ -0,0 +1,5 @@ +2 0.00825518000000258 0.0257617599999982 0.0170084700000004 0.0087532899999978 # Be2 +2 0.237244750000002 0.288915849999995 0.263080299999999 0.0258355499999965 # et +2 0.120478679999991 0.161305940000005 0.140892309999998 0.0204136300000073 # F2 +2 0.0640768899999955 0.0757367900000077 0.0699068400000016 0.00582995000000608 # HF +2 0.457967956768996 0.484803123403012 0.471385540086004 0.0134175833170076 # N2 diff --git a/all/stat_ooCIo1.dat b/all/stat_ooCIo1.dat new file mode 100644 index 0000000..7d140a1 --- /dev/null +++ b/all/stat_ooCIo1.dat @@ -0,0 +1,4 @@ +1 0.133512519999996 0.449018839999994 0.291265679999995 0.157753159999999 # et +1 0.0532371399999647 0.469518660000006 0.261377899999985 0.20814076000002 # F2 +1 0.0440150600000067 0.210347400000003 0.127181230000005 0.0831661699999984 # HF +1 0.478284338055005 0.730218098459005 0.604251218257005 0.125966880202 # N2 diff --git a/all/stat_ooCIo2.dat b/all/stat_ooCIo2.dat new file mode 100644 index 0000000..a996a7a --- /dev/null +++ b/all/stat_ooCIo2.dat @@ -0,0 +1,4 @@ +2 0.00387066999999774 0.0137924300000023 0.00883155000000002 0.00496088000000228 # Be2 +2 0.0738578000000132 0.108515180000012 0.0911864900000126 0.0173286899999994 # F2 +2 0.0324007100000046 0.0419862300000062 0.0371934700000054 0.00479276000000084 # HF +2 0.292278868541985 0.31663449328201 0.304456680911997 0.0121778123700125 # N2 diff --git a/all/stat_rhf.dat b/all/stat_rhf.dat new file mode 100644 index 0000000..b79e6f2 --- /dev/null +++ b/all/stat_rhf.dat @@ -0,0 +1,8 @@ +0 0.0354266356000004 0.2391827818 0.1373047087 0.1018780731 # Be2 +0 0.473499994000022 1.044138026 0.758819010000011 0.285319015999988 # et +0 0.373399535999994 1.08806501400002 0.730732275000008 0.357332739000014 # F2 +0 0.324567283800008 0.699536195400015 0.512051739600011 0.187484455800004 # H2O +0 0.40742469955 0.55319465727 0.48030967841 0.0728849788599999 # H4 +0 0.56630361292 0.89066681508 0.728485214 0.16218160108 # H8 +0 0.271943935699994 0.650069468499993 0.461006702099994 0.189062766399999 # HF +0 0.856654722999991 1.321177699 1.088916211 0.232261488000006 # N2 diff --git a/ethylene_cc-pvdz/compute_NPE.pl b/ethylene_cc-pvdz/compute_NPE.pl new file mode 100755 index 0000000..9a74955 --- /dev/null +++ b/ethylene_cc-pvdz/compute_NPE.pl @@ -0,0 +1,98 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use List::Util qw(min max); + +my $case = $ARGV[0]; +my $xcut = $ARGV[1]; + +my(@files,@index,$outfile); + +if($case==1){ +@files = qw( pes_rhf.dat pes_CIo1.dat pes_CIo1.5.dat pes_CIo2.dat pes_CIo2.5.dat pes_CIo3.dat pes_CIo3.5.dat pes_CIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_CIo.dat"; +} +elsif($case==2){ +@files = qw( pes_rhf.dat pes_ooCIo1.dat pes_ooCIo1.5.dat pes_ooCIo2.dat pes_ooCIo2.5.dat pes_ooCIo3.dat pes_ooCIo3.5.dat pes_ooCIo4.dat); +@index = qw( 0 1 1.5 2 2.5 3 3.5 4); +$outfile = "stat_ooCIo.dat"; +} +elsif($case==3){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_CISD.dat pes_CISDT.dat pes_CISDTQ.dat); +@index = qw( 0 1 2 3 4); +$outfile = "stat_CI.dat"; +} +elsif($case==4){ +@files = qw( pes_rhf.dat pes_rhf.dat pes_ooCISD.dat pes_ooCISDT.dat); +@index = qw( 0 1 2 3); +$outfile = "stat_ooCI.dat"; +} +else{ +print "case variable not recognized \n"; +die; +} + +my $fci_file = 'pes_fci.dat'; + +my $n_files = @files; + +my (@x0, @y0); +my ($x, $y, $dy); +my ($i, $n); + +$n=0; +open(Fi, '<', $fci_file) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $n++; + $x0[$n] = $line[0]; + $y0[$n] = $line[1]; + if($x0[$n]>$xcut){last}; + } +close(Fi); + + if(-e $outfile){unlink $outfile}; + + open(Fo, '>>', $outfile) or die $!; + for ( my $j = 0; $j < $n_files; $j++ ){ + + if(-e $files[$j]){ + + my $maxy = -1e99; + my $miny = 1e99; + + # my $m=0; + # open(Fi, '<', $files[$j]) or die $!; + # while(){ + # $m++; + # } + # close(Fi); + + # if($m==$n){ + my $m=0; + open(Fi, '<', $files[$j]) or die $!; + while(){ + my @line = split( /\s+/, $_ ); + $m++; + $x = $line[0]; + $y = $line[1]; + $dy = $y - $y0[$m]; + $maxy = max($maxy,$dy); + $miny = min($miny,$dy); + if($x==$xcut){last}; + } + close(Fi); + + if($x==$xcut){ + my $npe = $maxy - $miny; + my $closeness = $maxy + $miny; + print Fo "$index[$j] $npe $closeness $maxy $miny \n"; + } + # } + + } + + } + close(Fo); diff --git a/ethylene_cc-pvdz/cp_to_manuscript.sh b/ethylene_cc-pvdz/cp_to_manuscript.sh new file mode 100755 index 0000000..b4206b6 --- /dev/null +++ b/ethylene_cc-pvdz/cp_to_manuscript.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mol='ethylene' + +path='/home/fabris/ongoing_projects/seniority/Manuscript' + +cp plot_pes.pdf $path/${mol}_pes.pdf +cp plot_error.pdf $path/${mol}_pes_error.pdf +cp plot_stat.pdf $path/${mol}_pes_stat.pdf +cp xe.pdf $path/${mol}_xe.pdf diff --git a/ethylene_cc-pvdz/fit_eq.gnu b/ethylene_cc-pvdz/fit_eq.gnu new file mode 100644 index 0000000..5333a02 --- /dev/null +++ b/ethylene_cc-pvdz/fit_eq.gnu @@ -0,0 +1,299 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[1.5:16.0] +xmin=2.20 +xmax=2.90 + +# VIEW 1: +set yrange[-78.40:-77.7] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 9 dt 1 lw 2 linecolor rgb "violet" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 +set style line 15 dt 2 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel "Distance ({\305})" +set ylabel 'Energy (Hartree)' + +# check if file exists +file_exists(file) = int(system("[ -f '".file."' ] && echo '1' || echo '0'")) +D0=0.0;a0=1.0;xe0=1.0;C0=0.0 +D1=0.0;a1=1.0;xe1=1.0;C1=0.0 +D2=0.0;a2=1.0;xe2=1.0;C2=0.0 +D3=0.0;a3=1.0;xe3=1.0;C3=0.0 +D4=0.0;a4=1.0;xe4=1.0;C4=0.0 +D5=0.0;a5=1.0;xe5=1.0;C5=0.0 +D6=0.0;a6=1.0;xe6=1.0;C6=0.0 +D7=0.0;a7=1.0;xe7=1.0;C7=0.0 +D8=0.0;a8=1.0;xe8=1.0;C8=0.0 +D9=0.0;a9=1.0;xe9=1.0;C9=0.0 +D10=0.0;a10=1.0;xe10=1.0;C10=0.0 +D11=0.0;a11=1.0;xe11=1.0;C11=0.0 +D12=0.0;a12=1.0;xe12=1.0;C12=0.0 +D13=0.0;a13=1.0;xe13=1.0;C13=0.0 +D14=0.0;a14=1.0;xe14=1.0;C14=0.0 +D15=0.0;a15=1.0;xe15=1.0;C15=0.0 +D16=0.0;a16=1.0;xe16=1.0;C16=0.0 +D17=0.0;a17=1.0;xe17=1.0;C17=0.0 +D18=0.0;a18=1.0;xe18=1.0;C18=0.0 + +# function for fitting + +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +filename='pes_fci.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a0=1.0; xe0=STATS_pos_min_y; C0=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D0=last_y-C0 +fit [xmin:xmax] [*:*] f0(x) filename u 1:($2) via D0,a0,xe0,C0 +} + +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +filename='pes_rhf.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a1=1.0; xe1=STATS_pos_min_y; C1=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D1=last_y-C1 +fit [xmin:xmax] [*:*] f1(x) filename u 1:($2) via D1,a1,xe1,C1 +} + +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +filename='pes_CISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a2=1.0; xe2=STATS_pos_min_y; C2=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D2=last_y-C2 +fit [xmin:xmax] [*:*] f2(x) filename u 1:($2) via D2,a2,xe2,C2 +} + +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +filename='pes_CISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a3=1.0; xe3=STATS_pos_min_y; C3=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D3=last_y-C3 +fit [xmin:xmax] [*:*] f3(x) filename u 1:($2) via D3,a3,xe3,C3 +} + +f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +filename='pes_CISDTQ.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a4=1.0; xe4=STATS_pos_min_y; C4=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D4=last_y-C4 +fit [xmin:xmax] [*:*] f4(x) filename u 1:($2) via D4,a4,xe4,C4 +} + +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +filename='pes_CIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a5=1.0; xe5=STATS_pos_min_y; C5=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D5=last_y-C5 +fit [xmin:xmax] [*:*] f5(x) filename u 1:($2) via D5,a5,xe5,C5 +} + +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +filename='pes_CIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a6=1.0; xe6=STATS_pos_min_y; C6=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D6=last_y-C6 +fit [xmin:xmax] [*:*] f6(x) filename u 1:($2) via D6,a6,xe6,C6 +} + +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +filename='pes_CIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a7=1.0; xe7=STATS_pos_min_y; C7=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D7=last_y-C7 +fit [xmin:xmax] [*:*] f7(x) filename u 1:($2) via D7,a7,xe7,C7 +} + +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +filename='pes_CIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a8=1.0; xe8=STATS_pos_min_y; C8=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D8=last_y-C8 +fit [xmin:xmax] [*:*] f8(x) filename u 1:($2) via D8,a8,xe8,C8 +} + +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +filename='pes_CIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a9=1.0; xe9=STATS_pos_min_y; C9=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D9=last_y-C9 +fit [xmin:xmax] [*:*] f9(x) filename u 1:($2) via D9,a9,xe9,C9 +} + +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +filename='pes_CIo3.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a10=1.0; xe10=STATS_pos_min_y; C10=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D10=last_y-C10 +fit [xmin:xmax] [*:*] f10(x) filename u 1:($2) via D10,a10,xe10,C10 +} + +f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +filename='pes_CIo4.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a11=1.0; xe11=STATS_pos_min_y; C11=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D11=last_y-C11 +fit [xmin:xmax] [*:*] f11(x) filename u 1:($2) via D11,a11,xe11,C11 +} + +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +filename='pes_ooCISD.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a12=1.0; xe12=STATS_pos_min_y; C12=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D12=last_y-C12 +fit [xmin:xmax] [*:*] f12(x) filename u 1:($2) via D12,a12,xe12,C12 +} + +f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +filename='pes_ooCISDT.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a13=1.0; xe13=STATS_pos_min_y; C13=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D13=last_y-C13 +fit [xmin:xmax] [*:*] f13(x) filename u 1:($2) via D13,a13,xe13,C13 +} + +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +filename='pes_ooCIo1.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a14=1.0; xe14=STATS_pos_min_y; C14=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D14=last_y-C14 +fit [xmin:xmax] [*:*] f14(x) filename u 1:($2) via D14,a14,xe14,C14 +} + +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +filename='pes_ooCIo1.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a15=1.0; xe15=STATS_pos_min_y; C15=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D15=last_y-C15 +fit [xmin:xmax] [*:*] f15(x) filename u 1:($2) via D15,a15,xe15,C15 +} + +f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +filename='pes_ooCIo2.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a16=1.0; xe16=STATS_pos_min_y; C16=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D16=last_y-C16 +fit [xmin:xmax] [*:*] f16(x) filename u 1:($2) via D16,a16,xe16,C16 +} + +f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +filename='pes_ooCIo2.5.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a17=1.0; xe17=STATS_pos_min_y; C17=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D17=last_y-C17 +fit [xmin:xmax] [*:*] f17(x) filename u 1:($2) via D17,a17,xe17,C17 +} + +f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +filename='pes_ooCIo3.dat' +if ( file_exists(filename) ){ +stats filename using 1:2 nooutput +a18=1.0; xe18=STATS_pos_min_y; C18=STATS_min_y +stats filename using 1:(last_y=$2) every ::STATS_records-1::STATS_records-1 nooutput +D18=last_y-C18 +fit [xmin:xmax] [*:*] f18(x) filename u 1:($2) via D18,a18,xe18,C18 +} + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CISDTQ.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_CIo3.dat' w lp ls 4 notitle, \ + 'pes_CIo3.5.dat' w lp ls 5 notitle, \ + 'pes_CIo4.dat' w lp ls 4 notitle, \ + 'pes_ooCISD.dat' w lp ls 13 notitle, \ + 'pes_ooCISDT.dat' w lp ls 13 notitle, \ + 'pes_ooCIo1.dat' w lp ls 14 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo2.dat' w lp ls 14 notitle, \ + 'pes_ooCIo2.5.dat' w lp ls 15 notitle, \ + 'pes_ooCIo3.dat' w lp ls 14 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f4(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f11(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f13(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle, \ + [xmin:xmax] f16(x) w l ls 9 notitle, \ + [xmin:xmax] f17(x) w l ls 9 notitle, \ + [xmin:xmax] f18(x) w l ls 9 notitle + +################################################################################### +################################################################################### + +pause -1 diff --git a/ethylene_cc-pvdz/fit_eq.sh b/ethylene_cc-pvdz/fit_eq.sh new file mode 100755 index 0000000..753c081 --- /dev/null +++ b/ethylene_cc-pvdz/fit_eq.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +if [ -f "fit.log" ]; then + rm "fit.log" +fi + +gnuplot fit_eq.gnu + +grep ^xe fit.log | grep = | sed 's/=//g' | cut -c -30 | + sed 's/xe0 /FCI /g' | + sed 's/xe1 /RHF /g' | + sed 's/xe2 /hfCISD /g' | + sed 's/xe3 /hfCISDT /g' | + sed 's/xe4 /hfCISDTQ /g' | + sed 's/xe5 /hfCIo1 /g' | + sed 's/xe6 /hfCIo1.5 /g' | + sed 's/xe7 /hfCIo2 /g' | + sed 's/xe8 /hfCIo2.5 /g' | + sed 's/xe9 /hfCIo3 /g' | + sed 's/xe10/hfCIo3.5 /g' | + sed 's/xe11/hfCIo4 /g' | + sed 's/xe12/ooCISD /g' | + sed 's/xe13/ooCISDT /g' | + sed 's/xe14/ooCIo1 /g' | + sed 's/xe15/ooCIo1.5 /g' | + sed 's/xe16/ooCIo2 /g' | + sed 's/xe17/ooCIo2.5 /g' | + sed 's/xe18/ooCIo3 /g' > xe.dat + + +grep 'FCI' xe.dat | sed 's/FCI/-0.1 /g' > xe_FCI.dat +grep 'FCI' xe.dat | sed 's/FCI/4.1 /g' >> xe_FCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_CI.dat +grep 'hfCISD ' xe.dat | sed 's/hfCISD/2 /g' >> xe_CI.dat +grep 'hfCISDT ' xe.dat | sed 's/hfCISDT/3 /g' >> xe_CI.dat +grep 'hfCISDTQ' xe.dat | sed 's/hfCISDTQ/4 /g' >> xe_CI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCI.dat +grep 'RHF' xe.dat | sed 's/RHF/1 /g' >> xe_ooCI.dat +grep 'ooCISD ' xe.dat | sed 's/ooCISD/2 /g' >> xe_ooCI.dat +grep 'ooCISDT' xe.dat | sed 's/ooCISDT/3 /g' >> xe_ooCI.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_CIo.dat +grep 'hfCIo1 ' xe.dat | sed 's/hfCIo1/1 /g' >> xe_CIo.dat +grep 'hfCIo1.5' xe.dat | sed 's/hfCIo1.5/1.5 /g' >> xe_CIo.dat +grep 'hfCIo2 ' xe.dat | sed 's/hfCIo2/2 /g' >> xe_CIo.dat +grep 'hfCIo2.5' xe.dat | sed 's/hfCIo2.5/2.5 /g' >> xe_CIo.dat +grep 'hfCIo3 ' xe.dat | sed 's/hfCIo3/3 /g' >> xe_CIo.dat +grep 'hfCIo3.5' xe.dat | sed 's/hfCIo3.5/3.5 /g' >> xe_CIo.dat +grep 'hfCIo4 ' xe.dat | sed 's/hfCIo4/4 /g' >> xe_CIo.dat + +grep 'RHF' xe.dat | sed 's/RHF/0 /g' > xe_ooCIo.dat +grep 'ooCIo1 ' xe.dat | sed 's/ooCIo1/1 /g' >> xe_ooCIo.dat +grep 'ooCIo1.5' xe.dat | sed 's/ooCIo1.5/1.5 /g' >> xe_ooCIo.dat +grep 'ooCIo2 ' xe.dat | sed 's/ooCIo2/2 /g' >> xe_ooCIo.dat +grep 'ooCIo2.5' xe.dat | sed 's/ooCIo2.5/2.5 /g' >> xe_ooCIo.dat +grep 'ooCIo3 ' xe.dat | sed 's/ooCIo3/3 /g' >> xe_ooCIo.dat + +#epspdf fit_eq.eps +#okular fit_eq.pdf diff --git a/ethylene_cc-pvdz/fit_eq_1.gnu b/ethylene_cc-pvdz/fit_eq_1.gnu new file mode 100644 index 0000000..dfc7935 --- /dev/null +++ b/ethylene_cc-pvdz/fit_eq_1.gnu @@ -0,0 +1,161 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +#set terminal postscript eps size 5.3,5.3 enhanced color \ +# font 'Helvetica,24' linewidth 2 +#set output 'fit_eq.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +xmin=2.30 +xmax=2.80 + +set xrange[2.0:3.0] + +# VIEW 1: +#set yrange[-2.3:-1.7] +#set yrange[-2.3:-2.1] +################################################################################### +################################################################################### + +set format y "%.1f" + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" +set style line 3 dt 1 lw 3 linecolor rgb "light-red" +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" +set style line 5 dt 2 lw 3 linecolor rgb "sea-green" +set style line 6 dt 1 lw 3 linecolor rgb "orange" +set style line 7 dt 2 lw 3 linecolor rgb "orange" +set style line 9 dt 1 lw 1 linecolor rgb "purple" + +set xlabel "Distance ({\305})" +set ylabel 'Energy (Hartree)' + +# function for fitting +# +f0(x) = D0*(1-exp(-a0*(x-xe0)))**2+C0 +D0=0.30; a0=1.0; xe0=2.55; C0=-78.0 +fit [xmin:xmax] [*:*] f0(x) 'pes_fci.dat' u 1:($2) via D0,a0,xe0,C0 +# +f1(x) = D1*(1-exp(-a1*(x-xe1)))**2+C1 +D1=0.30; a1=1.0; xe1=2.55; C1=-78.0 +fit [xmin:xmax] [*:*] f1(x) 'pes_rhf.dat' u 1:($2) via D1,a1,xe1,C1 +# +f2(x) = D2*(1-exp(-a2*(x-xe2)))**2+C2 +D2=0.30; a2=1.0; xe2=2.55; C2=-78.0 +fit [xmin:xmax] [*:*] f2(x) 'pes_CISD.dat' u 1:($2) via D2,a2,xe2,C2 +# +f3(x) = D3*(1-exp(-a3*(x-xe3)))**2+C3 +D3=0.30; a3=1.0; xe3=2.55; C3=-78.0 +fit [xmin:xmax] [*:*] f3(x) 'pes_CISDT.dat' u 1:($2) via D3,a3,xe3,C3 +# +f4(x) = D4*(1-exp(-a4*(x-xe4)))**2+C4 +D4=0.30; a4=1.0; xe4=2.55; C4=-78.0 +fit [xmin:xmax] [*:*] f4(x) 'pes_CISDTQ.dat' u 1:($2) via D4,a4,xe4,C4 +# +f5(x) = D5*(1-exp(-a5*(x-xe5)))**2+C5 +D5=0.30; a5=1.0; xe5=2.55; C5=-78.0 +fit [xmin:xmax] [*:*] f5(x) 'pes_CIo1.dat' u 1:($2) via D5,a5,xe5,C5 +# +f6(x) = D6*(1-exp(-a6*(x-xe6)))**2+C6 +D6=0.30; a6=1.0; xe6=2.55; C6=-78.0 +fit [xmin:xmax] [*:*] f6(x) 'pes_CIo1.5.dat' u 1:($2) via D6,a6,xe6,C6 +# +f7(x) = D7*(1-exp(-a7*(x-xe7)))**2+C7 +D7=0.30; a7=1.0; xe7=2.55; C7=-78.0 +fit [xmin:xmax] [*:*] f7(x) 'pes_CIo2.dat' u 1:($2) via D7,a7,xe7,C7 +# +f8(x) = D8*(1-exp(-a8*(x-xe8)))**2+C8 +D8=0.30; a8=1.0; xe8=2.55; C8=-78.0 +fit [xmin:xmax] [*:*] f8(x) 'pes_CIo2.5.dat' u 1:($2) via D8,a8,xe8,C8 +# +f9(x) = D9*(1-exp(-a9*(x-xe9)))**2+C9 +D9=0.30; a9=1.0; xe9=2.55; C9=-78.0 +fit [xmin:xmax] [*:*] f9(x) 'pes_CIo3.dat' u 1:($2) via D9,a9,xe9,C9 +# +f10(x) = D10*(1-exp(-a10*(x-xe10)))**2+C10 +D10=0.30; a10=1.0; xe10=2.55; C10=-78.0 +fit [xmin:xmax] [*:*] f10(x) 'pes_CIo3.5.dat' u 1:($2) via D10,a10,xe10,C10 +# +f11(x) = D11*(1-exp(-a11*(x-xe11)))**2+C11 +D11=0.30; a11=1.0; xe11=2.55; C11=-78.0 +fit [xmin:xmax] [*:*] f11(x) 'pes_CIo4.dat' u 1:($2) via D11,a11,xe11,C11 +# +f12(x) = D12*(1-exp(-a12*(x-xe12)))**2+C12 +D12=0.30; a12=1.0; xe12=2.55; C12=-78.0 +fit [xmin:xmax] [*:*] f12(x) 'pes_ooCISD.dat' u 1:($2) via D12,a12,xe12,C12 +# +#f13(x) = D13*(1-exp(-a13*(x-xe13)))**2+C13 +#D13=0.30; a13=1.0; xe13=2.55; C13=-78.0 +#fit [xmin:xmax] [*:*] f13(x) 'pes_ooCISDT.dat' u 1:($2) via D13,a13,xe13,C13 +# +f14(x) = D14*(1-exp(-a14*(x-xe14)))**2+C14 +D14=0.30; a14=1.0; xe14=2.55; C14=-78.0 +fit [xmin:xmax] [*:*] f14(x) 'pes_ooCIo1.dat' u 1:($2) via D14,a14,xe14,C14 +# +f15(x) = D15*(1-exp(-a15*(x-xe15)))**2+C15 +D15=0.30; a15=1.0; xe15=2.55; C15=-78.0 +fit [xmin:xmax] [*:*] f15(x) 'pes_ooCIo1.5.dat' u 1:($2) via D15,a15,xe15,C15 +# +#f16(x) = D16*(1-exp(-a16*(x-xe16)))**2+C16 +#D16=0.30; a16=1.0; xe16=2.55; C16=-78.0 +#fit [xmin:xmax] [*:*] f16(x) 'pes_ooCIo2.dat' u 1:($2) via D16,a16,xe16,C16 +# +#f17(x) = D17*(1-exp(-a17*(x-xe17)))**2+C17 +#D17=0.30; a17=1.0; xe17=2.55; C17=-78.0 +#fit [xmin:xmax] [*:*] f17(x) 'pes_ooCIo2.5.dat' u 1:($2) via D17,a17,xe17,C17 +# +#f18(x) = D18*(1-exp(-a18*(x-xe18)))**2+C18 +#D18=0.30; a18=1.0; xe18=2.55; C18=-78.0 +#fit [xmin:xmax] [*:*] f18(x) 'pes_ooCIo3.dat' u 1:($2) via D18,a18,xe18,C18 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'pes_rhf.dat' w lp ls 1 notitle, \ + 'pes_CISD.dat' w lp ls 3 notitle, \ + 'pes_CISDT.dat' w lp ls 3 notitle, \ + 'pes_CISDTQ.dat' w lp ls 3 notitle, \ + 'pes_CIo1.dat' w lp ls 4 notitle, \ + 'pes_CIo1.5.dat' w lp ls 5 notitle, \ + 'pes_CIo2.dat' w lp ls 4 notitle, \ + 'pes_CIo2.5.dat' w lp ls 5 notitle, \ + 'pes_CIo3.dat' w lp ls 4 notitle, \ + 'pes_CIo3.5.dat' w lp ls 5 notitle, \ + 'pes_CIo4.dat' w lp ls 4 notitle, \ + 'pes_ooCISD.dat' w lp ls 3 notitle, \ + 'pes_ooCIo1.dat' w lp ls 4 notitle, \ + 'pes_ooCIo1.5.dat' w lp ls 5 notitle, \ + 'pes_ooCIo2.dat' w lp ls 4 notitle, \ + 'pes_fci.dat' w lp ls 2 notitle, \ + [xmin:xmax] f0(x) w l ls 9 notitle, \ + [xmin:xmax] f1(x) w l ls 9 notitle, \ + [xmin:xmax] f2(x) w l ls 9 notitle, \ + [xmin:xmax] f3(x) w l ls 9 notitle, \ + [xmin:xmax] f4(x) w l ls 9 notitle, \ + [xmin:xmax] f5(x) w l ls 9 notitle, \ + [xmin:xmax] f6(x) w l ls 9 notitle, \ + [xmin:xmax] f7(x) w l ls 9 notitle, \ + [xmin:xmax] f8(x) w l ls 9 notitle, \ + [xmin:xmax] f9(x) w l ls 9 notitle, \ + [xmin:xmax] f10(x) w l ls 9 notitle, \ + [xmin:xmax] f11(x) w l ls 9 notitle, \ + [xmin:xmax] f12(x) w l ls 9 notitle, \ + [xmin:xmax] f14(x) w l ls 9 notitle, \ + [xmin:xmax] f15(x) w l ls 9 notitle#, \ +# [xmin:xmax] f13(x) w l ls 9 notitle, \ +# [xmin:xmax] f16(x) w l ls 9 notitle, \ +# [xmin:xmax] f17(x) w l ls 9 notitle, \ +# [xmin:xmax] f18(x) w l ls 9 notitle#, \ + +################################################################################### +################################################################################### + +pause -1 diff --git a/ethylene_cc-pvdz/plot.gnu b/ethylene_cc-pvdz/plot.gnu new file mode 100644 index 0000000..cae49d1 --- /dev/null +++ b/ethylene_cc-pvdz/plot.gnu @@ -0,0 +1,54 @@ +#!/bin/gnuplot + +#r=2.52053 angs + +efci=-78.35584460 + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,18' linewidth 2 +set output 'plot.eps' + +xmin=-0.1 +xmax=3.5 +ymin=0.0 +ymax=1.0 + +set grid + +#set format y "%.0e*10^{%T}" +set format y "10^{%T}" + +#set xrange[-0.1:3.1] +set xrange[-0.1:4.1] +#set yrange[0.0:0.2] + +set logscale y +set yrange[1e-3:1] +#set yrange[1e-4:1.0] + +#set xrange[1.9:3.1] +#set yrange[0.0:0.006] + +set style line 1 dt 1 lw 1 linecolor rgb "gray60" pt 13 ps 1.75 +set style line 3 dt 1 lw 1 linecolor rgb "light-red" pt 13 ps 1.75 +set style line 4 dt 1 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 +set style line 5 dt 2 lw 1 linecolor rgb "sea-green" pt 13 ps 1.75 + +set style line 11 dt 1 lw 1.5 linecolor rgb "gray60" +set style line 13 dt 2 lw 1.5 linecolor rgb "light-red" pt 7 ps 1.75 +set style line 14 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 +set style line 15 dt 2 lw 1.5 linecolor rgb "sea-green" pt 7 ps 1.75 + +set xlabel 'Computational scaling' +set ylabel 'Energy error (Hartree)' + +plot 'r2.52053_ciexc.dat' u 1:($2-efci) w lp ls 3 notitle, \ + 'r2.52053_oociexc.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'r2.52053_oociexc.dat' u 1:($2-efci) w lp ls 13 notitle, \ + 'r2.52053_cio.dat' u 1:($2-efci) w lp ls 4 notitle, \ + 'r2.52053_oocio.dat' u 1:($2-efci) w l ls 11 notitle, \ + 'r2.52053_oocio.dat' u 1:($2-efci) w lp ls 14 notitle + +#pause -1 diff --git a/ethylene_cc-pvdz/plot.sh b/ethylene_cc-pvdz/plot.sh new file mode 100755 index 0000000..f9f68b6 --- /dev/null +++ b/ethylene_cc-pvdz/plot.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot.gnu +epspdf plot.eps +okular plot.pdf diff --git a/ethylene_cc-pvdz/plot_eq.sh b/ethylene_cc-pvdz/plot_eq.sh new file mode 100755 index 0000000..6d67960 --- /dev/null +++ b/ethylene_cc-pvdz/plot_eq.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +grep ^xe fit.log | grep = | sed 's/=//g' | cut -c -30 | + sed 's/xe0 /FCI /g' | + sed 's/xe1 /RHF /g' | + sed 's/xe2 /SD /g' | + sed 's/xe3 /SDT /g' | + sed 's/xe4 /SDTQ /g' | + sed 's/xe5 /o1 /g' | + sed 's/xe6 /o1.5 /g' | + sed 's/xe7 /o2 /g' | + sed 's/xe8 /o2.5 /g' | + sed 's/xe9 /o3 /g' | + sed 's/xe10/o3.5 /g' | + sed 's/xe11/o4 /g' | + sed 's/xe12/ooSD /g' | + sed 's/xe13/ooSDT /g' | + sed 's/xe14/ooo1 /g' | + sed 's/xe15/ooo1.5/g' | + sed 's/xe16/ooo2 /g' | + sed 's/xe17/ooo2.5/g' | + sed 's/xe18/ooo3 /g' #| + diff --git a/ethylene_cc-pvdz/plot_error.sh b/ethylene_cc-pvdz/plot_error.sh new file mode 100755 index 0000000..86447b8 --- /dev/null +++ b/ethylene_cc-pvdz/plot_error.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_error.gnu +epspdf plot_error.eps +okular plot_error.pdf diff --git a/ethylene_cc-pvdz/plot_error_1.gnu b/ethylene_cc-pvdz/plot_error_1.gnu new file mode 100644 index 0000000..7036a18 --- /dev/null +++ b/ethylene_cc-pvdz/plot_error_1.gnu @@ -0,0 +1,69 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_error.png' + +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,16' linewidth 2 +set output 'plot_error.eps' + +xmin=1.50 +xmax=16.0 +ymin=0.0 +ymax=1.0 + +#set xrange[0.95:5.0] +set xrange[1.50:16.0] +# VIEW 1 +#set logscale y +#set yrange[1.0e-3:1.0] +# VIEW 2 +#set yrange[0.0:0.8] +# VIEW 3 +set yrange[0.0:0.3] +# VIEW 4 +#set yrange[0.0:0.02] + +set style line 1 dt 1 lw 2 linecolor rgb "gray" +set style line 2 dt 1 lw 2 linecolor rgb "black" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" +set style line 6 dt 1 lw 2 linecolor rgb "orange" +set style line 7 dt 2 lw 2 linecolor rgb "orange" + +set style line 13 dt 1 lw 2 linecolor rgb "red" +set style line 14 dt 1 lw 2 linecolor rgb "forest-green" +set style line 15 dt 2 lw 2 linecolor rgb "forest-green" + + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy error (Hartree)' + +plot '< paste pes_fci.dat pes_rhf.dat' using 1:($4-$2) w l ls 1 notitle, \ + '< paste pes_fci.dat pes_e2.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_e3.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_e4.dat' using 1:($4-$2) w l ls 3 notitle, \ + '< paste pes_fci.dat pes_CIo1.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo1.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo2.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_CIo2.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo3.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_CIo3.5.dat' using 1:($4-$2) w l ls 5 notitle, \ + '< paste pes_fci.dat pes_CIo4.dat' using 1:($4-$2) w l ls 4 notitle, \ + '< paste pes_fci.dat pes_ooCIe2.dat' using 1:($4-$2) w l ls 13 notitle, \ + '< paste pes_fci.dat pes_ooCIo1.dat' using 1:($4-$2) w l ls 15 notitle, \ + '< paste pes_fci.dat pes_fci.dat' using 1:($4-$2) w l ls 2 notitle +# '< paste pes_fci.dat pes_ooCISD.dat' using 1:($4-$2) w l ls 13 notitle, \ +# '< paste pes_fci.dat pes_ooCIo1.dat' using 1:($4-$2) w l ls 15 notitle, \ +# '< paste pes_fci.dat pes_ooCIo2.dat' using 1:($4-$2) w l ls 14 notitle, \ +# '< paste pes_fci.dat pes_pccd.dat' using 1:($4-$2) w l ls 6 notitle, \ +# '< paste pes_fci.dat pes_s0.e2.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e2.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e3.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s4.e3.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s0.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s2.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ +# '< paste pes_fci.dat pes_s4.e4.dat' using 1:($4-$2) w l ls 1 notitle, \ + +#pause -1 diff --git a/ethylene_cc-pvdz/plot_pes.sh b/ethylene_cc-pvdz/plot_pes.sh new file mode 100755 index 0000000..2aa451d --- /dev/null +++ b/ethylene_cc-pvdz/plot_pes.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot plot_pes.gnu +epspdf plot_pes.eps +okular plot_pes.pdf diff --git a/ethylene_cc-pvdz/plot_pes_1.gnu b/ethylene_cc-pvdz/plot_pes_1.gnu new file mode 100644 index 0000000..70711fd --- /dev/null +++ b/ethylene_cc-pvdz/plot_pes_1.gnu @@ -0,0 +1,98 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' + +set terminal postscript eps size 5.3,3.0 enhanced color \ + font 'Helvetica,16' linewidth 2 +set output 'plot_pes.eps' + +xmin=1.5 +xmax=16.0 +ymin=-78.36 +ymax=-77.8 + +#set xrange[0.95:6.0] +set xrange[1.5:16.0] +# VIEW 1: +set yrange[-78.36:-77.8] +# VIEW 2: +#set yrange[-199.11:-198.90] + +set style line 1 dt 1 lw 2 linecolor rgb "gray" +set style line 2 dt 1 lw 2 linecolor rgb "black" +set style line 3 dt 1 lw 2 linecolor rgb "light-red" +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" +set style line 5 dt 2 lw 2 linecolor rgb "sea-green" +set style line 6 dt 1 lw 2 linecolor rgb "orange" +set style line 7 dt 2 lw 2 linecolor rgb "orange" + +set style line 13 dt 1 lw 2 linecolor rgb "red" +set style line 14 dt 1 lw 2 linecolor rgb "forest-green" +set style line 15 dt 2 lw 2 linecolor rgb "forest-green" + +set xlabel 'Distance (angstrom)' +set ylabel 'Energy (Hartree)' + +# get the relation of x- and y-range +dx = xmax-xmin +dy = ymax-ymin +s1 = dx/dy +# get ratio of axes +s2 = 3.0/5.3 +# helper function for getting the rotation angle of the labels in degree +deg(x) = x/pi*180.0 +r(x) = deg(atan(s1*s2*x)) +# function for fitting +f(x) = a*x+b + +fit [1.6:2.0] [*:*] f(x) 'pes_rhf.dat' u 1:($2) via a,b +#set label 1 'RHF' at 1.8,-198.60 rotate by r(a) center tc ls 1 #font 'Verdana,20' + +fit [5.0:7.0] [*:*] f(x) 'pes_e2.dat' u 1:($2) via a,b +set label 2 'CISD' at 5.0,-198.91 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [5.0:7.0] [*:*] f(x) 'pes_e3.dat' u 1:($2) via a,b +set label 3 'CISDT' at 5.0,-198.95 rotate by r(a) center tc ls 3 #font 'Verdana,20' +fit [5.0:7.0] [*:*] f(x) 'pes_e4.dat' u 1:($2) via a,b +set label 4 'CISDTQ' at 5.0,-199.037 rotate by r(a) center tc ls 3 #font 'Verdana,20' + +fit [7.0:9.0] [*:*] f(x) 'pes_CIo2.dat' u 1:($2) via a,b +set label 12 'CIo2' at 7.0,-198.923 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [7.0:9.0] [*:*] f(x) 'pes_CIo3.dat' u 1:($2) via a,b +set label 13 'CIo3' at 7.0,-199.037 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [7.0:9.0] [*:*] f(x) 'pes_CIo4.dat' u 1:($2) via a,b +set label 14 'CIo4' at 7.0,-199.062 rotate by r(a) center tc ls 4 #font 'Verdana,20' +fit [7.0:9.0] [*:*] f(x) 'pes_fci.dat' u 1:($2) via a,b +set label 20 'FCI' at 9.0,-199.062 rotate by r(a) center tc ls 2 #font 'Verdana,20' + + +plot 'pes_rhf.dat' w l ls 1 notitle, \ + 'pes_e2.dat' w l ls 3 notitle, \ + 'pes_e3.dat' w l ls 3 notitle, \ + 'pes_e4.dat' w l ls 3 notitle, \ + 'pes_CIo1.dat' w l ls 5 notitle, \ + 'pes_CIo1.5.dat' w l ls 5 notitle, \ + 'pes_CIo2.dat' w l ls 4 notitle, \ + 'pes_CIo2.5.dat' w l ls 5 notitle, \ + 'pes_CIo3.dat' w l ls 4 notitle, \ + 'pes_CIo3.5.dat' w l ls 5 notitle, \ + 'pes_CIo4.dat' w l ls 4 notitle, \ + 'pes_ooCIe2.dat' w l ls 13 notitle, \ + 'pes_ooCIo1.dat' w l ls 15 notitle, \ + 'pes_fci.dat' w l ls 2 notitle +# 'pes_ooCISD.dat' w l ls 13 notitle, \ +# 'pes_ooCIo1.dat' w l ls 15 notitle, \ +# 'pes_ooCIo2.dat' w l ls 14 notitle, \ +# 'pes_ooCIo1.5.dat' w l ls 15 notitle, \ +# 'pes_pccd.dat' w l ls 6 notitle, \ +# 'pes_ccsd.dat' w l ls 6 notitle, \ +# 'pes_ccsdt.dat' w l ls 6 notitle, \ +# 'pes_s0.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e2.dat' w l ls 1 notitle, \ +# 'pes_s2.e3.dat' w l ls 1 notitle, \ +# 'pes_s4.e3.dat' w l ls 1 notitle, \ +# 'pes_s0.e4.dat' w l ls 1 notitle, \ +# 'pes_s2.e4.dat' w l ls 1 notitle, \ +# 'pes_s4.e4.dat' w l ls 1 notitle, \ + +#pause -1 diff --git a/ethylene_cc-pvdz/plot_stat.gnu b/ethylene_cc-pvdz/plot_stat.gnu new file mode 100644 index 0000000..a92f261 --- /dev/null +++ b/ethylene_cc-pvdz/plot_stat.gnu @@ -0,0 +1,51 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'plot_stat.eps' + +set format y "10^{%T}" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] +set yrange[1e-2:1] + +################################################################################### +################################################################################### + +set xtics 1 +set mxtics 1 +set logscale y + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.13 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 3 dt 1 lw 2 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 2 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel 'Nonparallelity error (Hartree)' + +plot 'stat_CI.dat' u 1:($2) w lp ls 3 notitle, \ + 'stat_CIo.dat' u 1:($2) w lp ls 4 notitle + +unset ylabel +unset label + +plot 'stat_ooCI.dat' u 1:($2) w lp ls 13 notitle, \ + 'stat_ooCIo.dat' u 1:($2) w lp ls 14 notitle diff --git a/ethylene_cc-pvdz/plot_stat.sh b/ethylene_cc-pvdz/plot_stat.sh new file mode 100755 index 0000000..54c9118 --- /dev/null +++ b/ethylene_cc-pvdz/plot_stat.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +./compute_NPE.pl 1 16.0 +./compute_NPE.pl 2 16.0 +./compute_NPE.pl 3 16.0 +./compute_NPE.pl 4 16.0 + +gnuplot plot_stat.gnu +epspdf plot_stat.eps +okular plot_stat.pdf diff --git a/ethylene_cc-pvdz/xe.gnu b/ethylene_cc-pvdz/xe.gnu new file mode 100644 index 0000000..d2ead0c --- /dev/null +++ b/ethylene_cc-pvdz/xe.gnu @@ -0,0 +1,70 @@ +#!/bin/gnuplot + +#set terminal pngcairo size 600,600 enhanced font 'Verdana,10' +#set output 'plot_pes.png' +#set terminal postscript eps size 5.3,3.0 enhanced color \ + +set terminal postscript eps size 5.3,5.3 enhanced color \ + font 'Helvetica,24' linewidth 2 +set output 'xe.eps' +set encoding iso_8859_1 + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: +set xrange[-0.1:4.1] + +# VIEW 1: +set yrange[2.49:2.57] +set format y "%.2f" +################################################################################### +################################################################################### + +set xtics 1 +set ytics 0.01 + +set grid xtics ytics mxtics mytics #lc rgb 'blue' lt 1, lc rgb 'red' lt 1 + +if (!exists("MP_LEFT")) MP_LEFT = 0.15 +if (!exists("MP_RIGHT")) MP_RIGHT = 0.98 +if (!exists("MP_BOTTOM")) MP_BOTTOM = 0.10 +if (!exists("MP_TOP")) MP_TOP = 0.97 +if (!exists("MP_xGAP")) MP_xGAP = 0.08 +if (!exists("MP_yGAP")) MP_yGAP = 0.08 + +set multiplot layout 1,2 rowsfirst \ + margins screen MP_LEFT, MP_RIGHT, MP_BOTTOM, MP_TOP spacing screen MP_xGAP, MP_yGAP + +set style line 1 dt 1 lw 3 linecolor rgb "gray60" +set style line 2 dt 1 lw 3 linecolor rgb "black" + +set style line 3 dt 1 lw 3 linecolor rgb "light-red" pt 13 ps 2 +set style line 4 dt 1 lw 3 linecolor rgb "sea-green" pt 13 ps 2 +set style line 13 dt 1 lw 2 linecolor rgb "light-red" pt 7 ps 2 +set style line 14 dt 1 lw 2 linecolor rgb "sea-green" pt 7 ps 2 + +set xlabel 'Computational scaling' +set ylabel "Equilibrium distance ({\305})" + +################################################################################### +################################################################################### +# SYSTEM DEPENDENT PART: + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_CI.dat' w lp ls 3 notitle, \ + 'xe_CIo.dat' w lp ls 4 notitle#, \ +# 'xe_ooCI.dat' w lp ls 13 notitle, \ +# 'xe_ooCIo.dat' w lp ls 14 notitle + +unset ylabel +unset label +set format y "" + +plot 'xe_FCI.dat' w l ls 2 notitle, \ + 'xe_ooCI.dat' w lp ls 13 notitle, \ + 'xe_ooCIo.dat' w lp ls 14 notitle + +################################################################################### +################################################################################### + +#pause -1 diff --git a/ethylene_cc-pvdz/xe.sh b/ethylene_cc-pvdz/xe.sh new file mode 100755 index 0000000..2896546 --- /dev/null +++ b/ethylene_cc-pvdz/xe.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +gnuplot xe.gnu +epspdf xe.eps +okular xe.pdf