|
@@ -19,7 +19,7 @@ using namespace ABACUS;
|
19
|
19
|
|
20
|
20
|
namespace ABACUS {
|
21
|
21
|
|
22
|
|
- DP Smoothen_RAW_into_SF (string prefix, int iKmin, int iKmax, int DiK,
|
|
22
|
+ DP Smoothen_RAW_into_SF (string prefix, int iKmin, int iKmax, int DiK, DP devmax,
|
23
|
23
|
DP ommin, DP ommax, int Nom, DP gwidth, DP normalization, DP denom_sum_K)
|
24
|
24
|
{
|
25
|
25
|
// ommax is omega max for .dsf file, Nom is the number of omega slots used.
|
|
@@ -69,7 +69,7 @@ namespace ABACUS {
|
69
|
69
|
|
70
|
70
|
while (RAW_infile.peek() != EOF) {
|
71
|
71
|
RAW_infile >> omega >> iK >> FF >> dev >> label;
|
72
|
|
- if (iK >= iKmin && iK <= iKmax && fabs(omega) > 1.0e-8) { // remove connected part of DSF
|
|
72
|
+ if (iK >= iKmin && iK <= iKmax && dev < devmax && fabs(omega) > 1.0e-8) { // remove connected part of DSF
|
73
|
73
|
for (int deltaiK = -DiK; deltaiK <= DiK; ++deltaiK)
|
74
|
74
|
if (iK + deltaiK >= iKmin && iK + deltaiK <= iKmax)
|
75
|
75
|
SSF[iK + deltaiK - iKmin] += Kweight[abs(deltaiK)] * FF * FF;
|
|
@@ -104,7 +104,7 @@ namespace ABACUS {
|
104
|
104
|
stringstream DSF_stringstream; string DSF_string;
|
105
|
105
|
DSF_stringstream << prefix;
|
106
|
106
|
if (DiK > 0) DSF_stringstream << "_DiK_" << DiK;
|
107
|
|
- DSF_stringstream << "_ommin_"<< ommin << "_ommax_" << ommax << "_Nom_" << Nom << "_w_" << gwidth << ".dsf";
|
|
107
|
+ DSF_stringstream << "_devmax_" << devmax << "_ommin_"<< ommin << "_ommax_" << ommax << "_Nom_" << Nom << "_w_" << gwidth << ".dsf";
|
108
|
108
|
DSF_string = DSF_stringstream.str(); const char* DSF_Cstr = DSF_string.c_str();
|
109
|
109
|
|
110
|
110
|
ofstream DSF_outfile;
|
|
@@ -121,7 +121,7 @@ namespace ABACUS {
|
121
|
121
|
stringstream SSF_stringstream; string SSF_string;
|
122
|
122
|
SSF_stringstream << prefix;
|
123
|
123
|
if (DiK > 0) SSF_stringstream << "_DiK_" << DiK;
|
124
|
|
- SSF_stringstream << ".ssf";
|
|
124
|
+ SSF_stringstream << "_devmax_" << devmax << ".ssf";
|
125
|
125
|
SSF_string = SSF_stringstream.str(); const char* SSF_Cstr = SSF_string.c_str();
|
126
|
126
|
|
127
|
127
|
ofstream SSF_outfile;
|
|
@@ -136,7 +136,7 @@ namespace ABACUS {
|
136
|
136
|
|
137
|
137
|
|
138
|
138
|
stringstream ASF_stringstream; string ASF_string;
|
139
|
|
- ASF_stringstream << prefix;
|
|
139
|
+ ASF_stringstream << prefix << "_devmax_" << devmax;
|
140
|
140
|
ASF_stringstream << "_ommin_"<< ommin << "_ommax_" << ommax << "_Nom_" << Nom << "_w_" << gwidth << ".asf";
|
141
|
141
|
ASF_string = ASF_stringstream.str(); const char* ASF_Cstr = ASF_string.c_str();
|
142
|
142
|
|
|
@@ -167,7 +167,7 @@ namespace ABACUS {
|
167
|
167
|
}
|
168
|
168
|
|
169
|
169
|
// This is the same function as above, but now using data for a diagonal ensemble of states
|
170
|
|
- DP Smoothen_RAW_into_SF (string prefix, Vect<string> rawfilename, Vect<DP> weight, int iKmin, int iKmax, int DiK,
|
|
170
|
+ DP Smoothen_RAW_into_SF (string prefix, Vect<string> rawfilename, Vect<DP> weight, int iKmin, int iKmax, int DiK, DP devmax,
|
171
|
171
|
DP ommin, DP ommax, int Nom, DP gwidth, DP normalization, DP denom_sum_K)
|
172
|
172
|
{
|
173
|
173
|
// ommax is omega max for .dsf file, Nom is the number of omega slots used.
|
|
@@ -217,7 +217,7 @@ namespace ABACUS {
|
217
|
217
|
|
218
|
218
|
while (RAW_infile.peek() != EOF) {
|
219
|
219
|
RAW_infile >> omega >> iK >> FF >> dev >> label;
|
220
|
|
- if (iK >= iKmin && iK <= iKmax && fabs(omega) > 1.0e-8) { // remove connected part of DSF)
|
|
220
|
+ if (iK >= iKmin && iK <= iKmax && dev < devmax && fabs(omega) > 1.0e-8) { // remove connected part of DSF)
|
221
|
221
|
SSF[iK - iKmin] += weight[ns] * FF * FF;
|
222
|
222
|
for (int iomega = 0; iomega < Nom; ++iomega)
|
223
|
223
|
if (big_gwidth_used > (d_omega = fabs(omegaout[iomega] - omega))) {
|
|
@@ -252,7 +252,7 @@ namespace ABACUS {
|
252
|
252
|
DSF_stringstream << prefix;
|
253
|
253
|
DSF_stringstream << "_ns_" << weight.size();
|
254
|
254
|
if (DiK > 0) DSF_stringstream << "_DiK_" << DiK;
|
255
|
|
- DSF_stringstream << "_ommin_"<< ommin << "_ommax_" << ommax << "_Nom_" << Nom << "_w_" << gwidth << ".dsf";
|
|
255
|
+ DSF_stringstream << "_devmax_" << devmax << "_ommin_"<< ommin << "_ommax_" << ommax << "_Nom_" << Nom << "_w_" << gwidth << ".dsf";
|
256
|
256
|
DSF_string = DSF_stringstream.str(); const char* DSF_Cstr = DSF_string.c_str();
|
257
|
257
|
|
258
|
258
|
ofstream DSF_outfile;
|
|
@@ -269,7 +269,7 @@ namespace ABACUS {
|
269
|
269
|
stringstream SSF_stringstream; string SSF_string;
|
270
|
270
|
SSF_stringstream << prefix;
|
271
|
271
|
SSF_stringstream << "_ns_" << weight.size();
|
272
|
|
- SSF_stringstream << ".ssf";
|
|
272
|
+ SSF_stringstream << "_devmax_" << devmax << ".ssf";
|
273
|
273
|
SSF_string = SSF_stringstream.str(); const char* SSF_Cstr = SSF_string.c_str();
|
274
|
274
|
|
275
|
275
|
ofstream SSF_outfile;
|
|
@@ -286,7 +286,7 @@ namespace ABACUS {
|
286
|
286
|
stringstream ASF_stringstream; string ASF_string;
|
287
|
287
|
ASF_stringstream << prefix;
|
288
|
288
|
ASF_stringstream << "_ns_" << weight.size();
|
289
|
|
- ASF_stringstream << "_ommin_"<< ommin << "_ommax_" << ommax << "_Nom_" << Nom << "_w_" << gwidth << ".asf";
|
|
289
|
+ ASF_stringstream << "_devmax_" << devmax << "_ommin_"<< ommin << "_ommax_" << ommax << "_Nom_" << Nom << "_w_" << gwidth << ".asf";
|
290
|
290
|
ASF_string = ASF_stringstream.str(); const char* ASF_Cstr = ASF_string.c_str();
|
291
|
291
|
|
292
|
292
|
ofstream ASF_outfile;
|
|
@@ -317,7 +317,7 @@ namespace ABACUS {
|
317
|
317
|
|
318
|
318
|
|
319
|
319
|
|
320
|
|
- DP Smoothen_RAW_into_ASF (string prefix, int iKmin, int iKmax, DP ommin, DP ommax, int Nom, DP gwidth,
|
|
320
|
+ DP Smoothen_RAW_into_ASF (string prefix, int iKmin, int iKmax, DP devmax, DP ommin, DP ommax, int Nom, DP gwidth,
|
321
|
321
|
DP normalization, DP denom_sum_K)
|
322
|
322
|
{
|
323
|
323
|
// ommax is omega max for .asf file, Nom is the number of omega slots used.
|
|
@@ -355,7 +355,7 @@ namespace ABACUS {
|
355
|
355
|
|
356
|
356
|
while (RAW_infile.peek() != EOF) {
|
357
|
357
|
RAW_infile >> omega >> iK >> FF >> dev >> label;
|
358
|
|
- if (iK >= iKmin && iK <= iKmax && fabs(omega) > 1.0e-8) { // remove connected part of DSF)
|
|
358
|
+ if (iK >= iKmin && iK <= iKmax && dev < devmax && fabs(omega) > 1.0e-8) { // remove connected part of DSF)
|
359
|
359
|
for (int iomega = 0; iomega < Nom; ++iomega)
|
360
|
360
|
if (big_gwidth_used > (d_omega = fabs(omegaout[iomega] - omega)))
|
361
|
361
|
ASF[iomega] += FF * FF * exp(-d_omega*d_omega * oneovertwowidthsq);
|
|
@@ -373,7 +373,7 @@ namespace ABACUS {
|
373
|
373
|
stringstream ASF_stringstream; string ASF_string;
|
374
|
374
|
ASF_stringstream << prefix;
|
375
|
375
|
//if (iKmax != iKmin) DSF_stringstream << "_iKmin_" << iKmin << "_iKmax_" << iKmax;
|
376
|
|
- ASF_stringstream << "_ommin_"<< ommin << "_ommax_" << ommax << "_Nom_" << Nom << "_w_" << gwidth << ".asf";
|
|
376
|
+ ASF_stringstream << "_devmax_" << devmax << "_ommin_"<< ommin << "_ommax_" << ommax << "_Nom_" << Nom << "_w_" << gwidth << ".asf";
|
377
|
377
|
ASF_string = ASF_stringstream.str(); const char* ASF_Cstr = ASF_string.c_str();
|
378
|
378
|
|
379
|
379
|
ofstream ASF_outfile;
|