fermisurfer  2.0.0
fermisurfer
read_file.cpp
Go to the documentation of this file.
1 /*
2 The MIT License (MIT)
3 
4 Copyright (c) 2014 Mitsuaki KAWAMURA
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 THE SOFTWARE.
23 */
24 /**@file
25 @brief Read .frmsf file
26 */
27 #include <cstdlib>
28 #include <cstdio>
29 #include <cmath>
30 #include <cctype>
31 #include <cstring>
32 #include "basic_math.hpp"
33 #include "variable.hpp"
34 #if defined(HAVE_CONFIG_H)
35 #include <config.h>
36 #endif
37 #if defined(HAVE_GL_GL_H)
38 #include <GL/gl.h>
39 #elif defined(HAVE_OPENGL_GL_H)
40 #include <OpenGL/gl.h>
41 #endif
42 #include <wx/wx.h>
43 /*
44  Allocation of Kohn-Sham energies $ matrix elements
45 */
46 static void allocate_griddata(
47 int ng[3],
48 int ng0[3]
49 )
50 {
51  int i, j, ib, i0, i1, i2;
52 
53  for (i = 0; i < 3; i++) ng[i] = ng0[i];
54 
55  ntri = new int[nb];
56  nnl = new int[nb];
57  n2d = new int[nb];
58  nequator = new int[nb];
59  draw_band = new int[nb];
60  rgb_band = new GLfloat *[nb];
61  for (ib = 0; ib < nb; ib++) {
62  draw_band[ib] = 1;
63  rgb_band[ib] = new GLfloat [4];
64  }
65 
66  scl /= sqrtf(bvec[0][0] * bvec[0][0] + bvec[0][1] * bvec[0][1] + bvec[0][2] * bvec[0][2]);
67  linewidth /= scl;
68  myf->textbox_scale->ChangeValue(wxString::Format(wxT("%f"), scl));
69  myf->textbox_linewidth->ChangeValue(wxString::Format(wxT("%f"), linewidth));
70  /*
71  Direct lattice vector
72  */
73  for (i = 0; i < 3; ++i) {
74  for (j = 0; j < 3; ++j) avec[i][j] = 0.0f;
75  avec[i][i] = 1.0f;
76  solve3(bvec, avec[i]);
77  *terminal << wxString::Format(wxT(" avec %d : %f %f %f \n"),
78  i + 1, avec[i][0], avec[i][1], avec[i][2]);
79  }/*for (i = 0; i < 3; ++i)*/
80  for (i = 0; i < 3; ++i) {
81  secvec[i] = bvec[2][i];
82  eqvec[i] = bvec[2][i];
83  eqvec_fr[i] = 0.0;
84  secvec_fr[i] = 0.0;
85  }
86  eqvec_fr[2] = 1.0;
87  secvec_fr[2] = 1.0;
88  secscale = 0.0;
89 
90  eig0 = new GLfloat * **[nb];
91  eig = new GLfloat * **[nb];
92  mat0 = new GLfloat * ***[nb];
93  mat = new GLfloat * ***[nb];
94  vf = new GLfloat * ***[nb];
95  for (ib = 0; ib < nb; ib++) {
96  eig0[ib] = new GLfloat * *[ng0[0]];
97  eig[ib] = new GLfloat * *[ng0[0]];
98  mat0[ib] = new GLfloat * **[ng0[0]];
99  mat[ib] = new GLfloat * **[ng0[0]];
100  vf[ib] = new GLfloat * **[ng0[0]];
101  for (i0 = 0; i0 < ng0[0]; i0++) {
102  eig0[ib][i0] = new GLfloat * [ng0[1]];
103  eig[ib][i0] = new GLfloat * [ng0[1]];
104  mat0[ib][i0] = new GLfloat * *[ng0[1]];
105  mat[ib][i0] = new GLfloat * *[ng0[1]];
106  vf[ib][i0] = new GLfloat * *[ng0[1]];
107  for (i1 = 0; i1 < ng0[1]; i1++) {
108  eig0[ib][i0][i1] = new GLfloat[ng0[2]];
109  eig[ib][i0][i1] = new GLfloat[ng0[2]];
110  mat0[ib][i0][i1] = new GLfloat * [ng0[2]];
111  mat[ib][i0][i1] = new GLfloat * [ng0[2]];
112  vf[ib][i0][i1] = new GLfloat * [ng0[2]];
113  for (i2 = 0; i2 < ng0[2]; ++i2) {
114  mat0[ib][i0][i1][i2] = new GLfloat[3];
115  mat[ib][i0][i1][i2] = new GLfloat[3];
116  vf[ib][i0][i1][i2] = new GLfloat[3];
117  }
118  }
119  }
120  }
121 }
122 /**
123  @brief Input from Fermi surface file
124 */
126 {
127  int ib, i, j, i0, i1, i2, ii0, ii1, ii2, ierr, iaxis;
128  FILE *fp;
129  char* ctemp1;
130  char ctemp2[256];
131  int lshift; //!< Switch for shifted Brillouin zone
132  /*
133  Open input file.
134  */
135  *terminal << wxT(" Openning ") << frmsf_file_name << wxT(" ...\n");
136  if ((fp = fopen(frmsf_file_name.mb_str(), "r")) == NULL) {
137  *terminal << wxT("file open error!!\n");
138  *terminal << wxT(" Press any key to exit.\n");
139  ierr = getchar();
140  exit(EXIT_FAILURE);
141  }
142  *terminal << wxT("\n");
143  *terminal << wxT(" ## Brillouin zone informations ###########\n");
144  *terminal << wxT("\n");
145  /*
146  k-point grid
147  */
148  ctemp1 = fgets(ctemp2, 256, fp);
149  ierr = sscanf(ctemp2, "%d%d%d", &ng0[0], &ng0[1], &ng0[2]);
150 
151  if (ierr == 0) *terminal << wxT("error ! reading ng\n");
152  *terminal << wxString::Format(wxT(" k point grid : %d %d %d\n"),
153  ng0[0], ng0[1], ng0[2]);
154  /*
155  Shift of k-point grid
156  */
157  ierr = fscanf(fp, "%d", &lshift);
158  if (ierr == 0) *terminal << wxT("error ! reading lshift\n");
159 
160  if (lshift == 0) {
161  *terminal << wxT(" k point grid is the Monkhorst-Pack grid.\n");
162  for (i = 0; i < 3; i++) shiftk[i] = (ng0[i] + 1) % 2;
163  }
164  else if (lshift == 1) {
165  *terminal << wxT(" k point grid starts from Gamma.\n");
166  for (i = 0; i < 3; i++) shiftk[i] = 0;
167  }
168  else if (lshift == 2) {
169  *terminal << wxT(" k point grid starts from Gamma + a half grid.\n");
170  for (i = 0; i < 3; i++) shiftk[i] = 1;
171  }
172  else {
173  exit(0);
174  }
175  /*
176  # of bands
177  */
178  ierr = fscanf(fp, "%d", &nb);
179  if (ierr == 0) *terminal << wxT("error ! reading nb\n");
180  *terminal << wxString::Format(wxT(" # of bands : %d\n"), nb);
181  /*
182  Reciplocal lattice vectors
183  */
184  for (i = 0; i < 3; ++i) {
185  ierr = fscanf(fp, "%e%e%e", &bvec[i][0], &bvec[i][1], &bvec[i][2]);
186  if (ierr == 0) *terminal << wxT("error ! reading bvec\n");
187  *terminal << wxString::Format(wxT(" bvec %d : %f %f %f \n"), i + 1, bvec[i][0], bvec[i][1], bvec[i][2]);
188  }/*for (i = 0; i < 3; ++i)*/
190  /*
191  Kohn-Sham energies
192  */
193  for (ib = 0; ib < nb; ++ib) {
194  for (i0 = 0; i0 < ng0[0]; ++i0) {
195  if (lshift != 0) ii0 = i0;
196  else ii0 = modulo(i0 + (ng0[0] + 1) / 2, ng0[0]);
197  for (i1 = 0; i1 < ng0[1]; ++i1) {
198  if (lshift != 0) ii1 = i1;
199  else ii1 = modulo(i1 + (ng0[1] + 1) / 2, ng0[1]);
200  for (i2 = 0; i2 < ng0[2]; ++i2) {
201  if (lshift != 0) ii2 = i2;
202  else ii2 = modulo(i2 + (ng0[2] + 1) / 2, ng0[2]);
203  ierr = fscanf(fp, "%e", &eig0[ib][ii0][ii1][ii2]);
204  }
205  }
206  }
207  }
208  /*
209  Matrix elements
210  */
211  for (iaxis = 0; iaxis < 3; iaxis++) {
212  for (ib = 0; ib < nb; ++ib) {
213  for (i0 = 0; i0 < ng0[0]; ++i0) {
214  if (lshift != 0) ii0 = i0;
215  else ii0 = modulo(i0 + (ng0[0] + 1) / 2, ng0[0]);
216  for (i1 = 0; i1 < ng0[1]; ++i1) {
217  if (lshift != 0) ii1 = i1;
218  else ii1 = modulo(i1 + (ng0[1] + 1) / 2, ng0[1]);
219  for (i2 = 0; i2 < ng0[2]; ++i2) {
220  if (lshift != 0) ii2 = i2;
221  else ii2 = modulo(i2 + (ng0[2] + 1) / 2, ng0[2]);
222  ierr = fscanf(fp, "%e", &mat0[ib][ii0][ii1][ii2][iaxis]);
223  if (ierr == EOF) {
224  fclose(fp);
225  return iaxis;
226  }
227  }/*for (i2 = 0; i2 < ng0[2]; ++i2)*/
228  }/*for (i1 = 0; i1 < ng0[1]; ++i1)*/
229  }/*for (i0 = 0; i0 < ng0[0]; ++i0)*/
230  }/*for (ib = 0; ib < nb; ++ib)*/
231  }
232  fclose(fp);
233  return 3;
234 } /* read_file */
235 /*
236  @brief Make all characters lower
237 */
238 static void Text2Lower(char *value //!<[inout] @brief Keyword or value
239 ) {
240  char value2;
241  int valuelen, ii;
242 
243  valuelen = strlen(value);
244  for (ii = 0; ii < valuelen; ii++) {
245  value2 = tolower(value[ii]);
246  value[ii] = value2;
247  }
248 }/*static void Text2Lower*/
250 {
251  char keyword[256], value[256];
252  FILE *fp;
253  char *ctmp;
254  int ierr, ib, iminmax;
255 
256  *terminal << wxT(" Openning ") << batch_name << wxT(" ...\n");
257  if ((fp = fopen(batch_name.mb_str(), "r")) == NULL) {
258  printf("file open error!!\n");
259  printf(" Press any key to exit.\n");
260  ierr = getchar();
261  exit(EXIT_FAILURE);
262  }
263 
264  iminmax = 0;
265  *terminal << wxT(" Reading...\n");
266  while (fscanf(fp, "%s", keyword) != EOF) {
267 
268  Text2Lower(keyword);
269  *terminal << wxString::Format(wxT("%s\n"), keyword);
270  if (keyword[0] == '#') {
271  ctmp = fgets(keyword, 256, fp);
272  continue;
273  }
274 
275  if (strcmp(keyword, "backgroundcolor") == 0) {
276  ierr = fscanf(fp, "%f%f%f", &BackGroundColor[0], &BackGroundColor[1], &BackGroundColor[2]);
277  }
278  else if (strcmp(keyword, "band") == 0) {
279  for (ib = 0; ib < nb; ib++)
280  ierr = fscanf(fp, "%d", &draw_band[ib]);
281  }
282  else if (strcmp(keyword, "brillouinzone") == 0) {
283  ierr = fscanf(fp, "%s", value);
284  Text2Lower(value);
285  if (strcmp(value, "first") == 0) fbz = 1;
286  else if (strcmp(value, "primitive") == 0) fbz = -1;
287  else {
288  printf("Error! %s = %s", keyword, value);
289  exit(-1);
290  }
291  }
292  else if (strcmp(keyword, "colorbar") == 0) {
293  ierr = fscanf(fp, "%d", &lcolorbar);
294  }
295  else if (strcmp(keyword, "colorscale") == 0) {
296  ierr = fscanf(fp, "%s", value);
297  Text2Lower(value);
298  if (strcmp(value, "input1d") == 0) color_scale = 1;
299  else if (strcmp(value, "input2d") == 0) color_scale = 2;
300  else if (strcmp(value, "input3d") == 0) color_scale = 3;
301  else if (strcmp(value, "fermivelocity") == 0) color_scale = 4;
302  else if (strcmp(value, "bandindex") == 0) color_scale = 5;
303  else if (strcmp(value, "inputgray") == 0) color_scale = 6;
304  else if (strcmp(value, "fermivelocitygray") == 0) color_scale = 7;
305  else {
306  printf("Error! %s = %s", keyword, value);
307  exit(-1);
308  }
309  }
310  else if (strcmp(keyword, "minmax") == 0) {
311  ierr = fscanf(fp, "%f%f", &patch_min, &patch_max);
312  skip_minmax = 1;
313  }
314  else if (strcmp(keyword, "equator") == 0) {
315  ierr = fscanf(fp, "%f%f%f", &eqvec[0], &eqvec[1], &eqvec[2]);
316  lequator = 1;
317  }
318  else if (strcmp(keyword, "interpol") == 0) {
319  ierr = fscanf(fp, "%d", &interpol);
320  }
321  else if (strcmp(keyword, "linecolor") == 0) {
322  ierr = fscanf(fp, "%f%f%f", &LineColor[0], &LineColor[1], &LineColor[2]);
323  }
324  else if (strcmp(keyword, "linewidth") == 0) {
325  ierr = fscanf(fp, "%f", &linewidth);
326  }
327  else if (strcmp(keyword, "lighting") == 0) {
328  ierr = fscanf(fp, "%s", value);
329  Text2Lower(value);
330  if (strcmp(value, "both") == 0) {
331  glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
332  side = 1.0;
333  }
334  else if (strcmp(value, "unoccupied") == 0) {
335  glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
336  side = 1.0;
337  }
338  else if (strcmp(value, "occupied") == 0) {
339  glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
340  side = -1.0;
341  }
342  else {
343  printf("Error! %s = %s", keyword, value);
344  exit(-1);
345  }
346  }
347  else if (strcmp(keyword, "nodalline") == 0) {
348  ierr = fscanf(fp, "%d", &nodeline);
349  }
350  else if (strcmp(keyword, "section") == 0) {
351  ierr = fscanf(fp, "%f%f%f", &secvec[0], &secvec[1], &secvec[2]);
352  lsection = 1;
353  }
354  else if (strcmp(keyword, "acrossgamma") == 0) {
355  ierr = fscanf(fp, "%f", &secscale);
356  secscale = 1.0f - secscale;
357  }
358  else if (strcmp(keyword, "position") == 0) {
359  ierr = fscanf(fp, "%f%f%f", &trans[0], &trans[1], &trans[2]);
360  }
361  else if (strcmp(keyword, "scale") == 0) {
362  ierr = fscanf(fp, "%f", &scl);
363  }
364  else if (strcmp(keyword, "rotation") == 0) {
365  ierr = fscanf(fp, "%f%f%f", &thetax, &thetay, &thetaz);
366  }
367  else if (strcmp(keyword, "fermienergy") == 0) {
368  ierr = fscanf(fp, "%f", &EF);
369  }
370  else if (strcmp(keyword, "stereogram") == 0) {
371  ierr = fscanf(fp, "%s", value);
372  Text2Lower(value);
373  if (strcmp(value, "none") == 0) lstereo = 1;
374  else if (strcmp(value, "parallel") == 0) lstereo = 2;
375  else if (strcmp(value, "cross") == 0) lstereo = 3;
376  else {
377  printf("Error! %s = %s", keyword, value);
378  exit(-1);
379  }
380  }
381  else if (strcmp(keyword, "tetrahedron") == 0) {
382  ierr = fscanf(fp, "%d", &itet);
383  }
384  else {
385  printf("Error! %s", keyword);
386  exit(-1);
387  }
388  }
389  fclose(fp);
390 
391  glClearColor(BackGroundColor[0], BackGroundColor[1], BackGroundColor[2], BackGroundColor[2]);
392 
393  thetax = 3.14159265f / 180.0f * thetax;
394  thetay = 3.14159265f / 180.0f * thetay;
395  thetaz = 3.14159265f / 180.0f * thetaz;
396 
397  rot[0][0] = cosf(thetay)* cosf(thetaz);
398  rot[0][1] = -cosf(thetay)* sinf(thetaz);
399  rot[0][2] = sinf(thetay);
400  rot[1][0] = cosf(thetaz)* sinf(thetax)* sinf(thetay) + cosf(thetax)* sinf(thetaz);
401  rot[1][1] = cosf(thetax) * cosf(thetaz) - sinf(thetax)* sinf(thetay)* sinf(thetaz);
402  rot[1][2] = -cosf(thetay)* sinf(thetax);
403  rot[2][0] = -cosf(thetax)* cosf(thetaz)* sinf(thetay) + sinf(thetax)* sinf(thetaz);
404  rot[2][1] = cosf(thetaz)* sinf(thetax) + cosf(thetax)* sinf(thetay)* sinf(thetaz);
405  rot[2][2] = cosf(thetax)* cosf(thetay);
406 }
407 
408 void read_bxsf()
409 {
410  FILE* fp;
411  char ctmp[256], ctmpEF1[16], ctmpEF2[16];
412  int ierr, ii, ib, i0, i1, i2, ii0, ii1, ii2;
413  char* cerr;
414  double EF;
415 
416  if ((fp = fopen(frmsf_file_name.mb_str(), "r")) == NULL) {
417  printf("file open error!!\n");
418  printf(" Press any key to exit.\n");
419  ierr = getchar();
420  exit(EXIT_FAILURE);
421  }
422  *terminal << wxT("\n##### Reading BXSF file ")
423  << frmsf_file_name << wxT(" #####\n\n");
424 
425  cerr = fgets(ctmp, 256, fp);
426  while (strstr(ctmp, "Fermi Energy:") == NULL) {
427  cerr = fgets(ctmp, 256, fp);
428  }
429  ierr = sscanf(ctmp, "%s %s %lf", ctmpEF1, ctmpEF2, &EF);
430  *terminal << wxString::Format(wxT(" Fermi energy : %le\n"), EF);
431 
432  cerr = fgets(ctmp, 256, fp);
433  while (strstr(ctmp, "BEGIN_BLOCK_BANDGRID_3D") == NULL) {
434  cerr = fgets(ctmp, 256, fp);
435  }
436  while (strstr(ctmp, "BEGIN_BANDGRID_3D") == NULL) {
437  cerr = fgets(ctmp, 256, fp);
438  }
439  cerr = fgets(ctmp, 256, fp);
440  ierr = sscanf(ctmp, "%d", &nb);
441  *terminal << wxString::Format(wxT(" Number of bands : %d\n"), nb);
442  cerr = fgets(ctmp, 256, fp);
443  ierr = sscanf(ctmp, "%d%d%d", &ng0[0], &ng0[1], &ng0[2]);
444  for (ii = 0; ii < 3; ii++) ng0[ii] -= 1;
445  *terminal << wxString::Format(wxT(" k point grid : %d %d %d\n"),
446  ng0[0], ng0[1], ng0[2]);
447 
448  cerr = fgets(ctmp, 256, fp);
449  for (ii = 0; ii < 3; ++ii) {
450  cerr = fgets(ctmp, 256, fp);
451  ierr = sscanf(ctmp, "%e%e%e", &bvec[ii][0], &bvec[ii][1], &bvec[ii][2]);
452  *terminal << wxString::Format(wxT(" Bvec %d : %f %f %f\n"),
453  ii, bvec[ii][0], bvec[ii][1], bvec[ii][2]);
454  }
456 
457  for (ib = 0; ib < nb; ib++) {
458  cerr = fgets(ctmp, 256, fp);
459  while (strstr(ctmp, "BAND:") == NULL) {
460  cerr = fgets(ctmp, 256, fp);
461  }
462  *terminal << wxString::Format(wxT(" Reading %s"), ctmp);
463 
464  for (i0 = 0; i0 <= ng0[0]; i0++) {
465  if (i0 == ng0[0]) ii0 = 0;
466  else ii0 = i0;
467  for (i1 = 0; i1 <= ng0[1]; i1++) {
468  if (i1 == ng0[1]) ii1 = 0;
469  else ii1 = i1;
470  for (i2 = 0; i2 <= ng0[2]; i2++) {
471  if (i2 == ng0[2]) ii2 = 0;
472  else ii2 = i2;
473 
474  ierr = fscanf(fp, "%e", &eig0[ib][ii0][ii1][ii2]);
475  eig0[ib][ii0][ii1][ii2] -= EF;
476  }/*for (i2 = 0; i2 < Ng[2]; i2++)*/
477  }/*for (i1 = 0; i1 < Ng[1]; i1++)*/
478  }/*for (i0 = 0; i0 < Ng[0]; i0++)*/
479 
480  cerr = fgets(ctmp, 256, fp);
481 
482  }/*for (ib = 0; ib < Nb; ib++)*/
483  for (ii = 0; ii < 3; ii++) shiftk[ii] = 0;
484  color_scale = 4;
485 }/*void read_bxsf*/
secvec
GLfloat secvec[3]
-vector to define section
Definition: fermisurfer.cpp:160
eig0
GLfloat **** eig0
Eigenvalues [nb][ng0[0]][ng0[1]][ng0[2]].
Definition: fermisurfer.cpp:102
side
GLfloat side
Which side is lighted.
Definition: fermisurfer.cpp:148
allocate_griddata
static void allocate_griddata(int ng[3], int ng0[3])
Definition: read_file.cpp:46
n2d
int * n2d
Number of line segment.
Definition: fermisurfer.cpp:164
mat0
GLfloat ***** mat0
Matrix element [nb][ng0[0]][ng0[1]][ng0[2]][3].
Definition: fermisurfer.cpp:103
MyFrame::textbox_scale
wxTextCtrl * textbox_scale
Definition: menu.hpp:57
frmsf_file_name
wxString frmsf_file_name
Definition: fermisurfer.cpp:232
read_file
int read_file()
Input from Fermi surface file.
Definition: read_file.cpp:125
eqvec_fr
GLfloat eqvec_fr[3]
-vector for equator
Definition: fermisurfer.cpp:174
ntri
int * ntri
The number of triangle patch [nb].
Definition: fermisurfer.cpp:136
interpol
int interpol
Ratio of interpolation.
Definition: fermisurfer.cpp:111
linewidth
GLfloat linewidth
BZ/nodal-line/Fermiline width.
Definition: fermisurfer.cpp:193
secvec_fr
GLfloat secvec_fr[3]
-vector to define section
Definition: fermisurfer.cpp:161
trans
GLfloat trans[3]
Translation.
Definition: fermisurfer.cpp:186
solve3
GLfloat solve3(GLfloat a[3][3], GLfloat b[3])
Solve linear system.
Definition: basic_math.cpp:58
EF
GLfloat EF
Fermi energy.
Definition: fermisurfer.cpp:218
lstereo
int lstereo
Switch for the stereogram.
Definition: fermisurfer.cpp:119
patch_max
GLfloat patch_max
Max value across patch.
Definition: fermisurfer.cpp:149
skip_minmax
int skip_minmax
Definition: fermisurfer.cpp:244
thetax
GLfloat thetax
Rotation angle.
Definition: fermisurfer.cpp:190
LineColor
GLfloat LineColor[4]
Line color code.
Definition: fermisurfer.cpp:209
read_batch
void read_batch()
Definition: read_file.cpp:249
avec
GLfloat avec[3][3]
Direct lattice vector.
Definition: fermisurfer.cpp:100
basic_math.hpp
batch_name
wxString batch_name
Definition: fermisurfer.cpp:231
color_scale
int color_scale
Switch for full color scale mode.
Definition: fermisurfer.cpp:115
variable.hpp
Global variables.
thetaz
GLfloat thetaz
Rotation angle.
Definition: fermisurfer.cpp:192
nodeline
int nodeline
Switch for node lines.
Definition: fermisurfer.cpp:117
MyFrame::textbox_linewidth
wxTextCtrl * textbox_linewidth
Definition: menu.hpp:65
BackGroundColor
GLfloat BackGroundColor[4]
BackGround color code.
Definition: fermisurfer.cpp:208
fbz
int fbz
Switch for 1st Brillouin zone mode.
Definition: fermisurfer.cpp:116
Text2Lower
static void Text2Lower(char *value)
Definition: read_file.cpp:238
read_bxsf
void read_bxsf()
Definition: read_file.cpp:408
rgb_band
GLfloat ** rgb_band
Switch for drawn bands [nb].
Definition: fermisurfer.cpp:138
lequator
int lequator
Switch for equator.
Definition: fermisurfer.cpp:122
modulo
int modulo(int i, int n)
Work as Modulo function of fortran.
Definition: basic_math.cpp:46
itet
int itet
Counter for tetrahedron.
Definition: fermisurfer.cpp:147
nb
int nb
The number of Bands.
Definition: fermisurfer.cpp:99
mat
GLfloat ***** mat
Matrix element [nb][ng[0]][ng[1]][ng[2]][3].
Definition: fermisurfer.cpp:109
eqvec
GLfloat eqvec[3]
-vector for equator
Definition: fermisurfer.cpp:173
draw_band
int * draw_band
Switch for drawn bands [nb].
Definition: fermisurfer.cpp:137
eig
GLfloat **** eig
Eigenvalues [nb][ng[0]][ng[1]][ng[2]].
Definition: fermisurfer.cpp:108
bvec
GLfloat bvec[3][3]
Reciprocal lattice vector.
Definition: fermisurfer.cpp:101
myf
MyFrame * myf
Definition: fermisurfer.cpp:235
vf
GLfloat ***** vf
Matrix element [nb][ng[0]][ng[1]][ng[2]][3].
Definition: fermisurfer.cpp:110
nnl
int * nnl
The number of nodeline.
Definition: fermisurfer.cpp:154
ng
int ng[3]
Interpolated -grids
Definition: fermisurfer.cpp:107
thetay
GLfloat thetay
Rotation angle.
Definition: fermisurfer.cpp:191
rot
GLfloat rot[3][3]
Rotation matrix.
Definition: fermisurfer.cpp:187
secscale
GLfloat secscale
0.0 (across ) or 1.0
Definition: fermisurfer.cpp:162
lcolorbar
int lcolorbar
Switch for colorbar.
Definition: fermisurfer.cpp:118
terminal
wxTextCtrl * terminal
Definition: fermisurfer.cpp:237
ng0
int ng0[3]
-point grid in the input file
Definition: fermisurfer.cpp:97
scl
GLfloat scl
Initial scale.
Definition: fermisurfer.cpp:185
lsection
int lsection
Switch for the 2D Fermi lines.
Definition: fermisurfer.cpp:121
patch_min
GLfloat patch_min
Max value across patch.
Definition: fermisurfer.cpp:150
shiftk
int shiftk[3]
Wherether -grid is shifted or not.
Definition: fermisurfer.cpp:98
nequator
int * nequator
The number of equator.
Definition: fermisurfer.cpp:175