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

Manages the computation of the charge densities for different bands (band-decomposed charge densities). More...

#include <get_pchg_lcao.h>

Collaboration diagram for Get_pchg_lcao:

Public Member Functions

 Get_pchg_lcao (psi::Psi< double > *psi_gamma_in, const Parallel_Orbitals *ParaV_in)
 
 Get_pchg_lcao (psi::Psi< std::complex< double > > *psi_k_in, const Parallel_Orbitals *ParaV_in)
 
 ~Get_pchg_lcao ()
 
void begin (Gint_Gamma &gg, double **rho, const ModuleBase::matrix &wg, const std::vector< double > &ef_all_spin, const int rhopw_nrxx, const std::vector< int > &out_pchg, const int nbands, const double nelec, const int nspin, const UnitCell *ucell_in, const Parallel_Grid &pgrid, const Grid_Driver *GridD_in, const K_Vectors &kv, const std::string &global_out_dir, std::ofstream &ofs_running)
 
void begin (Gint_k &gk, double **rho, std::complex< double > **rhog, const ModuleBase::matrix &wg, const std::vector< double > &ef_all_spin, const ModulePW::PW_Basis *rho_pw, const int rhopw_nrxx, const std::vector< int > &out_pchg, const int nbands, const double nelec, const int nspin, UnitCell *ucell_in, const Parallel_Grid &pgrid, const Grid_Driver *GridD_in, const K_Vectors &kv, const std::string &global_out_dir, std::ofstream &ofs_running, const bool if_separate_k, const int chr_ngmc)
 

Private Member Functions

void prepare_get_pchg (std::ofstream &ofs_running)
 
void select_bands (const std::vector< int > &out_pchg, const int nbands, const int fermi_band)
 Set this->bands_picked_ according to the mode, and process an error if the mode is not recognized.
 
void idmatrix (const int &ib, const int nspin, const double &nelec, const ModuleBase::matrix &wg, elecstate::DensityMatrix< double, double > &DM, const K_Vectors &kv)
 Calculates the density matrix for a given band.
 
void idmatrix (const int &ib, const int nspin, const double &nelec, const ModuleBase::matrix &wg, elecstate::DensityMatrix< std::complex< double >, double > &DM, const K_Vectors &kv, const bool if_separate_k)
 

Private Attributes

std::vector< int > bands_picked_
 
psi::Psi< double > * psi_gamma = nullptr
 
psi::Psi< std::complex< double > > * psi_k = nullptr
 
const Parallel_OrbitalsParaV
 

Detailed Description

Manages the computation of the charge densities for different bands (band-decomposed charge densities).

This class is responsible for initializing and managing the charge state computation process, offering functionality to calculate and plot the decomposed charge density for specified bands.

Constructor & Destructor Documentation

◆ Get_pchg_lcao() [1/2]

Get_pchg_lcao::Get_pchg_lcao ( psi::Psi< double > *  psi_gamma_in,
const Parallel_Orbitals ParaV_in 
)

◆ Get_pchg_lcao() [2/2]

Get_pchg_lcao::Get_pchg_lcao ( psi::Psi< std::complex< double > > *  psi_k_in,
const Parallel_Orbitals ParaV_in 
)

◆ ~Get_pchg_lcao()

Get_pchg_lcao::~Get_pchg_lcao ( )

Member Function Documentation

◆ begin() [1/2]

void Get_pchg_lcao::begin ( Gint_Gamma gg,
double **  rho,
const ModuleBase::matrix wg,
const std::vector< double > &  ef_all_spin,
const int  rhopw_nrxx,
const std::vector< int > &  out_pchg,
const int  nbands,
const double  nelec,
const int  nspin,
const UnitCell ucell_in,
const Parallel_Grid pgrid,
const Grid_Driver GridD_in,
const K_Vectors kv,
const std::string &  global_out_dir,
std::ofstream &  ofs_running 
)
Here is the call graph for this function:

◆ begin() [2/2]

void Get_pchg_lcao::begin ( Gint_k gk,
double **  rho,
std::complex< double > **  rhog,
const ModuleBase::matrix wg,
const std::vector< double > &  ef_all_spin,
const ModulePW::PW_Basis rho_pw,
const int  rhopw_nrxx,
const std::vector< int > &  out_pchg,
const int  nbands,
const double  nelec,
const int  nspin,
UnitCell ucell_in,
const Parallel_Grid pgrid,
const Grid_Driver GridD_in,
const K_Vectors kv,
const std::string &  global_out_dir,
std::ofstream &  ofs_running,
const bool  if_separate_k,
const int  chr_ngmc 
)
Here is the call graph for this function:

◆ idmatrix() [1/2]

void Get_pchg_lcao::idmatrix ( const int &  ib,
const int  nspin,
const double &  nelec,
const ModuleBase::matrix wg,
elecstate::DensityMatrix< double, double > &  DM,
const K_Vectors kv 
)
private

Calculates the density matrix for a given band.

This method calculates the density matrix for a given band using the wave function coefficients. It performs a matrix multiplication to produce the density matrix.

Parameters
ibBand index.
nspinNumber of spin channels.
nelecTotal number of electrons.
wgWeight matrix for bands and spins (k-points).
DMDensity matrix to be calculated.
kvK-vectors.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ idmatrix() [2/2]

void Get_pchg_lcao::idmatrix ( const int &  ib,
const int  nspin,
const double &  nelec,
const ModuleBase::matrix wg,
elecstate::DensityMatrix< std::complex< double >, double > &  DM,
const K_Vectors kv,
const bool  if_separate_k 
)
private
Here is the call graph for this function:

◆ prepare_get_pchg()

void Get_pchg_lcao::prepare_get_pchg ( std::ofstream &  ofs_running)
private
Here is the caller graph for this function:

◆ select_bands()

void Get_pchg_lcao::select_bands ( const std::vector< int > &  out_pchg,
const int  nbands,
const int  fermi_band 
)
private

Set this->bands_picked_ according to the mode, and process an error if the mode is not recognized.

Parameters
out_pchgINPUT parameter out_pchg, vector.
nbandsINPUT parameter nbands.
fermi_bandCalculated Fermi band.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ bands_picked_

std::vector<int> Get_pchg_lcao::bands_picked_
private

◆ ParaV

const Parallel_Orbitals* Get_pchg_lcao::ParaV
private

◆ psi_gamma

psi::Psi<double>* Get_pchg_lcao::psi_gamma = nullptr
private

◆ psi_k

psi::Psi<std::complex<double> >* Get_pchg_lcao::psi_k = nullptr
private

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