|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Manages the computation of the charge densities for different bands (band-decomposed charge densities). More...
#include <get_pchg_lcao.h>
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 (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 (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_Orbitals * | ParaV |
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.
| Get_pchg_lcao::Get_pchg_lcao | ( | psi::Psi< double > * | psi_gamma_in, |
| const Parallel_Orbitals * | ParaV_in | ||
| ) |
| 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 | ( | ) |
| void Get_pchg_lcao::begin | ( | 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 Get_pchg_lcao::begin | ( | 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 |
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.
| ib | Band index. |
| nspin | Number of spin channels. |
| nelec | Total number of electrons. |
| wg | Weight matrix for bands and spins (k-points). |
| DM | Density matrix to be calculated. |
| kv | K-vectors. |
|
private |
|
private |
|
private |
Set this->bands_picked_ according to the mode, and process an error if the mode is not recognized.
| out_pchg | INPUT parameter out_pchg, vector. |
| nbands | INPUT parameter nbands. |
| fermi_band | Calculated Fermi band. |
|
private |
|
private |
|
private |
|
private |