#!/home/soroush/gnuplot/bin/gnuplot -persist
#!/home/soroush/gnuplot/bin/gnuplot -persist

set terminal postscript portrait enhanced color dashed lw 1.5 font 'Arial-Bold, 20'  
set output "Figure_2_4.ps"
set size 3,3
set origin 0,0
set key autotitle columnhead font 'Arial-Bold,20' out horiz top 


set multiplot layout 3,3
set label 1 '(d)' at screen 0.85,1.25 font 'Arial-Bold 20'
set label 2 '(e)' at screen 1.75,1.25 font 'Arial-Bold 20'
set label 3 '(f)' at screen 2.65,1.25 font 'Arial-Bold 20'
set label 5 '(a)' at screen 0.85,1.95 font 'Arial-Bold 20'
set label 6 '(b)' at screen 1.75,1.95 font 'Arial-Bold 20'
set label 7 '(c)' at screen 2.65,1.95 font 'Arial-Bold 20'




set key autotitle columnhead font 'Arial-Bold,20' out horiz right top 
set xrange [ -0.5 : 6.5 ]
set size ratio 1.2
set ylabel '{/Symbol D}U (eV/H_2O)' font 'Arial-Bold, 20'
set tics font 'Arial-Bold,20'
set border lw 1.5
unset logscale y
set grid
set grid lc rgb '#D3D3D3  lw 0.5'


unset key
unset title 
set size 0.9,2
set origin 0,0.0
set ylabel 'E_{coh}^{kin+XC} (eV/H_2O)' font 'Arial-Bold, 20'  offset +1.5
plot "Figure_2_4-dft-xc.txt" using ($2):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 1 pt 7 lc 7, "" using ($3):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 1 pt 8 lc 8, "" using ($4):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 9 lc 9, "" using ($5):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 10 lc 10, "" using ($6):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 11 lc 11



unset key
set size 0.9,2
set origin 0.9,0
set ylabel 'E_{coh}^{Coul} (eV/H_2O)' font 'Arial-Bold, 20'  offset +1.5
plot "Figure_2_4-dft-col.txt" using ($2):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 1 pt 7 lc 7, "" using ($3):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 1 pt 8 lc 8, "" using ($4):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 9 lc 9, "" using ($5):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 10 lc 10, "" using ($6):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 11 lc 11

set size 0.9,2
set origin 1.8,0
set yrange [:0.17]
set ylabel 'E_{coh}^{vdW} (eV/H_2O)' font 'Arial-Bold, 20'  offset +1.5
plot "Figure_2_4-dft-vdw.txt" using ($2):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 1 pt 7 lc 7, "" using ($3):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 1 pt 8 lc 8, "" using ($4):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 9 lc 9, "" using ($5):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 10 lc 10, "" using ($6):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 11 lc 11


unset yrange
unset key
set size 0.9,2
set origin 0,0.7
set ylabel 'E_{coh}^{mol}+ E_{coh}^{LJ-r} (eV/H_2O)' font 'Arial-Bold, 20' offset +1.5
plot "Figure_2_4-lammps-mol-paul.txt" using ($2):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 2 pt 1, "" using ($3):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 3 pt 2, "" using ($4):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 4 pt 3, "" using ($5):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 5 pt 4, "" using ($6):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 7 pt 6



unset key
set size 0.9,2
set origin 0.9,0.7
set ylabel 'E_{coh}^{Coul} (eV/H_2O)' font 'Arial-Bold, 20' offset +1.5
plot "Figure_2_4-lammps-col.txt" using ($2):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 2 pt 1, "" using ($3):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 3 pt 2, "" using ($4):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 4 pt 3, "" using ($5):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 5 pt 4, "" using ($6):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 7 pt 6


unset key
set size 0.9,2
set origin 1.8,0.7
set ylabel 'E_{coh}^{LJ-a} (eV/H_2O)' font 'Arial-Bold, 20'  offset +1.5
plot "Figure_2_4-lammps-vdw-paul.txt" using ($2):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 2 pt 1, "" using ($3):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 3 pt 2, "" using ($4):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 4 pt 3, "" using ($5):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 5 pt 4, "" using ($6):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 7 pt 6

set size 2,0.5
set origin 1.1,0.19
set key outside horizontal 
set border 0 
unset title
unset tics
unset xlabel
unset ylabel
set yrange [0:0.001]
set xrange [0:0.001]

plot "Figure_2_4-lable.txt" using ($2):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 2 pt 1 lc 1, "" using ($3):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 3 pt 2 lc 2, "" using ($4):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 4 pt 3 lc 3, "" using ($5):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 5 pt 4 lc 4, "" using ($6):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 7 pt 6 lc 5, "" using ($8):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 1 pt 7 lc 7, "" using ($9):xticlabels(1) with linespoints  lw 2 ps 1.5 dt 1 pt 8 lc 8, "" using ($10):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 9 lc 9, "" using ($11):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 10 lc 10, "" using ($12):xticlabels(1)  with linespoints  lw 2 ps 1.5 dt 1 pt 11 lc 11

unset multiplot


