|
void | cal_dm (const Parallel_Orbitals *ParaV, const ModuleBase::matrix &wg, const psi::Psi< double > &wfc, std::vector< ModuleBase::matrix > &dm) |
|
void | cal_dm (const Parallel_Orbitals *ParaV, const ModuleBase::matrix &wg, const psi::Psi< std::complex< double > > &wfc, std::vector< ModuleBase::ComplexMatrix > &dm) |
|
void | cal_nelec (const Atom *atoms, const int &ntype, double &nelec) |
| calculate the total number of electrons in system
|
|
void | cal_nbands (const int &nelec, const int &nlocal, const std::vector< double > &nelec_spin, int &nbands) |
| Calculate the number of bands.
|
|
void | cal_ux (UnitCell &ucell) |
|
bool | judge_parallel (double a[3], ModuleBase::Vector3< double > b) |
|
void | cal_nwfc (std::ofstream &log, UnitCell &ucell, Atom *atoms) |
|
void | cal_meshx (int &meshx, const Atom *atoms, const int ntype) |
|
void | cal_natomwfc (std::ofstream &log, int &natomwfc, const int ntype, const Atom *atoms) |
|
void | print_scf_iterinfo (const std::string &ks_solver, const int &istep, const int &witer, const std::vector< double > &mag, const int &wmag, const double &etot, const double &ediff, const int &wener, const std::vector< double > &drho, const int &wrho, const double &time, const int &wtime) |
|
void | print_etot (const Magnetism &magnet, const ElecState &elec, const bool converged, const int &iter_in, const double &scf_thr, const double &scf_thr_kin, const double &duration, const double &pw_diag_thr, const double &avg_iter, const bool print) |
| print total free energy and other energies
|
|
void | print_format (const std::string &name, const double &value) |
| function to print name, value and value*Ry_to_eV
|
|
void | calEBand (const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, fenergy &f_en) |
|
void | calculate_weights (const ModuleBase::matrix &ekb, ModuleBase::matrix &wg, const K_Vectors *klist, efermi &eferm, fenergy &f_en, std::vector< double > &nelec_spin, const bool skip_weights=false) |
|
void | fixed_weights (const std::vector< double > &ocp_kb, const int &nbands, const double &nelec, const K_Vectors *klist, ModuleBase::matrix &wg, bool &skip_weights) |
|
void | cal_dm_psi (const Parallel_Orbitals *ParaV, const ModuleBase::matrix &wg, const psi::Psi< double > &wfc, elecstate::DensityMatrix< double, double > &DM) |
|
void | cal_dm_psi (const Parallel_Orbitals *ParaV, const ModuleBase::matrix &wg, const psi::Psi< std::complex< double > > &wfc, elecstate::DensityMatrix< std::complex< double >, double > &DM) |
|
void | psiMulPsiMpi (const psi::Psi< double > &psi1, const psi::Psi< double > &psi2, double *dm_out, const int *desc_psi, const int *desc_dm) |
|
void | psiMulPsiMpi (const psi::Psi< std::complex< double > > &psi1, const psi::Psi< std::complex< double > > &psi2, std::complex< double > *dm_out, const int *desc_psi, const int *desc_dm) |
|
void | psiMulPsi (const psi::Psi< double > &psi1, const psi::Psi< double > &psi2, double *dm_out) |
|
void | psiMulPsi (const psi::Psi< std::complex< double > > &psi1, const psi::Psi< std::complex< double > > &psi2, std::complex< double > *dm_out) |
|
void | cal_edm_tddft (Parallel_Orbitals &pv, elecstate::ElecState *pelec, K_Vectors &kv, hamilt::Hamilt< std::complex< double > > *p_hamilt) |
|
void | read_orb_file (int it, std::string &orb_file, std::ofstream &ofs_running, Atom *atom) |
| read number of numerical orbitals for each angular momentum
|
|
void | read_pseudo (std::ofstream &ofs, UnitCell &ucell) |
|
void | read_cell_pseudopots (const std::string &pp_dir, std::ofstream &log, UnitCell &ucell) |
|
void | print_unitcell_pseudo (const std::string &fn, UnitCell &ucell) |
|
void | Set_GlobalV_Default () |
|
std::vector< std::vector< std::complex< double > > > | restore_dm (const K_Vectors &kv, const std::vector< std::vector< std::complex< double > > > &dm_k_ibz, const ModuleSymmetry::Symmetry_rotation &symrot, const Parallel_2D &pv) |
| for symmetry, multi-k, nspin<4: restore DM(k) form DM(k_ibz)
|
|
std::vector< std::vector< double > > | restore_dm (const K_Vectors &kv, const std::vector< std::vector< double > > &dm_k_ibz, const ModuleSymmetry::Symmetry_rotation &symrot, const Parallel_2D &pv) |
| do nothing if gamma_only
|
|
InitSCF: elecstate::ElecState::init_scf()
FixedWeights: elecstate::ElecState::fixed_weights()
- fix wg using external weights: ocp_kb
CalEBand: elecstate::ElecState::cal_eband()
- calculate the electronic states energy contribution to total energy
CalculateWeights: elecstate::ElecState::calculate_weights()
- calculate the weights for each electronic state
Tested functions:
void elecstate::print_scf_iterinfo |
( |
const std::string & |
ks_solver, |
|
|
const int & |
istep, |
|
|
const int & |
witer, |
|
|
const std::vector< double > & |
mag, |
|
|
const int & |
wmag, |
|
|
const double & |
etot, |
|
|
const double & |
ediff, |
|
|
const int & |
wener, |
|
|
const std::vector< double > & |
drho, |
|
|
const int & |
wrho, |
|
|
const double & |
time, |
|
|
const int & |
wtime |
|
) |
| |
Notes on refactor of ESolver's functions
the print of SCF iteration on-the-fly information.
- Previously it is expected for nspin 1, 2, and 4, also with xc_type 3/5 or not, the information will organized in different ways. This brings inconsistencies between patterns of print and make it hard to vectorize information.
- the function print_etot actually do two kinds of things, 1) print information into running_*.log, 2) print information onto screen. These two tasks are, in no way should be placed/implemented in one function directly
- there are information redundance: the istep of SCF can provide information determing whether print out the SCF iteration info. table header or not, rather than dividing into two functions and hard code the format.
For nspin 1, print: ITER, ETOT, EDIFF, DRHO, TIME nspin 2, print: ITER, TMAG, AMAG, ETOT, EDIFF, DRHO, TIME nspin 4 with nlcc, print: ITER, TMAGX, TMAGY, TMAGZ, AMAG, ETOT, EDIFF, DRHO, TIME xc type_id 3/5: DKIN
Based on summary above, there are several groups of info:
- counting: ITER
- (optional) magnetization: TMAG or TMAGX-TMAGY-TMAGZ, AMAG
- energies: ETOT, EDIFF
- densities: DRHO, DKIN(optional)
- time: TIME