ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
ModuleIO Namespace Reference

This class has two functions: restart psi from the previous calculation, and write psi to the disk. More...

Classes

class  AngularMomentumCalculator
 
class  Cal_ldos
 
class  Cal_MLKEDF_Descriptors
 A class to calculate the descriptors for ML KEDF. Sun, Liang, and Mohan Chen. Physical Review B 109.11 (2024): 115135. Sun, Liang, and Mohan Chen. Electronic Structure 6.4 (2024): 045006. More...
 
class  CifParser
 
class  csrFileReader
 Class to read CSR file. More...
 
class  FileReader
 A base class of file reader. More...
 
class  Input_Item
 
class  Output_DMK
 
class  Output_Mulliken
 the output interface to write the Mulliken population charges More...
 
class  Output_Sk
 
class  ReadInput
 
class  SparseMatrix
 Sparse matrix class designed mainly for csr format input and output. More...
 
class  Write_MLKEDF_Descriptors
 

Typedefs

using TC = std::array< int, 3 >
 
using TAC = std::pair< int, TC >
 
template<typename T >
using Real = typename GetTypeReal< T >::type
 

Functions

void prepare_dos (std::ofstream &ofs_running, const elecstate::efermi &energy_fermi, const ModuleBase::matrix &ekb, const int nks, const int nbands, const double &dos_edelta_ev, const double &dos_scale, double &emax, double &emin)
 
bool cal_dos (const int &is, const std::string &fn, const double &de_ev, const double &emax_ev, const double &emin_ev, const double &bcoeff, const int &nks, const int &nkstot, const std::vector< double > &wk, const std::vector< int > &isk, const int &nbands, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg)
 
void cal_ldos_pw (const elecstate::ElecStatePW< std::complex< double > > *pelec, const psi::Psi< std::complex< double > > &psi, const Parallel_Grid &pgrid, const UnitCell &ucell)
 
void stm_mode_pw (const elecstate::ElecStatePW< std::complex< double > > *pelec, const psi::Psi< std::complex< double > > &psi, const Parallel_Grid &pgrid, const UnitCell &ucell)
 
void ldos_mode_pw (const elecstate::ElecStatePW< std::complex< double > > *pelec, const psi::Psi< std::complex< double > > &psi, const Parallel_Grid &pgrid, const UnitCell &ucell)
 
void get_grid_points (const std::vector< double > &start, const std::vector< double > &end, const int &npoints, const int &nx, const int &ny, const int &nz, std::vector< std::vector< int > > &points, std::vector< std::vector< double > > &shifts)
 
void trilinear_interpolate (const std::vector< std::vector< int > > &points, const std::vector< std::vector< double > > &shifts, const Parallel_Grid &pgrid, const std::vector< double > &data, std::vector< double > &results)
 
void cal_pdos (const psi::Psi< double > *psi, hamilt::Hamilt< double > *p_ham, const Parallel_Orbitals &pv, const UnitCell &ucell, const K_Vectors &kv, const int nspin0, const int nbands, const ModuleBase::matrix &ekb, const double &emax, const double &emin, const double &dos_edelta_ev, const double &bcoeff)
 
void print_tdos_gamma (const ModuleBase::matrix *pdos, const int nlocal, const int npoints, const double &emin, const double &dos_edelta_ev)
 
void print_pdos_gamma (const UnitCell &ucell, const ModuleBase::matrix *pdos, const int nlocal, const int npoints, const double &emin, const double &dos_edelta_ev)
 
void cal_pdos (const psi::Psi< std::complex< double > > *psi, hamilt::Hamilt< std::complex< double > > *p_ham, const Parallel_Orbitals &pv, const UnitCell &ucell, const K_Vectors &kv, const int nspin0, const int nbands, const ModuleBase::matrix &ekb, const double &emax, const double &emin, const double &dos_edelta_ev, const double &bcoeff)
 
void print_tdos_multik (const ModuleBase::matrix *pdos, const int nlocal, const int npoints, const double &emin, const double &dos_edelta_ev)
 
void print_pdos_multik (const UnitCell &ucell, const ModuleBase::matrix *pdos, const int nlocal, const int npoints, const double &emin, const double &dos_edelta_ev)
 
std::complex< double > cal_LzijR (const std::unique_ptr< TwoCenterIntegrator > &calculator, const int it, const int ia, const int il, const int iz, const int mi, const int jt, const int ja, const int jl, const int jz, const int mj, const ModuleBase::Vector3< double > &vR)
 calculate the <phi_i|Lz|phi_j> matrix elements, in which the Lz are the angular momentum operators, |phi_i> and |phi_j> are the numerical atomic orbitals (NAOs).
 
std::complex< double > cal_LyijR (const std::unique_ptr< TwoCenterIntegrator > &calculator, const int it, const int ia, const int il, const int iz, const int im, const int jt, const int ja, const int jl, const int jz, const int jm, const ModuleBase::Vector3< double > &vR)
 calculate the <phi_i|Ly|phi_j> matrix elements, in which the Lz are the angular momentum operators, |phi_i> and |phi_j> are the numerical atomic orbitals (NAOs).
 
std::complex< double > cal_LxijR (const std::unique_ptr< TwoCenterIntegrator > &calculator, const int it, const int ia, const int il, const int iz, const int im, const int jt, const int ja, const int jl, const int jz, const int jm, const ModuleBase::Vector3< double > &vR)
 calculate the <phi_i|Lx|phi_j> matrix elements, in which the Lz are the angular momentum operators, |phi_i> and |phi_j> are the numerical atomic orbitals (NAOs).
 
template<typename TK , typename TR >
void ctrl_output_fp (UnitCell &ucell, elecstate::ElecStateLCAO< TK > *pelec, const int istep)
 
template<typename TK , typename TR >
void ctrl_output_lcao (UnitCell &ucell, K_Vectors &kv, elecstate::ElecStateLCAO< TK > *pelec, Parallel_Orbitals &pv, Grid_Driver &gd, psi::Psi< TK > *psi, hamilt::HamiltLCAO< TK, TR > *p_hamilt, TwoCenterBundle &two_center_bundle, Gint_k &gk, LCAO_Orbitals &orb, const ModulePW::PW_Basis_K *pw_wfc, const ModulePW::PW_Basis *pw_rho, Grid_Technique &gt, const ModulePW::PW_Basis_Big *pw_big, const Structure_Factor &sf, rdmft::RDMFT< TK, TR > &rdmft_solver, LCAO_Deepks< TK > &ld, const int istep)
 
bool read_vdata_palgrid (const Parallel_Grid &pgrid, const int my_rank, std::ofstream &ofs_running, const std::string &fn, double *const data, const int nat)
 read volumetric data from .cube file into the parallel distributed grid.
 
void write_vdata_palgrid (const Parallel_Grid &pgrid, const double *const data, const int is, const int nspin, const int iter, const std::string &fn, const double ef, const UnitCell *const ucell, const int precision=11, const int out_fermi=1, const bool reduce_all_pool=false)
 write volumetric data on the parallized grid into a .cube file
 
bool read_cube (const std::string &file, std::vector< std::string > &comment, int &natom, std::vector< double > &origin, int &nx, int &ny, int &nz, std::vector< double > &dx, std::vector< double > &dy, std::vector< double > &dz, std::vector< int > &atom_type, std::vector< double > &atom_charge, std::vector< std::vector< double > > &atom_pos, std::vector< double > &data)
 read the full data from a cube file
 
void write_cube (const std::string &file, const std::vector< std::string > &comment, const int &natom, const std::vector< double > &origin, const int &nx, const int &ny, const int &nz, const std::vector< double > &dx, const std::vector< double > &dy, const std::vector< double > &dz, const std::vector< int > &atom_type, const std::vector< double > &atom_charge, const std::vector< std::vector< double > > &atom_pos, const std::vector< double > &data, const int precision, const int ndata_line=6)
 write a cube file
 
void trilinear_interpolate (const double *const data_in, const int &nx_read, const int &ny_read, const int &nz_read, const int &nx, const int &ny, const int &nz, double *data_out)
 The trilinear interpolation method.
 
void write_dipole (const UnitCell &ucell, const double *rho_save, const ModulePW::PW_Basis *rhopw, const int &is, const int &istep, const std::string &fn, const int &precision=11)
 
double prepare (const UnitCell &cell, int &dir)
 
std::string filename_output (const std::string &directory, const std::string &property, const std::string &basis, const int ik_local, const std::vector< int > &ik2iktot, const int nspin, const int nkstot, const int out_type, const bool out_app_flag, const bool gamma_only, const int istep)
 
template<typename Device >
void get_pchg_pw (const std::vector< int > &out_pchg, const int nbands, const int nspin, const int nxyz, const int chr_ngmc, UnitCell *ucell, const psi::Psi< std::complex< double >, Device > *kspw_psi, const ModulePW::PW_Basis *pw_rhod, const ModulePW::PW_Basis_K *pw_wfc, const Device *ctx, const Parallel_Grid &pgrid, const std::string &global_out_dir, const bool if_separate_k, const K_Vectors &kv, const int kpar, const int my_pool, const Charge *chr)
 
template<typename Device >
void get_wf_pw (const std::vector< int > &out_wfc_norm, const std::vector< int > &out_wfc_re_im, const int nbands, const int nspin, const int nxyz, UnitCell *ucell, const psi::Psi< std::complex< double >, Device > *kspw_psi, const ModulePW::PW_Basis_K *pw_wfc, const Device *ctx, const Parallel_Grid &pgrid, const std::string &global_out_dir, const K_Vectors &kv, const int kpar, const int my_pool)
 
std::string dmk_gen_fname (const bool gamma_only, const int ispin, const int ik)
 Generates the filename for the DMK file based on the given parameters.
 
void dmk_write_ucell (std::ofstream &ofs, const UnitCell *ucell)
 Writes the unit cell information to a DMK file.
 
void dmk_read_ucell (std::ifstream &ifs)
 Reads the unit cell information lines in a DMK file.
 
void dmk_readData (std::ifstream &ifs, double &data)
 Read one double from a file.
 
void dmk_readData (std::ifstream &ifs, std::complex< double > &data)
 Read one complex double from a file.
 
template<typename T >
bool read_dmk (const int nspin, const int nk, const Parallel_2D &pv, const std::string &dmk_dir, std::vector< std::vector< T > > &dmk, std::ofstream &ofs_running)
 Reads the DMK data from a file.
 
template<typename T >
void write_dmk (const std::vector< std::vector< T > > &dmk, const int precision, const std::vector< double > &efs, const UnitCell *ucell, const Parallel_2D &pv)
 Writes the DMK data to a file.
 
void read_mat_npz (const Parallel_Orbitals *paraV, const UnitCell &ucell, std::string &zipname, hamilt::HContainer< double > &hR)
 
void output_mat_npz (const UnitCell &ucell, std::string &zipname, const hamilt::HContainer< double > &hR)
 
void nscf_band (const int &is, const std::string &eig_file, const int &nband, const double &fermie, const int &precision, const ModuleBase::matrix &ekb, const K_Vectors &kv)
 calculate the band structure
 
void nscf_fermi_surface (const std::string &out_band_dir, const int &nband, const double &ef, const K_Vectors &kv, const UnitCell &ucell, const ModuleBase::matrix &ekb)
 
void read_abacus_orb (std::ifstream &ifs, std::string &elem, double &ecut, int &nr, double &dr, std::vector< int > &nzeta, std::vector< std::vector< double > > &radials, const int rank=0)
 static version of read_abacus_orb. A delete-new operation may cause the memory leak, it is better to use std::vector to replace the raw pointer.
 
void write_abacus_orb (std::ofstream &ofs, const std::string &elem, const double &ecut, const int nr, const double dr, const std::vector< int > &nzeta, const std::vector< std::vector< double > > &radials, const int rank=0)
 
