|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Classes | |
| struct | ChargeMoments |
| Moments about one common origin. Charges carry their physical sign. More... | |
| class | ElecState |
| class | ElecStateLCAO |
| class | ElecStatePW |
| class | ElecStatePW_SDFT |
| struct | fenergy |
| struct | Efermi |
| struct | elecstate_pw_op< FPTYPE, base_device::DEVICE_CPU > |
| struct | elecstate_pw_op |
| struct | MakovPayneResult |
| class | Efield |
| class | PotEfield |
| class | Gatefield |
| class | PotGate |
| class | H_Hartree_pw |
| class | PotHartree |
| class | H_TDDFT_pw |
| Length-gauge RT-TDDFT potential backed by TDFieldManager. More... | |
| class | PotBase |
| class | Pot_Cosikr |
| class | PotLocal |
| class | ML_EXX |
| class | PotML_EXX |
| class | PotPcc |
| Self-consistent vacuum point-counter-charge (PCC) correction. More... | |
| struct | SccsResume |
| class | PotSccs |
| class | PotSep |
| class | PotSurChem |
| class | PotXC |
| class | PotXC_FDM |
| class | Potential |
| class | SccsFixedSources |
| struct | PccOutput |
| struct | SccsOutput |
| struct | SolventGridField |
| struct | TDFieldSample |
| Sampling location used to evaluate one time-dependent field profile. More... | |
| class | TDFieldProfile |
| Scalar time profile of one configured electric field. More... | |
| class | TDField |
| One configured field occurrence and its Cartesian direction. More... | |
| struct | TDFieldState |
| Field values for one trial interval, independent of the committed step counter. More... | |
| class | TDFieldManager |
| Own and advance all time-dependent electric fields in RT-TDDFT. More... | |
| class | TDGaussianProfile |
| Carrier cosine multiplied by a Gaussian envelope. More... | |
| class | TDTrapezoidProfile |
| Carrier cosine with linear-rise, plateau, and linear-fall envelope. More... | |
| class | TDTrigonometricProfile |
| Cosine carrier multiplied by a squared-sine envelope. More... | |
| class | TDHeavisideProfile |
| Constant field switched off at a specified electronic step. More... | |
| class | TDSupersineProfile |
| Compact supersine pulse derived from an analytic vector potential. More... | |
| class | ParamUpdater |
| struct | Pcc0dParameters |
| struct | Pcc2dParameters |
| class | MockElecState |
| class | MockPot |
| class | MockPotComponent |
| class | UsppProjector |
| Accumulate explicitly weighted collinear USPP states with reusable device buffers. More... | |
Functions | |
| bool | read_orb_file (int it, std::string &orbital_file, std::ofstream &ofs_running, Atom *atom) |
| 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) |
| ChargeMoments | charge_moments (const double *charges, const ModuleBase::Vector3< double > *relative_positions, const int count, const double weight) |
| ChargeMoments | add_charge_moments (const ChargeMoments &left, const ChargeMoments &right) |
| void | init_scf (const UnitCell &ucell, const Parallel_Grid &pgrid, const ModuleBase::ComplexMatrix &strucfac, const bool *numeric, const int istep, const std::string &out_dir, const Input_para &inp, ElecState *pelec) |
| Init rho_core, init rho, renormalize rho, init pot. | |
| 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, const double &ds_rms) |
| void | print_etot (const Magnetism &magnet, const ElecState &elec, const bool converged, const int &iter_in, const int iter_limit, const double &scf_thr, const double &scf_thr_kin, const double &duration, const Input_para &inp, const bool two_fermi, const double &pw_diag_thr, const double &avg_iter, const bool print, const double &ds_rms) |
| 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 | |
| template<typename Device> | |
| const std::vector< double > * | get_becsum (const ElecState &elec) |
| Return the USPP projector occupancy coefficients of a PW electronic state. | |
| template const std::vector< double > * | get_becsum< base_device::DEVICE_CPU > (const ElecState &elec) |
| 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 int global_nbands, const bool skip_weights) |
| 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) |
| MakovPayneResult | makov_payne_correction (const UnitCell &ucell, const Charge &charge, const double *v_elecstat, bool print) |
| void | sccs_cfg_input (const Input_para &input, ModuleSccs::SccsConfig &config, ModuleSccs::PolarizationSolverParameters &solver) |
| std::string | check_sccs_cell (const ModuleSccs::SccsConfig &config, const UnitCell &cell) |
| std::string | check_charge (const ModuleSccs::SccsConfig &config, const UnitCell &cell, double electron_count) |
| void | collect_output (const UnitCell &cell, const ModulePW::PW_Basis &basis, const std::vector< unitcell::AtomData > &atoms, const std::vector< ModuleBase::Vector3< double > > &grid_positions, const std::vector< double > &ions, const std::vector< double > &charge, const ModuleSccs::SccsConfig &config, const ModuleSccs::SccsResponse &response, SccsOutput &result) |
| void | write_sccs_wait (std::ostream &output, double residual, double start_drho, int start_nmax) |
| void | write_sccs_out (std::ostream &output, const SccsOutput &result, int level, double solvation_energy, bool pcc, double pcc_energy) |
| void | pcc_0d_geometry (const UnitCell &cell, const std::vector< unitcell::AtomData > &atoms, unitcell::OrthogonalCell &geometry, Pcc0dParameters ¶meters) |
| void | pcc_0d_relative (const unitcell::OrthogonalCell &geometry, std::vector< ModuleBase::Vector3< double > > &positions) |
| void | pcc_0d_operator (const UnitCell &cell, const ModulePW::PW_Basis &basis, const std::vector< unitcell::AtomData > &atoms, const std::vector< ModuleBase::Vector3< double > > &grid_positions, std::unique_ptr< ModuleSccs::CoulombOperator > &coulomb) |
| void | pcc_2d_geometry (const UnitCell &cell, const std::vector< unitcell::AtomData > &atoms, int open_axis, unitcell::SlabCell &geometry, Pcc2dParameters ¶meters) |
| void | pcc_2d_project (const unitcell::SlabCell &geometry, std::vector< ModuleBase::Vector3< double > > &positions) |
| void | pcc_2d_operator (const UnitCell &cell, const ModulePW::PW_Basis &basis, const std::vector< unitcell::AtomData > &atoms, int open_axis, const std::vector< ModuleBase::Vector3< double > > &grid_positions, std::unique_ptr< ModuleSccs::CoulombOperator > &coulomb) |
| std::shared_ptr< TDFieldManager > | create_td_field_manager (const Input_para &input) |
| Build all field profiles and convert user input to propagation units. | |
| void | occ_from_proj (const std::complex< double > *proj, const double *wg_ik, const int nbands, const int npol, const int nkb, const int nspin, const int isk, const int *nh_iat, const int nat, std::complex< double > *occ_block) |
| Accumulate per-projector 2x2 occupation blocks from the onsite projector coefficients for a single k-point. | |
| void | mix_occ_with_save (std::vector< std::vector< std::vector< ModuleBase::matrix > > > &occ_mat, const std::vector< std::vector< std::vector< ModuleBase::matrix > > > &occ_mat_save, const UnitCell &cell, const std::vector< int > &l_channel, const int nspin, const double beta) |
| bool | make_pcc_0d_parameters (const unitcell::OrthogonalCell &cell, const double relative_tolerance, Pcc0dParameters ¶meters) |
| double | pcc_0d_potential (const ChargeMoments &moments, const ModuleBase::Vector3< double > &position, const Pcc0dParameters ¶meters) |
| ModuleBase::Vector3< double > | pcc_0d_gradient (const ChargeMoments &moments, const ModuleBase::Vector3< double > &position, const Pcc0dParameters ¶meters) |
| double | pcc_0d_bilinear_energy (const ChargeMoments &left, const ChargeMoments &right, const Pcc0dParameters ¶meters) |
| double | pcc_0d_energy (const ChargeMoments &moments, const Pcc0dParameters ¶meters) |
| ModuleBase::Vector3< double > | pcc_0d_force (const ChargeMoments &moments, const double ionic_charge, const ModuleBase::Vector3< double > &position, const Pcc0dParameters ¶meters) |
| Pcc2dParameters | make_pcc_2d_parameters (const unitcell::SlabCell &cell) |
| double | pcc_2d_potential (const ChargeMoments &moments, const double coordinate, const ModuleBase::Vector3< double > &normal, const Pcc2dParameters ¶meters) |
| ModuleBase::Vector3< double > | pcc_2d_gradient (const ChargeMoments &moments, const double coordinate, const ModuleBase::Vector3< double > &normal, const Pcc2dParameters ¶meters) |
| double | pcc_2d_energy (const ChargeMoments &moments, const Pcc2dParameters ¶meters) |
| ModuleBase::Vector3< double > | pcc_2d_force (const ChargeMoments &moments, const double ionic_charge, const double coordinate, const ModuleBase::Vector3< double > &normal, const Pcc2dParameters ¶meters) |
| void | setup_estate_pw (UnitCell &ucell, K_Vectors &kv, Structure_Factor &sf, elecstate::ElecState *&pelec, Charge &chr, pseudopot_cell_vl &locpp, pseudopot_cell_vnl &ppcell, VSep *&vsep_cell, ModulePW::PW_Basis_K *pw_wfc, ModulePW::PW_Basis *pw_rho, ModulePW::PW_Basis *pw_rhod, ModulePW::PW_Basis_Big *pw_big, surchem &solvent, const Input_para &inp) |
| template<typename T, typename Device> | |
| void | setup_estate_pw_impl (UnitCell &ucell, K_Vectors &kv, Structure_Factor &sf, elecstate::ElecState *&pelec, Charge &chr, pseudopot_cell_vl &locpp, pseudopot_cell_vnl &ppcell, VSep *&vsep_cell, ModulePW::PW_Basis_K *pw_wfc, ModulePW::PW_Basis *pw_rho, ModulePW::PW_Basis *pw_rhod, ModulePW::PW_Basis_Big *pw_big, surchem &solvent, const Input_para &inp) |
| void | teardown_estate_pw (elecstate::ElecState *&pelec, VSep *&vsep_cell) |
| template<typename T, typename Device> | |
| void | teardown_estate_pw_impl (elecstate::ElecState *&pelec, VSep *&vsep_cell) |
| void | update_pot (UnitCell &ucell, elecstate::ElecState *&pelec, const Charge &chr, const bool conv_esolver) |
| int | uspp_becsum_size (const UnitCell &ucell, const pseudopot_cell_vnl &ppcell, const int nspin) |
| Size of the canonical [spin][atom][packed projector pair] storage. | |
| void | add_uspp_density (const UnitCell &ucell, const pseudopot_cell_vnl &ppcell, const ModulePW::PW_Basis &basis, const int nspin, const std::vector< double > &becsum, std::complex< double > **rhog) |
| Add USPP augmentation to caller-owned dense-grid reciprocal densities. becsum uses i <= j pairs, with the off-diagonal multiplicity already included. The Q(G) tables supply volume normalization; state weights are dimensionless. The current scalar/collinear contraction does not acquire spinor support by setting nspin=4. Spinor support requires charge/magnetization coefficients and a compatible Q/projector representation, including review of the packed-pair convention for SOC. | |
| 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_Blkcyclic &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_Blkcyclic &pv) |
| do nothing if gamma_only | |
Variables | |
| template<typename TK> | |
| int | ElecStateLCAO< TK >::out_wfc_lcao = 0 |
| template<typename TK> | |
| bool | ElecStateLCAO< TK >::need_psi_grid = true |
| double | tmp_ucell_omega = 500.0 |
| double | tmp_gridecut = 80.0 |
| ChargeMoments elecstate::add_charge_moments | ( | const ChargeMoments & | left, |
| const ChargeMoments & | right ) |
| void elecstate::add_uspp_density | ( | const UnitCell & | ucell, |
| const pseudopot_cell_vnl & | ppcell, | ||
| const ModulePW::PW_Basis & | basis, | ||
| const int | nspin, | ||
| const std::vector< double > & | becsum, | ||
| std::complex< double > ** | rhog ) |
Add USPP augmentation to caller-owned dense-grid reciprocal densities. becsum uses i <= j pairs, with the off-diagonal multiplicity already included. The Q(G) tables supply volume normalization; state weights are dimensionless. The current scalar/collinear contraction does not acquire spinor support by setting nspin=4. Spinor support requires charge/magnetization coefficients and a compatible Q/projector representation, including review of the packed-pair convention for SOC.
|
inline |
|
inline |
| void elecstate::calculate_weights | ( | const ModuleBase::matrix & | ekb, |
| ModuleBase::matrix & | wg, | ||
| const K_Vectors * | klist, | ||
| Efermi & | eferm, | ||
| fenergy & | f_en, | ||
| std::vector< double > & | nelec_spin, | ||
| const int | global_nbands, | ||
| const bool | skip_weights ) |
| void elecstate::calEBand | ( | const ModuleBase::matrix & | ekb, |
| const ModuleBase::matrix & | wg, | ||
| fenergy & | f_en ) |
| ChargeMoments elecstate::charge_moments | ( | const double * | charges, |
| const ModuleBase::Vector3< double > * | relative_positions, | ||
| int | count, | ||
| double | weight ) |
Local moments only; no MPI or cell/model dependencies. Use weight=1 for point charges and the volume element for a signed grid density. Zero samples are permitted.
| std::string elecstate::check_charge | ( | const ModuleSccs::SccsConfig & | config, |
| const UnitCell & | cell, | ||
| double | electron_count ) |
| std::string elecstate::check_sccs_cell | ( | const ModuleSccs::SccsConfig & | config, |
| const UnitCell & | cell ) |
| void elecstate::collect_output | ( | const UnitCell & | cell, |
| const ModulePW::PW_Basis & | basis, | ||
| const std::vector< unitcell::AtomData > & | atoms, | ||
| const std::vector< ModuleBase::Vector3< double > > & | grid_positions, | ||
| const std::vector< double > & | ions, | ||
| const std::vector< double > & | charge, | ||
| const ModuleSccs::SccsConfig & | config, | ||
| const ModuleSccs::SccsResponse & | response, | ||
| SccsOutput & | result ) |
| std::shared_ptr< TDFieldManager > elecstate::create_td_field_manager | ( | const Input_para & | input | ) |
Build all field profiles and convert user input to propagation units.
Parameters specific to a waveform are paired with td_ttype by occurrence, while td_vext_dire is paired by the overall field index.
| input | Validated ABACUS input parameters. |
| void elecstate::fixed_weights | ( | const std::vector< double > & | ocp_kb, |
| const int & | nbands, | ||
| const double & | nelec, | ||
| const K_Vectors * | klist, | ||
| ModuleBase::matrix & | wg, | ||
| bool & | skip_weights ) |
| const std::vector< double > * elecstate::get_becsum | ( | const ElecState & | elec | ) |
Return the USPP projector occupancy coefficients of a PW electronic state.
| elec | Electronic state to inspect. |
| template const std::vector< double > * elecstate::get_becsum< base_device::DEVICE_CPU > | ( | const ElecState & | elec | ) |
| void elecstate::init_scf | ( | const UnitCell & | ucell, |
| const Parallel_Grid & | pgrid, | ||
| const ModuleBase::ComplexMatrix & | strucfac, | ||
| const bool * | numeric, | ||
| const int | istep, | ||
| const std::string & | out_dir, | ||
| const Input_para & | inp, | ||
| ElecState * | pelec ) |
Init rho_core, init rho, renormalize rho, init pot.
| ucell | unit cell |
| pgrid | parallel grid |
| strucfac | structure factor |
| numeric | numeric flag |
| istep | ionic step index |
| out_dir | output directory |
| inp | input parameters |
| pelec | pointer to ElecState |
core correction potential.
renormalize the charge density
initialize the potential
output the initial potential
| bool elecstate::make_pcc_0d_parameters | ( | const unitcell::OrthogonalCell & | cell, |
| double | relative_tolerance, | ||
| Pcc0dParameters & | parameters ) |
Return false unless the OrthogonalCell has equal edges within relative_tolerance. No cell geometry is stored here.
| Pcc2dParameters elecstate::make_pcc_2d_parameters | ( | const unitcell::SlabCell & | cell | ) |
| MakovPayneResult elecstate::makov_payne_correction | ( | const UnitCell & | ucell, |
| const Charge & | charge, | ||
| const double * | v_elecstat = nullptr, | ||
| bool | print = true ) |
Calculate and print the Makov-Payne isolated-cell correction for cubic cells. All energies are in Ry; the optional corrected vacuum level is in eV.
| void elecstate::mix_occ_with_save | ( | std::vector< std::vector< std::vector< ModuleBase::matrix > > > & | occ_mat, |
| const std::vector< std::vector< std::vector< ModuleBase::matrix > > > & | occ_mat_save, | ||
| const UnitCell & | cell, | ||
| const std::vector< int > & | l_channel, | ||
| const int | nspin, | ||
| const double | beta ) |
occ = beta * occ + (1-beta) * occ_save, applied to the correlated orbital of every atom. nspin-aware: nspin=4 mixes the single Pauli block, nspin=1/2 mixes both spin channels. Replaces the duplicated LCAO k/gamma mixing loops.
occ = beta * occ + (1-beta) * occ_save on every atom's correlated orbital. nspin-aware: nspin=4 mixes the single Pauli block, nspin=1/2 mixes both spin channels. Replaces the duplicated LCAO k/gamma mixing loops.
| void elecstate::occ_from_proj | ( | const std::complex< double > * | proj, |
| const double * | wg_ik, | ||
| const int | nbands, | ||
| const int | npol, | ||
| const int | nkb, | ||
| const int | nspin, | ||
| const int | isk, | ||
| const int * | nh_iat, | ||
| const int | nat, | ||
| std::complex< double > * | occ_block ) |
Accumulate per-projector 2x2 occupation blocks from the onsite projector coefficients for a single k-point.
For each projector (l,m) (global index iprj), the occupation block is
rho^{ss'}_{iprj} = sum_i w_{k,i} * conj(proj^s_{i,iprj}) * proj^{s'}_{i,iprj}
where proj^s_{i,iprj} = <alpha_{iprj}|Psi^s_{k,i}> and w_{k,i} is the band occupation weight. The block is stored as occ_block[iprj*4 + {0,1,2,3}] = {rho^{up,up}, rho^{up,dn}, rho^{dn,up}, rho^{dn,dn}}.
The 2x2 layout is a storage convention, not an assumption of spin physics; the content of the four slots depends on nspin: nspin=1: rho is split evenly into occ[0]/occ[3], off-diagonal slots stay zero. No Pauli structure is involved; the even split only makes the magnetization readout M ~ occ[0] - occ[3] vanish. nspin=2: isk=0 accumulates into occ[0], isk=1 into occ[3]; the two diagonal slots are simply two independent spin channels. nspin=4: both spinor components cross, filling all four slots with a genuine 2x2 Hermitian spin density matrix (the only case where the Pauli decomposition rho = (n*I + M.sigma)/2 applies).
Accumulation semantics (+=): the caller zeroes occ_block before the k-point loop and performs the MPI reduction after it.
| proj | onsite projector coefficients <alpha|psi>, laid out as (nbands*npol) x nkb with spinor components offset by nkb |
| wg_ik | band occupation weights for this k-point (nbands values) |
| nbands | number of bands |
| npol | number of spinor components (1 collinear, 2 non-collinear) |
| nkb | total number of projectors |
| nspin | 1, 2 or 4 |
| isk | spin channel of this k-point (0/1); used only when nspin=2 |
| nh_iat | number of projectors per atom (nat values) |
| nat | number of atoms |
| occ_block | [in,out] blocks to accumulate into, size sum(nh_iat)*4 |
| double elecstate::pcc_0d_bilinear_energy | ( | const ChargeMoments & | left, |
| const ChargeMoments & | right, | ||
| const Pcc0dParameters & | parameters ) |
| double elecstate::pcc_0d_energy | ( | const ChargeMoments & | moments, |
| const Pcc0dParameters & | parameters ) |
| ModuleBase::Vector3< double > elecstate::pcc_0d_force | ( | const ChargeMoments & | moments, |
| const double | ionic_charge, | ||
| const ModuleBase::Vector3< double > & | position, | ||
| const Pcc0dParameters & | parameters ) |
| void elecstate::pcc_0d_geometry | ( | const UnitCell & | cell, |
| const std::vector< unitcell::AtomData > & | atoms, | ||
| unitcell::OrthogonalCell & | geometry, | ||
| Pcc0dParameters & | parameters ) |
| ModuleBase::Vector3< double > elecstate::pcc_0d_gradient | ( | const ChargeMoments & | moments, |
| const ModuleBase::Vector3< double > & | position, | ||
| const Pcc0dParameters & | parameters ) |
| void elecstate::pcc_0d_operator | ( | const UnitCell & | cell, |
| const ModulePW::PW_Basis & | basis, | ||
| const std::vector< unitcell::AtomData > & | atoms, | ||
| const std::vector< ModuleBase::Vector3< double > > & | grid_positions, | ||
| std::unique_ptr< ModuleSccs::CoulombOperator > & | coulomb ) |
| double elecstate::pcc_0d_potential | ( | const ChargeMoments & | moments, |
| const ModuleBase::Vector3< double > & | position, | ||
| const Pcc0dParameters & | parameters ) |
Numerical kernels require validated parameters and moments about a common origin. Coordinates are relative to that origin. Energies/potentials are in Hartree; gradients/forces are in Hartree/Bohr. The potential is for unit positive charge; electron potential conversion belongs to the host adapter.
| void elecstate::pcc_0d_relative | ( | const unitcell::OrthogonalCell & | geometry, |
| std::vector< ModuleBase::Vector3< double > > & | positions ) |
| double elecstate::pcc_2d_energy | ( | const ChargeMoments & | moments, |
| const Pcc2dParameters & | parameters ) |
| ModuleBase::Vector3< double > elecstate::pcc_2d_force | ( | const ChargeMoments & | moments, |
| const double | ionic_charge, | ||
| const double | coordinate, | ||
| const ModuleBase::Vector3< double > & | normal, | ||
| const Pcc2dParameters & | parameters ) |
| void elecstate::pcc_2d_geometry | ( | const UnitCell & | cell, |
| const std::vector< unitcell::AtomData > & | atoms, | ||
| int | open_axis, | ||
| unitcell::SlabCell & | geometry, | ||
| Pcc2dParameters & | parameters ) |
| ModuleBase::Vector3< double > elecstate::pcc_2d_gradient | ( | const ChargeMoments & | moments, |
| const double | coordinate, | ||
| const ModuleBase::Vector3< double > & | normal, | ||
| const Pcc2dParameters & | parameters ) |
| void elecstate::pcc_2d_operator | ( | const UnitCell & | cell, |
| const ModulePW::PW_Basis & | basis, | ||
| const std::vector< unitcell::AtomData > & | atoms, | ||
| int | open_axis, | ||
| const std::vector< ModuleBase::Vector3< double > > & | grid_positions, | ||
| std::unique_ptr< ModuleSccs::CoulombOperator > & | coulomb ) |
| double elecstate::pcc_2d_potential | ( | const ChargeMoments & | moments, |
| double | coordinate, | ||
| const ModuleBase::Vector3< double > & | normal, | ||
| const Pcc2dParameters & | parameters ) |
Hartree kernels. Parameters must be validated; moments use normal-projected positions r = normal * u, so second_moment is the normal second moment. The open planar kernel is zero on the source plane; its periodic counterpart has zero mean. This gauge fixes the charged-slab constant to -pi*L/(3*A); see M. J. Rutter, Electron. Struct. 3, 015002 (2021).
| void elecstate::pcc_2d_project | ( | const unitcell::SlabCell & | geometry, |
| std::vector< ModuleBase::Vector3< double > > & | positions ) |
| void elecstate::print_etot | ( | const Magnetism & | magnet, |
| const ElecState & | elec, | ||
| const bool | converged, | ||
| const int & | iter_in, | ||
| const int | iter_limit, | ||
| const double & | scf_thr, | ||
| const double & | scf_thr_kin, | ||
| const double & | duration, | ||
| const Input_para & | inp, | ||
| const bool | two_fermi, | ||
| const double & | pw_diag_thr, | ||
| const double & | avg_iter, | ||
| const bool | print, | ||
| const double & | ds_rms ) |
print total free energy and other energies
| ucell | unit cell |
| converged | if converged |
| iter_in | iter |
| scf_thr | threshold for scf |
| duration | time of each iteration |
| pw_diag_thr | threshold for diagonalization |
| avg_iter | averaged diagonalization iteration of each scf iteration |
| if print to screen | |
| inp | the INPUT parameters whose flags decide which energy terms and headers are printed |
| two_fermi | whether the run keeps two Fermi levels; derived, so it does not live in Input_para |
| iter_limit | maximum iterations for this SCF attempt, including propagation |
Kohn-Sham functional energy
Kohn-Sham energy with sigma->0
Harris functional energy
band energy
one-electron energy
Hartree energy
exchange-correlation energy
Ewald energy
entropy energy
correction energy for scf
local potential energy
vdw energy
hybrid functional energy
solvation energy
electric field energy
gate energy
deepks energy
| void elecstate::print_format | ( | const std::string & | name, |
| const double & | value ) |
function to print name, value and value*Ry_to_eV
| name | name |
| value | value |
| 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, | ||
| const double & | ds_rms ) |
Notes on refactor of ESolver's functions
the print of SCF iteration on-the-fly information.
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:
| bool elecstate::read_orb_file | ( | int | it, |
| std::string & | orbital_file, | ||
| std::ofstream & | ofs_running, | ||
| Atom * | atom ) |
| std::vector< std::vector< double > > elecstate::restore_dm | ( | const K_Vectors & | kv, |
| const std::vector< std::vector< double > > & | dm_k_ibz, | ||
| const ModuleSymmetry::Symmetry_rotation & | symrot, | ||
| const Parallel_Blkcyclic & | pv ) |
do nothing if gamma_only
| std::vector< std::vector< std::complex< double > > > elecstate::restore_dm | ( | const K_Vectors & | kv, |
| const std::vector< std::vector< std::complex< double > > > & | dm_k_ibz, | ||
| const ModuleSymmetry::Symmetry_rotation & | symrot, | ||
| const Parallel_Blkcyclic & | pv ) |
for symmetry, multi-k, nspin<4: restore DM(k) form DM(k_ibz)
| void elecstate::sccs_cfg_input | ( | const Input_para & | input, |
| ModuleSccs::SccsConfig & | config, | ||
| ModuleSccs::PolarizationSolverParameters & | solver ) |
| void elecstate::setup_estate_pw | ( | UnitCell & | ucell, |
| K_Vectors & | kv, | ||
| Structure_Factor & | sf, | ||
| elecstate::ElecState *& | pelec, | ||
| Charge & | chr, | ||
| pseudopot_cell_vl & | locpp, | ||
| pseudopot_cell_vnl & | ppcell, | ||
| VSep *& | vsep_cell, | ||
| ModulePW::PW_Basis_K * | pw_wfc, | ||
| ModulePW::PW_Basis * | pw_rho, | ||
| ModulePW::PW_Basis * | pw_rhod, | ||
| ModulePW::PW_Basis_Big * | pw_big, | ||
| surchem & | solvent, | ||
| const Input_para & | inp ) |
| void elecstate::setup_estate_pw_impl | ( | UnitCell & | ucell, |
| K_Vectors & | kv, | ||
| Structure_Factor & | sf, | ||
| elecstate::ElecState *& | pelec, | ||
| Charge & | chr, | ||
| pseudopot_cell_vl & | locpp, | ||
| pseudopot_cell_vnl & | ppcell, | ||
| VSep *& | vsep_cell, | ||
| ModulePW::PW_Basis_K * | pw_wfc, | ||
| ModulePW::PW_Basis * | pw_rho, | ||
| ModulePW::PW_Basis * | pw_rhod, | ||
| ModulePW::PW_Basis_Big * | pw_big, | ||
| surchem & | solvent, | ||
| const Input_para & | inp ) |
| void elecstate::teardown_estate_pw | ( | elecstate::ElecState *& | pelec, |
| VSep *& | vsep_cell ) |
| void elecstate::teardown_estate_pw_impl | ( | elecstate::ElecState *& | pelec, |
| VSep *& | vsep_cell ) |
| void elecstate::update_pot | ( | UnitCell & | ucell, |
| elecstate::ElecState *& | pelec, | ||
| const Charge & | chr, | ||
| const bool | conv_esolver ) |
| int elecstate::uspp_becsum_size | ( | const UnitCell & | ucell, |
| const pseudopot_cell_vnl & | ppcell, | ||
| const int | nspin ) |
Size of the canonical [spin][atom][packed projector pair] storage.
| void elecstate::write_sccs_out | ( | std::ostream & | output, |
| const SccsOutput & | result, | ||
| int | level, | ||
| double | solvation_energy, | ||
| bool | pcc, | ||
| double | pcc_energy ) |
| void elecstate::write_sccs_wait | ( | std::ostream & | output, |
| double | residual, | ||
| double | start_drho, | ||
| int | start_nmax ) |
| bool elecstate::ElecStateLCAO< TK >::need_psi_grid = true |
| int elecstate::ElecStateLCAO< TK >::out_wfc_lcao = 0 |
| double elecstate::tmp_gridecut = 80.0 |
| double elecstate::tmp_ucell_omega = 500.0 |