39 int main(
int argc,
char **argv)
48 bool momspace =
false;
50 struct option long_options[] =
52 {
"output", required_argument, 0,
'o'},
53 {
"interaction", required_argument, 0,
'U'},
54 {
"sites", required_argument, 0,
'L'},
55 {
"particles", required_argument, 0,
'N'},
56 {
"momspace", no_argument, 0,
'm'},
57 {
"help", no_argument, 0,
'h'},
63 while( (j = getopt_long (argc, argv,
"ho:U:L:N:m", long_options, &i)) != -1)
68 cout <<
"Usage: " << argv[0] <<
" [OPTIONS]\n"
70 " -o, --output=output-filename Set the output filename\n"
71 " -L, --sites=L Set the number of sites\n"
72 " -N, --particles=N Set the number of particles\n"
73 " -U, --interaction=U Set the on-site interaction\n"
74 " -m, --momspace Work in momentum space\n"
75 " -h, --help Display this help\n"
98 std::cerr <<
"You need to specifiy the system!" << endl;
102 cout <<
"Creating for L= " << L <<
" N= " << N <<
" U= " << U << endl;
104 const std::vector<int> orb2irrep (L, 0);
118 ham.setTmat(i, i, -2*std::cos(2*M_PI/(1.0*L)*i));
121 for(
int k1=0;k1<L;k1++)
122 for(
int k2=0;k2<L;k2++)
123 for(
int k3=0;k3<L;k3++)
124 for(
int k4=0;k4<L;k4++)
125 if((k1+k2)%L == (k3+k4)%L)
126 ham.setVmat(k1,k2,k3,k4, U*1.0/L);
131 for(
int i=1;i<(L-1);i++)
133 ham.setTmat(i, i+1, -1);
134 ham.setTmat(i, i-1, -1);
136 ham.setTmat(0, 1, -1);
137 ham.setTmat(L-1, L-2, -1);
140 ham.setTmat(0, L-1, -1);
141 ham.setTmat(L-1, 0, -1);
145 ham.setVmat(i, i, i, i, U);
150 output =
"hub-integrals-";
154 output += std::to_string(L) +
"-" + std::to_string(N) +
"-" + std::to_string(U) +
".h5";
157 cout <<
"Writing Hamiltonian to " << output << endl;
void reset()
set everything to zero
int main(int argc, char **argv)