void output_convergence_after_scf (const bool &convergence, double &energy, std::ofstream &ofs_running=GlobalV::ofs_running)
 output if is convergence and energy after scf
 
void output_after_relax (bool conv_ion, bool conv_esolver, std::ofstream &ofs_running=GlobalV::ofs_running)
 output after relaxation
 
void output_efermi (const bool &convergence, double &efermi, std::ofstream &ofs_running=GlobalV::ofs_running)
 output the fermi energy
 
void output_vacuum_level (const UnitCell *ucell, const double *const *rho, const double *v_elecstat, const int &nx, const int &ny, const int &nz, const int &nxyz, const int &nrxx, const int &nplane, const int &startz_current, std::ofstream &ofs_running=GlobalV::ofs_running)
 calculate and output the vacuum level We first determine the vacuum direction, then get the vacuum position based on the minimum of charge density, finally output the vacuum level, i.e., the electrostatic potential at the vacuum position.
 
void print_force (std::ofstream &ofs, const UnitCell &cell, const std::string &name, const ModuleBase::matrix &force, bool ry=true)
 output atomic forces
 
void print_stress (const std::string &name, const ModuleBase::matrix &scs, const bool screen, const bool ry, std::ofstream &ofs)
 output stress components
 
void write_head (std::ofstream &ofs_running, const int &istep, const int &iter, const std::string &basisname)
 write head for scf iteration
 
void write_head_td (std::ofstream &ofs_running, const int &istep, const int &estep, const int &iter, const std::string &basisname)
 write head for scf iteration
 
template<>
void output_mat_sparse (const bool &out_mat_hsR, const bool &out_mat_dh, const bool &out_mat_ds, const bool &out_mat_t, const bool &out_mat_r, const int &istep, const ModuleBase::matrix &v_eff, const Parallel_Orbitals &pv, Gint_k &gint_k, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, UnitCell &ucell, const Grid_Driver &grid, const K_Vectors &kv, hamilt::Hamilt< double > *p_ham)
 
template<>
void output_mat_sparse (const bool &out_mat_hsR, const bool &out_mat_dh, const bool &out_mat_ds, const bool &out_mat_t, const bool &out_mat_r, const int &istep, const ModuleBase::matrix &v_eff, const Parallel_Orbitals &pv, Gint_k &gint_k, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, UnitCell &ucell, const Grid_Driver &grid, const K_Vectors &kv, hamilt::Hamilt< std::complex< double > > *p_ham)
 
template<typename T >
void output_mat_sparse (const bool &out_mat_hsR, const bool &out_mat_dh, const bool &out_mat_ds, const bool &out_mat_t, const bool &out_mat_r, const int &istep, const ModuleBase::matrix &v_eff, const Parallel_Orbitals &pv, Gint_k &gint_k, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, UnitCell &ucell, const Grid_Driver &grid, const K_Vectors &kv, hamilt::Hamilt< T > *p_ham)
 the output interface to write the sparse matrix of H, S, T, and r
 
template<typename TK >
void cal_mag (Parallel_Orbitals *pv, hamilt::Hamilt< TK > *p_ham, K_Vectors &kv, elecstate::ElecState *pelec, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, UnitCell &ucell, const Grid_Driver &gd, const int istep, const bool print)
 
void parse_args (int argc, char **argv)
 This function reture the version information when using command "abacus --version", "abacus -v" or "abacus -V". Otherwise, it does nothing.
 
void setup_parameters (UnitCell &ucell, K_Vectors &kv)
 
void print_time (time_t &time_start, time_t &time_finish)
 
void print_rhofft (ModulePW::PW_Basis *pw_rhod, ModulePW::PW_Basis *pw_rho, ModulePW::PW_Basis_Big *pw_big, std::ofstream &ofs)
 Print charge density using FFT.
 
void print_wfcfft (const Input_para &inp, ModulePW::PW_Basis_K &pw_wfc, std::ofstream &ofs)
 
void print_screen (const int &stress_step, const int &force_step, const int &istep)
 
int read_exit_file (const int &my_rank, const std::string &filename, std::ofstream &ofs_running)
 read file to determine whether to stop the current execution
 
std::string longstring (const std::vector< std::string > &words)
 
bool assume_as_boolean (const std::string &val)
 
std::string to_dir (const std::string &str)
 
void read_information (std::ifstream &ifs, std::vector< std::string > &output, const std::string &delimiters)
 
std::string nofound_str (std::vector< std::string > init_chgs, const std::string &str)
 
void read_wf2rho_pw (const ModulePW::PW_Basis_K *pw_wfc, ModuleSymmetry::Symmetry &symm, Charge &chg, const std::string &readin_dir, const int kpar, const int my_pool, const int my_rank, const int nproc_in_pool, const int rank_in_pool, const int nbands, const int nspin, const int npol, const int nkstot, const std::vector< int > &ik2iktot, const std::vector< int > &isk, std::ofstream &ofs_running)
 read wave functions and occupation numbers to charge density
 
void read_wfc_nao_one_data (std::ifstream &ifs, double &data)
 Reads a single data value from an input file stream.
 
void read_wfc_nao_one_data (std::ifstream &ifs, std::complex< double > &data)
 Reads a single complex data value from an input file stream.
 
template<typename T >
bool read_wfc_nao (const std::string &global_readin_dir, const Parallel_Orbitals &ParaV, psi::Psi< T > &psid, elecstate::ElecState *const pelec, const std::vector< int > &ik2iktot, const int nkstot, const int nspin, const int skip_band=0, const int nstep=-1)
 Reads the wavefunction coefficients from an input file.
 
void read_wfc_pw (const std::string &filedir, const ModulePW::PW_Basis_K *pw_wfc, const int rank_in_pool, const int nproc_in_pool, const int nbands, const int npol, const int &ik, const int &ikstot, const int &nkstot, ModuleBase::ComplexMatrix &wfc)
 read wave functions from binary file
 
template<typename Tdata >
void read_Hexxs_csr (const std::string &file_name, const UnitCell &ucell, const int nspin, const int nbasis, std::vector< std::map< int, std::map< TAC, RI::Tensor< Tdata > > > > &Hexxs)
 read Hexxs in CSR format
 
template<typename Tdata >
void read_Hexxs_cereal (const std::string &file_name, std::vector< std::map< int, std::map< TAC, RI::Tensor< Tdata > > > > &Hexxs)
 read Hexxs in cereal format
 
template<typename Tdata >
void write_Hexxs_csr (const std::string &file_name, const UnitCell &ucell, const std::map< int, std::map< TAC, RI::Tensor< Tdata > > > &Hexxs)
 write Hexxs in CSR format
 
template<typename Tdata >
std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, Tdata > > > calculate_RI_Tensor_sparse (const double &sparse_threshold, const std::vector< std::map< int, std::map< TAC, RI::Tensor< Tdata > > > > &Hexxs, const UnitCell &ucell)
 
template<typename Tdata >
std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, Tdata > > > calculate_RI_Tensor_sparse (const double &sparse_threshold, const std::map< int, std::map< TAC, RI::Tensor< Tdata > > > &Hexxs, const UnitCell &ucell)
 
template<typename Tdata >
void write_Hexxs_csr (const std::string &file_name, const UnitCell &ucell, const std::vector< std::map< int, std::map< TAC, RI::Tensor< Tdata > > > > &Hexxs)
 
bool read_rhog (const std::string &filename, const ModulePW::PW_Basis *pw_rhod, std::complex< double > **rhog)
 
bool write_rhog (const std::string &fchg, const bool gamma_only, const ModulePW::PW_Basis *pw_rho, const int nspin, const ModuleBase::Matrix3 &GT, std::complex< double > **rhog, const int ipool, const int irank, const int nrank)
 
template<typename T >
void output_single_R (std::ofstream &ofs, const std::map< size_t, std::map< size_t, T > > &XR, const double &sparse_threshold, const bool &binary, const Parallel_Orbitals &pv, const bool &reduce=true)
 
std::vector< double > read_k (std::string filename, int ik)
 
std::string dmr_gen_fname (const int out_type, const int ispin, const bool append, const int istep)
 
void write_dmr_csr (std::string &fname, hamilt::HContainer< double > *dm_serial, const int istep)
 
void write_dmr (const std::vector< hamilt::HContainer< double > * > dmr, const Parallel_2D &paraV, const bool append, const int *iat2iwt, const int nat, const int istep)
 
template<typename T >
void write_dos_lcao (const psi::Psi< T > *psi, hamilt::Hamilt< T > *p_ham, const Parallel_Orbitals &pv, const UnitCell &ucell, const K_Vectors &kv, const int nbands, const elecstate::efermi &energy_fermi, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const double &dos_edelta_ev, const double &dos_scale, const double &bcoeff, const bool out_app_flag, const int istep, std::ofstream &ofs_running)
 calculate density of states(DOS), partial density of states(PDOS), and mulliken charge for LCAO base
 
template void write_dos_lcao (const psi::Psi< double > *psi, hamilt::Hamilt< double > *p_ham, const Parallel_Orbitals &pv, const UnitCell &ucell, const K_Vectors &kv, const int nbands, const elecstate::efermi &energy_fermi, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const double &dos_edelta_ev, const double &dos_scale, const double &bcoeff, const bool out_app_flag, const int istep, std::ofstream &ofs_running)
 
template void write_dos_lcao (const psi::Psi< std::complex< double > > *psi, hamilt::Hamilt< std::complex< double > > *p_ham, const Parallel_Orbitals &pv, const UnitCell &ucell, const K_Vectors &kv, const int nbands, const elecstate::efermi &energy_fermi, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const double &dos_edelta_ev, const double &dos_scale, const double &bcoeff, const bool out_app_flag, const int istep, std::ofstream &ofs_running)
 
void write_dos_pw (const UnitCell &ucell, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const K_Vectors &kv, const int nbands, const elecstate::efermi &energy_fermi, const double &dos_edelta_ev, const double &dos_scale, const double &bcoeff, std::ofstream &ofs_running)
 calculate density of states(DOS) for PW base
 
template<typename TK , typename TR >
void write_eband_terms (const int nspin, const int nbasis, const int drank, const Parallel_Orbitals *pv, const psi::Psi< TK > &psi, const UnitCell &ucell, Structure_Factor &sf, surchem &solvent, const ModulePW::PW_Basis &rho_basis, const ModulePW::PW_Basis &rhod_basis, const ModuleBase::matrix &vloc, const Charge &chg, Gint_Gamma &gint_gamma, Gint_k &gint_k, const K_Vectors &kv, const ModuleBase::matrix &wg, Grid_Driver &gd, const std::vector< double > &orb_cutoff, const TwoCenterBundle &two_center_bundle)
 
void write_eig_iter (const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const K_Vectors &kv)
 
void write_eig_file (const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const K_Vectors &kv)
 
void write_elecstat_pot (const int &bz, const int &nbz, const std::string &fn, const int &istep, ModulePW::PW_Basis *rho_basis, const Charge *const chr, const UnitCell *ucell_, const double *v_effective_fixed, const surchem &solvent)
 write electric static potential to file
 
void write_elf (const int &bz, const int &nbz, const std::string &out_dir, const int &istep, const int &nspin, const double *const *rho, const double *const *tau, ModulePW::PW_Basis *rho_basis, const Parallel_Grid &pgrid, const UnitCell *ucell_, const int &precision)
 
template<typename T >
void write_hsk (const std::string &global_out_dir, const int nspin, const int nks, const int nkstot, const std::vector< int > &ik2iktot, const std::vector< int > &isk, hamilt::Hamilt< T > *p_hamilt, const Parallel_Orbitals &pv, const bool gamma_only, const bool out_app_flag, const int istep, std::ofstream &ofs_running)
 
