ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
dm_trans.h
Go to the documentation of this file.
1#pragma once
2// use tensor or basematrix in the future
3#include <ATen/core/tensor.h>
4#include "source_psi/psi.h"
5#include <vector>
6#ifdef __MPI
8#endif
9namespace LR
10{
11
12#ifndef MO_TYPE_H
13#define MO_TYPE_H
14 enum MO_TYPE { OO, VO, VV };
15#endif
16
17#ifdef __MPI
20 template<typename T>
21 std::vector<container::Tensor> cal_dm_trans_pblas(
22 const T* const X_istate,
23 const Parallel_2D& px,
24 const psi::Psi<T>& c,
25 const Parallel_2D& pc,
26 const int naos,
27 const int nocc,
28 const int nvirt,
29 const Parallel_2D& pmat,
30 const T factor = (T)1.0,
31 const MO_TYPE type = MO_TYPE::VO);
32#endif
33
35 template<typename T>
36 std::vector<container::Tensor> cal_dm_trans_blas(
37 const T* const X_istate,
38 const psi::Psi<T>& c,
39 const int& nocc, const int& nvirt,
40 const T factor = (T)1.0,
41 const MO_TYPE type = MO_TYPE::VO);
42
43 // for test
45 template<typename T>
46 std::vector<container::Tensor> cal_dm_trans_forloop_serial(
47 const T* const X_istate,
48 const psi::Psi<T>& c,
49 const int& nocc, const int& nvirt,
50 const T factor = (T)1.0,
51 const MO_TYPE type = MO_TYPE::VO);
52}
This class packs the basic information of 2D-block-cyclic parallel distribution of an arbitrary matri...
Definition parallel_2d.h:12
Definition psi.h:37
#define T
Definition exp.cpp:237
Definition esolver_ks_lcao.h:37
std::vector< container::Tensor > cal_dm_trans_pblas(const T *const X_istate, const Parallel_2D &px, const psi::Psi< T > &c, const Parallel_2D &pc, const int naos, const int nocc, const int nvirt, const Parallel_2D &pmat, const T factor=(T) 1.0, const MO_TYPE type=MO_TYPE::VO)
calculate the 2d-block transition density matrix in AO basis using p?gemm
std::vector< container::Tensor > cal_dm_trans_blas(const T *const X_istate, const psi::Psi< T > &c, const int &nocc, const int &nvirt, const T factor=(T) 1.0, const MO_TYPE type=MO_TYPE::VO)
calculate the 2d-block transition density matrix in AO basis using ?gemm
std::vector< container::Tensor > cal_dm_trans_forloop_serial(const T *const X_istate, const psi::Psi< T > &c, const int &nocc, const int &nvirt, const T factor=(T) 1.0, const MO_TYPE type=MO_TYPE::VO)
calculate the 2d-block transition density matrix in AO basis using for loop (for test)
MO_TYPE
Definition ao_to_mo.h:12
@ OO
Definition ao_to_mo.h:12
@ VO
Definition ao_to_mo.h:12
@ VV
Definition ao_to_mo.h:12