Browse Source

Tweak scripts for catalogue

master
Jean-Sébastien 2 years ago
parent
commit
362d856e74

+ 1
- 1
scripts/build_LiebLin_c_scan_k_fixed.sh View File

@@ -78,7 +78,7 @@ basedir="$(pwd)"
78 78
 for c in $clist
79 79
 do
80 80
     echo '** Starting run for c =' $c', N = '$N
81
-    dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/N_'$N'/data/store/c_'$c
81
+    dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/data/N_'$N'/c_'$c
82 82
     mkdir -p $dir
83 83
     cd $dir
84 84
     LiebLin_DSF $whichDSF $c $N $N $iK $iK $kBT $Max_Secs $target_sumrule $refine

+ 1
- 1
scripts/build_LiebLin_c_scan_k_fixed_dsfs.sh View File

@@ -84,7 +84,7 @@ basedir="$(pwd)"
84 84
 for c in $clist
85 85
 do
86 86
     echo '** Starting computation of DSFs for c =' $c', N = '$N
87
-    dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/N_'$N'/data/store/c_'$c
87
+    dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/data/N_'$N'/c_'$c
88 88
     cd $dir
89 89
     Smoothen_LiebLin_DSF_Scaled $whichDSF $c $N $N $iK $iK $kBT 0 $ommin $ommax $Nom $width
90 90
     cd $basedir

+ 2
- 2
scripts/build_LiebLin_c_scan_k_fixed_dsfs_plot.sh View File

@@ -82,9 +82,9 @@ done
82 82
 basedir="$(pwd)"
83 83
 
84 84
 echo '** Starting run for N = '$N
85
-dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/N_'$N'/data/plots'
85
+dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/plots'
86 86
 mkdir -p $dir
87 87
 cd $dir
88
-plot_c_scan_k_fixed_dsfs.py $width
88
+plot_c_scan_k_fixed_dsfs.py $N $width
89 89
 cd $basedir
90 90
 echo ' Successfully computed DSFs for N = '$N'.\n'

+ 1
- 1
scripts/build_LiebLin_catalogue_k_fixed.sh View File

@@ -63,7 +63,7 @@ do
63 63
     for nk in {1..16}
64 64
     do
65 65
 	echo '** Starting run for c =' $c', kfact = '$nk | tee -a $logfile
66
-	dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_'$c'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/prelim'
66
+	dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed/c_'$c'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/prelim'
67 67
 	mkdir -p $dir
68 68
 	cd $dir
69 69
 	LiebLin_Catalogue_Fixed_c_k_Nscaling $whichDSF $c $nk $kBT $target_sumrule 0 $nr_minutes | tee -a $basedir/$logfile

+ 1
- 1
scripts/build_LiebLin_catalogue_k_fixed_dsfs.sh View File

@@ -61,7 +61,7 @@ do
61 61
 	# Number of points:
62 62
 	Nom=1000
63 63
 	echo 'Starting computation of DSFs for c =' $c', kfact = '$nk
64
-	dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_'$c'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/data'
64
+	dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed/c_'$c'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/data'
65 65
 	cd $dir
66 66
 	for datadir in *
67 67
 	do

+ 1
- 1
scripts/build_LiebLin_catalogue_k_fixed_dsfs_plots.sh View File

@@ -49,7 +49,7 @@ do
49 49
     for nk in {1..16}
50 50
     do
51 51
 	echo '** Starting plotting of DSFs for c =' $c', k = '$nk' kFo4.'
52
-	dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_'$c'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/plots'
52
+	dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed/c_'$c'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/store/plots'
53 53
 	mkdir -p $dir
54 54
 	cd $dir
55 55
 	# Move all K_, Omega_ and .dsfs files to the plots directory

+ 21
- 7
scripts/plot_c_scan_k_fixed_dsfs.py View File

@@ -13,15 +13,16 @@ import numpy as np
13 13
 import os
14 14
 import sys
15 15
 
16
-width = str(sys.argv[1])
16
+N = str(sys.argv[1])
17
+width = str(sys.argv[2])
17 18
 
18 19
 
19 20
 # Get the list of interactions which have been computed
20
-dirlist = os.listdir('../store/')
21
+dirlist = os.listdir('../data/N_%s' % N)
21 22
 clist = sorted([float(c.lstrip('c_')) for c in dirlist])
22 23
 
23 24
 # Get the Omega file
24
-omegafile = glob.glob('../store/c_%s*/Omega*' % str(clist[0]).rstrip('.0')[:12])[0]
25
+omegafile = glob.glob('../data/N_%s/c_%s*/Omega*' % (N, str(clist[0]).rstrip('.0')[:12]))[0]
25 26
 omega = np.loadtxt(omegafile)
26 27
 
27 28
 # Load all the available dsfs from the data store
@@ -31,11 +32,22 @@ for c in clist:
31 32
     # first try for exact match, stripping '.0' to treat integer values, e.g. 4.0 into 4
32 33
     # and then (if it doesn't work) use only the first 12 characters, plus wildcard, to cover rounding errors
33 34
     try:
34
-        dsffile = glob.glob('../store/c_%s/*_w_%s.dsfs' % (str(c).rstrip('.0'), width))[0]
35
+        dsffile = glob.glob('../data/N_%s/c_%s/*_w_%s.dsfs' % (N, str(c).rstrip('.0'), width))[0]
35 36
     except IndexError:
36
-        dsffile = glob.glob('../store/c_%s*/*_w_%s.dsfs' % (str(c).rstrip('.0')[:12], width))[0]
37
+        dsffile = glob.glob('../data/N_%s/c_%s*/*_w_%s.dsfs' % (N, str(c).rstrip('.0')[:12], width))[0]
37 38
     dsfs[str(c)] = np.loadtxt(dsffile)
38 39
 
40
+# Read some useful parameters from (last) file name:
41
+elements = dsffile.rpartition('/')[2].split('_')
42
+L = elements[5]
43
+#N = elements[7]
44
+iK = elements[12]
45
+width = elements[20].rpartition('.')[0]
46
+# which leads to
47
+rho = int(N)/int(L)
48
+kokF = int(iK)*0.5/int(L)
49
+
50
+
39 51
 fig, ax = plt.subplots()
40 52
 
41 53
 ax.set_xlim(omega[0], omega[-1])
@@ -43,9 +55,10 @@ ax.set_xlim(omega[0], omega[-1])
43 55
 dsfsmax = max(dsfs[str(clist[0])])
44 56
 print('dsfsmax = ', dsfsmax)
45 57
 
46
-ymax = 1.2 * dsfsmax
58
+ymax = 1.01 * dsfsmax
59
+ymax=4
47 60
 xtext = 0.6 * omega[-1]
48
-ytext = 1.1 * dsfsmax
61
+ytext = 0.9 * ymax
49 62
 
50 63
 ax.set_ylim([0, ymax])
51 64
 ax.text(xtext, ytext, f'c = {clist[0]}')
@@ -54,6 +67,7 @@ def animate(i):
54 67
     ax.clear()
55 68
     ax.set_xlim(omega[0], omega[-1])
56 69
     ax.set_ylim([0, ymax])
70
+    ax.set_title(f'c scan, rho={rho} (N={N}), k={kokF}k_F, w={width}')
57 71
     ax.text(xtext, ytext, f'c = {clist[i]:10.6f}')
58 72
     ax.plot(omega, dsfs[str(clist[i])])
59 73
 

+ 1
- 1
src/EXECS/LiebLin_Catalogue_Fixed_c_k_Nscaling.cc View File

@@ -30,7 +30,7 @@ int main(int argc, char* argv[])
30 30
     cout << "char whichDSF \t\t Which structure factor should be calculated ?  Options are:  "
31 31
       "d for rho rho, g for psi psi{dagger}, o for psi{dagger} psi" << endl;
32 32
     cout << "DP c_int \t\t Value of the interaction parameter:  use positive real values only" << endl;
33
-    cout << "int kfact \t\t momentum factor: momemntum will be set to kfact * kF/4" << endl;
33
+    cout << "int kfact \t\t momentum factor: momentum will be set to kfact * kF/4" << endl;
34 34
     cout << "DP kBT \t\t Temperature (positive only of course)" << endl;
35 35
     cout << "DP target_sumrule \t sumrule saturation you're satisfied with" << endl;
36 36
     cout << "int Hrs \t\t Allowed computational time (hours)" << endl;

Loading…
Cancel
Save