template<typename T >
void save_mat (const int istep, const T *mat, const int dim, const bool bit, const int precision, const bool tri, const bool app, const std::string &file_name, const Parallel_2D &pv, const int drank, const bool reduce=true)
 save a square matrix, such as H(k) and S(k)
 
void output_HSR (const UnitCell &ucell, const int &istep, const ModuleBase::matrix &v_eff, const Parallel_Orbitals &pv, LCAO_HS_Arrays &HS_Arrays, const Grid_Driver &grid, const K_Vectors &kv, hamilt::Hamilt< std::complex< double > > *p_ham, const std::string &SR_filename="srs1_nao.csr", const std::string &HR_filename_up="hrs1_nao.csr", const std::string HR_filename_down="hrs2_nao.csr", const bool &binary=false, const double &sparse_threshold=1e-10)
 
void output_dHR (const int &istep, const ModuleBase::matrix &v_eff, Gint_k &gint_k, const UnitCell &ucell, const Parallel_Orbitals &pv, LCAO_HS_Arrays &HS_Arrays, const Grid_Driver &grid, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, const K_Vectors &kv, const bool &binary=false, const double &sparse_threshold=1e-10)
 
void output_dSR (const int &istep, const UnitCell &ucell, const Parallel_Orbitals &pv, LCAO_HS_Arrays &HS_Arrays, const Grid_Driver &grid, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, const K_Vectors &kv, const bool &binary=false, const double &sparse_thr=1e-10)
 
void output_TR (const int istep, const UnitCell &ucell, const Parallel_Orbitals &pv, LCAO_HS_Arrays &HS_Arrays, const Grid_Driver &grid, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, const std::string &TR_filename="trs1_nao.csr", const bool &binary=false, const double &sparse_threshold=1e-10)
 
void output_SR (Parallel_Orbitals &pv, const Grid_Driver &grid, hamilt::Hamilt< std::complex< double > > *p_ham, const std::string &SR_filename="srs1_nao.csr", const bool &binary=false, const double &sparse_threshold=1e-10)
 
void save_HSR_sparse (const int &istep, const Parallel_Orbitals &pv, LCAO_HS_Arrays &HS_Arrays, const double &sparse_thr, const bool &binary, const std::string &SR_filename, const std::string &HR_filename_up, const std::string &HR_filename_down)
 
void save_dH_sparse (const int &istep, const Parallel_Orbitals &pv, LCAO_HS_Arrays &HS_Arrays, const double &sparse_thr, const bool &binary, const std::string &fileflag="h")
 
template<typename Tdata >
void save_sparse (const std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, Tdata > > > &smat, const std::set< Abfs::Vector3_Order< int > > &all_R_coor, const double &sparse_thr, const bool &binary, const std::string &filename, const Parallel_Orbitals &pv, const std::string &label, const int &istep=-1, const bool &reduce=true)
 
void write_orb_info (const UnitCell *ucell)
 
void print_PAOs (const UnitCell &ucell)
 print chi (PAO) in pseudopotential file
 
template<typename TK >
void write_proj_band_lcao (const psi::Psi< TK > *psi, const Parallel_Orbitals &pv, const elecstate::ElecState *pelec, const K_Vectors &kv, const UnitCell &ucell, hamilt::Hamilt< TK > *p_ham)
 
void set_para2d_MO (const Parallel_Orbitals &pv, const int nbands, Parallel_2D &p2d)
 
template<typename T >
std::vector< TcVc (T *V, T *c, const int nbasis, const int nbands, const Parallel_Orbitals &pv, const Parallel_2D &p2d)
 
double get_real (const std::complex< double > &c)
 
double get_real (const double &d)
 
template<typename T >
double all_band_energy (const int ik, const std::vector< T > &mat_mo, const Parallel_2D &p2d, const ModuleBase::matrix &wg)
 
template<typename T >
std::vector< double > orbital_energy (const int ik, const int nbands, const std::vector< T > &mat_mo, const Parallel_2D &p2d)
 
template<typename T >
void set_gint_pointer (Gint_Gamma &gint_gamma, Gint_k &gint_k, typename TGint< T >::type *&gint)
 
template<>
void set_gint_pointer< double > (Gint_Gamma &gint_gamma, Gint_k &gint_k, typename TGint< double >::type *&gint)
 
template<>
void set_gint_pointer< std::complex< double > > (Gint_Gamma &gint_gamma, Gint_k &gint_k, typename TGint< std::complex< double > >::type *&gint)
 
void write_orb_energy (const K_Vectors &kv, const int nspin0, const int nbands, const std::vector< std::vector< double > > &e_orb, const std::string &term, const std::string &label, const bool app=false)
 
template<typename TK , typename TR >
void write_Vxc (const int nspin, const int nbasis, const int drank, const Parallel_Orbitals *pv, const psi::Psi< TK > &psi, const UnitCell &ucell, Structure_Factor &sf, surchem &solvent, const ModulePW::PW_Basis &rho_basis, const ModulePW::PW_Basis &rhod_basis, const ModuleBase::matrix &vloc, const Charge &chg, Gint_Gamma &gint_gamma, Gint_k &gint_k, const K_Vectors &kv, const std::vector< double > &orb_cutoff, const ModuleBase::matrix &wg, Grid_Driver &gd)
 write the Vxc matrix in KS orbital representation, usefull for GW calculation including terms: local/semi-local XC, EXX, DFTU
 
template<typename FPTYPE >
FPTYPE get_real (const std::complex< FPTYPE > &c)
 
template<typename FPTYPE >
FPTYPE get_real (const FPTYPE &d)
 
template<typename T >
std::vector< TcVc (T *const V, T *const c, int nbasis, int nbands)
 
template<typename FPTYPE >
std::vector< std::complex< FPTYPE > > psi_Hpsi (std::complex< FPTYPE > *const psi, std::complex< FPTYPE > *const hpsi, const int nbasis, const int nbands)
 
template<typename FPTYPE >
std::vector< FPTYPE > orbital_energy (const int ik, const int nbands, const std::vector< std::complex< FPTYPE > > &mat_mo)
 
template<typename FPTYPE >
FPTYPE all_band_energy (const int ik, const int nbands, const std::vector< std::complex< FPTYPE > > &mat_mo, const ModuleBase::matrix &wg)
 
template<typename FPTYPE >
FPTYPE all_band_energy (const int ik, const std::vector< FPTYPE > &orbital_energy, const ModuleBase::matrix &wg)
 
template<typename FPTYPE >
void write_Vxc (int nspin, int naos, int drank, const psi::Psi< std::complex< FPTYPE > > &psi_pw, const UnitCell &ucell, Structure_Factor &sf, surchem &solvent, const ModulePW::PW_Basis_K &wfc_basis, const ModulePW::PW_Basis &rho_basis, const ModulePW::PW_Basis &rhod_basis, const ModuleBase::matrix &vloc, const Charge &chg, const K_Vectors &kv, const ModuleBase::matrix &wg)
 write the Vxc matrix in KS orbital representation, usefull for GW calculation including terms: local/semi-local XC and EXX
 
template<>
void set_gint_pointer< double > (Gint_Gamma &gint_gamma, Gint_k &gint_k, typename TGint< double >::type *&gint)
 
template<>
void set_gint_pointer< std::complex< double > > (Gint_Gamma &gint_gamma, Gint_k &gint_k, typename TGint< std::complex< double > >::type *&gint)
 
template<typename TR >
std::set< Abfs::Vector3_Order< int > > get_R_range (const hamilt::HContainer< TR > &hR)
 
template<typename TR >
std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, TR > > > cal_HR_sparse (const hamilt::HContainer< TR > &hR, const int current_spin, const double sparse_thr)
 
template<>
std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, double > > > cal_HR_sparse (const hamilt::HContainer< double > &hR, const int current_spin, const double sparse_thr)
 
template<>
std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, std::complex< double > > > > cal_HR_sparse (const hamilt::HContainer< std::complex< double > > &hR, const int current_spin, const double sparse_thr)
 
template<typename TK , typename TR >
void write_Vxc_R (const int nspin, const Parallel_Orbitals *pv, const UnitCell &ucell, Structure_Factor &sf, surchem &solvent, const ModulePW::PW_Basis &rho_basis, const ModulePW::PW_Basis &rhod_basis, const ModuleBase::matrix &vloc, const Charge &chg, Gint_Gamma &gint_gamma, Gint_k &gint_k, const K_Vectors &kv, const std::vector< double > &orb_cutoff, Grid_Driver &gd, const double sparse_thr=1e-10)
 write the Vxc matrix in KS orbital representation, usefull for GW calculation including terms: local/semi-local XC, EXX, DFTU
 
void wfc_nao_write2file (const std::string &name, const double *ctot, const int nlocal, const int ik, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const bool &writeBinary, const bool &append_flag)
 
void wfc_nao_write2file_complex (const std::string &name, const std::complex< double > *ctot, const int nlocal, const int &ik, const ModuleBase::Vector3< double > &kvec_c, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const bool &writeBinary, const bool &append_flag)
 
template<typename T >
void write_wfc_nao (const int out_type, const bool out_app_flag, const psi::Psi< T > &psi, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const std::vector< ModuleBase::Vector3< double > > &kvec_c, const std::vector< int > &ik2iktot, const int nkstot, const Parallel_Orbitals &pv, const int nspin, const int istep)
 
template void write_wfc_nao< double > (const int out_type, const bool out_app_flag, const psi::Psi< double > &psi, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const std::vector< ModuleBase::Vector3< double > > &kvec_c, const std::vector< int > &ik2iktot, const int nkstot, const Parallel_Orbitals &pv, const int nspin, const int istep)
 
template void write_wfc_nao< std::complex< double > > (const int out_type, const bool out_app_flag, const psi::Psi< std::complex< double > > &psi, const ModuleBase::matrix &ekb, const ModuleBase::matrix &wg, const std::vector< ModuleBase::Vector3< double > > &kvec_c, const std::vector< int > &ik2iktot, const int nkstot, const Parallel_Orbitals &pv, const int nspin, const int istep)
 
void write_wfc_pw (const int kpar, const int my_pool, const int my_rank, const int nbands, const int nspin, const int npol, const int rank_in_pool, const int nproc_in_pool, const int out_wfc_pw, const double &ecutwfc, const std::string &global_out_dir, const psi::Psi< std::complex< double > > &psi, const K_Vectors &kv, const ModulePW::PW_Basis_K *wfcpw, std::ofstream &ofs_running)
 

Detailed Description

This class has two functions: restart psi from the previous calculation, and write psi to the disk.

calculate the <phi_i|Lx/Ly/Lz|phi_j> matrix elements, in which the Lx/Ly/Lz are the angular momentum operators, |phi_i> and |phi_j> are the numerical atomic orbitals (NAOs).

Formulation

Calculate the <phi_i|Lx/Ly/Lz|phi_j> with ladder operator L+ and L-.

The relation between Lx, Ly and L+, L- are:

                             Lx = (L+ + L-) / 2
                             Ly = (L+ - L-) / 2i

With L+, the spherical harmonic function Ylm (denoted as |l, m> in the following) can be raised:

                     L+|l, m> = sqrt((l-m)(l+m+1))|l, m+1>

Likely, with L-, the spherical harmonic function Ylm can be lowered:

                     L-|l, m> = sqrt((l+m)(l-m+1))|l, m-1>

Therefore the Lx matrix element can be calculated as:

           <l, m|Lx|l, m'> =   sqrt((l-m)(l+m+1)) * delta(m, m'+1) / 2
                             + sqrt((l+m)(l-m+1)) * delta(m, m'-1) / 2

The Ly matrix element can be calculated as:

           <l, m|Ly|l, m'> =   sqrt((l-m)(l+m+1)) * delta(m, m'+1) / 2i
                             - sqrt((l+m)(l-m+1)) * delta(m, m'-1) / 2i

The Lz matrix element can be calculated as:

                     <l, m|Lz|l, m'> = m * delta(m, m')

