ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
cal_w_from_z.h
Go to the documentation of this file.
1#ifndef ABACUS_SOURCE_LCAO_MODULE_LR_CAL_W_FROM_Z_H
2#define ABACUS_SOURCE_LCAO_MODULE_LR_CAL_W_FROM_Z_H
3#include "gradient_inputs.h"
11#include <ATen/ops/linalg_op.h>
12#ifdef __EXX
14#endif
17
18namespace LR
19{
20 // $\sum_a X^*_{ai} X_{aj}(\Omega - \epsilon_a)$
21 template<typename T>
22 void add_ediff_term(T* const inout,
23 const T* const X,
24 const double eig_ext_istate,
25 const double* const eig_ks,
26 const int nk,
27 const int nocc,
28 const int nvirt,
29 const Parallel_Blkcyclic& px,
30 const Parallel_Blkcyclic& p_occ_occ)
31 {
32 for (int ik = 0;ik < nk;++ik)
33 {
34 // 1. calculate (\Omega-\epsilon_a)X_{aj}
35 std::vector<T> wX(px.size());
36 const int eigks_start_k = ik * (nocc + nvirt);
37 const int x_start_k = ik * px.size();
38 const int inout_start_k = ik * p_occ_occ.size();
39 for (int la = 0;la < px.nrloc();++la)
40 {
41 const int ga = px.irglb(la);
42 const double weight = eig_ext_istate - eig_ks[eigks_start_k + nocc + ga];
43 for (int li = 0;li < px.ncloc();++li)
44 {
45 const int idx = li * px.nrloc() + la;
46 wX[idx] = weight * X[x_start_k + idx];
47 }
48 }
49 // 2. matrix multiplication (parallel)
50#ifdef __MPI
51 const int i1 = 1;
52 ScalapackConnector::gemm('C', 'N', nocc, nocc, nvirt,
53 T(1.0), X + x_start_k, i1, i1, px.desc(),
54 wX.data(), i1, i1, px.desc(),
55 T(1.0)/*add-on*/, inout + inout_start_k, i1, i1, p_occ_occ.desc());
56#else
57 BlasConnector::gemm_cm('C', 'N', nocc, nocc, nvirt,
58 T(1.0), X + x_start_k, nvirt,
59 wX.data(), nvirt,
60 T(1.0)/*add-on*/, inout + inout_start_k, nocc);
61#endif
62 }
63 }
64
65 // relaxed_density[k] is the symmetric T + DZ + Dwin used by the force contraction.
66 template<typename T>
67 void cal_W_from_Z(const GradientInputs<T>& inputs,
68 T* const W,
69 const std::vector<ct::Tensor>& relaxed_density,
70 const T* const X,
71 const double eig,
72 const double* const eig_ks,
73 const psi::Psi<T>& psi_ks, // the closed-shell caller supplies a single-spin view
74 const std::vector<Parallel_Blkcyclic>& p_occ_occ,
75 const std::string& spin_type = "singlet")
76 {
77 const int& nspin = inputs.nspin;
78 const int& naos = inputs.nbasis;
79 const std::vector<int>& nocc = inputs.nocc;
80 const std::vector<int>& nvirt = inputs.nvirt;
81 const UnitCell& ucell = inputs.ucell;
82 const std::vector<double>& orb_cutoff = inputs.orb_cutoff;
83 const Grid_Driver& gd = inputs.gd;
84 const K_Vectors& kv = inputs.kv;
85 const std::vector<Parallel_Blkcyclic>& px = inputs.px;
86 const Parallel_Blkcyclic& pc = inputs.pc;
87 const Parallel_Orbitals& pmat = inputs.pmat;
88 const std::string& dft_functional = inputs.dft_functional;
89 std::weak_ptr<PotHxcLR> pot_hxc_gs = inputs.pot_hxc_gs;
90#ifdef __EXX
91 std::weak_ptr<Exx_LRI<T>> exx_lri = inputs.exx_lri;
92 const double& exx_alpha = inputs.hybrid_alpha;
93#endif
94 const std::string xc_kernel = inputs.xc_kernel;
95 ModuleBase::TITLE("cal_W_from_Z", "cal_W_from_Z");
96 using ATYPE = typename OperatorLRHxc<T>::MO_TO_AO_TYPE;
97#ifdef __EXX
98 using ATYPE_EXX = typename OperatorLREXX<T>::MO_TO_AO_TYPE;
99#endif
100 const int nk = kv.get_nks() / nspin;
101 // allocate memory for DMs
102 module_dm::DensityMatrix<T, T> DM_trans(&pmat, 1, kv.kvec_d, nk); //DX
103 LR_Util::initialize_DMR(DM_trans, pmat, ucell, gd, orb_cutoff);
104 module_dm::DensityMatrix<T, T> DM_diff_relaxed(&pmat, 1, kv.kvec_d, nk); //T+DZ+Dwin
105 LR_Util::initialize_DMR(DM_diff_relaxed, pmat, ucell, gd, orb_cutoff);
107 // 1. Hgs_ij[T + DZ + Dwin]/2; the supplied density is symmetric.
108 // Note that K_Hxc(singlet) = 2* pot_hxc_gs, that's why there's factor 2 here.
109 OperatorLRHxc<T> op_ht(nspin, naos, nocc, nvirt, psi_ks,
110 DM_diff_relaxed, pot_hxc_gs, ucell, orb_cutoff, gd, kv, p_occ_occ, pc, pmat,
111 { 0 }, T(2.0), ATYPE::CC_oo, hamilt::calculation_type::lr_dmtrans_hxc);
112#ifdef __EXX
113 // cal_W_from_Z only runs on the force-calculation path, so cal_force is always true here.
114 OperatorLREXX<T> op_ht_exx(nspin, naos, nocc[0], nvirt[0], ucell, psi_ks,
115 DM_diff_relaxed, exx_lri, kv, p_occ_occ[0], pc, pmat,
116 /*cal_force=*/true, exx_alpha, ATYPE_EXX::CC_oo, {}, hamilt::calculation_type::lr_dmtrans_exx);
117#endif
118 // 2. $2\sum_{jb,kc} g^{xc}_{ia, jb, kc}X_{jb}X_{kc}$
119 // use pointer here for polymorphism
120 // but `weak_ptr = make_shared()` will cause a segment fault because the shared_ptr is a temporary object
121 // correct way is to use `shared_ptr = make_shared()` and then assign it to weak_ptr
122 // `weak_ptr=shared_ptr` is automatically called in the constructor of OperatorLRHxc, so we don't need to do it manually
123 // if `pot_grad` is passed into a function rather than a class, we need to write `weak_ptr=shared_ptr` explicitly
124 // This quadratic term differentiates the LR kernel K, unlike H[T+DZ+Dwin] above.
125 const bool triplet = spin_type == "triplet";
126 const int ispin = triplet && nspin == 2 ? 1 : 0;
127 const std::shared_ptr<PotHxcLR>& pot_lr = inputs.pot[ispin];
128 const int kernel_nspin = pot_lr->xc_kernel_components().nspin();
129 std::shared_ptr<PotGradXCLR> pot_grad =
130 std::make_shared<PotGradXCLR>(pot_lr->xc_kernel_components(), pot_lr->get_rho_basis(),
131 ucell, pot_lr->nrxx, kernel_nspin, triplet);
132 OperatorLRHxc<T> op_gxc(nspin, naos, nocc, nvirt, psi_ks,
133 DM_trans, pot_grad, ucell, orb_cutoff, gd, kv, p_occ_occ, pc, pmat,
134 // Factor 1.0 according to the $W^c$ formula (`pot_grad` carries $2*g^{xc}$: uu+ud or uu-ud).
135 // NOTE this factor is NOT shared with the Z-vector RHS `op_gxc` in `hamilt_zeq_right.h`:
136 // that one is a different object and its original -2.0 is correct, as the formula and H2-DZP scan confirms.
137 { 0 }, T(1.0), ATYPE::CC_oo, hamilt::calculation_type::lr_dmtrans_hxc);
138
139 std::vector<ct::Tensor> dm_trans_2d;
140 auto cal_dm_trans = [&psi_ks, nk, &dm_trans_2d, &px, &pc, naos, &nocc, &nvirt, &pmat, &DM_trans](const int is, const T* const x_ptr)->void //DX
141 {
142 const psi::Psi<T> psi_ks_is = LR_Util::get_psi_spin(psi_ks, is, nk);
143#ifdef __MPI
144 dm_trans_2d = cal_dm_trans_pblas(x_ptr, px[is], psi_ks_is, pc, naos, nocc[is], nvirt[is], pmat.para_2d());
145 for (container::Tensor& t: dm_trans_2d)
146 LR_Util::matsym(t.data<T>(), naos, pmat.para_2d());
147#else
148 dm_trans_2d = cal_dm_trans_blas(x_ptr, psi_ks_is, nocc[is], nvirt[is]);
149 for (auto& t: dm_trans_2d)
150 LR_Util::matsym(t.data<T>(), naos);
151#endif
152 for (int ik = 0; ik < nk; ++ik)
153 {
154 DM_trans.set_dmk_ptr(ik, dm_trans_2d[ik].data<T>());
155 }
156 };
157 // The caller owns T + DZ + Dwin for this state, shared with the force contraction.
158 for (int ik = 0; ik < nk; ++ik)
159 {
160 DM_diff_relaxed.set_dmk_ptr(ik, relaxed_density[ik].data<T>());
161 }
162
163 // act the operators onto current state
164 const int ld_vo = nk * px[0].size();
165 const int ld_oo = nk * p_occ_occ[0].size();
166 cal_dm_trans(0, X); // transition density matrix DX
167 // the 3 terms
168 op_ht.act(/*nband=*/1, ld_oo, /*npol=*/1, X, W); //comment out this line to test H[T+Z]=0
169 // std::cout << "W (H[T+Z])) local terms: " << std::endl;
170 // LR_Util::print_value(W, nk, p_occ_occ[0].ncloc(), p_occ_occ[0].nrloc());
171#ifdef __EXX
172 if (LR::gs_is_hybrid(dft_functional)) // H[T+Z] term depends on ground-state kernel
173 op_ht_exx.act(/*nband=*/1, ld_oo, /*npol=*/1, X, W);
174#endif
175 // std::cout << "W (H[T+Z])) local +exx terms: " << std::endl;
176 // LR_Util::print_value(W, nk, p_occ_occ[0].ncloc(), p_occ_occ[0].nrloc());
177 // Not singlet-only: $K^T_{xc}=f_{uu}-f_{ud}\ne0$ for a local functional, so $W^{c,T}$ has a
178 // $g^{xc}$ term as well, built from the "-" spin combination (the `triplet` flag above).
179 if (LR_Util::has_local_xc(xc_kernel))
180 op_gxc.act(/*nband=*/1, ld_oo, /*npol=*/1, X, W);
181
182 add_ediff_term(W, X, eig, eig_ks, nk, nocc[0], nvirt[0], px[0], p_occ_occ[0]);
183 }
184
196 // relaxed_density[spin][k] includes Dwin; sum both input spins with the GS kernel.
197 template<typename T>
199 std::vector<std::vector<T>>& W,
200 const std::vector<std::vector<ct::Tensor>>& relaxed_density,
201 const T* const X,
202 const double eig,
203 const double* const eig_ks,
204 const std::vector<Parallel_Blkcyclic>& p_occ_occ)
205 {
206 const int& nspin = inputs.nspin;
207 const int& naos = inputs.nbasis;
208 const std::vector<int>& nocc = inputs.nocc;
209 const std::vector<int>& nvirt = inputs.nvirt;
210 const UnitCell& ucell = inputs.ucell;
211 const std::vector<double>& orb_cutoff = inputs.orb_cutoff;
212 const Grid_Driver& gd = inputs.gd;
213 const K_Vectors& kv = inputs.kv;
214 const std::vector<Parallel_Blkcyclic>& px = inputs.px;
215 const Parallel_Blkcyclic& pc = inputs.pc;
216 const Parallel_Orbitals& pmat = inputs.pmat;
217 const std::string& dft_functional = inputs.dft_functional;
218 std::weak_ptr<PotHxcLR> pot_hxc_gs = inputs.pot_hxc_gs;
219#ifdef __EXX
220 std::weak_ptr<Exx_LRI<T>> exx_lri = inputs.exx_lri;
221 const double& exx_alpha = inputs.hybrid_alpha;
222#endif
223 const psi::Psi<T>& psi_ks = inputs.psi_ks;
224 const std::string xc_kernel = inputs.xc_kernel;
225 const std::string& ks_solver = inputs.ks_solver;
226 ModuleBase::TITLE("cal_W_from_Z_openshell", "cal_W_from_Z_openshell");
227 using ATYPE = typename OperatorLRHxc<T>::MO_TO_AO_TYPE;
228#ifdef __EXX
229 using ATYPE_EXX = typename OperatorLREXX<T>::MO_TO_AO_TYPE;
230#endif
231 const int nk = kv.get_nks() / nspin;
232 const std::vector<int> ld_x = { static_cast<int>(nk * px[0].size()), static_cast<int>(nk * px[1].size()) };
233 const std::vector<int> ld_oo = { static_cast<int>(nk * p_occ_occ[0].size()), static_cast<int>(nk * p_occ_occ[1].size()) };
234 const std::vector<int> off_x = { 0, ld_x[0] };
235 const int nband_window = nocc[0] + nvirt[0]; // common KS window, see `set_dimension`
236
237 W.assign(2, {});
238 for (int is: {0, 1})
239 {
240 W[is].assign(ld_oo[is], T(0.0));
241 }
242
243 module_dm::DensityMatrix<T, T> DM_diff_relaxed(&pmat, 1, kv.kvec_d, nk); // T+D^Z of one channel
244 LR_Util::initialize_DMR(DM_diff_relaxed, pmat, ucell, gd, orb_cutoff);
245
246 // $\tfrac12 H_{ij\sigma}[T+D^Z]=K_{ij\sigma}[T+D^Z]$, one operator per (out, in) spin pair
247 std::vector<std::unique_ptr<OperatorLRHxc<T>>> op_ht(4);
248 for (int sl : {0, 1})
249 {
250 for (int sr : {0, 1})
251 {
252 op_ht[(sl << 1) + sr] = LR_Util::make_unique<OperatorLRHxc<T>>(nspin, naos, nocc, nvirt, psi_ks,
253 DM_diff_relaxed, pot_hxc_gs, ucell, orb_cutoff, gd, kv, p_occ_occ, pc, pmat,
254 std::vector<int>({ sl, sr }), T(1.0), ATYPE::CC_oo, hamilt::calculation_type::lr_dmtrans_hxc);
255 }
256 }
257#ifdef __EXX
258 std::vector<psi::Psi<T>> psi_ks_spin;
259 for (int is: {0, 1})
260 {
261 psi_ks_spin.push_back(LR_Util::get_psi_spin(psi_ks, is, nk));
262 }
263 const std::vector<int> no_aims_probe;
264 std::vector<std::unique_ptr<OperatorLREXX<T>>> op_ht_exx(2);
265 const bool with_exx = LR::gs_is_hybrid(dft_functional);
266 if (with_exx)
267 { // exchange is spin-diagonal
268 for (int is : {0, 1})
269 {
270 op_ht_exx[is] = LR_Util::make_unique<OperatorLREXX<T>>(nspin, naos, nocc[is], nvirt[is],
271 ucell, psi_ks_spin[is], DM_diff_relaxed, exx_lri, kv, p_occ_occ[is], pc, pmat,
272 /*cal_force=*/true, exx_alpha, ATYPE_EXX::CC_oo, no_aims_probe, hamilt::calculation_type::lr_dmtrans_exx);
273 }
274 }
275#endif
276 for (int is_in : {0, 1})
277 {
278 for (int ik = 0; ik < nk; ++ik)
279 {
280 DM_diff_relaxed.set_dmk_ptr(ik, relaxed_density[is_in][ik].data<T>());
281 }
282 for (int is_out : {0, 1})
283 {
284 op_ht[(is_out << 1) + is_in]->act(/*nband=*/1, ld_oo[is_out], /*npol=*/1,
285 X + off_x[is_in], W[is_out].data());
286 }
287#ifdef __EXX
288 if (with_exx)
289 { // $\delta_{\sigma\sigma'}$: only the diagonal block contributes
290 op_ht_exx[is_in]->act(/*nband=*/1, ld_oo[is_in], /*npol=*/1,
291 X + off_x[is_in], W[is_in].data());
292 }
293#endif
294 }
295
296 // $\sum_{\sigma'\sigma''}D^X_{\sigma'}D^X_{\sigma''}g^{xc}_{\dots,ij\tau}$, coefficient 1
297 // in the spin-orbital formula. Quadratic in $D^X$, so it does not fit the block loop above.
298 // Use the LR kernel's density derivative, consistently with the Z-vector RHS.
299 // The separate H[T+DZ+Dwin] operators above retain the GS kernel.
300 if (LR_Util::has_local_xc(xc_kernel))
301 {
302 const std::shared_ptr<PotHxcLR>& pot_lr = inputs.pot[0];
303 OperatorGxcULR<T> gxc(pot_lr->xc_kernel_components(), pot_lr->get_rho_basis(),
304 ucell, orb_cutoff, gd, kv, pmat, pc, psi_ks, nocc, nvirt, naos,
305 px, p_occ_occ, LR_Util::MO_TYPE::OO, T(1.0), nspin, ks_solver);
306 std::vector<T> w_flat(ld_oo[0] + ld_oo[1], T(0.0));
307 gxc.act(X, w_flat.data());
308 for (int is : {0, 1})
309 {
310 const int off = is * ld_oo[0];
311 for (int i = 0; i < ld_oo[is]; ++i)
312 {
313 W[is][i] += w_flat[off + i];
314 }
315 }
316 }
317
318 // $\sum_a X_{ai\sigma}(\Omega-\epsilon_{a\sigma})X_{aj\sigma}$ -- spin-diagonal
319 for (int is : {0, 1})
320 {
321 add_ediff_term(W[is].data(), X + off_x[is], eig, eig_ks + is * nk * nband_window,
322 nk, nocc[is], nvirt[is], px[is], p_occ_occ[is]);
323 }
324 }
325}
326
327#endif // ABACUS_SOURCE_LCAO_MODULE_LR_CAL_W_FROM_Z_H
static void gemm_cm(const char transa, const char transb, const int m, const int n, const int k, const float alpha, const float *a, const int lda, const float *b, const int ldb, const float beta, float *c, const int ldc, base_device::AbacusDevice_t device_type=base_device::AbacusDevice_t::CpuDevice)
Definition blas_connector_matrix.cpp:166
Grid_Driver class for neighbor search interface.
Definition sltk_grid_driver.h:63
Class for k-points management.
Definition klist.h:20
int get_nks() const
Definition klist.h:71
The open-shell $g^{xc}$ term, i.e. $\sum_{\kappa\lambda\sigma'}\sum_{\alpha\beta\sigma''}...
Definition op_gxc_ulr.h:31
void act(const T *const X_full, T *const out_full) const
out += factor * <p tau| v^{(2)}_tau[X, X] |q tau> for both spin channels
Definition op_gxc_ulr.h:66
Definition exx_lri.h:35
Hxc part of A operator for LR-TDDFT.
Definition operator_lr_hxc.h:17
MO_TO_AO_TYPE
type of molecular orbital to atomic orbital transformation: CC_vo: MO = C_v^* AO C_o; CC_oo: MO = C_o...
Definition operator_lr_hxc.h:24
std::vector< ModuleBase::Vector3< double > > kvec_d
Direct coordinates of the points.
Definition reciprocal_grid.h:57
Parallel block-cyclic matrix distribution.
Definition parallel_blkcyc.h:25
int irglb(const int irloc) const
Definition parallel_blkcyc.h:88
int ncloc() const
Definition parallel_blkcyc.h:40
const int * desc() const
Definition parallel_blkcyc.h:125
int nrloc() const
Definition parallel_blkcyc.h:35
std::size_t size() const
Definition parallel_blkcyc.h:48
Definition parallel_orbitals.h:16
Parallel_Blkcyclic & para_2d()
Definition parallel_orbitals.h:24
static void gemm(const char transa, const char transb, const int M, const int N, const int K, const double alpha, const double *A, const int IA, const int JA, const int *DESCA, const double *B, const int IB, const int JB, const int *DESCB, const double beta, double *C, const int IC, const int JC, const int *DESCC)
Definition scalapack_connector.h:295
Provide the basic information about unitcell.
Definition unitcell.h:16
A multi-dimensional array of elements of a single data type.
Definition tensor.h:32
DensityMatrix Class <TK,TR> = <double,double> for Gamma-only calculation <TK,TR> = <std::complex<doub...
Definition density_matrix.h:172
void set_dmk_ptr(const int ik, TK *DMK_in)
set dmk using a input TK* pointer please make sure the size of TK* is correct
Definition dm_setter.cpp:20
Definition psi.h:37
#define T
Definition exp.cpp:237
psi::Psi< T > get_psi_spin(const psi::Psi< T > &psi_in, const int &is, const int &nk)
get the Psi wrapper of the selected spin from the Psi object
Definition lr_util.hpp:235
std::unique_ptr< T > make_unique(Args &&... args)
Definition lr_util.hpp:33
void matsym(const T *in, const int n, T *out)
Definition lr_util.hpp:79
@ OO
Definition mo_type.h:9
bool has_local_xc(const std::string &name)
check if the xc functional has local xc kernel
Definition lr_util.h:80
void initialize_DMR(module_dm::DensityMatrix< T, TR > &dm, const Parallel_Orbitals &pmat, const UnitCell &ucell, const Grid_Driver &gd, const std::vector< double > &orb_cutoff)
Definition lr_util_hcontainer.h:179
Definition esolver_lr_lcao_tddft.h:28
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 LR_Util::MO_TYPE type=LR_Util::MO_TYPE::VO)
calculate the 2d-block transition density matrix in AO basis using ?gemm
void cal_W_from_Z(const GradientInputs< T > &inputs, T *const W, const std::vector< ct::Tensor > &relaxed_density, const T *const X, const double eig, const double *const eig_ks, const psi::Psi< T > &psi_ks, const std::vector< Parallel_Blkcyclic > &p_occ_occ, const std::string &spin_type="singlet")
Definition cal_w_from_z.h:67
std::vector< container::Tensor > cal_dm_trans_pblas(const T *const X_istate, const Parallel_Blkcyclic &px, const psi::Psi< T > &c, const Parallel_Blkcyclic &pc, const int naos, const int nocc, const int nvirt, const Parallel_Blkcyclic &pmat, const T factor=(T) 1.0, const LR_Util::MO_TYPE type=LR_Util::MO_TYPE::VO)
calculate the 2d-block transition density matrix in AO basis using p?gemm
void add_ediff_term(T *const inout, const T *const X, const double eig_ext_istate, const double *const eig_ks, const int nk, const int nocc, const int nvirt, const Parallel_Blkcyclic &px, const Parallel_Blkcyclic &p_occ_occ)
Definition cal_w_from_z.h:22
void cal_W_from_Z_openshell(const GradientInputs< T > &inputs, std::vector< std::vector< T > > &W, const std::vector< std::vector< ct::Tensor > > &relaxed_density, const T *const X, const double eig, const double *const eig_ks, const std::vector< Parallel_Blkcyclic > &p_occ_occ)
Open-shell (spin-unrestricted) counterpart of cal_W_from_Z.
Definition cal_w_from_z.h:198
void TITLE(const std::string &class_name, const std::string &function_name, const bool disable)
Definition tool_title.cpp:18
@ lr_dmtrans_exx
Definition operator.h:32
@ lr_dmtrans_hxc
Definition operator.h:29
Definition gradient_inputs.h:11
const std::vector< int > & nvirt
Definition gradient_inputs.h:22
const std::vector< int > & nocc
Definition gradient_inputs.h:21
const K_Vectors & kv
Definition gradient_inputs.h:13
const Parallel_Orbitals & pmat
Definition gradient_inputs.h:16
const std::vector< double > & orb_cutoff
Definition gradient_inputs.h:15
int nspin
Definition gradient_inputs.h:23
const std::string & ks_solver
Definition gradient_inputs.h:29
const std::vector< Parallel_Blkcyclic > & px
Definition gradient_inputs.h:18
const psi::Psi< T > & psi_ks
Definition gradient_inputs.h:19
const Parallel_Blkcyclic & pc
Definition gradient_inputs.h:17
const std::vector< std::shared_ptr< PotHxcLR > > & pot
Definition gradient_inputs.h:35
const std::string & dft_functional
Definition gradient_inputs.h:28
const UnitCell & ucell
Definition gradient_inputs.h:12
const std::string & xc_kernel
Definition gradient_inputs.h:27
const Grid_Driver & gd
Definition gradient_inputs.h:14
int nbasis
Definition gradient_inputs.h:25
const std::shared_ptr< PotHxcLR > & pot_hxc_gs
Definition gradient_inputs.h:36