ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
exx_force_dm.h
Go to the documentation of this file.
1#ifndef ABACUS_SOURCE_LCAO_MODULE_LR_EXX_FORCE_DM_H
2#define ABACUS_SOURCE_LCAO_MODULE_LR_EXX_FORCE_DM_H
3#ifdef __EXX
4#include <RI/physics/Exx.h>
5
6#include <array>
7#include <map>
8#include <string>
9#include <utility>
10
11namespace LR
12{
25 template<typename TA, typename Tcell, std::size_t Ndim, typename Tdata>
26 class ExxForceTwoDM : public RI::Exx<TA, Tcell, Ndim, Tdata>
27 {
28 using Base = RI::Exx<TA, Tcell, Ndim, Tdata>;
29
30 public:
31 using TC = std::array<Tcell, Ndim>;
32 using TAC = std::pair<TA, TC>;
33
34 ExxForceTwoDM() = default;
36 ExxForceTwoDM(Base&& exx) : Base(std::move(exx)) {}
37
38 using Base::cal_force;
39
42 void cal_force(const std::map<TA, std::map<TAC, RI::Tensor<Tdata>>>& Ds_left,
43 const std::array<std::string, 5>& save_names_suffix = { "","","","","" })
44 {
45 if (!Ds_left.empty())
46 {
47 this->post_2D.saves["Ds_" + save_names_suffix[2]]
48 = this->post_2D.set_tensors_map2(Ds_left);
49 }
50 this->cal_force(save_names_suffix);
51 }
52 };
53}
54#endif
55
56#endif // ABACUS_SOURCE_LCAO_MODULE_LR_EXX_FORCE_DM_H
Definition esolver_lr_lcao_tddft.h:28
std::array< int, 3 > TC
Definition test_write_ri_cv.cpp:9
std::pair< int, TC > TAC
Definition test_write_ri_cv.cpp:10