However, things will change when there are more than one centers.

Technical Details

0. The calculation of matrix elements involves the two-center-integral calculation, this is supported by ABACUS built-in class TwoCenterIntegrator. see: source/source_basis/module_nao/two_center_integrator.h.

  1. The interface of it is RadialCollection, which is a collection of radial functions. see: source/source_basis/module_nao/radial_collection.h
  2. The radial functions are stored in AtomicRadials class, see: source/source_basis/module_nao/atomic_radials.h
  3. The construction of AtomicRadials involves the filename of orbital, it is stored in the UnitCell instance
  4. The calculation will run over all supercells in which the two-center-integral is not zero. This is done by the class SltkGridDriver, which is a driver for searching the neighboring cells.

I/O free function of rho(G) in binary format Author: YuLiu98, Kirk0830

The designed foramt of the binary file is kept similar to the one in QuantumESPRESSO Modules/io_base.f90, function write_rhog (non-HDF5):

/3/ /gammaonly/ /ngm_g/ /nspin/ /3/ ! bool, int, int. ngm_g is the global, total number of G-vectors /9/ /b11/ /b12/ /b13/ /b21/ /b22/ /b23/ /b31/ /b32/ /b33/ /9/ ! 9 real numbers, the three lattice vectors /ngm_g*3/ /miller(1,1)/ /miller(1,2)/ /miller(1,3)/ /miller(2,1)/ /miller(2,2)/ /miller(2,3)/ ... /miller(ngm_g,1)/ /miller(ngm_g,2)/ /miller(ngm_g,3)/ /ngm_g*3/ ! ngm_g*3 integers, the G-vectors in Miller indices /ngm_g/ /rhog(1)/ /rhog(2)/ /rhog(3)/ ... /ngm_g/ ! ngm_g complex numbers, the rho(G) values !/ngm_g/ ! ngm_g complex numbers, the rho(G) values for the second spin component !/rhog(1)/ /rhog(2)/ /rhog(3)/ ... !/ngm_g/ ! ngm_g complex numbers, the rho(G) values for the second spin component

There are some aspects needed to ensure:

  1. the correspondence between ABACUS PW and QuantumESPRESSO ABACUS PW QuantumESPRESSO bij UnitCell::GT b1, b2, b3 miller index ibox[*] mill rho Charge::rhog rho
  2. the unit of each quantity ABACUS PW QuantumESPRESSO bij a.u. miller index rho

Typedef Documentation

◆ Real

template<typename T >
using ModuleIO::Real = typedef typename GetTypeReal<T>::type

◆ TAC

typedef std::pair< int, std::array< int, 3 > > ModuleIO::TAC

◆ TC

using ModuleIO::TC = typedef std::array<int, 3>

Function Documentation

◆ all_band_energy() [1/3]

template<typename FPTYPE >
FPTYPE ModuleIO::all_band_energy ( const int  ik,
const int  nbands,
const std::vector< std::complex< FPTYPE > > &  mat_mo,
const ModuleBase::matrix wg 
)
Here is the call graph for this function:

◆ all_band_energy() [2/3]

template<typename FPTYPE >
FPTYPE ModuleIO::all_band_energy ( const int  ik,
const std::vector< FPTYPE > &  orbital_energy,
const ModuleBase::matrix wg 
)
Here is the call graph for this function:

◆ all_band_energy() [3/3]

template<typename T >
double ModuleIO::all_band_energy ( const int  ik,
const std::vector< T > &  mat_mo,
const Parallel_2D p2d,
const ModuleBase::matrix wg 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ assume_as_boolean()

bool ModuleIO::assume_as_boolean ( const std::string &  val)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_dos()

bool ModuleIO::cal_dos ( const int &  is,
const std::string &  fn,
const double &  de_ev,
const double &  emax_ev,
const double &  emin_ev,
const double &  bcoeff,
const int &  nks,
const int &  nkstot,
const std::vector< double > &  wk,
const std::vector< int > &  isk,
const int &  nbands,
const ModuleBase::matrix ekb,
const ModuleBase::matrix wg 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_HR_sparse() [1/3]

template<>
std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, double > > > ModuleIO::cal_HR_sparse ( const hamilt::HContainer< double > &  hR,
const int  current_spin,
const double  sparse_thr 
)
Here is the call graph for this function:

◆ cal_HR_sparse() [2/3]

template<>
std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, std::complex< double > > > > ModuleIO::cal_HR_sparse ( const hamilt::HContainer< std::complex< double > > &  hR,
const int  current_spin,
const double  sparse_thr 
)
Here is the call graph for this function:

◆ cal_HR_sparse() [3/3]

template<typename TR >
std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, TR > > > ModuleIO::cal_HR_sparse ( const hamilt::HContainer< TR > &  hR,
const int  current_spin,
const double  sparse_thr 
)
Here is the caller graph for this function:

◆ cal_ldos_pw()

void ModuleIO::cal_ldos_pw ( const elecstate::ElecStatePW< std::complex< double > > *  pelec,
const psi::Psi< std::complex< double > > &  psi,
const Parallel_Grid pgrid,
const UnitCell ucell 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_LxijR()

std::complex< double > ModuleIO::cal_LxijR ( const std::unique_ptr< TwoCenterIntegrator > &  calculator,
const int  it,
const int  ia,
const int  il,
const int  iz,
const int  im,
const int  jt,
const int  ja,
const int  jl,
const int  jz,
const int  jm,
const ModuleBase::Vector3< double > &  vR 
)

calculate the <phi_i|Lx|phi_j> matrix elements, in which the Lz are the angular momentum operators, |phi_i> and |phi_j> are the numerical atomic orbitals (NAOs).

Parameters
calculatorthe std::unique_ptr<TwoCenterIntegrator> instance
itatomtype index of the first atom
iaatomic index of the first atom within the atomtype
ilangular momentum index of the first atom
izzeta function index of the first atom
mimagnetic quantum number of the first atom
jtatomtype index of the second atom
jaatomic index of the second atom within the atomtype
jlangular momentum index of the second atom
jzzeta function index of the second atom
mjmagnetic quantum number of the second atom
vRthe vector from the first atom to the second atom
Returns
std::complex<double>
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_LyijR()

std::complex< double > ModuleIO::cal_LyijR ( const std::unique_ptr< TwoCenterIntegrator > &  calculator,
const int  it,
const int  ia,
const int  il,
const int  iz,
const int  im,
const int  jt,
const int  ja,
const int  jl,
const int  jz,
const int  jm,
const ModuleBase::Vector3< double > &  vR 
)

calculate the <phi_i|Ly|phi_j> matrix elements, in which the Lz are the angular momentum operators, |phi_i> and |phi_j> are the numerical atomic orbitals (NAOs).

Parameters
calculatorthe std::unique_ptr<TwoCenterIntegrator> instance
itatomtype index of the first atom
iaatomic index of the first atom within the atomtype
ilangular momentum index of the first atom
izzeta function index of the first atom
mimagnetic quantum number of the first atom
jtatomtype index of the second atom
jaatomic index of the second atom within the atomtype
jlangular momentum index of the second atom
jzzeta function index of the second atom
mjmagnetic quantum number of the second atom
vRthe vector from the first atom to the second atom
Returns
std::complex<double>
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_LzijR()

std::complex< double > ModuleIO::cal_LzijR ( const std::unique_ptr< TwoCenterIntegrator > &  calculator,
const int  it,
const int  ia,
const int  il,
const int  iz,
const int  mi,
const int  jt,
const int  ja,
const int  jl,
const int  jz,
const int  mj,
const ModuleBase::Vector3< double > &  vR 
)

calculate the <phi_i|Lz|phi_j> matrix elements, in which the Lz are the angular momentum operators, |phi_i> and |phi_j> are the numerical atomic orbitals (NAOs).

Parameters
calculatorthe std::unique_ptr<TwoCenterIntegrator> instance
itatomtype index of the first atom
iaatomic index of the first atom within the atomtype
ilangular momentum index of the first atom
izzeta function index of the first atom
mimagnetic quantum number of the first atom
jtatomtype index of the second atom
jaatomic index of the second atom within the atomtype
jlangular momentum index of the second atom
jzzeta function index of the second atom
mjmagnetic quantum number of the second atom
vRthe vector from the first atom to the second atom
Returns
std::complex<double>
Here is the caller graph for this function:

◆ cal_mag()

template<typename TK >
void ModuleIO::cal_mag ( Parallel_Orbitals pv,
hamilt::Hamilt< TK > *  p_ham,
K_Vectors kv,
elecstate::ElecState pelec,
const TwoCenterBundle two_center_bundle,
const LCAO_Orbitals orb,
UnitCell ucell,
const Grid_Driver gd,
const int  istep,
const bool  print 
)

used in updating mag info in STRU file

write the Orbital file

write mulliken.txt

write atomic mag info in running log file

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_pdos() [1/2]

void ModuleIO::cal_pdos ( const psi::Psi< double > *  psi,
hamilt::Hamilt< double > *  p_ham,
const Parallel_Orbitals pv,
const UnitCell ucell,
const K_Vectors kv,
const int  nspin0,
const int  nbands,
const ModuleBase::matrix ekb,
const double &  emax,
const double &  emin,
const double &  dos_edelta_ev,
const double &  bcoeff 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_pdos() [2/2]

void ModuleIO::cal_pdos ( const psi::Psi< std::complex< double > > *  psi,
hamilt::Hamilt< std::complex< double > > *  p_ham,
const Parallel_Orbitals pv,
const UnitCell ucell,
const K_Vectors kv,
const int  nspin0,
const int  nbands,
const ModuleBase::matrix ekb,
const double &  emax,
const double &  emin,
const double &  dos_edelta_ev,
const double &  bcoeff 
)
Here is the call graph for this function:

◆ calculate_RI_Tensor_sparse() [1/2]

template<typename Tdata >
std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, Tdata > > > ModuleIO::calculate_RI_Tensor_sparse ( const double &  sparse_threshold,
const std::map< int, std::map< TAC, RI::Tensor< Tdata > > > &  Hexxs,
const UnitCell ucell 
)
Here is the call graph for this function:

◆ calculate_RI_Tensor_sparse() [2/2]

template<typename Tdata >
std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, Tdata > > > ModuleIO::calculate_RI_Tensor_sparse ( const double &  sparse_threshold,
const std::vector< std::map< int, std::map< TAC, RI::Tensor< Tdata > > > > &  Hexxs,
const UnitCell ucell 
)

calculate CSR sparse matrix from the global matrix stored with RI::Tensor the return type is same as SR_sparse, HR_sparse, etc.

Here is the caller graph for this function:

◆ ctrl_output_fp()

template<typename TK , typename TR >
void ModuleIO::ctrl_output_fp ( UnitCell ucell,
elecstate::ElecStateLCAO< TK > *  pelec,
const int  istep 
)
Here is the call graph for this function:

◆ ctrl_output_lcao()

template<typename TK , typename TR >
void ModuleIO::ctrl_output_lcao ( UnitCell ucell,
K_Vectors kv,
elecstate::ElecStateLCAO< TK > *  pelec,
Parallel_Orbitals pv,
Grid_Driver gd,
psi::Psi< TK > *  psi,
hamilt::HamiltLCAO< TK, TR > *  p_hamilt,
TwoCenterBundle two_center_bundle,
Gint_k gk,
LCAO_Orbitals orb,
const ModulePW::PW_Basis_K pw_wfc,
const ModulePW::PW_Basis pw_rho,
Grid_Technique gt,
const ModulePW::PW_Basis_Big pw_big,
const Structure_Factor sf,
rdmft::RDMFT< TK, TR > &  rdmft_solver,
LCAO_Deepks< TK > &  ld,
const int  istep 
)

1) Output density matrix DM(R)

2) Output density matrix DM(k)

5) Output DeePKS information

6) Output <phi_i|O|phi_j> matrices, where O can be chosen as H, S, dH, dS, T, r. The format is CSR format.

