ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | List of all members
Occupy Class Reference

#include <occupy.h>

Collaboration diagram for Occupy:

Public Member Functions

 Occupy ()
 
 ~Occupy ()
 

Static Public Member Functions

static void decision (const std::string &name, const std::string &smearing_method, const double &smearing_sigma)
 
static const bool & gauss (void)
 
static const bool & fix (void)
 
static void iweights (const int nks, const std::vector< double > &wk, const int nband, const double &nelec, const ModuleBase::matrix &ekb, double &ef, ModuleBase::matrix &wg, const int &is, const std::vector< int > &isk)
 calculates weights and fermi energy for semiconductors and insulators
 
static void gweights (const int nks, const std::vector< double > &wk, const int nband, const double &nelec, const double &smearing_sigma, const int ngauss, const ModuleBase::matrix &ekb, double &ef, double &demet, ModuleBase::matrix &wg, const int &is, const std::vector< int > &isk)
 calculates weights with the gaussian spreading technique
 
static void tweights (const int nks, const int nspin, const int nband, const double &nelec, const int ntetra, const ModuleBase::matrix &tetra, double **ekb, double &ef, ModuleBase::matrix &wg)
 
static double wsweight (const ModuleBase::Vector3< double > &r, ModuleBase::Vector3< double > *rws, const int nrws)
 

Static Public Attributes

static bool use_gaussian_broadening = false
 
static int gaussian_type = 0
 
static double gaussian_parameter = 0.01
 
static bool fixed_occupations = false
 

Static Private Member Functions

static void efermig (const ModuleBase::matrix &ekb, const int nbnd, const int nks, const double &nelec, const std::vector< double > &wk, const double &smearing_sigma, const int ngauss, double &ef, const int &is, const std::vector< int > &isk)
 Finds the Fermi energy.
 
static double sumkg (const ModuleBase::matrix &ekb, const int nband, const int nks, const std::vector< double > &wk, const double &smearing_sigma, const int ngauss, const double &e, const int &is, const std::vector< int > &isk)
 This function computes the number of states under a given energy e.
 
static double wgauss (const double &x, const int n)
 
static double w1gauss (const double &x, const int n)
 
static void efermit (double **ekb, const int nband, const int nks, const double &nelec, const int nspin, const int ntetra, const ModuleBase::matrix &tetra, double &ef)
 
static double sumkt (double **ekb, const int nband, const int nks, const int nspin, const int ntetra, const ModuleBase::matrix &tetra, const double &eup)
 
static void piksort (const int n, double *a)
 

Constructor & Destructor Documentation

◆ Occupy()

Occupy::Occupy ( )

◆ ~Occupy()

Occupy::~Occupy ( )

Member Function Documentation

◆ decision()

void Occupy::decision ( const std::string &  name,
const std::string &  smearing_method,
const double &  smearing_sigma 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ efermig()

void Occupy::efermig ( const ModuleBase::matrix ekb,
const int  nband,
const int  nks,
const double &  nelec,
const std::vector< double > &  wk,
const double &  smearing_sigma,
const int  ngauss,
double &  ef,
const int &  is,
const std::vector< int > &  isk 
)
staticprivate

Finds the Fermi energy.

Parameters
ekbband energy.
nbandnumber of bands.
nksnks number of k points.
nelecnumber of electrons.
wkwk weight of each k point(symmetry considered).
smearing_sigmaparameter input by user.
ngausswhich type of smearing.
efoutput: fermi level
isspin
iskarray to point out each k belong to which spin
Here is the call graph for this function:
Here is the caller graph for this function:

◆ efermit()

static void Occupy::efermit ( double **  ekb,
const int  nband,
const int  nks,
const double &  nelec,
const int  nspin,
const int  ntetra,
const ModuleBase::matrix tetra,
double &  ef 
)
staticprivate

◆ fix()

static const bool & Occupy::fix ( void  )
inlinestatic

◆ gauss()

static const bool & Occupy::gauss ( void  )
inlinestatic

◆ gweights()

void Occupy::gweights ( const int  nks,
const std::vector< double > &  wk,
const int  nband,
const double &  nelec,
const double &  smearing_sigma,
const int  ngauss,
const ModuleBase::matrix ekb,
double &  ef,
double &  demet,
ModuleBase::matrix wg,
const int &  is,
const std::vector< int > &  isk 
)
static

calculates weights with the gaussian spreading technique

Parameters
nksnumber of k points.
wkweight of each k point(symmetry considered).
nbandnumber of bands.
nelecnumber of electrons.
smearing_sigmaparameter input by user.
ngausswhich type of smearing.
ekbband energy.
efoutput: fermi level
demetoutput: energy correction for metal
wgoutput: weight of each band at each k point
isspin
iskarray to point out each k belong to which spin
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iweights()

void Occupy::iweights ( const int  nks,
const std::vector< double > &  wk,
const int  nbands,
const double &  nelec,
const ModuleBase::matrix ekb,
double &  ef,
ModuleBase::matrix wg,
const int &  is,
const std::vector< int > &  isk 
)
static

calculates weights and fermi energy for semiconductors and insulators

Note
It is only applicable to semiconductors and insulators that have an energy gap. Here, bands are either empty or filled, and there is no electronic transfer among different k-points.
Parameters
nksnumber of k points.
wkweight of each k point (consider symmetry).
nbandsnumber of bands.
nelecnumber of electrons for this spin direction.
ekbthe array save the band energy.
efoutput: the highest occupied Kohn-Sham level.
wgoutput: weight for each k, each band.
isthe spin index now.
iskdistinguish k point belong to which spin.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ piksort()

static void Occupy::piksort ( const int  n,
double *  a 
)
staticprivate

◆ sumkg()

double Occupy::sumkg ( const ModuleBase::matrix ekb,
const int  nband,
const int  nks,
const std::vector< double > &  wk,
const double &  smearing_sigma,
const int  ngauss,
const double &  e,
const int &  is,
const std::vector< int > &  isk 
)
staticprivate

This function computes the number of states under a given energy e.

Parameters
ekbband energy.
nbandnumber of bands.
nksnumber of k points.
wkweight of each k point(symmetry considered).
smearing_sigmaparameter input by user
ngausswhich type of smearing.
ea givern energy
isspin
iskarray to point out each k belong to which spin
Returns
(double) the number of states
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sumkt()

static double Occupy::sumkt ( double **  ekb,
const int  nband,
const int  nks,
const int  nspin,
const int  ntetra,
const ModuleBase::matrix tetra,
const double &  eup 
)
staticprivate

◆ tweights()

static void Occupy::tweights ( const int  nks,
const int  nspin,
const int  nband,
const double &  nelec,
const int  ntetra,
const ModuleBase::matrix tetra,
double **  ekb,
double &  ef,
ModuleBase::matrix wg 
)
static

◆ w1gauss()

double Occupy::w1gauss ( const double &  x,
const int  n 
)
staticprivate
Here is the caller graph for this function:

◆ wgauss()

double Occupy::wgauss ( const double &  x,
const int  n 
)
staticprivate
Here is the caller graph for this function:

◆ wsweight()

static double Occupy::wsweight ( const ModuleBase::Vector3< double > &  r,
ModuleBase::Vector3< double > *  rws,
const int  nrws 
)
static

Member Data Documentation

◆ fixed_occupations

bool Occupy::fixed_occupations = false
static

◆ gaussian_parameter

double Occupy::gaussian_parameter = 0.01
static

◆ gaussian_type

int Occupy::gaussian_type = 0
static

◆ use_gaussian_broadening

bool Occupy::use_gaussian_broadening = false
static

The documentation for this class was generated from the following files: