ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ModuleIO::Get_pchg_pw< T, Device > Class Template Reference

Write band-resolved PW partial charges on the dense real-space grid. More...

#include <get_pchg_pw.h>

Collaboration diagram for ModuleIO::Get_pchg_pw< T, Device >:

Classes

class  Workspace

Public Member Functions

 Get_pchg_pw (const psi::Psi< T, Device > &psi, const ModulePW::PW_Basis_K &pw_wfc, const ModulePW::PW_Basis &pw_rho, const ModulePW::PW_Basis &pw_rhod, const pseudopot_cell_vnl &ppcell, const int nspin, const int global_nbands)
 Bind the wavefunction, grids, and global band/spin configuration.
void begin (UnitCell *ucell, const Parallel_Grid &pgrid, const K_Vectors &kv, const std::vector< int > &out_pchg, const std::string &global_out_dir, const bool if_separate_k, const bool noncolin, std::ofstream &ofs_running) const
 Write selected bands, either per k-point or after k summation and symmetry.

Private Member Functions

std::vector< int > select_bands (const std::vector< int > &selection, const std::string &parameter_name) const
void transform_band (const int global_band, const int ik, const Parallel::ParaBandOutput &band_output, Workspace *work) const
const std::complex< double > * transform_wfc (const T *coefficients, const int ik, const int component, Workspace *work) const
void write_separate (const int band, const UnitCell &ucell, const Parallel_Grid &pgrid, const K_Vectors &kv, const std::string &out_dir, const bool noncolin, const Parallel::ParaBandOutput &band_output, std::ofstream &ofs_running, Workspace *work) const
void write_summed (const int band, UnitCell *ucell, const Parallel_Grid &pgrid, const K_Vectors &kv, const std::string &out_dir, const bool noncolin, const Parallel::ParaBandOutput &band_output, std::ofstream &ofs_running, Workspace *work) const
void calc_density (const int spin_index, const double weight, const bool noncolin, const bool accumulate, Workspace *work) const
void accumulate_uspp (const int band, const int ik, const int spin, const double weight, const Parallel::ParaBandOutput &band_output, Workspace *work) const
void add_augmentation (const UnitCell &ucell, Workspace *work) const
void sum_pools (const Parallel_Grid &pgrid, Workspace *work) const
void symmetrize (UnitCell *ucell, Workspace *work) const
void write_cube (const int band, const int component, const int k_number, const UnitCell &ucell, const Parallel_Grid &pgrid, const std::string &out_dir, const bool separate_k, const std::vector< double > &values, std::ofstream &ofs_running) const

Private Attributes

const psi::Psi< T, Device > & psi_
const ModulePW::PW_Basis_K & pw_wfc_
const ModulePW::PW_Basis & pw_rho_
const ModulePW::PW_Basis & pw_rhod_
const pseudopot_cell_vnl & ppcell_
const int nspin_
const int global_nbands_

Detailed Description

template<typename T, typename Device>
class ModuleIO::Get_pchg_pw< T, Device >

Write band-resolved PW partial charges on the dense real-space grid.

The caller owns the wavefunction and bases, which must outlive this object. T follows the solver wavefunction precision; host grid processing uses double. Scratch buffers are local to each begin() call.

Constructor & Destructor Documentation

◆ Get_pchg_pw()

template<typename T, typename Device>
ModuleIO::Get_pchg_pw< T, Device >::Get_pchg_pw ( const psi::Psi< T, Device > & psi,
const ModulePW::PW_Basis_K & pw_wfc,
const ModulePW::PW_Basis & pw_rho,
const ModulePW::PW_Basis & pw_rhod,
const pseudopot_cell_vnl & ppcell,
const int nspin,
const int global_nbands )

Bind the wavefunction, grids, and global band/spin configuration.

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

Member Function Documentation

◆ accumulate_uspp()