7) Output kinetic matrix

8) Output expectation of angular momentum operator

9) Output Mulliken charge

10) Output atomic magnetization by using 'spin_constraint'

11) Output Berry phase

12) Wannier90 interface in LCAO basis

18) Perform RDMFT calculations, added by jghan, 2024-10-17

initialize the gradients of Etotal with respect to occupation numbers and wfc, and set all elements to 0. dedocc = d E/d Occ_Num

dedwfc = d E/d wfc

Output quasi orbitals

Here is the call graph for this function:

◆ cVc() [1/2]

template<typename T >
std::vector< T > ModuleIO::cVc ( T *const  V,
T *const  c,
int  nbasis,
int  nbands 
)
Here is the call graph for this function:

◆ cVc() [2/2]

template<typename T >
std::vector< T > ModuleIO::cVc ( T V,
T c,
const int  nbasis,
const int  nbands,
const Parallel_Orbitals pv,
const Parallel_2D p2d 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dmk_gen_fname()

std::string ModuleIO::dmk_gen_fname ( const bool  gamma_only,
const int  ispin,
const int  ik 
)

Generates the filename for the DMK file based on the given parameters.

Parameters
gamma_onlyWhether the calculation is gamma_only.
ispinThe index of the spin component.
ikThe index of the k-point.
Returns
The generated filename.
Here is the caller graph for this function:

◆ dmk_read_ucell()

void ModuleIO::dmk_read_ucell ( std::ifstream &  ifs)

Reads the unit cell information lines in a DMK file.

Parameters
ifsThe input file stream.
Here is the caller graph for this function:

◆ dmk_readData() [1/2]

void ModuleIO::dmk_readData ( std::ifstream &  ifs,
double &  data 
)

Read one double from a file.

Here is the caller graph for this function:

◆ dmk_readData() [2/2]

void ModuleIO::dmk_readData ( std::ifstream &  ifs,
std::complex< double > &  data 
)

Read one complex double from a file.

Here is the call graph for this function:

◆ dmk_write_ucell()

void ModuleIO::dmk_write_ucell ( std::ofstream &  ofs,
const UnitCell ucell 
)

Writes the unit cell information to a DMK file.

Parameters
ofsThe output file stream.
ucellA pointer to the UnitCell object.
Here is the caller graph for this function:

◆ dmr_gen_fname()

std::string ModuleIO::dmr_gen_fname ( const int  out_type,
const int  ispin,
const bool  append = true,
const int  istep = -1 
)

Generates a filename for the DMR output based on the given parameters.

Parameters
out_typeThe output type. 1: csr, 2: npz.
ispinThe spin value, starting from 0.
appendA boolean indicating whether append the data to one file or create a new file.
istepThe ION step (default: -1), starting from 0.
Returns
The generated filename as a string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filename_output()

std::string ModuleIO::filename_output ( const std::string &  directory,
const std::string &  property,
const std::string &  basis,
const int  ik_local,
const std::vector< int > &  ik2iktot,
const int  nspin,
const int  nkstot,
const int  out_type,
const bool  out_app_flag,
const bool  gamma_only,
const int  istep = -1 
)

Generates the filename for the output files

Parameters
directorydirectory of the file
propertywave function (wf), charge density (chg) or matrix (mat)
basisnao or pw
ik_localindex of the k-points within each pool, and starting from 0.
ik2iktotmap from ik to iktot
nspinnumber of spin channels, 1,2 or 4
nkstotnumber of total k-points
out_typetwo types of output file format, 1 for .txt and 2 for .dat (binary)
out_app_flagwhether to append to existing file.
gamma_onlygamma_only algorithm or not.
istepindex of the ion step starting from 0. If < 0, the step number is not included in the file name.
Returns
The generated filename.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_grid_points()

void ModuleIO::get_grid_points ( const std::vector< double > &  start,
const std::vector< double > &  end,
const int &  npoints,
const int &  nx,
const int &  ny,
const int &  nz,
std::vector< std::vector< int > > &  points,
std::vector< std::vector< double > > &  shifts 
)
Here is the caller graph for this function:

◆ get_pchg_pw()

template<typename Device >
void ModuleIO::get_pchg_pw ( const std::vector< int > &  out_pchg,
const int  nbands,
const int  nspin,
const int  nxyz,
const int  chr_ngmc,
UnitCell ucell,
const psi::Psi< std::complex< double >, Device > *  kspw_psi,
const ModulePW::PW_Basis pw_rhod,
const ModulePW::PW_Basis_K pw_wfc,
const Device *  ctx,
const Parallel_Grid pgrid,
const std::string &  global_out_dir,
const bool  if_separate_k,
const K_Vectors kv,
const int  kpar,
const int  my_pool,
const Charge chr 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_R_range()

template<typename TR >
std::set< Abfs::Vector3_Order< int > > ModuleIO::get_R_range ( const hamilt::HContainer< TR > &  hR)

◆ get_real() [1/4]

double ModuleIO::get_real ( const double &  d)
inline

◆ get_real() [2/4]

template<typename FPTYPE >
FPTYPE ModuleIO::get_real ( const FPTYPE &  d)
inline

◆ get_real() [3/4]

double ModuleIO::get_real ( const std::complex< double > &  c)
inline
Here is the caller graph for this function:

◆ get_real() [4/4]

template<typename FPTYPE >
FPTYPE ModuleIO::get_real ( const std::complex< FPTYPE > &  c)
inline

◆ get_wf_pw()

template<typename Device >
void ModuleIO::get_wf_pw ( const std::vector< int > &  out_wfc_norm,
const std::vector< int > &  out_wfc_re_im,
const int  nbands,
const int  nspin,
const int  nxyz,
UnitCell ucell,
const psi::Psi< std::complex< double >, Device > *  kspw_psi,
const ModulePW::PW_Basis_K pw_wfc,
const Device *  ctx,
const Parallel_Grid pgrid,
const std::string &  global_out_dir,
const K_Vectors kv,
const int  kpar,
const int  my_pool 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ldos_mode_pw()

void ModuleIO::ldos_mode_pw ( const elecstate::ElecStatePW< std::complex< double > > *  pelec,
const psi::Psi< std::complex< double > > &  psi,
const Parallel_Grid pgrid,
const UnitCell ucell 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ longstring()

std::string ModuleIO::longstring ( const std::vector< std::string > &  words)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nofound_str()

std::string ModuleIO::nofound_str ( std::vector< std::string >  init_chgs,
const std::string &  str 
)
Here is the caller graph for this function:

◆ nscf_band()

void ModuleIO::nscf_band ( const int &  is,
const std::string &  eig_file,
const int &  nband,
const double &  fermie,
const int &  precision,
const ModuleBase::matrix ekb,
const K_Vectors kv 
)

calculate the band structure

Parameters
isspin index is = 0 or 1
out_band_dirdirectory to save the band structure
nbandnumber of bands
fermiefermi energy
precisionprecision of the output
ekbeigenvalues of k points and bands
kvklist

first find if present kpoint in present pool

then get the local kpoint index, which starts definitly from 0

if present kpoint corresponds the spin of the present one

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nscf_fermi_surface()

void ModuleIO::nscf_fermi_surface ( const std::string &  out_band_dir,
const int &  nband,
const double &  ef,
const K_Vectors kv,
const UnitCell ucell,
const ModuleBase::matrix ekb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ orbital_energy() [1/2]

template<typename FPTYPE >
std::vector< FPTYPE > ModuleIO::orbital_energy ( const int  ik,
const int  nbands,
const std::vector< std::complex< FPTYPE > > &  mat_mo 
)
Here is the call graph for this function:

◆ orbital_energy() [2/2]

template<typename T >
std::vector< double > ModuleIO::orbital_energy ( const int  ik,
const int  nbands,
const std::vector< T > &  mat_mo,
const Parallel_2D p2d 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_after_relax()

void ModuleIO::output_after_relax ( bool  conv_ion,
bool  conv_esolver,
std::ofstream &  ofs_running = GlobalV::ofs_running 
)

output after relaxation

Parameters
conv_ionif is convergence for ions
conv_esolverif is convergence for electrons
ofs_runningthe output stream
Here is the caller graph for this function:

◆ output_convergence_after_scf()

void ModuleIO::output_convergence_after_scf ( const bool &  convergence,
double &  energy,
std::ofstream &  ofs_running = GlobalV::ofs_running 
)

output if is convergence and energy after scf

Parameters
convergenceif is convergence
energythe total energy in Ry
ofs_runningthe output stream
Here is the caller graph for this function:

◆ output_dHR()

void ModuleIO::output_dHR ( const int &  istep,
const ModuleBase::matrix v_eff,
Gint_k gint_k,
const UnitCell ucell,
const Parallel_Orbitals pv,
LCAO_HS_Arrays HS_Arrays,
const Grid_Driver grid,
const TwoCenterBundle two_center_bundle,
const LCAO_Orbitals orb,
const K_Vectors kv,
const bool &  binary = false,
const double &  sparse_threshold = 1e-10 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_dSR()

void ModuleIO::output_dSR ( const int &  istep,
const UnitCell ucell,
const Parallel_Orbitals pv,
LCAO_HS_Arrays HS_Arrays,
const Grid_Driver grid,
const TwoCenterBundle two_center_bundle,
const LCAO_Orbitals orb,
const K_Vectors kv,
const bool &  binary = false,
const double &  sparse_thr = 1e-10 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_efermi()

void ModuleIO::output_efermi ( const bool &  convergence,
double &  efermi,
std::ofstream &  ofs_running = GlobalV::ofs_running 
)

output the fermi energy

Parameters
convergenceif is convergence
efermi
ofs_runningthe output stream
Here is the caller graph for this function:

◆ output_HSR()

void ModuleIO::output_HSR ( const UnitCell ucell,
const int &  istep,
const ModuleBase::matrix v_eff,
const Parallel_Orbitals pv,
LCAO_HS_Arrays HS_Arrays,
const Grid_Driver grid,
const K_Vectors kv,
hamilt::Hamilt< std::complex< double > > *  p_ham,
const std::string &  SR_filename = "srs1_nao.csr",
const std::string &  HR_filename_up = "hrs1_nao.csr",
const std::string  HR_filename_down = "hrs2_nao.csr",
const bool &  binary = false,
const double &  sparse_threshold = 1e-10 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_mat_npz()

void ModuleIO::output_mat_npz ( const UnitCell ucell,
std::string &  zipname,
const hamilt::HContainer< double > &  hR 
)
Here is the call graph for this function:

◆ output_mat_sparse() [1/3]

template<>
void ModuleIO::output_mat_sparse ( const bool &  out_mat_hsR,
const bool &  out_mat_dh,
const bool &  out_mat_ds,
const bool &  out_mat_t,
const bool &  out_mat_r,
const int &  istep,
const ModuleBase::matrix v_eff,
const Parallel_Orbitals pv,
Gint_k gint_k,
const TwoCenterBundle two_center_bundle,
const LCAO_Orbitals orb,
UnitCell ucell,
const Grid_Driver grid,
const K_Vectors kv,
hamilt::Hamilt< double > *  p_ham 
)
Here is the caller graph for this function:

◆ output_mat_sparse() [2/3]

template<>
void ModuleIO::output_mat_sparse ( const bool &  out_mat_hsR,
const bool &  out_mat_dh,
const bool &  out_mat_ds,
const bool &  out_mat_t,
const bool &  out_mat_r,
const int &  istep,
const ModuleBase::matrix v_eff,
const Parallel_Orbitals pv,
Gint_k gint_k,
const TwoCenterBundle two_center_bundle,
const LCAO_Orbitals orb,
UnitCell ucell,
const Grid_Driver grid,
const K_Vectors kv,
hamilt::Hamilt< std::complex< double > > *  p_ham 
)

generate a file containing the Hamiltonian and S(overlap) matrices

generate a file containing the kinetic energy matrix

generate a file containing the derivatives of the Hamiltonian matrix (in Ry/Bohr)

generate a file containing the derivatives of the overlap matrix (in Ry/Bohr)

Here is the call graph for this function:

◆ output_mat_sparse() [3/3]

template<typename T >
void ModuleIO::output_mat_sparse ( const bool &  out_mat_hsR,
const bool &  out_mat_dh,
const bool &  out_mat_ds,
const bool &  out_mat_t,
const bool &  out_mat_r,
const int &  istep,
const ModuleBase::matrix v_eff,
const Parallel_Orbitals pv,
Gint_k gint_k,
const TwoCenterBundle two_center_bundle,
const LCAO_Orbitals orb,
UnitCell ucell,
const Grid_Driver grid,
const K_Vectors kv,
hamilt::Hamilt< T > *  p_ham 
)

the output interface to write the sparse matrix of H, S, T, and r

◆ output_single_R()

template<typename T >
void ModuleIO::output_single_R ( std::ofstream &  ofs,
const std::map< size_t, std::map< size_t, T > > &  XR,
const double &  sparse_threshold,
const bool &  binary,
const Parallel_Orbitals pv,
const bool &  reduce = true 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_SR()

void ModuleIO::output_SR ( Parallel_Orbitals pv,
const Grid_Driver grid,
hamilt::Hamilt< std::complex< double > > *  p_ham,
const std::string &  SR_filename = "srs1_nao.csr",
const bool &  binary = false,
const double &  sparse_threshold = 1e-10 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_TR()

void ModuleIO::output_TR ( const int  istep,
const UnitCell ucell,
const Parallel_Orbitals pv,
LCAO_HS_Arrays HS_Arrays,
const Grid_Driver grid,
const TwoCenterBundle two_center_bundle,
const LCAO_Orbitals orb,
const std::string &  TR_filename = "trs1_nao.csr",
const bool &  binary = false,
const double &  sparse_threshold = 1e-10 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_vacuum_level()

void ModuleIO::output_vacuum_level ( const UnitCell ucell,
const double *const *  rho,
const double *  v_elecstat,
const int &  nx,
const int &  ny,
const int &  nz,
const int &  nxyz,
const int &  nrxx,
const int &  nplane,
const int &  startz_current,
std::ofstream &  ofs_running = GlobalV::ofs_running 
)

calculate and output the vacuum level We first determine the vacuum direction, then get the vacuum position based on the minimum of charge density, finally output the vacuum level, i.e., the electrostatic potential at the vacuum position.

Parameters
ucellthe unitcell
rhocharge density
v_elecstatelectrostatic potential
ofs_runningthe output stream
Here is the caller graph for this function:

◆ parse_args()

void ModuleIO::parse_args ( int  argc,
char **  argv 
)

This function reture the version information when using command "abacus --version", "abacus -v" or "abacus -V". Otherwise, it does nothing.

Parameters
[in]argc(ARGument Count) is an integer variable that stores the number of command-line arguments passed by the user including the name of the program. So if we pass a value to a program, the value of argc would be 2 (one for argument and one for program name)
[in]argv(ARGument Vector) is an array of character pointers listing all the arguments. If argc is greater than zero, the array elements from argv[0] to argv[argc-1] will contain pointers to strings. argv[0] is the name of the program , After that till argv[argc-1] every element is command -line arguments.
Here is the caller graph for this function:

◆ prepare()

double ModuleIO::prepare ( const UnitCell cell,
int &  dir 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepare_dos()

void ModuleIO::prepare_dos ( std::ofstream &  ofs_running,
const elecstate::efermi energy_fermi,
const ModuleBase::matrix ekb,
const int  nks,
const int  nbands,
const double &  dos_edelta_ev,
const double &  dos_scale,
double &  emax,
double &  emin 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_force()

void ModuleIO::print_force ( std::ofstream &  ofs,
const UnitCell cell,
const std::string &  name,
const ModuleBase::matrix force,
bool  ry = true 
)

output atomic forces

Parameters
ofsthe output stream
cellthe unitcell
nameforce term name
forceatomic forces
rytrue if the unit of force is a.u.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_PAOs()

void ModuleIO::print_PAOs ( const UnitCell ucell)

print chi (PAO) in pseudopotential file

Parameters
ucell
Here is the caller graph for this function:

◆ print_pdos_gamma()

void ModuleIO::print_pdos_gamma ( const UnitCell ucell,
const ModuleBase::matrix pdos,
const int  nlocal,
const int  npoints,
const double &  emin,
const double &  dos_edelta_ev 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_pdos_multik()

void ModuleIO::print_pdos_multik ( const UnitCell ucell,
const ModuleBase::matrix pdos,
const int  nlocal,
const int  npoints,
const double &  emin,
const double &  dos_edelta_ev 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_rhofft()

void ModuleIO::print_rhofft ( ModulePW::PW_Basis pw_rhod,
ModulePW::PW_Basis pw_rho,
ModulePW::PW_Basis_Big pw_big,
std::ofstream &  ofs 
)

Print charge density using FFT.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_screen()

void ModuleIO::print_screen ( const int &  stress_step,
const int &  force_step,
const int &  istep 
)
Here is the caller graph for this function:

◆ print_stress()

void ModuleIO::print_stress ( const std::string &  name,
const ModuleBase::matrix scs,
const bool  screen,
const bool  ry,
std::ofstream &  ofs 
)

output stress components

Parameters
namestress term name
fstress components
rytrue if the unit of force is a.u.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_tdos_gamma()

void ModuleIO::print_tdos_gamma ( const ModuleBase::matrix pdos,
const int  nlocal,
const int  npoints,
const double &  emin,
const double &  dos_edelta_ev 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_tdos_multik()

void ModuleIO::print_tdos_multik ( const ModuleBase::matrix pdos,
const int  nlocal,
const int  npoints,
const double &  emin,
const double &  dos_edelta_ev 
)
Here is the caller graph for this function:

◆ print_time()

void ModuleIO::print_time ( time_t &  time_start,
time_t &  time_finish 
)
Here is the caller graph for this function:

◆ print_wfcfft()

void ModuleIO::print_wfcfft ( const Input_para inp,
ModulePW::PW_Basis_K pw_wfc,
std::ofstream &  ofs 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ psi_Hpsi()

template<typename FPTYPE >
std::vector< std::complex< FPTYPE > > ModuleIO::psi_Hpsi ( std::complex< FPTYPE > *const  psi,
std::complex< FPTYPE > *const  hpsi,
const int  nbasis,
const int  nbands 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_abacus_orb()

void ModuleIO::read_abacus_orb ( std::ifstream &  ifs,
std::string &  elem,
double &  ecut,
int &  nr,
double &  dr,
std::vector< int > &  nzeta,
std::vector< std::vector< double > > &  radials,
const int  rank = 0 
)

static version of read_abacus_orb. A delete-new operation may cause the memory leak, it is better to use std::vector to replace the raw pointer.

Parameters
ifs[in] ifstream from the orbital file, via std::ifstream ifs(forb);
elem[out] element symbol
ecut[out] planewave energy cutoff
nr[out] number of radial grid points
dr[out] radial grid spacing
nzeta[out] number of zeta functions for each angular momentum
radials[out] radial orbitals
rank[in] MPI rank
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_cube()

bool ModuleIO::read_cube ( const std::string &  file,
std::vector< std::string > &  comment,
int &  natom,
std::vector< double > &  origin,
int &  nx,
int &  ny,
int &  nz,
std::vector< double > &  dx,
std::vector< double > &  dy,
std::vector< double > &  dz,
std::vector< int > &  atom_type,
std::vector< double > &  atom_charge,
std::vector< std::vector< double > > &  atom_pos,
std::vector< double > &  data 
)

read the full data from a cube file

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_dmk()

template<typename T >
bool ModuleIO::read_dmk ( const int  nspin,
const int  nk,
const Parallel_2D pv,
const std::string &  dmk_dir,
std::vector< std::vector< T > > &  dmk,
std::ofstream &  ofs_running 
)

Reads the DMK data from a file.

Template Parameters
TThe type of the DMK data.
Parameters
nspinThe number of spin components.
nkThe number of k-points.
pvThe Parallel_2D object. Will get the global size and local size from it, and seperate the data into different processors accordingly.
dmk_dirThe directory path of the DMK file.
dmkA vector to store the DMK data. If use MPI parallel, the data will be seperated into different processors based on the Parallel_2D object.
Returns
True if the DMK data is successfully read, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_exit_file()

int ModuleIO::read_exit_file ( const int &  my_rank,
const std::string &  filename,
std::ofstream &  ofs_running 
)

read file to determine whether to stop the current execution

Parameters
my_rankthe rank of the current process
filenamethe name of the file to read
ofs_runningthe output stream
Returns
0 if the file is not found or does not contain correct keywords, do not stop the current execution
1 if the file is found and contains "stop_ion", the current execution stops at the next ionic step
2 if the file is found and contains "stop_elec", the current execution stops at the next electronic step
Here is the caller graph for this function:

◆ read_Hexxs_cereal()

template<typename Tdata >
void ModuleIO::read_Hexxs_cereal ( const std::string &  file_name,
std::vector< std::map< int, std::map< TAC, RI::Tensor< Tdata > > > > &  Hexxs 
)

read Hexxs in cereal format

Here is the call graph for this function:

◆ read_Hexxs_csr()

template<typename Tdata >
void ModuleIO::read_Hexxs_csr ( const std::string &  file_name,
const UnitCell ucell,
const int  nspin,
const int  nbasis,
std::vector< std::map< int, std::map< TAC, RI::Tensor< Tdata > > > > &  Hexxs 
)

read Hexxs in CSR format

Here is the call graph for this function:

◆ read_information()

void ModuleIO::read_information ( std::ifstream &  ifs,
std::vector< std::string > &  output,
const std::string &  delimiters 
)
Here is the caller graph for this function:

◆ read_k()

std::vector< double > ModuleIO::read_k ( std::string  filename,
int  ik 
)
Here is the caller graph for this function:

◆ read_mat_npz()

void ModuleIO::read_mat_npz ( const Parallel_Orbitals paraV,
const UnitCell ucell,
std::string &  zipname,
hamilt::HContainer< double > &  hR 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_rhog()

bool ModuleIO::read_rhog ( const std::string &  filename,
const ModulePW::PW_Basis pw_rhod,
std::complex< double > **  rhog 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_vdata_palgrid()

bool ModuleIO::read_vdata_palgrid ( const Parallel_Grid pgrid,
const int  my_rank,
std::ofstream &  ofs_running,
const std::string &  fn,
double *const  data,
const int  nat 
)

read volumetric data from .cube file into the parallel distributed grid.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_wf2rho_pw()

void ModuleIO::read_wf2rho_pw ( const ModulePW::PW_Basis_K pw_wfc,
ModuleSymmetry::Symmetry symm,
Charge chg,
const std::string &  readin_dir,
const int  kpar,
const int  my_pool,
const int  my_rank,
const int  nproc_in_pool,
const int  rank_in_pool,
const int  nbands,
const int  nspin,
const int  npol,
const int  nkstot,
const std::vector< int > &  ik2iktot,
const std::vector< int > &  isk,
std::ofstream &  ofs_running 
)

read wave functions and occupation numbers to charge density

Parameters
pw_wfcpw basis for wave functions
symmsymmetry
nkstottotal number of k points
iskk index to spin index
chgcharge density
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_wfc_nao()

template<typename T >
bool ModuleIO::read_wfc_nao ( const std::string &  global_readin_dir,
const Parallel_Orbitals ParaV,
psi::Psi< T > &  psid,
elecstate::ElecState *const  pelec,
const std::vector< int > &  ik2iktot,
const int  nkstot,
const int  nspin,
const int  skip_band = 0,
const int  nstep = -1 
)

Reads the wavefunction coefficients from an input file.

Template Parameters
TThe type of the wavefunction coefficients.
Parameters
global_readin_dirThe global directory for reading input files.
ParaVThe parallel orbitals object.
psidThe Psi object to store the wavefunction coefficients.
pelecPointer to the ElecState object.
skip_bandFrom which band to start reading.
Returns
True if the wavefunction coefficients are successfully read, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_wfc_nao_one_data() [1/2]

void ModuleIO::read_wfc_nao_one_data ( std::ifstream &  ifs,
double &  data 
)

Reads a single data value from an input file stream.

Parameters
ifsThe input file stream to read from.
dataThe variable to store the read data value.
Here is the caller graph for this function:

◆ read_wfc_nao_one_data() [2/2]

void ModuleIO::read_wfc_nao_one_data ( std::ifstream &  ifs,
std::complex< double > &  data 
)

Reads a single complex data value from an input file stream.

Parameters
ifsThe input file stream to read from.
dataThe variable to store the read complex data value.

◆ read_wfc_pw()

void ModuleIO::read_wfc_pw ( const std::string &  filedir,
const ModulePW::PW_Basis_K pw_wfc,
const int  rank_in_pool,
const int  nproc_in_pool,
const int  nbands,
const int  npol,
const int &  ik,
const int &  ikstot,
const int &  nkstot,
ModuleBase::ComplexMatrix wfc 
)

read wave functions from binary file

Parameters
filenamefilename containing wave functions
pw_wfcwave function FFT grids
ikk index
ikstottotal index of k points
nkstottotal number of k points
wfcwave functions
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_dH_sparse()

void ModuleIO::save_dH_sparse ( const int &  istep,
const Parallel_Orbitals pv,
LCAO_HS_Arrays HS_Arrays,
const double &  sparse_thr,
const bool &  binary,
const std::string &  fileflag = "h" 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_HSR_sparse()

void ModuleIO::save_HSR_sparse ( const int &  istep,
const Parallel_Orbitals pv,
LCAO_HS_Arrays HS_Arrays,
const double &  sparse_thr,
const bool &  binary,
const std::string &  SR_filename,
const std::string &  HR_filename_up,
const std::string &  HR_filename_down = "" 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_mat()

template<typename T >
void ModuleIO::save_mat ( const int  istep,
const T mat,
const int  dim,
const bool  bit,
const int  precision,
const bool  tri,
const bool  app,
const std::string &  file_name,
const Parallel_2D pv,
const int  drank,
const bool  reduce = true 
)

save a square matrix, such as H(k) and S(k)

Parameters
[in]istep: the step of the calculation
[in]mat: the local matrix
[in]bit: true for binary, false for decimal
[in]tri: true for upper triangle, false for full matrix
[in]app: true for append, false for overwrite
[in]file_name: the name of the output file
[in]pv: the 2d-block parallelization information
[in]drank: the rank of the current process
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_sparse()

template<typename Tdata >
void ModuleIO::save_sparse ( const std::map< Abfs::Vector3_Order< int >, std::map< size_t, std::map< size_t, Tdata > > > &  smat,
const std::set< Abfs::Vector3_Order< int > > &  all_R_coor,
const double &  sparse_thr,
const bool &  binary,
const std::string &  filename,
const Parallel_Orbitals pv,
const std::string &  label,
const int &  istep = -1,
const bool &  reduce = true 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_gint_pointer()

template<typename T >
void ModuleIO::set_gint_pointer ( Gint_Gamma gint_gamma,
Gint_k gint_k,
typename TGint< T >::type *&  gint 
)

◆ set_gint_pointer< double >() [1/2]

template<>
void ModuleIO::set_gint_pointer< double > ( Gint_Gamma gint_gamma,
Gint_k gint_k,
typename TGint< double >::type *&  gint 
)

◆ set_gint_pointer< double >() [2/2]

template<>
void ModuleIO::set_gint_pointer< double > ( Gint_Gamma gint_gamma,
Gint_k gint_k,
typename TGint< double >::type *&  gint 
)

◆ set_gint_pointer< std::complex< double > >() [1/2]

template<>
void ModuleIO::set_gint_pointer< std::complex< double > > ( Gint_Gamma gint_gamma,
Gint_k gint_k,
typename TGint< std::complex< double > >::type *&  gint 
)

◆ set_gint_pointer< std::complex< double > >() [2/2]

template<>
void ModuleIO::set_gint_pointer< std::complex< double > > ( Gint_Gamma gint_gamma,
Gint_k gint_k,
typename TGint< std::complex< double > >::type *&  gint 
)

◆ set_para2d_MO()

void ModuleIO::set_para2d_MO ( const Parallel_Orbitals pv,
const int  nbands,
Parallel_2D p2d 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_parameters()

void ModuleIO::setup_parameters ( UnitCell ucell,
K_Vectors kv 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stm_mode_pw()

void ModuleIO::stm_mode_pw ( const elecstate::ElecStatePW< std::complex< double > > *  pelec,
const psi::Psi< std::complex< double > > &  psi,
const Parallel_Grid pgrid,
const UnitCell ucell 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_dir()

std::string ModuleIO::to_dir ( const std::string &  str)
Here is the caller graph for this function:

◆ trilinear_interpolate() [1/2]

void ModuleIO::trilinear_interpolate ( const double *const  data_in,
const int &  nx_read,
const int &  ny_read,
const int &  nz_read,
const int &  nx,
const int &  ny,
const int &  nz,
double *  data_out 
)

The trilinear interpolation method.

Trilinear interpolation is a method for interpolating grid data in 3D space. It estimates the value at a given position by interpolating the data along the three adjacent points.

Specifically, for 3D grid data, trilinear interpolation requires determining the eight data points that are closest to the point where the estimation is required. These data points form a cube, with vertices at (x0,y0,z0), (x0+1,y0,z0), (x0,y0+1,z0), (x0+1,y0+1,z0), (x0,y0,z0+1), (x0+1,y0,z0+1), (x0,y0+1,z0+1) and (x0+1,y0+1,z0+1). Here, (x0,y0,z0) is the data point closest to the estimation point and has coordinate values less than those of the estimation point.

For the estimation location (x,y,z), its estimated value in the grid can be calculated using the following formula: f(x,y,z) = f000(1-dx)(1-dy)(1-dz) + f100dx(1-dy)(1-dz) + f010(1-dx)dy(1-dz) + f001(1-dx)(1-dy)dz + f101dx(1-dy)dz + f011(1-dx)dydz + f110dxdy(1-dz) + f111dxdydz where fijk represents the data value at vertex i,j,k of the cube, and dx = x - x0, dy = y - y0, dz = z - z0 represent the distance between the estimation point and the closest data point in each of the three directions, divided by the grid spacing. Here, it is assumed that the grid spacing is equal and can be omitted during computation.

Parameters
data_inthe input data of size nxyz_read
nx_readnx read from file
ny_readny read from file
nz_readnz read from file
nxthe dimension of grids along x
nythe dimension of grids along y
nzthe dimension of grids along z
data_outthe interpolated results of size nxyz
Here is the call graph for this function:

◆ trilinear_interpolate() [2/2]

void ModuleIO::trilinear_interpolate ( const std::vector< std::vector< int > > &  points,
const std::vector< std::vector< double > > &  shifts,
const Parallel_Grid pgrid,
const std::vector< double > &  data,
std::vector< double > &  results 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wfc_nao_write2file()

void ModuleIO::wfc_nao_write2file ( const std::string &  name,
const double *  ctot,
const int  nlocal,
const int  ik,
const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const bool &  writeBinary,
const bool &  append_flag 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wfc_nao_write2file_complex()

void ModuleIO::wfc_nao_write2file_complex ( const std::string &  name,
const std::complex< double > *  ctot,
const int  nlocal,
const int &  ik,
const ModuleBase::Vector3< double > &  kvec_c,
const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const bool &  writeBinary,
const bool &  append_flag 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_abacus_orb()

void ModuleIO::write_abacus_orb ( std::ofstream &  ofs,
const std::string &  elem,
const double &  ecut,
const int  nr,
const double  dr,
const std::vector< int > &  nzeta,
const std::vector< std::vector< double > > &  radials,
const int  rank = 0 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_cube()

void ModuleIO::write_cube ( const std::string &  file,
const std::vector< std::string > &  comment,
const int &  natom,
const std::vector< double > &  origin,
const int &  nx,
const int &  ny,
const int &  nz,
const std::vector< double > &  dx,
const std::vector< double > &  dy,
const std::vector< double > &  dz,
const std::vector< int > &  atom_type,
const std::vector< double > &  atom_charge,
const std::vector< std::vector< double > > &  atom_pos,
const std::vector< double > &  data,
const int  precision,
const int  ndata_line = 6 
)

write a cube file

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_dipole()

void ModuleIO::write_dipole ( const UnitCell ucell,
const double *  rho_save,
const ModulePW::PW_Basis rhopw,
const int &  is,
const int &  istep,
const std::string &  fn,
const int &  precision = 11 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_dmk()

template<typename T >
void ModuleIO::write_dmk ( const std::vector< std::vector< T > > &  dmk,
const int  precision,
const std::vector< double > &  efs,
const UnitCell ucell,
const Parallel_2D pv 
)

Writes the DMK data to a file.

Template Parameters
TThe type of the DMK data.
Parameters
dmkA vector containing the DMK data. The first dimension is nspin*nk, and the second dimension is nlocal*nlocal. DMK is parallel in 2d-block type if using MPI.
precisionThe precision of the output of DMK.
efsA vector containing the Fermi energies, and should have the same size as the number of SPIN.
ucellA pointer to the UnitCell object.
pvThe Parallel_2D object. The 2d-block parallel information of DMK.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_dmr()

void ModuleIO::write_dmr ( const std::vector< hamilt::HContainer< double > * >  dmr,
const Parallel_2D paraV,
const bool  append,
const int *  iat2iwt,
const int  nat,
const int  istep 
)

Writes DMR to a file.

Parameters
dmrThe 2D block parallel matrix representing the density matrix. The first dimension is the spin index.
paraVThe parallel 2D object.
out_typeThe output file type. 1: csr, 2: npz.
sparseWhether output the sparse DM.
ispinThe spin index, starting from 0.
appendWhether to append the data to an existing file or create a new file. The file name is related to this flag.
istepThe ION step, starting from 0.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_dmr_csr()

void ModuleIO::write_dmr_csr ( std::string &  fname,
hamilt::HContainer< double > *  dm_serial,
const int  istep 
)

Writes HContainer to a csr file.

Parameters
fnameThe name of the file to write the CSR representation to.
dm_serialA pointer to the Hamiltonian container.
istepThe current step number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_dos_lcao() [1/3]

template void ModuleIO::write_dos_lcao ( const psi::Psi< double > *  psi,
hamilt::Hamilt< double > *  p_ham,
const Parallel_Orbitals pv,
const UnitCell ucell,
const K_Vectors kv,
const int  nbands,
const elecstate::efermi energy_fermi,
const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const double &  dos_edelta_ev,
const double &  dos_scale,
const double &  bcoeff,
const bool  out_app_flag,
const int  istep,
std::ofstream &  ofs_running 
)

◆ write_dos_lcao() [2/3]

template void ModuleIO::write_dos_lcao ( const psi::Psi< std::complex< double > > *  psi,
hamilt::Hamilt< std::complex< double > > *  p_ham,
const Parallel_Orbitals pv,
const UnitCell ucell,
const K_Vectors kv,
const int  nbands,
const elecstate::efermi energy_fermi,
const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const double &  dos_edelta_ev,
const double &  dos_scale,
const double &  bcoeff,
const bool  out_app_flag,
const int  istep,
std::ofstream &  ofs_running 
)

◆ write_dos_lcao() [3/3]

template<typename T >
void ModuleIO::write_dos_lcao ( const psi::Psi< T > *  psi,
hamilt::Hamilt< T > *  p_ham,
const Parallel_Orbitals pv,
const UnitCell ucell,
const K_Vectors kv,
const int  nbands,
const elecstate::efermi energy_fermi,
const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const double &  dos_edelta_ev,
const double &  dos_scale,
const double &  bcoeff,
const bool  out_app_flag,
const int  istep,
std::ofstream &  ofs_running 
)

calculate density of states(DOS), partial density of states(PDOS), and mulliken charge for LCAO base

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_dos_pw()

void ModuleIO::write_dos_pw ( const UnitCell ucell,
const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const K_Vectors kv,
const int  nbands,
const elecstate::efermi energy_fermi,
const double &  dos_edelta_ev,
const double &  dos_scale,
const double &  bcoeff,
std::ofstream &  ofs_running 
)

calculate density of states(DOS) for PW base

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_eband_terms()

template<typename TK , typename TR >
void ModuleIO::write_eband_terms ( const int  nspin,
const int  nbasis,
const int  drank,
const Parallel_Orbitals pv,
const psi::Psi< TK > &  psi,
const UnitCell ucell,
Structure_Factor sf,
surchem solvent,
const ModulePW::PW_Basis rho_basis,
const ModulePW::PW_Basis rhod_basis,
const ModuleBase::matrix vloc,
const Charge chg,
Gint_Gamma gint_gamma,
Gint_k gint_k,
const K_Vectors kv,
const ModuleBase::matrix wg,
Grid_Driver gd,
const std::vector< double > &  orb_cutoff,
const TwoCenterBundle two_center_bundle 
)
Here is the call graph for this function:

◆ write_eig_file()

void ModuleIO::write_eig_file ( const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const K_Vectors kv 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_eig_iter()

void ModuleIO::write_eig_iter ( const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const K_Vectors kv 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_elecstat_pot()

void ModuleIO::write_elecstat_pot ( const int &  bz,
const int &  nbz,
const std::string &  fn,
const int &  istep,
ModulePW::PW_Basis rho_basis,
const Charge *const  chr,
const UnitCell ucell_,
const double *  v_effective_fixed,
const surchem solvent 
)

write electric static potential to file

Parameters
bz
nbz
fn
istep
rho_basis
chr
ucell_
v_effective_fixed

Dipole correction

Add hartree potential and local pseudopot

Get the vacuum level of the system

Write down the electrostatic potential

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_elf()

void ModuleIO::write_elf ( const int &  bz,
const int &  nbz,
const std::string &  out_dir,
const int &  istep,
const int &  nspin,
const double *const *  rho,
const double *const *  tau,
ModulePW::PW_Basis rho_basis,
const Parallel_Grid pgrid,
const UnitCell ucell_,
const int &  precision 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_head()

void ModuleIO::write_head ( std::ofstream &  ofs_running,
const int &  istep,
const int &  iter,
const std::string &  basisname 
)

write head for scf iteration

Parameters
ofs_runningoutput stream
istepthe ion step
iterthe scf iteration step
basisnamebasis set name
Here is the caller graph for this function:

◆ write_head_td()

void ModuleIO::write_head_td ( std::ofstream &  ofs_running,
const int &  istep,
const int &  estep,
const int &  iter,
const std::string &  basisname 
)

write head for scf iteration

Parameters
ofs_runningoutput stream
istepthe ion step
estepthe electron step
iterthe scf iteration step
basisnamebasis set name
Here is the caller graph for this function:

◆ write_Hexxs_csr() [1/2]

template<typename Tdata >
void ModuleIO::write_Hexxs_csr ( const std::string &  file_name,
const UnitCell ucell,
const std::map< int, std::map< TAC, RI::Tensor< Tdata > > > &  Hexxs 
)

write Hexxs in CSR format

Here is the caller graph for this function:

◆ write_Hexxs_csr() [2/2]

template<typename Tdata >
void ModuleIO::write_Hexxs_csr ( const std::string &  file_name,
const UnitCell ucell,
const std::vector< std::map< int, std::map< TAC, RI::Tensor< Tdata > > > > &  Hexxs 
)
Here is the call graph for this function:

◆ write_hsk()

template<typename T >
void ModuleIO::write_hsk ( const std::string &  global_out_dir,
const int  nspin,
const int  nks,
const int  nkstot,
const std::vector< int > &  ik2iktot,
const std::vector< int > &  isk,
hamilt::Hamilt< T > *  p_hamilt,
const Parallel_Orbitals pv,
const bool  gamma_only,
const bool  out_app_flag,
const int  istep,
std::ofstream &  ofs_running 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_orb_energy()

void ModuleIO::write_orb_energy ( const K_Vectors kv,
const int  nspin0,
const int  nbands,
const std::vector< std::vector< double > > &  e_orb,
const std::string &  term,
const std::string &  label,
const bool  app = false 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_orb_info()

void ModuleIO::write_orb_info ( const UnitCell ucell)
Here is the caller graph for this function:

◆ write_proj_band_lcao()

template<typename TK >
void ModuleIO::write_proj_band_lcao ( const psi::Psi< TK > *  psi,
const Parallel_Orbitals pv,
const elecstate::ElecState pelec,
const K_Vectors kv,
const UnitCell ucell,
hamilt::Hamilt< TK > *  p_ham 
)
Here is the caller graph for this function:

◆ write_rhog()

bool ModuleIO::write_rhog ( const std::string &  fchg,
const bool  gamma_only,
const ModulePW::PW_Basis pw_rho,
const int  nspin,
const ModuleBase::Matrix3 GT,
std::complex< double > **  rhog,
const int  ipool,
const int  irank,
const int  nrank 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_vdata_palgrid()

void ModuleIO::write_vdata_palgrid ( const Parallel_Grid pgrid,
const double *const  data,
const int  is,
const int  nspin,
const int  iter,
const std::string &  fn,
const double  ef,
const UnitCell *const  ucell,
const int  precision = 11,
const int  out_fermi = 1,
const bool  reduce_all_pool = false 
)

write volumetric data on the parallized grid into a .cube file

output header for cube file

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_Vxc() [1/2]

template<typename TK , typename TR >
void ModuleIO::write_Vxc ( const int  nspin,
const int  nbasis,
const int  drank,
const Parallel_Orbitals pv,
const psi::Psi< TK > &  psi,
const UnitCell ucell,
Structure_Factor sf,
surchem solvent,
const ModulePW::PW_Basis rho_basis,
const ModulePW::PW_Basis rhod_basis,
const ModuleBase::matrix vloc,
const Charge chg,
Gint_Gamma gint_gamma,
Gint_k gint_k,
const K_Vectors kv,
const std::vector< double > &  orb_cutoff,
const ModuleBase::matrix wg,
Grid_Driver gd 
)

write the Vxc matrix in KS orbital representation, usefull for GW calculation including terms: local/semi-local XC, EXX, DFTU

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_Vxc() [2/2]

template<typename FPTYPE >
void ModuleIO::write_Vxc ( int  nspin,
int  naos,
int  drank,
const psi::Psi< std::complex< FPTYPE > > &  psi_pw,
const UnitCell ucell,
Structure_Factor sf,
surchem solvent,
const ModulePW::PW_Basis_K wfc_basis,
const ModulePW::PW_Basis rho_basis,
const ModulePW::PW_Basis rhod_basis,
const ModuleBase::matrix vloc,
const Charge chg,
const K_Vectors kv,
const ModuleBase::matrix wg 
)

write the Vxc matrix in KS orbital representation, usefull for GW calculation including terms: local/semi-local XC and EXX

wrap psi and act band-by-band (the same result as act all bands at once)

add-up and write

Here is the call graph for this function:

◆ write_Vxc_R()

template<typename TK , typename TR >
void ModuleIO::write_Vxc_R ( const int  nspin,
const Parallel_Orbitals pv,
const UnitCell ucell,
Structure_Factor sf,
surchem solvent,
const ModulePW::PW_Basis rho_basis,
const ModulePW::PW_Basis rhod_basis,
const ModuleBase::matrix vloc,
const Charge chg,
Gint_Gamma gint_gamma,
Gint_k gint_k,
const K_Vectors kv,
const std::vector< double > &  orb_cutoff,
Grid_Driver gd,
const double  sparse_thr = 1e-10 
)

write the Vxc matrix in KS orbital representation, usefull for GW calculation including terms: local/semi-local XC, EXX, DFTU

Here is the call graph for this function:

◆ write_wfc_nao()

template<typename T >
void ModuleIO::write_wfc_nao ( const int  out_type,
const bool  out_app_flag,
const psi::Psi< T > &  psi,
const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const std::vector< ModuleBase::Vector3< double > > &  kvec_c,
const std::vector< int > &  ik2iktot,
const int  nkstot,
const Parallel_Orbitals pv,
const int  nspin,
const int  istep = -1 
)

Writes the wavefunction coefficients for the LCAO method to a file. Will loop all k-points by psi.get_nk(). The nbands are determined by ekb.nc. The nlocal is determined by psi.get_nbasis() if not compiled with MPI, otherwise it is determined by pv->desc[2].

Parameters
out_typeThe output file type. 1 for text, 2 for binary.
psiThe Psi object containing the wavefunction coefficients.
ekbThe matrix of Kohn-Sham eigenvalues.
wgThe matrix of Kohn-Sham eigenvectors.
kvec_cThe vector of k-points in Cartesian coordinates.
pvThe Parallel_Orbitals object containing additional information.
istepThe current step number. if < 0, the step number is not included in the file name.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_wfc_nao< double >()

template void ModuleIO::write_wfc_nao< double > ( const int  out_type,
const bool  out_app_flag,
const psi::Psi< double > &  psi,
const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const std::vector< ModuleBase::Vector3< double > > &  kvec_c,
const std::vector< int > &  ik2iktot,
const int  nkstot,
const Parallel_Orbitals pv,
const int  nspin,
const int  istep 
)

◆ write_wfc_nao< std::complex< double > >()

template void ModuleIO::write_wfc_nao< std::complex< double > > ( const int  out_type,
const bool  out_app_flag,
const psi::Psi< std::complex< double > > &  psi,
const ModuleBase::matrix ekb,
const ModuleBase::matrix wg,
const std::vector< ModuleBase::Vector3< double > > &  kvec_c,
const std::vector< int > &  ik2iktot,
const int  nkstot,
const Parallel_Orbitals pv,
const int  nspin,
const int  istep 
)

◆ write_wfc_pw()

void ModuleIO::write_wfc_pw ( const int  kpar,
const int  my_pool,
const int  my_rank,
const int  nbands,
const int  nspin,
const int  npol,
const int  rank_in_pool,
const int  nproc_in_pool,
const int  out_wfc_pw,
const double &  ecutwfc,
const std::string &  global_out_dir,
const psi::Psi< std::complex< double > > &  psi,
const K_Vectors kv,
const ModulePW::PW_Basis_K wfcpw,
std::ofstream &  ofs_running 
)
Here is the call graph for this function:
Here is the caller graph for this function: