HΦ  3.2.0
HoneycombLattice.c
Go to the documentation of this file.
1 /*
2 HPhi-mVMC-StdFace - Common input generator
3 Copyright (C) 2015 The University of Tokyo
4 
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
21 #include "StdFace_vals.h"
22 #include "StdFace_ModelUtil.h"
23 #include <stdlib.h>
24 #include <stdio.h>
25 #include <math.h>
26 #include <complex.h>
27 #include <string.h>
28 
33 void StdFace_Honeycomb(struct StdIntList *StdI)
34 {
35  int isite, jsite, kCell, ntransMax, nintrMax;
36  int iL, iW;
37  FILE *fp;
38  double complex Cphase;
39  double dR[3];
40 
44  fp = fopen("lattice.gp", "w");
45 
46  StdI->NsiteUC = 2;
47 
48  fprintf(stdout, " @ Lattice Size & Shape\n\n");
49 
50  StdFace_PrintVal_d("a", &StdI->a, 1.0);
51  StdFace_PrintVal_d("Wlength", &StdI->length[0], StdI->a);
52  StdFace_PrintVal_d("Llength", &StdI->length[1], StdI->a);
53  StdFace_PrintVal_d("Wx", &StdI->direct[0][0], StdI->length[0]);
54  StdFace_PrintVal_d("Wy", &StdI->direct[0][1], 0.0);
55  StdFace_PrintVal_d("Lx", &StdI->direct[1][0], StdI->length[1] * 0.5);
56  StdFace_PrintVal_d("Ly", &StdI->direct[1][1], StdI->length[1] * 0.5 * sqrt(3.0));
57 
58  StdFace_PrintVal_d("phase0", &StdI->phase[0], 0.0);
59  StdFace_PrintVal_d("phase1", &StdI->phase[1], 0.0);
60 
61  StdFace_InitSite(StdI, fp, 2);
62  StdI->tau[0][0] = 0.0; StdI->tau[0][1] = 0.0; StdI->tau[0][2] = 0.0;
63  StdI->tau[1][0] = 1.0 / 3.0; StdI->tau[1][1] = 1.0 / 3.0; StdI->tau[1][2] = 0.0;
67  fprintf(stdout, "\n @ Hamiltonian \n\n");
68  StdFace_NotUsed_d("K", StdI->K);
69  StdFace_PrintVal_d("h", &StdI->h, 0.0);
70  StdFace_PrintVal_d("Gamma", &StdI->Gamma, 0.0);
71 
72  if (strcmp(StdI->model, "spin") == 0 ) {
73  StdFace_PrintVal_i("2S", &StdI->S2, 1);
74  StdFace_PrintVal_d("D", &StdI->D[2][2], 0.0);
75  StdFace_InputSpinNN(StdI->J, StdI->JAll, StdI->J0, StdI->J0All, "J0");
76  StdFace_InputSpinNN(StdI->J, StdI->JAll, StdI->J1, StdI->J1All, "J1");
77  StdFace_InputSpinNN(StdI->J, StdI->JAll, StdI->J2, StdI->J2All, "J2");
78  StdFace_InputSpinNN(StdI->Jp, StdI->JpAll, StdI->J0p, StdI->J0pAll, "J0'");
79  StdFace_InputSpinNN(StdI->Jp, StdI->JpAll, StdI->J1p, StdI->J1pAll, "J1'");
80  StdFace_InputSpinNN(StdI->Jp, StdI->JpAll, StdI->J2p, StdI->J2pAll, "J2'");
81  StdFace_InputSpinNN(StdI->Jpp, StdI->JppAll, StdI->J0pp, StdI->J0ppAll, "J0'");
82  StdFace_InputSpinNN(StdI->Jpp, StdI->JppAll, StdI->J1pp, StdI->J1ppAll, "J1'");
83  StdFace_InputSpinNN(StdI->Jpp, StdI->JppAll, StdI->J2pp, StdI->J2ppAll, "J2'");
84 
85  StdFace_NotUsed_d("mu", StdI->mu);
86  StdFace_NotUsed_d("U", StdI->U);
87  StdFace_NotUsed_c("t", StdI->t);
88  StdFace_NotUsed_c("t0", StdI->t0);
89  StdFace_NotUsed_c("t1", StdI->t1);
90  StdFace_NotUsed_c("t2", StdI->t2);
91  StdFace_NotUsed_c("t'", StdI->tp);
92  StdFace_NotUsed_c("t0'", StdI->t0p);
93  StdFace_NotUsed_c("t1'", StdI->t1p);
94  StdFace_NotUsed_c("t2'", StdI->t2p);
95  StdFace_NotUsed_d("V", StdI->V);
96  StdFace_NotUsed_d("V0", StdI->V0);
97  StdFace_NotUsed_d("V1", StdI->V1);
98  StdFace_NotUsed_d("V2", StdI->V2);
99  StdFace_NotUsed_d("V'", StdI->Vp);
100  StdFace_NotUsed_d("V0'", StdI->V0p);
101  StdFace_NotUsed_d("V1'", StdI->V1p);
102  StdFace_NotUsed_d("V2'", StdI->V2p);
103  }/*if (strcmp(StdI->model, "spin") == 0 )*/
104  else {
105  StdFace_PrintVal_d("mu", &StdI->mu, 0.0);
106  StdFace_PrintVal_d("U", &StdI->U, 0.0);
107  StdFace_InputHopp(StdI->t, &StdI->t0, "t0");
108  StdFace_InputHopp(StdI->t, &StdI->t1, "t1");
109  StdFace_InputHopp(StdI->t, &StdI->t2, "t2");
110  StdFace_InputHopp(StdI->tp, &StdI->t0p, "t0'");
111  StdFace_InputHopp(StdI->tp, &StdI->t1p, "t1'");
112  StdFace_InputHopp(StdI->tp, &StdI->t2p, "t2'");
113  StdFace_InputHopp(StdI->tpp, &StdI->t0pp, "t0''");
114  StdFace_InputHopp(StdI->tpp, &StdI->t1pp, "t1''");
115  StdFace_InputHopp(StdI->tpp, &StdI->t2pp, "t2''");
116  StdFace_InputCoulombV(StdI->V, &StdI->V0, "V0");
117  StdFace_InputCoulombV(StdI->V, &StdI->V1, "V1");
118  StdFace_InputCoulombV(StdI->V, &StdI->V2, "V2");
119  StdFace_InputCoulombV(StdI->Vp, &StdI->V0p, "V0'");
120  StdFace_InputCoulombV(StdI->Vp, &StdI->V1p, "V1'");
121  StdFace_InputCoulombV(StdI->Vp, &StdI->V2p, "V2'");
122  StdFace_InputCoulombV(StdI->Vpp, &StdI->V0pp, "V0''");
123  StdFace_InputCoulombV(StdI->Vpp, &StdI->V1pp, "V1''");
124  StdFace_InputCoulombV(StdI->Vpp, &StdI->V2pp, "V2''");
125  StdFace_PrintVal_d("V'", &StdI->Vp, 0.0);
126 
127  StdFace_NotUsed_J("J0", StdI->J0All, StdI->J0);
128  StdFace_NotUsed_J("J1", StdI->J1All, StdI->J1);
129  StdFace_NotUsed_J("J2", StdI->J2All, StdI->J2);
130  StdFace_NotUsed_J("J'", StdI->JpAll, StdI->Jp);
131  StdFace_NotUsed_d("D", StdI->D[2][2]);
132 
133  if (strcmp(StdI->model, "hubbard") == 0 ) {
134  StdFace_NotUsed_i("2S", StdI->S2);
135  StdFace_NotUsed_J("J", StdI->JAll, StdI->J);
136  }/*if (strcmp(StdI->model, "hubbard") == 0 )*/
137  else {
138  StdFace_PrintVal_i("2S", &StdI->S2, 1);
139  StdFace_InputSpin(StdI->J, StdI->JAll, "J");
140  }/*if (model != "hubbard")*/
141 
142  }/*if (model != "spin")*/
143  fprintf(stdout, "\n @ Numerical conditions\n\n");
148  StdI->nsite = StdI->NsiteUC * StdI->NCell;
149  if (strcmp(StdI->model, "kondo") == 0 ) StdI->nsite *= 2;
150  StdI->locspinflag = (int *)malloc(sizeof(int) * StdI->nsite);
151 
152  if (strcmp(StdI->model, "spin") == 0 )
153  for (isite = 0; isite < StdI->nsite; isite++) StdI->locspinflag[isite] = StdI->S2;
154  else if (strcmp(StdI->model, "hubbard") == 0 )
155  for (isite = 0; isite < StdI->nsite; isite++) StdI->locspinflag[isite] = 0;
156  else
157  for (iL = 0; iL < StdI->nsite / 2; iL++) {
158  StdI->locspinflag[iL] = StdI->S2;
159  StdI->locspinflag[iL + StdI->nsite / 2] = 0;
160  }
164  if (strcmp(StdI->model, "spin") == 0 ) {
165  ntransMax = StdI->nsite * (StdI->S2 + 1/*h*/ + 2 * StdI->S2/*Gamma*/);
166  nintrMax = StdI->NCell * (StdI->NsiteUC/*D*/ + 3/*J*/ + 6/*J'*/ + 3/*J''*/)
167  * (3 * StdI->S2 + 1) * (3 * StdI->S2 + 1);
168  }
169  else {
170  ntransMax = StdI->NCell * 2/*spin*/ * (
171  2 * StdI->NsiteUC/*mu+h+Gamma*/ + 6/*t*/ + 12/*t'*/ + 6/*t''*/);
172  nintrMax = StdI->NCell * (StdI->NsiteUC/*U*/ + 4 * (3/*V*/ + 6/*V'*/ + 3/*V''*/));
173 
174  if (strcmp(StdI->model, "kondo") == 0) {
175  ntransMax += StdI->nsite / 2 * (StdI->S2 + 1/*h*/ + 2 * StdI->S2/*Gamma*/);
176  nintrMax += StdI->nsite / 2 * (3 * StdI->S2 + 1) * (3 * StdI->S2 + 1);
177  }/*if (strcmp(StdI->model, "kondo") == 0)*/
178  }
179 
180  StdFace_MallocInteractions(StdI, ntransMax, nintrMax);
184  for (kCell = 0; kCell < StdI->NCell; kCell++) {
185 
186  iW = StdI->Cell[kCell][0];
187  iL = StdI->Cell[kCell][1];
188  /*
189  Local term
190  */
191  isite = StdI->NsiteUC * kCell;
192  if (strcmp(StdI->model, "kondo") == 0 ) isite += 2 * StdI->NCell;
193 
194  if (strcmp(StdI->model, "spin") == 0 ) {
195  StdFace_MagField(StdI, StdI->S2, -StdI->h, -StdI->Gamma, isite);
196  StdFace_MagField(StdI, StdI->S2, -StdI->h, -StdI->Gamma, isite + 1);
197  StdFace_GeneralJ(StdI, StdI->D, StdI->S2, StdI->S2, isite, isite);
198  StdFace_GeneralJ(StdI, StdI->D, StdI->S2, StdI->S2, isite + 1, isite + 1);
199  }/*if (strcmp(StdI->model, "spin") == 0 )*/
200  else {
201  StdFace_HubbardLocal(StdI, StdI->mu, -StdI->h, -StdI->Gamma, StdI->U, isite);
202  StdFace_HubbardLocal(StdI, StdI->mu, -StdI->h, -StdI->Gamma, StdI->U, isite + 1);
203 
204  if (strcmp(StdI->model, "kondo") == 0 ) {
205  jsite = StdI->NsiteUC * kCell;
206  StdFace_GeneralJ(StdI, StdI->J, 1, StdI->S2, isite, jsite);
207  StdFace_GeneralJ(StdI, StdI->J, 1, StdI->S2, isite + 1, jsite + 1);
208  StdFace_MagField(StdI, StdI->S2, -StdI->h, -StdI->Gamma, jsite);
209  StdFace_MagField(StdI, StdI->S2, -StdI->h, -StdI->Gamma, jsite + 1);
210  }/*if (strcmp(StdI->model, "kondo") == 0 )*/
211  }
212  /*
213  Nearest neighbor intra cell 0 -> 1
214  */
215  StdFace_SetLabel(StdI, fp, iW, iL, 0, 0, 0, 1, &isite, &jsite, 1, &Cphase, dR);
216 
217  if (strcmp(StdI->model, "spin") == 0 ) {
218  StdFace_GeneralJ(StdI, StdI->J0, StdI->S2, StdI->S2, isite, jsite);
219  }/*if (strcmp(StdI->model, "spin") == 0 )*/
220  else {
221  StdFace_Hopping(StdI, Cphase * StdI->t0, isite, jsite, dR);
222  StdFace_Coulomb(StdI, StdI->V0, isite, jsite);
223  }
224  /*
225  Nearest neighbor along W 1 -> 0
226  */
227  StdFace_SetLabel(StdI, fp, iW, iL, 1, 0, 1, 0, &isite, &jsite, 1, &Cphase, dR);
228 
229  if (strcmp(StdI->model, "spin") == 0 ) {
230  StdFace_GeneralJ(StdI, StdI->J1, StdI->S2, StdI->S2, isite, jsite);
231  }/*if (strcmp(StdI->model, "spin") == 0 )*/
232  else {
233  StdFace_Hopping(StdI, Cphase * StdI->t1, isite, jsite, dR);
234  StdFace_Coulomb(StdI, StdI->V1, isite, jsite);
235  }
236  /*
237  Nearest neighbor along L 1 -> 0
238  */
239  StdFace_SetLabel(StdI, fp, iW, iL, 0, 1, 1, 0, &isite, &jsite, 1, &Cphase, dR);
240 
241  if (strcmp(StdI->model, "spin") == 0 ) {
242  StdFace_GeneralJ(StdI, StdI->J2, StdI->S2, StdI->S2, isite, jsite);
243  }
244  else {
245  StdFace_Hopping(StdI, Cphase * StdI->t2, isite, jsite, dR);
246  StdFace_Coulomb(StdI, StdI->V2, isite, jsite);
247  }
248  /*
249  Second nearest neighbor along W 0 -> 0
250  */
251  StdFace_SetLabel(StdI, fp, iW, iL, 1, 0, 0, 0, &isite, &jsite, 2, &Cphase, dR);
252 
253  if (strcmp(StdI->model, "spin") == 0 ) {
254  StdFace_GeneralJ(StdI, StdI->J2p, StdI->S2, StdI->S2, isite, jsite);
255  }/*if (strcmp(StdI->model, "spin") == 0 )*/
256  else {
257  StdFace_Hopping(StdI, Cphase * StdI->t2p, isite, jsite, dR);
258  StdFace_Coulomb(StdI, StdI->V2p, isite, jsite);
259  }
260  /*
261  Second nearest neighbor along W 1 -> 1
262  */
263  StdFace_SetLabel(StdI, fp, iW, iL, 1, 0, 1, 1, &isite, &jsite, 2, &Cphase, dR);
264 
265  if (strcmp(StdI->model, "spin") == 0 ) {
266  StdFace_GeneralJ(StdI, StdI->J2p, StdI->S2, StdI->S2, isite, jsite);
267  }/*if (strcmp(StdI->model, "spin") == 0 )*/
268  else {
269  StdFace_Hopping(StdI, Cphase * StdI->t2p, isite, jsite, dR);
270  StdFace_Coulomb(StdI, StdI->V2p, isite, jsite);
271  }
272  /*
273  Second nearest neighbor along L 0 -> 0
274  */
275  StdFace_SetLabel(StdI, fp, iW, iL, 0, 1, 0, 0, &isite, &jsite, 2, &Cphase, dR);
276 
277  if (strcmp(StdI->model, "spin") == 0 ) {
278  StdFace_GeneralJ(StdI, StdI->J1p, StdI->S2, StdI->S2, isite, jsite);
279  }/*if (strcmp(StdI->model, "spin") == 0 )*/
280  else {
281  StdFace_Hopping(StdI, Cphase * StdI->t1p, isite, jsite, dR);
282  StdFace_Coulomb(StdI, StdI->V1p, isite, jsite);
283  }
284  /*
285  Second nearest neighbor along L 1 -> 1
286  */
287  StdFace_SetLabel(StdI, fp, iW, iL, 0, 1, 1, 1, &isite, &jsite, 2, &Cphase, dR);
288 
289  if (strcmp(StdI->model, "spin") == 0 ) {
290  StdFace_GeneralJ(StdI, StdI->J1p, StdI->S2, StdI->S2, isite, jsite);
291  }/*if (strcmp(StdI->model, "spin") == 0 )*/
292  else {
293  StdFace_Hopping(StdI, Cphase * StdI->t1p, isite, jsite, dR);
294  StdFace_Coulomb(StdI, StdI->V1p, isite, jsite);
295  }
296  /*
297  Second nearest neighbor along W-L 0 -> 0
298  */
299  StdFace_SetLabel(StdI, fp, iW, iL, 1, - 1, 0, 0, &isite, &jsite, 2, &Cphase, dR);
300 
301  if (strcmp(StdI->model, "spin") == 0 ) {
302  StdFace_GeneralJ(StdI, StdI->J0p, StdI->S2, StdI->S2, isite, jsite);
303  }/*if (strcmp(StdI->model, "spin") == 0 )*/
304  else {
305  StdFace_Hopping(StdI, Cphase * StdI->t0p, isite, jsite, dR);
306  StdFace_Coulomb(StdI, StdI->V0p, isite, jsite);
307  }
308  /*
309  Second nearest neighbor along W - L 1 -> 1
310  */
311  StdFace_SetLabel(StdI, fp, iW, iL, 1, -1, 1, 1, &isite, &jsite, 2, &Cphase, dR);
312 
313  if (strcmp(StdI->model, "spin") == 0 ) {
314  StdFace_GeneralJ(StdI, StdI->J0p, StdI->S2, StdI->S2, isite, jsite);
315  }/*if (strcmp(StdI->model, "spin") == 0 )*/
316  else {
317  StdFace_Hopping(StdI, Cphase * StdI->t0p, isite, jsite, dR);
318  StdFace_Coulomb(StdI, StdI->V0p, isite, jsite);
319  }
320  /*
321  Third nearest neighbor along W - L 0 -> 1
322  */
323  StdFace_SetLabel(StdI, fp, iW, iL, 1, -1, 0, 1, &isite, &jsite, 3, &Cphase, dR);
324 
325  if (strcmp(StdI->model, "spin") == 0) {
326  StdFace_GeneralJ(StdI, StdI->J1pp, StdI->S2, StdI->S2, isite, jsite);
327  }/*if (strcmp(StdI->model, "spin") == 0 )*/
328  else {
329  StdFace_Hopping(StdI, Cphase * StdI->t1pp, isite, jsite, dR);
330  StdFace_Coulomb(StdI, StdI->V1pp, isite, jsite);
331  }
332  /*
333  Third nearest neighbor along - W - L 0 -> 1
334  */
335  StdFace_SetLabel(StdI, fp, iW, iL, -1, -1, 0, 1, &isite, &jsite, 3, &Cphase, dR);
336 
337  if (strcmp(StdI->model, "spin") == 0) {
338  StdFace_GeneralJ(StdI, StdI->J0pp, StdI->S2, StdI->S2, isite, jsite);
339  }/*if (strcmp(StdI->model, "spin") == 0 )*/
340  else {
341  StdFace_Hopping(StdI, Cphase * StdI->t0pp, isite, jsite, dR);
342  StdFace_Coulomb(StdI, StdI->V0pp, isite, jsite);
343  }
344  /*
345  Third nearest neighbor along - W + L 0 -> 1
346  */
347  StdFace_SetLabel(StdI, fp, iW, iL, -1, 1, 0, 1, &isite, &jsite, 3, &Cphase, dR);
348 
349  if (strcmp(StdI->model, "spin") == 0) {
350  StdFace_GeneralJ(StdI, StdI->J2pp, StdI->S2, StdI->S2, isite, jsite);
351  }/*if (strcmp(StdI->model, "spin") == 0 )*/
352  else {
353  StdFace_Hopping(StdI, Cphase * StdI->t2pp, isite, jsite, dR);
354  StdFace_Coulomb(StdI, StdI->V2pp, isite, jsite);
355  }
356  }/*for (kCell = 0; kCell < StdI->NCell; kCell++)*/
357 
358  fprintf(fp, "plot \'-\' w d lc 7\n0.0 0.0\nend\npause -1\n");
359  fclose(fp);
360  StdFace_PrintGeometry(StdI);
361 }/*void StdFace_Honeycomb*/
362 
363 #if defined(_HPhi)
364 
371 {
372  int isite, ipivot, i1, i2;
373  int kintr;
374  FILE *fp;
375 
376  if (StdI->box[0][1] != 0 || StdI->box[1][0] != 0) {
377  fprintf(stdout, "\nERROR ! (a0W, a0L, a1W, a1L) can not be used with SpinGCBoost.\n\n");
378  StdFace_exit(-1);
379  }
380  for (i1 = 0; i1 < 3; i1++) {
381  for (i2 = 0; i2 < 3; i2++) {
382  if (fabs(StdI->Jp[i1][i2]) > 1.0e-8) {
383  fprintf(stdout, "\nERROR ! J' can not be used with SpinGCBoost.\n\n");
384  StdFace_exit(-1);
385  }
386  }
387  }
388  /*
389  Magnetic field
390  */
391  fp = fopen("boost.def", "w");
392  fprintf(fp, "# Magnetic field\n");
393  fprintf(fp, "%25.15e %25.15e %25.15e\n",
394  -0.5 * StdI->Gamma, 0.0, -0.5 *StdI->h);
395  /*
396  Interaction
397  */
398  fprintf(fp, "%d # Number of type of J\n", 3);
399  fprintf(fp, "# J 0\n");
400  fprintf(fp, "%25.15e %25.15e %25.15e\n",
401  0.25 * StdI->J0[0][0], 0.25 * StdI->J0[0][1], 0.25 * StdI->J0[0][2]);
402  fprintf(fp, "%25.15e %25.15e %25.15e\n",
403  0.25 * StdI->J0[0][1], 0.25 * StdI->J0[1][1], 0.25 * StdI->J0[1][2]);
404  fprintf(fp, "%25.15e %25.15e %25.15e\n",
405  0.25 * StdI->J0[0][2], 0.25 * StdI->J0[1][2], 0.25 * StdI->J0[2][2]);
406  fprintf(fp, "# J 1\n");
407  fprintf(fp, "%25.15e %25.15e %25.15e\n",
408  0.25 * StdI->J1[0][0], 0.25 * StdI->J1[0][1], 0.25 * StdI->J1[0][2]);
409  fprintf(fp, "%25.15e %25.15e %25.15e\n",
410  0.25 * StdI->J1[0][1], 0.25 * StdI->J1[1][1], 0.25 * StdI->J1[1][2]);
411  fprintf(fp, "%25.15e %25.15e %25.15e\n",
412  0.25 * StdI->J1[0][2], 0.25 * StdI->J1[1][2], 0.25 * StdI->J1[2][2]);
413  fprintf(fp, "# J 2\n");
414  fprintf(fp, "%25.15e %25.15e %25.15e\n",
415  0.25 * StdI->J2[0][0], 0.25 * StdI->J2[0][1], 0.25 * StdI->J2[0][2]);
416  fprintf(fp, "%25.15e %25.15e %25.15e\n",
417  0.25 * StdI->J2[0][1], 0.25 * StdI->J2[1][1], 0.25 * StdI->J2[1][2]);
418  fprintf(fp, "%25.15e %25.15e %25.15e\n",
419  0.25 * StdI->J2[0][2], 0.25 * StdI->J2[1][2], 0.25 * StdI->J2[2][2]);
420  /*
421  Topology
422  */
423  if (StdI->S2 != 1) {
424  fprintf(stdout, "\n ERROR! S2 must be 1 in Boost. \n\n");
425  StdFace_exit(-1);
426  }
427  StdI->ishift_nspin = 3;
428  if (StdI->L < 2) {
429  fprintf(stdout, "\n ERROR! L < 2 \n\n");
430  StdFace_exit(-1);
431  }
432  if (StdI->W % StdI->ishift_nspin != 0) {
433  fprintf(stdout, "\n ERROR! W %% %d != 0 \n\n", StdI->ishift_nspin);
434  StdFace_exit(-1);
435  }
436  StdI->num_pivot = 2;
437  if (StdI->W != 3) {
438  fprintf(stdout, "DEBUG: W != 3\n");
439  StdFace_exit(-1);
440  }
441  StdI->W = 6;
442  fprintf(fp, "# W0 R0 StdI->num_pivot StdI->ishift_nspin\n");
443  fprintf(fp, "%d %d %d %d\n", StdI->W, StdI->L, StdI->num_pivot, StdI->ishift_nspin);
444 
445  StdI->list_6spin_star = (int **)malloc(sizeof(int*) * StdI->num_pivot);
446  for (ipivot = 0; ipivot < StdI->num_pivot; ipivot++) {
447  StdI->list_6spin_star[ipivot] = (int *)malloc(sizeof(int) * 7);
448  }
449 
450  StdI->list_6spin_star[0][0] = 5; // num of J
451  StdI->list_6spin_star[0][1] = 1;
452  StdI->list_6spin_star[0][2] = 1;
453  StdI->list_6spin_star[0][3] = 1;
454  StdI->list_6spin_star[0][4] = 2;
455  StdI->list_6spin_star[0][5] = 1;
456  StdI->list_6spin_star[0][6] = 1; // flag
457 
458  StdI->list_6spin_star[1][0] = 4; //(0,2+2*j)=4 ! num of J
459  StdI->list_6spin_star[1][1] = 1; //(1,2+2*j)=1
460  StdI->list_6spin_star[1][2] = 1; //(2,2+2*j)=1
461  StdI->list_6spin_star[1][3] = 1; //(3,2+2*j)=1
462  StdI->list_6spin_star[1][4] = 2; //(4,2+2*j)=2
463  StdI->list_6spin_star[1][5] = 2; //(5,2+2*j)=2
464  StdI->list_6spin_star[1][6] = 1; //(6,2+2*j)=1 ! flag
465 
466  fprintf(fp, "# StdI->list_6spin_star\n");
467  for (ipivot = 0; ipivot < StdI->num_pivot; ipivot++) {
468  fprintf(fp, "# pivot %d\n", ipivot);
469  for (isite = 0; isite < 7; isite++) {
470  fprintf(fp, "%d ", StdI->list_6spin_star[ipivot][isite]);
471  }
472  fprintf(fp, "\n");
473  }
474 
475  StdI->list_6spin_pair = (int ***)malloc(sizeof(int**) * StdI->num_pivot);
476  for (ipivot = 0; ipivot < StdI->num_pivot; ipivot++) {
477  StdI->list_6spin_pair[ipivot] = (int **)malloc(sizeof(int*) * 7);
478  for (isite = 0; isite < 7; isite++) {
479  StdI->list_6spin_pair[ipivot][isite] = (int *)malloc(sizeof(int) * StdI->list_6spin_star[ipivot][0]);
480  }
481  }
482 
483  StdI->list_6spin_pair[0][0][0] = 0; //(1,1,1+2*j)=0
484  StdI->list_6spin_pair[0][1][0] = 1; //(2,1,1+2*j)=1
485  StdI->list_6spin_pair[0][2][0] = 2; //(3,1,1+2*j)=2
486  StdI->list_6spin_pair[0][3][0] = 3; //(4,1,1+2*j)=3
487  StdI->list_6spin_pair[0][4][0] = 4; //(5,1,1+2*j)=4
488  StdI->list_6spin_pair[0][5][0] = 5; //(6,1,1+2*j)=5
489  StdI->list_6spin_pair[0][6][0] = 1; //(7,1,1+2*j)=3 ! type of J
490  StdI->list_6spin_pair[0][0][1] = 1; //(1,2,1+2*j)=1
491  StdI->list_6spin_pair[0][1][1] = 2; //(2,2,1+2*j)=2
492  StdI->list_6spin_pair[0][2][1] = 0; //(3,2,1+2*j)=0
493  StdI->list_6spin_pair[0][3][1] = 3; //(4,2,1+2*j)=3
494  StdI->list_6spin_pair[0][4][1] = 4; //(5,2,1+2*j)=4
495  StdI->list_6spin_pair[0][5][1] = 5; //(6,2,1+2*j)=5
496  StdI->list_6spin_pair[0][6][1] = 2; //(7,2,1+2*j)=1 ! type of J
497  StdI->list_6spin_pair[0][0][2] = 2; //(1,3,1+2*j)=2
498  StdI->list_6spin_pair[0][1][2] = 3; //(2,3,1+2*j)=3
499  StdI->list_6spin_pair[0][2][2] = 0; //(3,3,1+2*j)=0
500  StdI->list_6spin_pair[0][3][2] = 1; //(4,3,1+2*j)=1
501  StdI->list_6spin_pair[0][4][2] = 4; //(5,3,1+2*j)=4
502  StdI->list_6spin_pair[0][5][2] = 5; //(6,3,1+2*j)=5
503  StdI->list_6spin_pair[0][6][2] = 1; //(7,3,1+2*j)=3 ! type of J
504  StdI->list_6spin_pair[0][0][3] = 0; //(1,4,1+2*j)=0
505  StdI->list_6spin_pair[0][1][3] = 4; //(2,4,1+2*j)=4
506  StdI->list_6spin_pair[0][2][3] = 1; //(3,4,1+2*j)=1
507  StdI->list_6spin_pair[0][3][3] = 2; //(4,4,1+2*j)=2
508  StdI->list_6spin_pair[0][4][3] = 3; //(5,4,1+2*j)=3
509  StdI->list_6spin_pair[0][5][3] = 5; //(6,4,1+2*j)=5
510  StdI->list_6spin_pair[0][6][3] = 2; //(7,4,1+2*j)=1 ! type of J
511  StdI->list_6spin_pair[0][0][4] = 1; //(1,5,1+2*j)=1
512  StdI->list_6spin_pair[0][1][4] = 5; //(2,5,1+2*j)=5
513  StdI->list_6spin_pair[0][2][4] = 0; //(3,5,1+2*j)=0
514  StdI->list_6spin_pair[0][3][4] = 2; //(4,5,1+2*j)=2
515  StdI->list_6spin_pair[0][4][4] = 3; //(5,5,1+2*j)=3
516  StdI->list_6spin_pair[0][5][4] = 4; //(6,5,1+2*j)=4
517  StdI->list_6spin_pair[0][6][4] = 3; //(7,5,1+2*j)=2 ! type of J
518 
519  StdI->list_6spin_pair[1][0][0] = 0; //(1,1,2+2*j)=0
520  StdI->list_6spin_pair[1][1][0] = 1; //(2,1,2+2*j)=1
521  StdI->list_6spin_pair[1][2][0] = 2; //(3,1,2+2*j)=2
522  StdI->list_6spin_pair[1][3][0] = 3; //(4,1,2+2*j)=3
523  StdI->list_6spin_pair[1][4][0] = 4; //(5,1,2+2*j)=4
524  StdI->list_6spin_pair[1][5][0] = 5; //(6,1,2+2*j)=5
525  StdI->list_6spin_pair[1][6][0] = 2; //(7,1,2+2*j)=1 ! type of J
526  StdI->list_6spin_pair[1][0][1] = 1; //(1,2,2+2*j)=1
527  StdI->list_6spin_pair[1][1][1] = 2; //(2,2,2+2*j)=2
528  StdI->list_6spin_pair[1][2][1] = 0; //(3,2,2+2*j)=0
529  StdI->list_6spin_pair[1][3][1] = 3; //(4,2,2+2*j)=3
530  StdI->list_6spin_pair[1][4][1] = 4; //(5,2,2+2*j)=4
531  StdI->list_6spin_pair[1][5][1] = 5; //(6,2,2+2*j)=5
532  StdI->list_6spin_pair[1][6][1] = 1; //(7,2,2+2*j)=3 ! type of J
533  StdI->list_6spin_pair[1][0][2] = 0; //(1,3,2+2*j)=0
534  StdI->list_6spin_pair[1][1][2] = 4; //(2,3,2+2*j)=4
535  StdI->list_6spin_pair[1][2][2] = 1; //(3,3,2+2*j)=1
536  StdI->list_6spin_pair[1][3][2] = 2; //(4,3,2+2*j)=2
537  StdI->list_6spin_pair[1][4][2] = 3; //(5,3,2+2*j)=3
538  StdI->list_6spin_pair[1][5][2] = 5; //(6,3,2+2*j)=5
539  StdI->list_6spin_pair[1][6][2] = 3; //(7,3,2+2*j)=2 ! type of J
540  StdI->list_6spin_pair[1][0][3] = 2; //(1,4,2+2*j)=2
541  StdI->list_6spin_pair[1][1][3] = 5; //(2,4,2+2*j)=5
542  StdI->list_6spin_pair[1][2][3] = 0; //(3,4,2+2*j)=0
543  StdI->list_6spin_pair[1][3][3] = 1; //(4,4,2+2*j)=1
544  StdI->list_6spin_pair[1][4][3] = 3; //(5,4,2+2*j)=3
545  StdI->list_6spin_pair[1][5][3] = 4; //(6,4,2+2*j)=4
546  StdI->list_6spin_pair[1][6][3] = 3; //(7,4,2+2*j)=2 ! type of J
547 
548  fprintf(fp, "# StdI->list_6spin_pair\n");
549  for (ipivot = 0; ipivot < StdI->num_pivot; ipivot++) {
550  fprintf(fp, "# pivot %d\n", ipivot);
551  for (kintr = 0; kintr < StdI->list_6spin_star[ipivot][0]; kintr++) {
552  for (isite = 0; isite < 7; isite++) {
553  fprintf(fp, "%d ", StdI->list_6spin_pair[ipivot][isite][kintr]);
554  }
555  fprintf(fp, "\n");
556  }
557  }
558  fclose(fp);
559 
560  for (ipivot = 0; ipivot < StdI->num_pivot; ipivot++) {
561  free(StdI->list_6spin_star[ipivot]);
562  }
563  free(StdI->list_6spin_star);
564 
565  for (ipivot = 0; ipivot < StdI->num_pivot; ipivot++) {
566  for (isite = 0; isite < 7; isite++) {
567  free(StdI->list_6spin_pair[ipivot][isite]);
568  }
569  free(StdI->list_6spin_pair[ipivot]);
570  }
571  free(StdI->list_6spin_pair);
572 
573 }
574 #endif
void StdFace_PrintVal_i(char *valname, int *val, int val0)
Print a valiable (integer) read from the input file if it is not specified in the input file (=214748...
double V2
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:83
double J0pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J0&#39;&#39;x, J0&#39;&#39;y, J0&#39;&#39;z, J0&#39;&#39;xy, etc. or set in StdFace_InputSpin().
Definition: StdFace_vals.h:122
double Jp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J&#39;x, J&#39;y, J&#39;z, J&#39;xy, etc.
Definition: StdFace_vals.h:114
int box[3][3]
The shape of the super-cell. Input parameter a0W, a0L, a0H, etc. or defined from StdIntList::W, etc. in StdFace_InitSite().
Definition: StdFace_vals.h:44
double complex t2p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:71
double J[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter Jx, Jy, Jz, Jxy, etc.
Definition: StdFace_vals.h:112
void StdFace_GeneralJ(struct StdIntList *StdI, double J[3][3], int Si2, int Sj2, int isite, int jsite)
Treat J as a 3*3 matrix [(6S + 1)*(6S&#39; + 1) interactions].
int L
Number of sites along the 2nd axis, input parameter.
Definition: StdFace_vals.h:40
void StdFace_HubbardLocal(struct StdIntList *StdI, double mu0, double h0, double Gamma0, double U0, int isite)
Add intra-Coulomb, magnetic field, chemical potential for the itenerant electron. ...
double D[3][3]
Coefficient for input parameter D. Only D[2][2] is used.
Definition: StdFace_vals.h:145
double J1p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J1&#39;x, J1&#39;y...
Definition: StdFace_vals.h:128
void StdFace_PrintGeometry(struct StdIntList *StdI)
Print geometry of sites for the pos-process of correlation function.
double J1ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J1&#39;&#39;.
Definition: StdFace_vals.h:102
double J2pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J2&#39;&#39;x, J2&#39;&#39;y, J2&#39;&#39;z, J2&#39;&#39;xy, etc. or set in StdFace_InputSpin().
Definition: StdFace_vals.h:140
double JpAll
Isotropic, diagonal spin coupling (2nd Near), input parameter Jp.
Definition: StdFace_vals.h:90
void StdFace_InputHopp(double complex t, double complex *t0, char *t0name)
Input hopping integral from the input file, if it is not specified, use the default value(0 or the is...
double J1[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J1x, J1y, J1z, J1xy, etc. or set in StdFace_InputSpinNN().
Definition: StdFace_vals.h:125
double J2p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J2&#39;x, J2&#39;y...
Definition: StdFace_vals.h:137
int ** list_6spin_star
Definition: StdFace_vals.h:279
void StdFace_Hopping(struct StdIntList *StdI, double complex trans0, int isite, int jsite, double *dR)
Add Hopping for the both spin.
double complex t
Nearest-neighbor hopping, input parameter.
Definition: StdFace_vals.h:62
void StdFace_MallocInteractions(struct StdIntList *StdI, int ntransMax, int nintrMax)
Malloc Arrays for interactions.
double JAll
Isotropic, diagonal spin coupling (1st Near.), input parameter J.
Definition: StdFace_vals.h:88
int S2
Total spin |S| of a local spin, input from file.
Definition: StdFace_vals.h:236
int NsiteUC
Number of sites in the unit cell. Defined in the beginning of each lattice function.
Definition: StdFace_vals.h:53
void StdFace_InputSpin(double Jp[3][3], double JpAll, char *Jpname)
Input spin-spin interaction other than nearest-neighbor.
double J1All
Anisotropic, diagonal spin coupling (1st Near), input parameter J1.
Definition: StdFace_vals.h:98
double V0p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:78
double J1pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J1&#39;&#39;x, J1&#39;&#39;y, J1&#39;&#39;z, J1&#39;&#39;xy, etc. or set in StdFace_InputSpin().
Definition: StdFace_vals.h:131
void StdFace_InitSite(struct StdIntList *StdI, FILE *fp, int dim)
Initialize the super-cell where simulation is performed.
int W
Number of sites along the 1st axis, input parameter.
Definition: StdFace_vals.h:39
double V2p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:84
double V2pp
Anisotropic Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:85
double J2ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J2&#39;&#39;.
Definition: StdFace_vals.h:108
double complex tpp
3rd-nearest hopping, input parameter
Definition: StdFace_vals.h:73
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
void StdFace_NotUsed_J(char *valname, double JAll, double J[3][3])
Stop HPhi if variables (real) not used is specified in the input file (!=NaN).
double Gamma
Transvars magnetic field, input parameter.
Definition: StdFace_vals.h:148
double JppAll
Isotropic, diagonal spin coupling (3rd Near), input parameter J&#39;&#39;.
Definition: StdFace_vals.h:110
double complex t1pp
Anisotropic hopping (3rd), input parameter.
Definition: StdFace_vals.h:69
double V1
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:80
double J0All
Anisotropic, diagonal spin coupling (1st Near), input parameter J0.
Definition: StdFace_vals.h:92
double J0[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J0x, J0y, J0z, J0xy, etc. or set in StdFace_InputSpinNN().
Definition: StdFace_vals.h:116
double J0ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J0&#39;&#39;.
Definition: StdFace_vals.h:96
double U
On-site Coulomb potential, input parameter.
Definition: StdFace_vals.h:74
double complex t0p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:65
int ** Cell
[StdIntList][3] The cell position in the fractional coordinate. Malloc and Set in StdFace_InitSite()...
Definition: StdFace_vals.h:51
double complex t2pp
Anisotropic hopping (3rd), input parameter.
Definition: StdFace_vals.h:72
double phase[3]
Boundary phase, input parameter phase0, etc.
Definition: StdFace_vals.h:154
double V1pp
Anisotropic Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:82
double J0pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J0&#39;.
Definition: StdFace_vals.h:94
int ishift_nspin
Definition: StdFace_vals.h:281
double length[3]
Anisotropic lattice constant, input parameter wlength, llength, hlength.
Definition: StdFace_vals.h:37
int * locspinflag
[StdIntList::nsite] LocSpin in Expert mode, malloc and set in each lattice file.
Definition: StdFace_vals.h:162
double complex tp
2nd-nearest hopping, input parameter
Definition: StdFace_vals.h:63
void StdFace_Honeycomb(struct StdIntList *StdI)
Setup a Hamiltonian for the Hubbard model on a Honeycomb lattice.
double Jpp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J&#39;&#39;x, J&#39;&#39;y...
Definition: StdFace_vals.h:143
double complex t1
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:67
double V
Off-site Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:75
double complex t0
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:64
double direct[3][3]
The unit direct lattice vector. Set in StdFace_InitSite().
Definition: StdFace_vals.h:42
void StdFace_MagField(struct StdIntList *StdI, int S2, double h, double Gamma, int isite)
Add longitudinal and transvars magnetic field to the list.
void StdFace_NotUsed_d(char *valname, double val)
Stop HPhi if a variable (real) not used is specified in the input file (!=NaN).
double complex t0pp
Anisotropic hopping (3rd), input parameter.
Definition: StdFace_vals.h:66
double V0
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:77
void StdFace_Coulomb(struct StdIntList *StdI, double V, int isite, int jsite)
Add onsite/offsite Coulomb term to the list StdIntList::Cinter and StdIntList::CinterIndx, and increase the number of them (StdIntList::NCinter).
void StdFace_InputCoulombV(double V, double *V0, char *V0name)
Input off-site Coulomb interaction from the input file, if it is not specified, use the default value...
void StdFace_SetLabel(struct StdIntList *StdI, FILE *fp, int iW, int iL, int diW, int diL, int isiteUC, int jsiteUC, int *isite, int *jsite, int connect, double complex *Cphase, double *dR)
Set Label in the gnuplot display (Only used in 2D system)
double Vpp
Off-site Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:86
double complex t1p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:68
double complex t2
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:70
void StdFace_Honeycomb_Boost(struct StdIntList *StdI)
double mu
Chemical potential, input parameter.
Definition: StdFace_vals.h:61
void StdFace_PrintVal_d(char *valname, double *val, double val0)
Print a valiable (real) read from the input file if it is not specified in the input file (=NaN)...
int NCell
The number of the unit cell in the super-cell (determinant of StdIntList::box). Set in StdFace_InitSi...
Definition: StdFace_vals.h:49
double Vp
Off-site Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:76
double J1pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J1&#39;.
Definition: StdFace_vals.h:100
int *** list_6spin_pair
Definition: StdFace_vals.h:278
void StdFace_NotUsed_c(char *valname, double complex val)
Stop HPhi if a variable (complex) not used is specified in the input file (!=NaN).
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:161
double J2All
Anisotropic, diagonal spin coupling (1st Near), input parameter J2.
Definition: StdFace_vals.h:104
Variables used in the Standard mode. These variables are passed as a pointer of the structure(StdIntL...
double V0pp
Anisotropic Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:79
void StdFace_NotUsed_i(char *valname, int val)
Stop HPhi if a variable (integer) not used is specified in the input file (!=2147483647, the upper limt of Int).
double h
Longitudinal magnetic field, input parameter.
Definition: StdFace_vals.h:147
double a
The lattice constant. Input parameter.
Definition: StdFace_vals.h:36
double J2[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J2x, J2y, J2z, J2xy, etc. or set in StdFace_InputSpinNN().
Definition: StdFace_vals.h:134
double J2pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J2&#39;.
Definition: StdFace_vals.h:106
double ** tau
Cell-internal site position in the fractional coordinate. Defined in the beginning of each lattice fu...
Definition: StdFace_vals.h:55
double J0p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J0&#39;x, J0&#39;y...
Definition: StdFace_vals.h:119
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
void StdFace_InputSpinNN(double J[3][3], double JAll, double J0[3][3], double J0All, char *J0name)
Input nearest-neighbor spin-spin interaction.
double V1p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:81
double K
4-spin term. Not used.
Definition: StdFace_vals.h:149