#include <charge.h>
|
| | Charge () |
| | ~Charge () |
| | Charge (const Charge &)=delete |
| Charge & | operator= (const Charge &)=delete |
| void | set_rhopw (ModulePW::PW_Basis *rhopw_in) |
| void | init_rho (const UnitCell &ucell, const Parallel_Grid &pgrid, const ModuleBase::ComplexMatrix &strucFac, ModuleSymmetry::Symmetry &symm, const void *klist, const void *wfcpw, const module_charge::InitRhoCfg &cfg) |
| | Init charge density from file or atomic pseudo-wave-functions.
|
| void | allocate (const int &nspin_in, const bool kin_den, const bool meta_gga, const int test_charge) |
| | Allocate the rho/rhog/kin_r buffers.
|
| void | renormalize_rho (const double nelec, const double omega) |
| | Renormalize rho so that its integral equals the electron number.
|
| double | sum_rho (const double omega) const |
| void | save_rho_before_sum_band () |
| bool | get_allocate_rho () const |
| | whether allocate() has already claimed the density buffers
|
◆ Charge() [1/2]
◆ ~Charge()
◆ Charge() [2/2]
| Charge::Charge |
( |
const Charge & | | ) |
|
|
delete |
◆ allocate()
| void Charge::allocate |
( |
const int & | nspin_in, |
|
|
const bool | kin_den, |
|
|
const bool | meta_gga, |
|
|
const int | test_charge ) |
Allocate the rho/rhog/kin_r buffers.
- Parameters
-
| nspin_in | number of spins |
| kin_den | whether to allocate the kinetic-energy density buffers |
| meta_gga | whether the functional is meta-GGA (kin_r carries XC physics, not just ELF output); stored for tau handling |
| test_charge | verbosity flag (PARAM.inp.test_charge) |
◆ destroy()
◆ get_allocate_rho()
| bool Charge::get_allocate_rho |
( |
| ) |
const |
|
inline |
whether allocate() has already claimed the density buffers
- Returns
- true once allocate() has run; allocate() is idempotent and returns early when this is already true
◆ init_rho()
Init charge density from file or atomic pseudo-wave-functions.
- Parameters
-
| ucell | [in] unit cell |
| pgrid | [in] parallel grid descriptor |
| strucFac | [in] structure factor |
| symm | [in] symmetry |
| klist | [in] k points list if needed |
| wfcpw | [in] PW basis for wave function if needed |
| cfg | [in] INPUT values for charge initialization |
◆ operator=()
◆ renormalize_rho()
| void Charge::renormalize_rho |
( |
const double | nelec, |
|
|
const double | omega ) |
Renormalize rho so that its integral equals the electron number.
- Parameters
-
| nelec | target total electron number (PARAM.inp.nelec) |
| omega | current unit-cell volume. Must be ucell.omega, NOT rhopw->omega, because in variable-cell calculations (e.g. NPT) rhopw->omega is stale (pw_rho/pw_rhod are not rebuilt on cell change) while ucell.omega is updated every step. Using the stale volume gives a wrong electron count and a wrong renormalization factor, which corrupts the stress. |
◆ save_rho_before_sum_band()
| void Charge::save_rho_before_sum_band |
( |
| ) |
|
◆ set_rhopw()
◆ sum_rho()
| double Charge::sum_rho |
( |
const double | omega | ) |
const |
◆ _ptrs_kin_r
| std::vector<double*> Charge::_ptrs_kin_r |
|
private |
◆ _ptrs_kin_r_save
| std::vector<double*> Charge::_ptrs_kin_r_save |
|
private |
◆ _ptrs_rho
| std::vector<double*> Charge::_ptrs_rho |
|
private |
◆ _ptrs_rho_save
| std::vector<double*> Charge::_ptrs_rho_save |
|
private |
◆ _ptrs_rhog
| std::vector<std::complex<double>*> Charge::_ptrs_rhog |
|
private |
◆ _ptrs_rhog_save
| std::vector<std::complex<double>*> Charge::_ptrs_rhog_save |
|
private |
◆ _space_kin_r
| std::vector<double> Charge::_space_kin_r |
|
private |
◆ _space_kin_r_save
| std::vector<double> Charge::_space_kin_r_save |
|
private |
◆ _space_rho
| std::vector<double> Charge::_space_rho |
|
private |
◆ _space_rho_core
| std::vector<double> Charge::_space_rho_core |
|
private |
◆ _space_rho_save
| std::vector<double> Charge::_space_rho_save |
|
private |
◆ _space_rhog
| std::vector<std::complex<double> > Charge::_space_rhog |
|
private |
◆ _space_rhog_core
| std::vector<std::complex<double> > Charge::_space_rhog_core |
|
private |
◆ _space_rhog_save
| std::vector<std::complex<double> > Charge::_space_rhog_save |
|
private |
◆ allocate_rho
| bool Charge::allocate_rho |
|
private |
◆ kin_r
| double** Charge::kin_r = nullptr |
◆ kin_r_save
| double** Charge::kin_r_save = nullptr |
◆ meta_gga
| bool Charge::meta_gga = false |
◆ ngmc
◆ nrxx
◆ nspin
◆ nxyz
◆ pgrid
◆ rho
| double** Charge::rho = nullptr |
◆ rho_core
| double* Charge::rho_core = nullptr |
◆ rho_save
| double** Charge::rho_save = nullptr |
◆ rhog
| std::complex<double>** Charge::rhog = nullptr |
◆ rhog_core
| std::complex<double>* Charge::rhog_core = nullptr |
◆ rhog_save
| std::complex<double>** Charge::rhog_save = nullptr |
◆ rhopw
The documentation for this class was generated from the following files:
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/module_charge/charge.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/module_charge/charge.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/module_charge/chg_init.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/module_charge/unittests/test_chg_extra.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/module_charge/unittests/test_chg_mix.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/module_charge/unittests/test_chg_parallel.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/unittests/test_elecstate.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/unittests/test_elecstate_print.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/unittests/test_elecstate_pw.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/unittests/test_pot_pcc.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/unittests/test_pot_sccs.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_estate/unittests/test_potential_new.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_hamilt/module_xc/test/xc3_mock.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_hamilt/module_xc/unittests/test_xc_functional_ncgga_sf.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_lcao/module_lr/unittests/test_pot_grad_xc.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_lcao/module_lr/unittests/test_pot_hxc_lrtd.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_lcao/module_lr/unittests/test_xc_kernel.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_pw/module_stodft/unittests/test_sto_hsolver_pw.cpp