ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Classes | |
class | Evolve_elec |
class | Propagator |
Functions | |
int | globalIndex (int localindex, int nblk, int nprocs, int myproc) |
void | compute_ekb (const Parallel_Orbitals *pv, const int nband, const int nlocal, const std::complex< double > *Htmp, const std::complex< double > *psi_k, double *ekb, std::ofstream &ofs_running) |
compute band energy ekb <psi_i|H|psi_i> | |
void | compute_ekb_tensor (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Htmp, const ct::Tensor &psi_k, ct::Tensor &ekb, std::ofstream &ofs_running) |
template<typename Device > | |
void | compute_ekb_tensor_lapack (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Htmp, const ct::Tensor &psi_k, ct::Tensor &ekb, std::ofstream &ofs_running) |
template void | compute_ekb_tensor_lapack< base_device::DEVICE_CPU > (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Htmp, const ct::Tensor &psi_k, ct::Tensor &ekb, std::ofstream &ofs_running) |
template<typename T > | |
void | gatherPsi (const int myid, const int root_proc, T *psi_l, const Parallel_Orbitals ¶_orb, ModuleESolver::Matrix_g< T > &psi_g) |
template<typename T > | |
void | distributePsi (const Parallel_Orbitals ¶_orb, T *psi_l, const ModuleESolver::Matrix_g< T > &psi_g) |
void | evolve_psi (const int nband, const int nlocal, const Parallel_Orbitals *pv, hamilt::Hamilt< std::complex< double > > *p_hamilt, std::complex< double > *psi_k, std::complex< double > *psi_k_laststep, std::complex< double > *H_laststep, std::complex< double > *S_laststep, double *ekb, int htype, int propagator, std::ofstream &ofs_running, const int print_matrix) |
template<typename Device > | |
void | evolve_psi_tensor (const int nband, const int nlocal, const Parallel_Orbitals *pv, hamilt::Hamilt< std::complex< double > > *p_hamilt, ct::Tensor &psi_k, ct::Tensor &psi_k_laststep, ct::Tensor &H_laststep, ct::Tensor &S_laststep, ct::Tensor &ekb, int htype, int propagator, std::ofstream &ofs_running, const int print_matrix, const bool use_lapack) |
template void | evolve_psi_tensor< base_device::DEVICE_CPU > (const int nband, const int nlocal, const Parallel_Orbitals *pv, hamilt::Hamilt< std::complex< double > > *p_hamilt, ct::Tensor &psi_k, ct::Tensor &psi_k_laststep, ct::Tensor &H_laststep, ct::Tensor &S_laststep, ct::Tensor &ekb, int htype, int propagator, std::ofstream &ofs_running, const int print_matrix, const bool use_lapack) |
void | half_Hmatrix (const Parallel_Orbitals *pv, const int nband, const int nlocal, std::complex< double > *Htmp, std::complex< double > *Stmp, const std::complex< double > *H_laststep, const std::complex< double > *S_laststep, std::ofstream &ofs_running, const int print_matrix) |
compute H(t+dt/2) | |
void | half_Hmatrix_tensor (const Parallel_Orbitals *pv, const int nband, const int nlocal, ct::Tensor &Htmp, ct::Tensor &Stmp, const ct::Tensor &H_laststep, const ct::Tensor &S_laststep, std::ofstream &ofs_running, const int print_matrix) |
template<typename Device > | |
void | half_Hmatrix_tensor_lapack (const Parallel_Orbitals *pv, const int nband, const int nlocal, ct::Tensor &Htmp, ct::Tensor &Stmp, const ct::Tensor &H_laststep, const ct::Tensor &S_laststep, std::ofstream &ofs_running, const int print_matrix) |
template void | half_Hmatrix_tensor_lapack< base_device::DEVICE_CPU > (const Parallel_Orbitals *pv, const int nband, const int nlocal, ct::Tensor &Htmp, ct::Tensor &Stmp, const ct::Tensor &H_laststep, const ct::Tensor &S_laststep, std::ofstream &ofs_running, const int print_matrix) |
void | norm_psi (const Parallel_Orbitals *pv, const int nband, const int nlocal, const std::complex< double > *Stmp, std::complex< double > *psi_k, std::ofstream &ofs_running, const int print_matrix) |
normalize the wave function | |
void | norm_psi_tensor (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Stmp, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix) |
template<typename Device > | |
void | norm_psi_tensor_lapack (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Stmp, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix) |
template void | norm_psi_tensor_lapack< base_device::DEVICE_CPU > (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &Stmp, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix) |
template void | Propagator::compute_propagator_tensor< base_device::DEVICE_CPU > (const int nlocal, const ct::Tensor &Stmp, const ct::Tensor &Htmp, const ct::Tensor &H_laststep, ct::Tensor &U_operator, std::ofstream &ofs_running, const int print_matrix, const bool use_lapack) const |
template<typename T > | |
T | init_value (typename std::enable_if<!std::is_same< T, std::complex< float > >::value &&!std::is_same< T, std::complex< double > >::value >::type *=nullptr) |
template<typename T > | |
T | init_value (typename std::enable_if< std::is_same< T, std::complex< float > >::value||std::is_same< T, std::complex< double > >::value >::type *=nullptr) |
template<typename T > | |
ct::Tensor | create_identity_matrix (const int n, ct::DeviceType device=ct::DeviceType::CpuDevice) |
template void | Propagator::compute_propagator_cn2_tensor_lapack< base_device::DEVICE_CPU > (const int nlocal, const ct::Tensor &Stmp, const ct::Tensor &Htmp, ct::Tensor &U_operator, std::ofstream &ofs_running, const int print_matrix) const |
void | snap_psibeta_half_tddft (const LCAO_Orbitals &orb, const InfoNonlocal &infoNL_, std::vector< std::vector< std::complex< double > > > &nlm, const ModuleBase::Vector3< double > &R1, const int &T1, const int &L1, const int &m1, const int &N1, const ModuleBase::Vector3< double > &R0, const int &T0, const ModuleBase::Vector3< double > &A, const bool &calc_r) |
void | solve_propagation (const Parallel_Orbitals *pv, const int nband, const int nlocal, const double dt, const std::complex< double > *Stmp, const std::complex< double > *Htmp, const std::complex< double > *psi_k_laststep, std::complex< double > *psi_k) |
solve propagation equation A (t+dt) = B (t) | |
template<typename TR > | |
void | folding_HR_td (const hamilt::HContainer< TR > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const int ncol, const int hk_type, const UnitCell *ucell, const ModuleBase::Vector3< double > &cart_At) |
template void | folding_HR_td< double > (const hamilt::HContainer< double > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const int ncol, const int hk_type, const UnitCell *ucell, const ModuleBase::Vector3< double > &At) |
template void | folding_HR_td< std::complex< double > > (const hamilt::HContainer< std::complex< double > > &hR, std::complex< double > *hk, const ModuleBase::Vector3< double > &kvec_d_in, const int ncol, const int hk_type, const UnitCell *ucell, const ModuleBase::Vector3< double > &At) |
void | upsi (const Parallel_Orbitals *pv, const int nband, const int nlocal, const std::complex< double > *U_operator, const std::complex< double > *psi_k_laststep, std::complex< double > *psi_k, std::ofstream &ofs_running, const int print_matrix) |
apply U_operator to the wave function of the previous step for new wave function | |
void | upsi_tensor (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &U_operator, const ct::Tensor &psi_k_laststep, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix) |
template<typename Device > | |
void | upsi_tensor_lapack (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &U_operator, const ct::Tensor &psi_k_laststep, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix) |
template void | upsi_tensor_lapack< base_device::DEVICE_CPU > (const Parallel_Orbitals *pv, const int nband, const int nlocal, const ct::Tensor &U_operator, const ct::Tensor &psi_k_laststep, ct::Tensor &psi_k, std::ofstream &ofs_running, const int print_matrix) |
void module_rt::compute_ekb | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const std::complex< double > * | Htmp, | ||
const std::complex< double > * | psi_k, | ||
double * | ekb, | ||
std::ofstream & | ofs_running | ||
) |
compute band energy ekb <psi_i|H|psi_i>
[in] | pv | information of parallel |
[in] | nband | number of bands |
[in] | nlocal | number of orbitals |
[in] | Htmp | Hamiltonian |
[in] | psi_k | psi of this step |
[out] | ekb | band energy |
void module_rt::compute_ekb_tensor | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const ct::Tensor & | Htmp, | ||
const ct::Tensor & | psi_k, | ||
ct::Tensor & | ekb, | ||
std::ofstream & | ofs_running | ||
) |
void module_rt::compute_ekb_tensor_lapack | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const ct::Tensor & | Htmp, | ||
const ct::Tensor & | psi_k, | ||
ct::Tensor & | ekb, | ||
std::ofstream & | ofs_running | ||
) |
template void module_rt::compute_ekb_tensor_lapack< base_device::DEVICE_CPU > | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const ct::Tensor & | Htmp, | ||
const ct::Tensor & | psi_k, | ||
ct::Tensor & | ekb, | ||
std::ofstream & | ofs_running | ||
) |
ct::Tensor module_rt::create_identity_matrix | ( | const int | n, |
ct::DeviceType | device = ct::DeviceType::CpuDevice |
||
) |
void module_rt::distributePsi | ( | const Parallel_Orbitals & | para_orb, |
T * | psi_l, | ||
const ModuleESolver::Matrix_g< T > & | psi_g | ||
) |
void module_rt::evolve_psi | ( | const int | nband, |
const int | nlocal, | ||
const Parallel_Orbitals * | pv, | ||
hamilt::Hamilt< std::complex< double > > * | p_hamilt, | ||
std::complex< double > * | psi_k, | ||
std::complex< double > * | psi_k_laststep, | ||
std::complex< double > * | H_laststep, | ||
std::complex< double > * | S_laststep, | ||
double * | ekb, | ||
int | htype, | ||
int | propagator, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
compute H(t+dt/2) @input H_laststep, Htmp, print_matrix @output Htmp
compute U_operator @input Stmp, Htmp, print_matrix @output U_operator
apply U_operator to the wave function of the previous step for new wave function @input U_operator, psi_k_laststep, print_matrix @output psi_k
solve the propagation equation @input Stmp, Htmp, psi_k_laststep @output psi_k
normalize psi_k @input Stmp, psi_not_norm, psi_k, print_matrix @output psi_k
compute ekb @input Htmp, psi_k @output ekb
void module_rt::evolve_psi_tensor | ( | const int | nband, |
const int | nlocal, | ||
const Parallel_Orbitals * | pv, | ||
hamilt::Hamilt< std::complex< double > > * | p_hamilt, | ||
ct::Tensor & | psi_k, | ||
ct::Tensor & | psi_k_laststep, | ||
ct::Tensor & | H_laststep, | ||
ct::Tensor & | S_laststep, | ||
ct::Tensor & | ekb, | ||
int | htype, | ||
int | propagator, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix, | ||
const bool | use_lapack | ||
) |
compute H(t+dt/2) @input H_laststep, Htmp, print_matrix @output Htmp
compute U_operator @input Stmp, Htmp, print_matrix @output U_operator
apply U_operator to the wave function of the previous step for new wave function @input U_operator, psi_k_laststep, print_matrix @output psi_k
normalize psi_k @input Stmp, psi_not_norm, psi_k, print_matrix @output psi_k
compute ekb @input Htmp, psi_k @output ekb
template void module_rt::evolve_psi_tensor< base_device::DEVICE_CPU > | ( | const int | nband, |
const int | nlocal, | ||
const Parallel_Orbitals * | pv, | ||
hamilt::Hamilt< std::complex< double > > * | p_hamilt, | ||
ct::Tensor & | psi_k, | ||
ct::Tensor & | psi_k_laststep, | ||
ct::Tensor & | H_laststep, | ||
ct::Tensor & | S_laststep, | ||
ct::Tensor & | ekb, | ||
int | htype, | ||
int | propagator, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix, | ||
const bool | use_lapack | ||
) |
void module_rt::folding_HR_td | ( | const hamilt::HContainer< TR > & | hR, |
std::complex< double > * | hk, | ||
const ModuleBase::Vector3< double > & | kvec_d_in, | ||
const int | ncol, | ||
const int | hk_type, | ||
const UnitCell * | ucell, | ||
const ModuleBase::Vector3< double > & | cart_At | ||
) |
template void module_rt::folding_HR_td< double > | ( | const hamilt::HContainer< double > & | hR, |
std::complex< double > * | hk, | ||
const ModuleBase::Vector3< double > & | kvec_d_in, | ||
const int | ncol, | ||
const int | hk_type, | ||
const UnitCell * | ucell, | ||
const ModuleBase::Vector3< double > & | At | ||
) |
template void module_rt::folding_HR_td< std::complex< double > > | ( | const hamilt::HContainer< std::complex< double > > & | hR, |
std::complex< double > * | hk, | ||
const ModuleBase::Vector3< double > & | kvec_d_in, | ||
const int | ncol, | ||
const int | hk_type, | ||
const UnitCell * | ucell, | ||
const ModuleBase::Vector3< double > & | At | ||
) |
void module_rt::gatherPsi | ( | const int | myid, |
const int | root_proc, | ||
T * | psi_l, | ||
const Parallel_Orbitals & | para_orb, | ||
ModuleESolver::Matrix_g< T > & | psi_g | ||
) |
|
inline |
void module_rt::half_Hmatrix | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
std::complex< double > * | Htmp, | ||
std::complex< double > * | Stmp, | ||
const std::complex< double > * | H_laststep, | ||
const std::complex< double > * | S_laststep, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
compute H(t+dt/2)
[in] | pv | information of parallel |
[in] | nband | number of bands |
[in] | nlocal | number of orbitals |
[in] | Htmp | H(t+dt) |
[in] | H_laststep | H(t) |
[in] | print_matirx | print internal matrix or not |
[out] | Htmp | H(t+dt/2) |
void module_rt::half_Hmatrix_tensor | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
ct::Tensor & | Htmp, | ||
ct::Tensor & | Stmp, | ||
const ct::Tensor & | H_laststep, | ||
const ct::Tensor & | S_laststep, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
void module_rt::half_Hmatrix_tensor_lapack | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
ct::Tensor & | Htmp, | ||
ct::Tensor & | Stmp, | ||
const ct::Tensor & | H_laststep, | ||
const ct::Tensor & | S_laststep, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
template void module_rt::half_Hmatrix_tensor_lapack< base_device::DEVICE_CPU > | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
ct::Tensor & | Htmp, | ||
ct::Tensor & | Stmp, | ||
const ct::Tensor & | H_laststep, | ||
const ct::Tensor & | S_laststep, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
|
inline |
|
inline |
void module_rt::norm_psi | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const std::complex< double > * | Stmp, | ||
std::complex< double > * | psi_k, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
normalize the wave function
[in] | pv | information of parallel |
[in] | nband | number of bands |
[in] | nlocal | number of orbitals |
[in] | Stmp | overlap matrix |
[in] | psi_k | psi of this step |
[in] | print_matirx | print internal matrix or not |
[out] | psi_k | psi of this step after normalization |
void module_rt::norm_psi_tensor | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const ct::Tensor & | Stmp, | ||
ct::Tensor & | psi_k, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
void module_rt::norm_psi_tensor_lapack | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const ct::Tensor & | Stmp, | ||
ct::Tensor & | psi_k, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
template void module_rt::norm_psi_tensor_lapack< base_device::DEVICE_CPU > | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const ct::Tensor & | Stmp, | ||
ct::Tensor & | psi_k, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
template void module_rt::Propagator::compute_propagator_cn2_tensor_lapack< base_device::DEVICE_CPU > | ( | const int | nlocal, |
const ct::Tensor & | Stmp, | ||
const ct::Tensor & | Htmp, | ||
ct::Tensor & | U_operator, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) | const |
template void module_rt::Propagator::compute_propagator_tensor< base_device::DEVICE_CPU > | ( | const int | nlocal, |
const ct::Tensor & | Stmp, | ||
const ct::Tensor & | Htmp, | ||
const ct::Tensor & | H_laststep, | ||
ct::Tensor & | U_operator, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix, | ||
const bool | use_lapack | ||
) | const |
void module_rt::snap_psibeta_half_tddft | ( | const LCAO_Orbitals & | orb, |
const InfoNonlocal & | infoNL_, | ||
std::vector< std::vector< std::complex< double > > > & | nlm, | ||
const ModuleBase::Vector3< double > & | R1, | ||
const int & | T1, | ||
const int & | L1, | ||
const int & | m1, | ||
const int & | N1, | ||
const ModuleBase::Vector3< double > & | R0, | ||
const int & | T0, | ||
const ModuleBase::Vector3< double > & | A, | ||
const bool & | calc_r | ||
) |
void module_rt::solve_propagation | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const double | dt, | ||
const std::complex< double > * | Stmp, | ||
const std::complex< double > * | Htmp, | ||
const std::complex< double > * | psi_k_laststep, | ||
std::complex< double > * | psi_k | ||
) |
solve propagation equation A(t+dt) = B
(t)
[in] | pv | information of parallel |
[in] | nband | number of bands |
[in] | nlocal | number of orbitals |
[in] | dt | time interval |
[in] | Stmp | overlap matrix S(t+dt/2) |
[in] | Htmp | H(t+dt/2) |
[in] | psi_k_laststep | psi of last step |
[out] | psi_k | psi of this step |
void module_rt::upsi | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const std::complex< double > * | U_operator, | ||
const std::complex< double > * | psi_k_laststep, | ||
std::complex< double > * | psi_k, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
apply U_operator to the wave function of the previous step for new wave function
[in] | pv | information of parallel |
[in] | nband | number of bands |
[in] | nlocal | number of orbitals |
[in] | U_operator | operator of propagator |
[in] | psi_k_laststep | psi of last step |
[in] | print_matirx | print internal matrix or not |
[out] | psi_k | psi of this step |
void module_rt::upsi_tensor | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const ct::Tensor & | U_operator, | ||
const ct::Tensor & | psi_k_laststep, | ||
ct::Tensor & | psi_k, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
void module_rt::upsi_tensor_lapack | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const ct::Tensor & | U_operator, | ||
const ct::Tensor & | psi_k_laststep, | ||
ct::Tensor & | psi_k, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |
template void module_rt::upsi_tensor_lapack< base_device::DEVICE_CPU > | ( | const Parallel_Orbitals * | pv, |
const int | nband, | ||
const int | nlocal, | ||
const ct::Tensor & | U_operator, | ||
const ct::Tensor & | psi_k_laststep, | ||
ct::Tensor & | psi_k, | ||
std::ofstream & | ofs_running, | ||
const int | print_matrix | ||
) |