ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
uspp_density.h
Go to the documentation of this file.
1#ifndef USPP_DENSITY_H_
2#define USPP_DENSITY_H_
3
8
9#include <complex>
10#include <memory>
11#include <vector>
12
13namespace elecstate
14{
16int uspp_becsum_size(const UnitCell& ucell, const pseudopot_cell_vnl& ppcell, const int nspin);
17
19template <typename T, typename Device>
21{
22 public:
24 UsppProjector(const UnitCell& ucell, const pseudopot_cell_vnl& ppcell, const int nbands);
26
39 void accumulate(const int ik,
40 const T* coefficients,
41 const int stride,
42 const int npw,
43 const int spin,
44 const std::vector<double>& weights,
45 std::vector<double>* becsum);
46
47 private:
50 const int nbands_;
51 class Workspace;
52 std::unique_ptr<Workspace> work_;
53};
54
63void add_uspp_density(const UnitCell& ucell,
64 const pseudopot_cell_vnl& ppcell,
65 const ModulePW::PW_Basis& basis,
66 const int nspin,
67 const std::vector<double>& becsum,
68 std::complex<double>** rhog);
69} // namespace elecstate
70
71#endif
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:60
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition uspp_density.cpp:25
UsppProjector(const UnitCell &ucell, const pseudopot_cell_vnl &ppcell, const int nbands)
Bind cell/projectors and allocate storage for a block of nbands states.
Definition uspp_density.cpp:49
void accumulate(const int ik, const T *coefficients, const int stride, const int npw, const int spin, const std::vector< double > &weights, std::vector< double > *becsum)
Add weighted projector products to the caller's packed coefficients.
Definition uspp_density.cpp:59
const int nbands_
Definition uspp_density.h:50
std::unique_ptr< Workspace > work_
Definition uspp_density.h:52
const pseudopot_cell_vnl & ppcell_
Definition uspp_density.h:49
const UnitCell & ucell_
Definition uspp_density.h:48
Definition vnl_pw.h:23
#define T
Definition exp.cpp:237
Definition read_atoms_hlp_test.cpp:13
int uspp_becsum_size(const UnitCell &ucell, const pseudopot_cell_vnl &ppcell, const int nspin)
Size of the canonical [spin][atom][packed projector pair] storage.
Definition uspp_density.cpp:16
void add_uspp_density(const UnitCell &ucell, const pseudopot_cell_vnl &ppcell, const ModulePW::PW_Basis &basis, const int nspin, const std::vector< double > &becsum, std::complex< double > **rhog)
Add USPP augmentation to caller-owned dense-grid reciprocal densities. becsum uses i <= j pairs,...
Definition uspp_density.cpp:140