Browse Source

Fix uncommitted changes from previously

master
Jean-Sébastien Caux 1 year ago
parent
commit
6ea82da104

+ 2
- 2
Makefile View File

@@ -26,7 +26,7 @@ BIN_DIR = $(BASE_DIR)/bin
26 26
 SRC_EXT = cc
27 27
 
28 28
 # Compiler choice
29
-CXX = g++-11.2
29
+CXX = g++
30 30
 CXXFLAGS = -fopenmp
31 31
 LDFLAGS = -O3 -w -fopenmp
32 32
 # Compilation command
@@ -85,7 +85,7 @@ $(LIB_DIR)/lib$(VERSION).a : $(OBJECTS)
85 85
 ###########################################
86 86
 # Parallel version
87 87
 
88
-.PHONE: parallel
88
+.PHONY: parallel
89 89
 parallel : $(EXECUTABLES_PAR)
90 90
 
91 91
 $(EXECUTABLES_PAR): $(BIN_DIR)/%: $(SRC_DIR)/EXECS/%.$(SRC_EXT) $(LIB_DIR)/lib$(VERSION).a

+ 21
- 9
include/ABACUS_Scan.h View File

@@ -25,12 +25,20 @@ namespace ABACUS {
25 25
   // Functions in src/UTILS/Data_File_Name.cc:
26 26
   void Data_File_Name (std::stringstream& name, char whichDSF, DP c_int, DP L, int N,
27 27
 		       int iKmin, int iKmax, DP kBT, DP L2, std::string defaultname);
28
+  std::string Data_Filename (char whichDSF, DP c_int, DP L, int N,
29
+			     int iKmin, int iKmax, DP kBT, DP L2, std::string defaultname);
28 30
   void Data_File_Name (std::stringstream& name, char whichDSF, int iKmin, int iKmax, DP kBT,
29 31
 		       LiebLin_Bethe_State& State, LiebLin_Bethe_State& RefScanState, std::string defaultname);
32
+  std::string Data_Filename (char whichDSF, int iKmin, int iKmax, DP kBT,
33
+			     LiebLin_Bethe_State& State, LiebLin_Bethe_State& RefScanState, std::string defaultname);
30 34
   void Data_File_Name (std::stringstream& name, char whichDSF, DP Delta, int N, int M, int iKmin, int iKmax,
31 35
 		       DP kBT, int N2, std::string defaultname);
36
+  std::string Data_Filename (char whichDSF, DP Delta, int N, int M, int iKmin, int iKmax,
37
+			     DP kBT, int N2, std::string defaultname);
32 38
   void Data_File_Name (std::stringstream& name, char whichDSF, int iKmin, int iKmax, DP kBT,
33 39
 		       Heis_Bethe_State& State, Heis_Bethe_State& RefScanState, std::string defaultname);
40
+  std::string Data_Filename (char whichDSF, int iKmin, int iKmax, DP kBT,
41
+			     Heis_Bethe_State& State, Heis_Bethe_State& RefScanState, std::string defaultname);
34 42
   void ODSLF_Data_File_Name (std::stringstream& name, char whichDSF, DP Delta, int N, int M,
35 43
 			     int iKmin, int iKmax, DP kBT, int N2, std::string defaultname);
36 44
   void Data_File_Name (std::stringstream& name, char whichDSF, int iKmin, int iKmax, DP kBT,
@@ -149,8 +157,10 @@ namespace ABACUS {
149 157
     Scan_Info();  // constructor, puts everything to zero
150 158
     Scan_Info (DP sr, DP Nf, long long int Ni, long long int Nd, long long int Ndc, long long int Ndc0, double t);
151 159
 
152
-    void Save (const char* outfile_Cstr);
153
-    void Load (const char* infile_Cstr);
160
+    // void Save (const char* outfile_Cstr);
161
+    // void Load (const char* infile_Cstr);
162
+    void Save (std::string outfile_str);
163
+    void Load (std::string infile_str);
154 164
 
155 165
     inline Scan_Info& operator = (const Scan_Info& ref_info)
156 166
     {
@@ -409,8 +419,10 @@ namespace ABACUS {
409 419
     inline void Raise_Scanning_Flags (DP threshold); // checks whether base/type should be scanned based on simpler base/type combinations
410 420
 
411 421
     inline void Order_in_SRC ();
412
-    inline void Save_Info (const char* sumfile_Cstr);
413
-    inline void Load_Info (const char* sumfile_Cstr);
422
+    // inline void Save_Info (const char* sumfile_Cstr);
423
+    // inline void Load_Info (const char* sumfile_Cstr);
424
+    inline void Save_Info (std::string sumfile_str);
425
+    inline void Load_Info (std::string sumfile_str);
414 426
   };
415 427
 
416 428
   // Do the explicit class specializations:
@@ -775,11 +787,11 @@ namespace ABACUS {
775 787
     }
776 788
 
777 789
   template<class Tstate>
778
-    inline void Scan_State_List<Tstate>::Save_Info (const char* sumfile_Cstr)
790
+  inline void Scan_State_List<Tstate>::Save_Info (std::string sumfile_str)
779 791
     {
780 792
       std::ofstream outfile;
781 793
 
782
-      outfile.open(sumfile_Cstr);
794
+      outfile.open(sumfile_str);
783 795
       if (outfile.fail()) ABACUSerror("Could not open outfile... ");
784 796
 
785 797
       outfile.setf(std::ios::fixed);
@@ -803,12 +815,12 @@ namespace ABACUS {
803 815
     }
804 816
 
805 817
   template<class Tstate>
806
-    inline void Scan_State_List<Tstate>::Load_Info (const char* sumfile_Cstr)
818
+  inline void Scan_State_List<Tstate>::Load_Info (std::string sumfile_str)
807 819
     {
808 820
       std::ifstream infile;
809
-      infile.open(sumfile_Cstr);
821
+      infile.open(sumfile_str);
810 822
       if(infile.fail()) {
811
-	std::cout << std::endl << sumfile_Cstr << std::endl;
823
+	std::cout << std::endl << sumfile_str << std::endl;
812 824
 	ABACUSerror("Could not open input file in Scan_State_List::Load_Info.");
813 825
       }
814 826
 

+ 6
- 0
include/ABACUS_Utils.h View File

@@ -39,6 +39,12 @@ namespace ABACUS {
39 39
 
40 40
   // Inexplicably missing string functions in standard library:
41 41
 
42
+  inline std::string DP_to_string (DP value) {
43
+    std::stringstream s;
44
+    s << std::setprecision(16) << value;
45
+    return s.str();
46
+  }
47
+
42 48
   inline std::string replace(const std::string& str,
43 49
 			     const std::string& from,
44 50
 			     const std::string& to) {

+ 1
- 1
scripts/Histograms.py View File

@@ -15,6 +15,6 @@ fig = go.Figure()
15 15
 for datafilename in args.filenames:
16 16
 	data = numpy.loadtxt(datafilename, delimiter="\t", usecols=[0,1,2,3])
17 17
 	x = [line[0] for line in data]
18
-	y = [line[3] for line in data]
18
+	y = [line[2] for line in data]
19 19
 	fig.add_trace(go.Bar(x=x, y=y))
20 20
 fig.show()

+ 51
- 21
src/SCAN/General_Scan.cc View File

@@ -230,6 +230,7 @@ namespace ABACUS {
230 230
     int Max_Secs_used = int(0.9 * Max_Secs); // we don't start any new ithread loop beyond this point
231 231
     int Max_Secs_alert = int(0.95 * Max_Secs); // we break any ongoing ithread loop beyond this point
232 232
 
233
+    /* TO_STR
233 234
     stringstream filenameprefix;
234 235
     Data_File_Name (filenameprefix, whichDSF, iKmin, iKmax, kBT,
235 236
 		    AveragingState, SeedScanState, defaultScanStatename);
@@ -239,7 +240,14 @@ namespace ABACUS {
239 240
 	filenameprefix << "_" << rank[r] << "_" << nr_processors[r];
240 241
 
241 242
     string prefix = filenameprefix.str();
243
+    */
244
+    string prefix = Data_Filename(whichDSF, iKmin, iKmax, kBT,
245
+				  AveragingState, SeedScanState, defaultScanStatename);
246
+    if (in_parallel)
247
+      for (int r = 0; r < paralevel; ++r)
248
+	prefix += "_" + to_string(rank[r]) + "_" + to_string(nr_processors[r]);
242 249
 
250
+    /* TO_STR
243 251
     stringstream filenameprefix_prevparalevel;
244 252
     // without the rank and nr_processors of the highest paralevel
245 253
 
@@ -249,7 +257,15 @@ namespace ABACUS {
249 257
 		       filenameprefix << "_" << rank[r] << "_" << nr_processors[r];
250 258
 
251 259
     string prefix_prevparalevel = filenameprefix_prevparalevel.str();
260
+    */
261
+    // without the rank and nr_processors of the highest paralevel
262
+    string prefix_prevparalevel = Data_Filename(whichDSF, iKmin, iKmax, kBT,
263
+						AveragingState, SeedScanState, defaultScanStatename);
264
+    if (in_parallel)
265
+      for (int r = 0; r < paralevel - 1; ++r)
266
+	prefix_prevparalevel += "_" + to_string(rank[r]) + "_" + to_string(nr_processors[r]);
252 267
 
268
+    /* TO_STR
253 269
     stringstream RAW_stringstream;    string RAW_string;
254 270
     stringstream INADM_stringstream;    string INADM_string;
255 271
     stringstream CONV0_stringstream;    string CONV0_string;
@@ -280,55 +296,66 @@ namespace ABACUS {
280 296
     SUM_string = SUM_stringstream.str();    const char* SUM_Cstr = SUM_string.c_str();
281 297
 
282 298
     THRDIR_string = THRDIR_stringstream.str();
299
+    */
300
+    string RAW_str = prefix + ".raw";
301
+    string INADM_str = prefix + ".inadm";
302
+    string CONV0_str = prefix + ".conv0";
303
+    string STAT_str = prefix + ".stat";
304
+    string LOG_str = prefix + ".log";
305
+    string THR_str = prefix + ".thr";
306
+    string THRDIR_str = prefix + "_thrdir";
307
+    string SRC_str = prefix + ".src";
308
+    string SUM_str = prefix + ".sum";
309
+
283 310
 
284 311
     fstream RAW_outfile;
285
-    if (!refine || in_parallel) RAW_outfile.open(RAW_Cstr, fstream::out | fstream::trunc);
286
-    else RAW_outfile.open(RAW_Cstr, fstream::out | fstream::app);
312
+    if (!refine || in_parallel) RAW_outfile.open(RAW_str, fstream::out | fstream::trunc);
313
+    else RAW_outfile.open(RAW_str, fstream::out | fstream::app);
287 314
     if (RAW_outfile.fail()) {
288
-      cout << RAW_Cstr << endl;
315
+      cout << RAW_str << endl;
289 316
       ABACUSerror("Could not open RAW_outfile... ");
290 317
     }
291 318
     RAW_outfile.precision(16);
292 319
 
293 320
     fstream INADM_outfile;
294
-    if (!refine || in_parallel) INADM_outfile.open(INADM_Cstr, fstream::out | fstream::trunc);
295
-    else INADM_outfile.open(INADM_Cstr, fstream::out | fstream::app);
321
+    if (!refine || in_parallel) INADM_outfile.open(INADM_str, fstream::out | fstream::trunc);
322
+    else INADM_outfile.open(INADM_str, fstream::out | fstream::app);
296 323
     if (INADM_outfile.fail()) ABACUSerror("Could not open INADM_outfile... ");
297 324
     INADM_outfile.precision(16);
298 325
 
299 326
     fstream CONV0_outfile;
300
-    if (!refine || in_parallel) CONV0_outfile.open(CONV0_Cstr, fstream::out | fstream::trunc);
301
-    else CONV0_outfile.open(CONV0_Cstr, fstream::out | fstream::app);
327
+    if (!refine || in_parallel) CONV0_outfile.open(CONV0_str, fstream::out | fstream::trunc);
328
+    else CONV0_outfile.open(CONV0_str, fstream::out | fstream::app);
302 329
     if (CONV0_outfile.fail()) ABACUSerror("Could not open CONV0_outfile... ");
303 330
     CONV0_outfile.precision(16);
304 331
 
305 332
     fstream STAT_outfile;
306
-    if (!refine || in_parallel) STAT_outfile.open(STAT_Cstr, fstream::out | fstream::trunc);
307
-    else STAT_outfile.open(STAT_Cstr, fstream::out | fstream::app);
333
+    if (!refine || in_parallel) STAT_outfile.open(STAT_str, fstream::out | fstream::trunc);
334
+    else STAT_outfile.open(STAT_str, fstream::out | fstream::app);
308 335
     if (STAT_outfile.fail()) ABACUSerror("Could not open STAT_outfile... ");
309 336
     STAT_outfile.precision(8);
310 337
 
311 338
     ofstream LOG_outfile;
312 339
     if (!in_parallel) {
313
-      if (!refine) LOG_outfile.open(LOG_Cstr, fstream::out | fstream::trunc);
314
-      else LOG_outfile.open(LOG_Cstr, fstream::out | fstream::app);
340
+      if (!refine) LOG_outfile.open(LOG_str, fstream::out | fstream::trunc);
341
+      else LOG_outfile.open(LOG_str, fstream::out | fstream::app);
315 342
       if (LOG_outfile.fail()) ABACUSerror("Could not open LOG_outfile... ");
316 343
       LOG_outfile.precision(16);
317 344
     }
318 345
     else { // in_parallel
319
-      LOG_outfile.open(LOG_Cstr, fstream::out | fstream::trunc);
346
+      LOG_outfile.open(LOG_str, fstream::out | fstream::trunc);
320 347
       if (LOG_outfile.fail()) ABACUSerror("Could not open LOG_outfile... ");
321 348
       LOG_outfile.precision(16);
322 349
     }
323 350
 
324 351
     Scan_Info scan_info;
325 352
 
326
-    if (!refine) mkdir(THRDIR_string.c_str(), S_IRWXU | S_IRWXG | S_IRWXO);
327
-    Scan_Thread_Data paused_thread_data (THRDIR_string, refine);
353
+    if (!refine) mkdir(THRDIR_str.c_str(), S_IRWXU | S_IRWXG | S_IRWXO);
354
+    Scan_Thread_Data paused_thread_data (THRDIR_str, refine);
328 355
 
329 356
     if (refine) {
330 357
       paused_thread_data.Load();
331
-      if (!in_parallel) scan_info.Load(SRC_Cstr);
358
+      if (!in_parallel) scan_info.Load(SRC_str);
332 359
     }
333 360
 
334 361
     Scan_Info scan_info_before = scan_info;  // for LOG file
@@ -338,7 +365,7 @@ namespace ABACUS {
338 365
     Scan_State_List<Tstate> ScanStateList (whichDSF, SeedScanState);
339 366
     ScanStateList.Populate_List(whichDSF, SeedScanState);
340 367
 
341
-    if (refine && !in_parallel) ScanStateList.Load_Info (SUM_Cstr);
368
+    if (refine && !in_parallel) ScanStateList.Load_Info (SUM_str);
342 369
     else if (in_parallel && rank.sum() == 0) {}; // do nothing, keep info in the higher .sum file!
343 370
 
344 371
     DP Chem_Pot = Chemical_Potential (AveragingState);
@@ -807,7 +834,7 @@ namespace ABACUS {
807 834
     CONV0_outfile.close();
808 835
     STAT_outfile.close();
809 836
 
810
-    scan_info.Save(SRC_Cstr);
837
+    scan_info.Save(SRC_str);
811 838
 
812 839
     Scan_Info scan_info_refine = scan_info;
813 840
     scan_info_refine -= scan_info_before;
@@ -850,7 +877,7 @@ namespace ABACUS {
850 877
 
851 878
     ScanStateList.Order_in_SRC ();
852 879
 
853
-    ScanStateList.Save_Info (SUM_Cstr);
880
+    ScanStateList.Save_Info (SUM_str);
854 881
 
855 882
 
856 883
     // Evaluate f-sumrule:
@@ -890,16 +917,19 @@ namespace ABACUS {
890 917
     // Construct the finite-size saddle-point state:
891 918
     // if we refine, read the quantum numbers of the saddle point state (and seed sps) from the sps file:
892 919
 
920
+    /* TO_STR
893 921
     stringstream SPS_stringstream;  string SPS_string;
894 922
     Data_File_Name (SPS_stringstream, whichDSF, c_int, L, N, iKmin, iKmax, kBT, 0.0, "");
895 923
     SPS_stringstream << ".sps";
896 924
     SPS_string = SPS_stringstream.str();    const char* SPS_Cstr = SPS_string.c_str();
925
+    */
926
+    string SPS_str = Data_Filename (whichDSF, c_int, L, N, iKmin, iKmax, kBT, 0.0, "") + ".sps";
897 927
 
898 928
     fstream spsfile;
899
-    if (refine) spsfile.open(SPS_Cstr, fstream::in);
900
-    else spsfile.open(SPS_Cstr, fstream::out | fstream::trunc);
929
+    if (refine) spsfile.open(SPS_str, fstream::in);
930
+    else spsfile.open(SPS_str, fstream::out | fstream::trunc);
901 931
     if (spsfile.fail()) {
902
-      cout << SPS_Cstr << endl; ABACUSerror("Could not open spsfile.");
932
+      cout << SPS_str << endl; ABACUSerror("Could not open spsfile.");
903 933
     }
904 934
 
905 935
     LiebLin_Bethe_State spstate;

+ 7
- 5
src/SCAN/Scan_Info.cc View File

@@ -25,11 +25,12 @@ namespace ABACUS {
25 25
   Scan_Info::Scan_Info (DP sr, DP Nf, long long int Ni, long long int Nd, long long int Ndc, long long int Ndc0, double t) :
26 26
     sumrule_obtained(sr), Nfull(Nf), Ninadm(Ni), Ndata(Nd), Ndata_conv(Ndc), Ndata_conv0(Ndc0), TT(t) {}
27 27
 
28
-  void Scan_Info::Save (const char* outfile_Cstr)
28
+  //void Scan_Info::Save (const char* outfile_Cstr)
29
+  void Scan_Info::Save (string outfile_str)
29 30
   {
30 31
     ofstream outfile;
31 32
 
32
-    outfile.open(outfile_Cstr);
33
+    outfile.open(outfile_str);
33 34
     if (outfile.fail()) ABACUSerror("Could not open outfile... ");
34 35
 
35 36
     outfile.precision(16);
@@ -48,12 +49,13 @@ namespace ABACUS {
48 49
     return;
49 50
   }
50 51
 
51
-  void Scan_Info::Load (const char* infile_Cstr)
52
+  //void Scan_Info::Load (const char* infile_Cstr)
53
+  void Scan_Info::Load (string infile_str)
52 54
   {
53 55
     ifstream infile;
54
-    infile.open(infile_Cstr);
56
+    infile.open(infile_str);
55 57
     if(infile.fail()) {
56
-      cout << endl << infile_Cstr << endl;
58
+      cout << endl << infile_str << endl;
57 59
       ABACUSerror("Could not open input file in Scan_Info::Load.");
58 60
     }
59 61
 

+ 109
- 0
src/UTILS/Data_File_Name.cc View File

@@ -53,6 +53,32 @@ namespace ABACUS {
53 53
     return;
54 54
   }
55 55
 
56
+  string Data_Filename (char whichDSF, DP c_int, DP L, int N, int iKmin, int iKmax,
57
+			DP kBT, DP L2, string defaultScanStatename)
58
+  {
59
+    string name = "LiebLin_";
60
+    if (whichDSF == 'Z') name += "Z";
61
+    else if (whichDSF == 'd') name += "rho-rho";
62
+    else if (whichDSF == 'g') name += "psi-psidag";
63
+    else if (whichDSF == 'o') name += "psidag-psi";
64
+    else if (whichDSF == 'q') name += "GeomQuench";
65
+    else if (whichDSF == '1') name += "Type_I_Exp_Data";
66
+    else if (whichDSF == 'B') name += "BECg2";
67
+    else if (whichDSF == 'C') name += "BECoverlap";
68
+    else ABACUSerror("Option not implemented in Data_File_Name");
69
+
70
+    name += "_c_" + DP_to_string(c_int) + "_L_" + DP_to_string(L) + "_N_" + to_string(N);
71
+    if (defaultScanStatename == "") name += "_" + to_string(N) + "_0_"; // simulates label of ground state
72
+    else name += "_" + defaultScanStatename;
73
+    if (iKmin == iKmax) name += "_iK_" + to_string(iKmin);
74
+    else name += "_iKmin_" + to_string(iKmin) + "_iKmax_" + to_string(iKmax);
75
+    if (kBT > 0.0) name += "_kBT_" + DP_to_string(kBT);
76
+    if (whichDSF == 'q') name += "_L2_" + DP_to_string(L2);
77
+
78
+    return(name);
79
+  }
80
+
81
+
56 82
   void Data_File_Name (stringstream& name, char whichDSF, int iKmin, int iKmax, DP kBT,
57 83
 		       LiebLin_Bethe_State& State, LiebLin_Bethe_State& RefScanState, string defaultScanStatename)
58 84
   {
@@ -77,6 +103,32 @@ namespace ABACUS {
77 103
     return;
78 104
   }
79 105
 
106
+  string Data_Filename (char whichDSF, int iKmin, int iKmax, DP kBT,
107
+			LiebLin_Bethe_State& State, LiebLin_Bethe_State& RefScanState,
108
+			string defaultScanStatename)
109
+  {
110
+    string name = "LiebLin_";
111
+    if (whichDSF == 'Z') name += "Z";
112
+    else if (whichDSF == 'd') name += "rho-rho";
113
+    else if (whichDSF == 'g') name += "psi-psidag";
114
+    else if (whichDSF == 'o') name += "psidag-psi";
115
+    else if (whichDSF == 'q') name += "GeomQuench";
116
+    else if (whichDSF == '1') name += "Type_I_Exp_Data";
117
+    else if (whichDSF == 'B') name += "BECg2";
118
+    else if (whichDSF == 'C') name += "BECoverlap";
119
+    else ABACUSerror("Option not implemented in Data_File_Name");
120
+
121
+    name += "_c_" + DP_to_string(State.c_int) + "_L_" + DP_to_string(State.L) + "_N_" + to_string(State.N);
122
+    if (defaultScanStatename == "") name += "_" + State.label;
123
+    else name += "_" + defaultScanStatename;
124
+    if (iKmin == iKmax) name += "_iK_" + to_string(iKmin);
125
+    else name += "_iKmin_" + to_string(iKmin) + "_iKmax_" + to_string(iKmax);
126
+    if (kBT > 0.0) name += "_kBT_" + DP_to_string(kBT);
127
+    if (whichDSF == 'q') name += "_L2_" + DP_to_string(RefScanState.L);
128
+
129
+    return(name);
130
+  }
131
+
80 132
 
81 133
   // Heisenberg:
82 134
 
@@ -109,6 +161,35 @@ namespace ABACUS {
109 161
     return;
110 162
   }
111 163
 
164
+  string Data_Filename (char whichDSF, DP Delta, int N, int M, int iKmin, int iKmax,
165
+			DP kBT, int N2, string defaultScanStatename)
166
+  {
167
+    string name = "HEIS_";
168
+    if (whichDSF == 'Z') name += "Z";
169
+    else if (whichDSF == 'm') name += "Smp";
170
+    else if (whichDSF == 'z') name += "Szz";
171
+    else if (whichDSF == 'p') name += "Spm";
172
+    else if (whichDSF == 'a') name += "SzSz";
173
+    else if (whichDSF == 'b') name += "SzSm";
174
+    else if (whichDSF == 'c') name += "SmSm";
175
+    else if (whichDSF == 'q') name += "GeomQuench";
176
+    else {
177
+      cout << "Option tried (1): " << whichDSF << endl;
178
+      ABACUSerror("Option not implemented in Data_File_Name");
179
+    }
180
+
181
+    name += "_D_" + to_string(Delta) + "_N_" + to_string(N) + "_M_";
182
+    for (int i = 0; i < int(log10(DP(N/2))) - int(log10(DP(M))); ++i) name += "0";
183
+    name += to_string(M);
184
+    if (defaultScanStatename == "") name += "_" + to_string(M) + "_0_"; // simulates label of ground state
185
+    else name += "_" + defaultScanStatename;
186
+
187
+    if (kBT > 0.0) name += "_kBT_" + to_string(kBT);
188
+    if (whichDSF == 'q') name += "_N2_" + to_string(N2);
189
+
190
+    return(name);
191
+  }
192
+
112 193
   void Data_File_Name (stringstream& name, char whichDSF, int iKmin, int iKmax, DP kBT,
113 194
 		       Heis_Bethe_State& State, Heis_Bethe_State& RefScanState, string defaultScanStatename)
114 195
   {
@@ -137,6 +218,34 @@ namespace ABACUS {
137 218
     return;
138 219
   }
139 220
 
221
+  string Data_Filename (char whichDSF, int iKmin, int iKmax, DP kBT,
222
+			Heis_Bethe_State& State, Heis_Bethe_State& RefScanState, string defaultScanStatename)
223
+  {
224
+    string name = "HEIS_";
225
+    if (whichDSF == 'Z') name += "Z";
226
+    else if (whichDSF == 'm') name += "Smp";
227
+    else if (whichDSF == 'z') name += "Szz";
228
+    else if (whichDSF == 'p') name += "Spm";
229
+    else if (whichDSF == 'a') name += "SzSz";
230
+    else if (whichDSF == 'b') name += "SzSm";
231
+    else if (whichDSF == 'c') name += "SmSm";
232
+    else if (whichDSF == 'q') name += "GeomQuench";
233
+    else {
234
+      cout << "Option tried (2): " << whichDSF << endl;
235
+      ABACUSerror("Option not implemented in Data_File_Name");
236
+    }
237
+
238
+    name += "_D_" + to_string(State.chain.Delta) + "_N_" + to_string(State.chain.Nsites) + "_M_";
239
+    for (int i = 0; i < int(log10(DP(State.chain.Nsites/2))) - int(log10(DP(State.base.Mdown))); ++i) name += "0";
240
+    name += to_string(State.base.Mdown);
241
+    if (defaultScanStatename == "") name += "_" + State.label;
242
+    else name += "_" + defaultScanStatename;
243
+    if (kBT > 0.0) name += "_kBT_" + to_string(kBT);
244
+    if (whichDSF == 'q') name += "_N2_" + to_string(RefScanState.chain.Nsites);
245
+
246
+    return(name);
247
+  }
248
+
140 249
 
141 250
   // One-D spinless fermions: IN DEVELOPMENT
142 251
   /*

+ 1
- 1
src/UTILS/State_Label.cc View File

@@ -23,7 +23,7 @@ namespace ABACUS {
23 23
 
24 24
   // M0[|type1:M1|type2:M2...]_nexc0[|nexc1|nexc2...]_type0Ix2old@type0Ix2new[:...][|type1Ix2old@type1Ix2new...]
25 25
 
26
-  // A label is always relative to another label reference state, in practise
26
+  // A label is always relative to another label reference state, in practice
27 27
   // the seed state used in the scanning for correlations (or otherwise by default: the ground state).
28 28
 
29 29
   // The first part of the label (before the first _ ) labels the particle content (the "base").

Loading…
Cancel
Save