template<typename T, typename Device>
void ModuleIO::Get_pchg_pw< T, Device >::accumulate_uspp ( const int band,
const int ik,
const int spin,
const double weight,
const Parallel::ParaBandOutput & band_output,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_augmentation()

template<typename T, typename Device>
void ModuleIO::Get_pchg_pw< T, Device >::add_augmentation ( const UnitCell & ucell,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ begin()

template<typename T, typename Device>
void ModuleIO::Get_pchg_pw< T, Device >::begin ( UnitCell * ucell,
const Parallel_Grid & pgrid,
const K_Vectors & kv,
const std::vector< int > & out_pchg,
const std::string & global_out_dir,
const bool if_separate_k,
const bool noncolin,
std::ofstream & ofs_running ) const

Write selected bands, either per k-point or after k summation and symmetry.

Parameters
ucellCell whose symmetry workspace may be updated during symmetrization.
noncolinWhether to retain transverse spinor magnetization components.
Here is the call graph for this function:

◆ calc_density()

template<typename T, typename Device>
void ModuleIO::Get_pchg_pw< T, Device >::calc_density ( const int spin_index,
const double weight,
const bool noncolin,
const bool accumulate,
Workspace * work ) const
private
Here is the caller graph for this function:

◆ select_bands()

template<typename T, typename Device>
std::vector< int > ModuleIO::Get_pchg_pw< T, Device >::select_bands ( const std::vector< int > & selection,
const std::string & parameter_name ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sum_pools()

template<typename T, typename Device>
void ModuleIO::Get_pchg_pw< T, Device >::sum_pools ( const Parallel_Grid & pgrid,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ symmetrize()

template<typename T, typename Device>
void ModuleIO::Get_pchg_pw< T, Device >::symmetrize ( UnitCell * ucell,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transform_band()

template<typename T, typename Device>
void ModuleIO::Get_pchg_pw< T, Device >::transform_band ( const int global_band,
const int ik,
const Parallel::ParaBandOutput & band_output,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transform_wfc()

template<typename T, typename Device>
const std::complex< double > * ModuleIO::Get_pchg_pw< T, Device >::transform_wfc ( const T * coefficients,
const int ik,
const int component,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_cube()

template<typename T, typename Device>
void ModuleIO::Get_pchg_pw< T, Device >::write_cube ( const int band,
const int component,
const int k_number,
const UnitCell & ucell,
const Parallel_Grid & pgrid,
const std::string & out_dir,
const bool separate_k,
const std::vector< double > & values,
std::ofstream & ofs_running ) const
private
Here is the call graph for this function:

◆ write_separate()

template<typename T, typename Device>
void ModuleIO::Get_pchg_pw< T, Device >::write_separate ( const int band,
const UnitCell & ucell,
const Parallel_Grid & pgrid,
const K_Vectors & kv,
const std::string & out_dir,
const bool noncolin,
const Parallel::ParaBandOutput & band_output,
std::ofstream & ofs_running,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_summed()

template<typename T, typename Device>
void ModuleIO::Get_pchg_pw< T, Device >::write_summed ( const int band,
UnitCell * ucell,
const Parallel_Grid & pgrid,
const K_Vectors & kv,
const std::string & out_dir,
const bool noncolin,
const Parallel::ParaBandOutput & band_output,
std::ofstream & ofs_running,
Workspace * work ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ global_nbands_

template<typename T, typename Device>
const int ModuleIO::Get_pchg_pw< T, Device >::global_nbands_
private

◆ nspin_

template<typename T, typename Device>
const int ModuleIO::Get_pchg_pw< T, Device >::nspin_
private

◆ ppcell_

template<typename T, typename Device>
const pseudopot_cell_vnl& ModuleIO::Get_pchg_pw< T, Device >::ppcell_
private

◆ psi_

template<typename T, typename Device>
const psi::Psi<T, Device>& ModuleIO::Get_pchg_pw< T, Device >::psi_
private

◆ pw_rho_

template<typename T, typename Device>
const ModulePW::PW_Basis& ModuleIO::Get_pchg_pw< T, Device >::pw_rho_
private

◆ pw_rhod_

template<typename T, typename Device>
const ModulePW::PW_Basis& ModuleIO::Get_pchg_pw< T, Device >::pw_rhod_
private

◆ pw_wfc_

template<typename T, typename Device>
const ModulePW::PW_Basis_K& ModuleIO::Get_pchg_pw< T, Device >::pw_wfc_
private

The documentation for this class was generated from the following files: