#include "TBTK/PropertyExtractor/Diagonalizer.h"
#include <complex>
#include <cstdlib>
using namespace std;
using namespace TBTK;
using namespace Visualization::MatPlotLib;
complex<double> i(0, 1);
int main(){
const unsigned int SIZE_X = 30;
const unsigned int SIZE_Y = 30;
const double t = -1;
const double mu = 0;
srand(time(nullptr));
Plotter plotter;
for(unsigned int n = 0; n < 3; n++){
double U = 2*n;
for(unsigned int x = 0; x < SIZE_X; x++){
for(unsigned int y = 0; y < SIZE_Y; y++){
U*(rand()%100 - 50)/50.,
{x, y},
{x, y}
);
if(x+1 < SIZE_X){
t,
{x+1, y},
{x, y}
) + HC;
}
if(y+1 < SIZE_Y){
t,
{x, y+1},
{x, y}
) + HC;
}
}
}
const double LOWER_BOUND = -8;
const double UPPER_BOUND = 8;
const unsigned int RESOLUTION = 1000;
propertyExtractor.setEnergyWindow(
LOWER_BOUND,
UPPER_BOUND,
RESOLUTION
);
const double SMOOTHING_SIGMA = 0.1;
const unsigned int SMOOTHING_WINDOW = 101;
dos = Smooth::gaussian(dos, SMOOTHING_SIGMA, SMOOTHING_WINDOW);
plotter.plot(dos, {{"label", "U=" + to_string(2*n)}});
if(n == 2){
plotter.save("figures/DOS.png");
= propertyExtractor.calculateDensity(
{{_a_, _a_}}
);
plotter.clear();
plotter.plot({_a_, _a_}, density);
plotter.save("figures/Density.png");
}
}
}