Psi4
integraltransform_functors.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2018 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef INTEGRALTRANSFORM_FUNCTORS_H
30 #define INTEGRALTRANSFORM_FUNCTORS_H
31 
32 #include "integraltransform.h"
33 
34 #include "psi4/libdpd/dpd.h"
35 #include "psi4/libiwl/iwl.hpp"
36 #include "psi4/libpsio/psio.hpp"
39 
40 namespace psi {
41 
43  private:
45  const double *D_;
47  const double *FzD_;
49  double *F_;
51  double *Fz_;
53  int al[8], bl[8], cl[8], dl[8], dum, found;
54 
55  public:
56  /*
57  * Generates the fock and frozen core operators, given the density matrices as input
58  *
59  * @param D: The density matrix (stored as a lower triangular array)
60  * @param FzD: The frozen core density matrix (stored as a lower triangular array)
61  * @param F: The Fock matrix (stored as a lower triangular array)
62  * @param Fz: The frozen core operator (stored as a lower triangular array)
63  */
64  FrozenCoreAndFockRestrictedFunctor(const double *D, const double *FzD, double *F, double *Fz)
65  : D_(D), FzD_(FzD), F_(F), Fz_(Fz) {}
66 
67  void operator()(int pabs, int qabs, int rabs, int sabs, int psym, int prel, int qsym, int qrel, int rsym, int rrel,
68  int ssym, int srel, double value) {
69  int a = al[0] = pabs;
70  int b = bl[0] = qabs;
71  int c = cl[0] = rabs;
72  int d = dl[0] = sabs;
73  int ab = INDEX(a, b);
74  int cd = INDEX(c, d);
75  int bc = INDEX(b, c);
76  int ad = INDEX(a, d);
77 
78  Fz_[cd] += 2.0 * FzD_[ab] * value;
79  F_[cd] += 2.0 * D_[ab] * value;
80  if (b >= c) {
81  Fz_[bc] -= FzD_[ad] * value;
82  F_[bc] -= D_[ad] * value;
83  }
84 
85  a = al[1] = qabs;
86  b = bl[1] = pabs;
87  c = cl[1] = rabs;
88  d = dl[1] = sabs;
89  if (!(a == al[0] && b == bl[0] && c == cl[0] && d == dl[0])) {
90  ab = INDEX(a, b);
91  cd = INDEX(c, d);
92  bc = INDEX(b, c);
93  ad = INDEX(a, d);
94  if (c >= d) {
95  Fz_[cd] += 2.0 * FzD_[ab] * value;
96  F_[cd] += 2.0 * D_[ab] * value;
97  }
98  if (b >= c) {
99  Fz_[bc] -= FzD_[ad] * value;
100  F_[bc] -= D_[ad] * value;
101  }
102  }
103 
104  a = al[2] = pabs;
105  b = bl[2] = qabs;
106  c = cl[2] = sabs;
107  d = dl[2] = rabs;
108  for (dum = 0, found = 0; dum < 2 && !found; dum++)
109  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
110  if (!found) {
111  ab = INDEX(a, b);
112  cd = INDEX(c, d);
113  bc = INDEX(b, c);
114  ad = INDEX(a, d);
115  if (c >= d) {
116  Fz_[cd] += 2.0 * FzD_[ab] * value;
117  F_[cd] += 2.0 * D_[ab] * value;
118  }
119  if (b >= c) {
120  Fz_[bc] -= FzD_[ad] * value;
121  F_[bc] -= D_[ad] * value;
122  }
123  }
124 
125  a = al[3] = qabs;
126  b = bl[3] = pabs;
127  c = cl[3] = sabs;
128  d = dl[3] = rabs;
129  for (dum = 0, found = 0; dum < 3 && !found; dum++)
130  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
131  if (!found) {
132  ab = INDEX(a, b);
133  cd = INDEX(c, d);
134  bc = INDEX(b, c);
135  ad = INDEX(a, d);
136  if (c >= d) {
137  Fz_[cd] += 2.0 * FzD_[ab] * value;
138  F_[cd] += 2.0 * D_[ab] * value;
139  }
140  if (b >= c) {
141  Fz_[bc] -= FzD_[ad] * value;
142  F_[bc] -= D_[ad] * value;
143  }
144  }
145 
146  a = al[4] = rabs;
147  b = bl[4] = sabs;
148  c = cl[4] = pabs;
149  d = dl[4] = qabs;
150  for (dum = 0, found = 0; dum < 4 && !found; dum++)
151  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
152  if (!found) {
153  ab = INDEX(a, b);
154  cd = INDEX(c, d);
155  bc = INDEX(b, c);
156  ad = INDEX(a, d);
157  if (c >= d) {
158  Fz_[cd] += 2.0 * FzD_[ab] * value;
159  F_[cd] += 2.0 * D_[ab] * value;
160  }
161  if (b >= c) {
162  Fz_[bc] -= FzD_[ad] * value;
163  F_[bc] -= D_[ad] * value;
164  }
165  }
166 
167  a = al[5] = rabs;
168  b = bl[5] = sabs;
169  c = cl[5] = qabs;
170  d = dl[5] = pabs;
171  for (dum = 0, found = 0; dum < 5 && !found; dum++)
172  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
173  if (!found) {
174  ab = INDEX(a, b);
175  cd = INDEX(c, d);
176  bc = INDEX(b, c);
177  ad = INDEX(a, d);
178  if (c >= d) {
179  Fz_[cd] += 2.0 * FzD_[ab] * value;
180  F_[cd] += 2.0 * D_[ab] * value;
181  }
182  if (b >= c) {
183  Fz_[bc] -= FzD_[ad] * value;
184  F_[bc] -= D_[ad] * value;
185  }
186  }
187 
188  a = al[6] = sabs;
189  b = bl[6] = rabs;
190  c = cl[6] = pabs;
191  d = dl[6] = qabs;
192  for (dum = 0, found = 0; dum < 6 && !found; ++dum)
193  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
194  if (!found) {
195  ab = INDEX(a, b);
196  cd = INDEX(c, d);
197  bc = INDEX(b, c);
198  ad = INDEX(a, d);
199  if (c >= d) {
200  Fz_[cd] += 2.0 * FzD_[ab] * value;
201  F_[cd] += 2.0 * D_[ab] * value;
202  }
203  if (b >= c) {
204  Fz_[bc] -= FzD_[ad] * value;
205  F_[bc] -= D_[ad] * value;
206  }
207  }
208 
209  a = al[7] = sabs;
210  b = bl[7] = rabs;
211  c = cl[7] = qabs;
212  d = dl[7] = pabs;
213  for (dum = 0, found = 0; dum < 7 && !found; dum++)
214  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
215  if (!found) {
216  ab = INDEX(a, b);
217  cd = INDEX(c, d);
218  bc = INDEX(b, c);
219  ad = INDEX(a, d);
220  if (c >= d) {
221  Fz_[cd] += 2.0 * FzD_[ab] * value;
222  F_[cd] += 2.0 * D_[ab] * value;
223  }
224  if (b >= c) {
225  Fz_[bc] -= FzD_[ad] * value;
226  F_[bc] -= D_[ad] * value;
227  }
228  }
229  }
230 };
231 
233  private:
235  const double *Da_;
237  const double *Db_;
239  const double *FzDa_;
241  const double *FzDb_;
243  double *Fa_;
245  double *Fb_;
247  double *Fza_;
249  double *Fzb_;
251  int al[8], bl[8], cl[8], dl[8], dum, found;
252 
253  public:
254  /*
255  * Generates the fock and frozen core operators, given the density matrices as input
256  *
257  * @param Da: The alpha density matrix (stored as a lower triangular array)
258  * @param Db: The beta density matrix (stored as a lower triangular array)
259  * @param FzDa: The alpha frozen core density matrix (stored as a lower triangular array)
260  * @param FzDb: The beta frozen core density matrix (stored as a lower triangular array)
261  * @param Fa: The alpha Fock matrix (stored as a lower triangular array)
262  * @param Fa: The beta Fock matrix (stored as a lower triangular array)
263  * @param Fza: The alpha frozen core operator (stored as a lower triangular array)
264  * @param Fzb: The beta frozen core operator (stored as a lower triangular array)
265  */
266  FrozenCoreAndFockUnrestrictedFunctor(const double *Da, const double *Db, const double *FzDa, const double *FzDb,
267  double *Fa, double *Fb, double *Fza, double *Fzb)
268  : Da_(Da), Db_(Db), FzDa_(FzDa), FzDb_(FzDb), Fa_(Fa), Fb_(Fb), Fza_(Fza), Fzb_(Fzb) {}
269 
270  void operator()(int pabs, int qabs, int rabs, int sabs, int psym, int prel, int qsym, int qrel, int rsym, int rrel,
271  int ssym, int srel, double value) {
272  int a = al[0] = pabs;
273  int b = bl[0] = qabs;
274  int c = cl[0] = rabs;
275  int d = dl[0] = sabs;
276  int ab = INDEX(a, b);
277  int cd = INDEX(c, d);
278  int bc = INDEX(b, c);
279  int ad = INDEX(a, d);
280  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
281  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
282  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
283  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
284  if (b >= c) {
285  Fza_[bc] -= FzDa_[ad] * value;
286  Fa_[bc] -= Da_[ad] * value;
287  Fzb_[bc] -= FzDb_[ad] * value;
288  Fb_[bc] -= Db_[ad] * value;
289  }
290 
291  a = al[1] = qabs;
292  b = bl[1] = pabs;
293  c = cl[1] = rabs;
294  d = dl[1] = sabs;
295  if (!(a == al[0] && b == bl[0] && c == cl[0] && d == dl[0])) {
296  ab = INDEX(a, b);
297  cd = INDEX(c, d);
298  bc = INDEX(b, c);
299  ad = INDEX(a, d);
300  if (c >= d) {
301  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
302  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
303  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
304  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
305  }
306  if (b >= c) {
307  Fza_[bc] -= FzDa_[ad] * value;
308  Fa_[bc] -= Da_[ad] * value;
309  Fzb_[bc] -= FzDb_[ad] * value;
310  Fb_[bc] -= Db_[ad] * value;
311  }
312  }
313 
314  a = al[2] = pabs;
315  b = bl[2] = qabs;
316  c = cl[2] = sabs;
317  d = dl[2] = rabs;
318  for (dum = 0, found = 0; dum < 2 && !found; dum++)
319  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
320  if (!found) {
321  ab = INDEX(a, b);
322  cd = INDEX(c, d);
323  bc = INDEX(b, c);
324  ad = INDEX(a, d);
325  if (c >= d) {
326  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
327  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
328  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
329  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
330  }
331  if (b >= c) {
332  Fza_[bc] -= FzDa_[ad] * value;
333  Fa_[bc] -= Da_[ad] * value;
334  Fzb_[bc] -= FzDb_[ad] * value;
335  Fb_[bc] -= Db_[ad] * value;
336  }
337  }
338 
339  a = al[3] = qabs;
340  b = bl[3] = pabs;
341  c = cl[3] = sabs;
342  d = dl[3] = rabs;
343  for (dum = 0, found = 0; dum < 3 && !found; dum++)
344  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
345  if (!found) {
346  ab = INDEX(a, b);
347  cd = INDEX(c, d);
348  bc = INDEX(b, c);
349  ad = INDEX(a, d);
350  if (c >= d) {
351  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
352  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
353  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
354  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
355  }
356  if (b >= c) {
357  Fza_[bc] -= FzDa_[ad] * value;
358  Fa_[bc] -= Da_[ad] * value;
359  Fzb_[bc] -= FzDb_[ad] * value;
360  Fb_[bc] -= Db_[ad] * value;
361  }
362  }
363 
364  a = al[4] = rabs;
365  b = bl[4] = sabs;
366  c = cl[4] = pabs;
367  d = dl[4] = qabs;
368  for (dum = 0, found = 0; dum < 4 && !found; dum++)
369  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
370  if (!found) {
371  ab = INDEX(a, b);
372  cd = INDEX(c, d);
373  bc = INDEX(b, c);
374  ad = INDEX(a, d);
375  if (c >= d) {
376  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
377  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
378  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
379  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
380  }
381  if (b >= c) {
382  Fza_[bc] -= FzDa_[ad] * value;
383  Fa_[bc] -= Da_[ad] * value;
384  Fzb_[bc] -= FzDb_[ad] * value;
385  Fb_[bc] -= Db_[ad] * value;
386  }
387  }
388 
389  a = al[5] = rabs;
390  b = bl[5] = sabs;
391  c = cl[5] = qabs;
392  d = dl[5] = pabs;
393  for (dum = 0, found = 0; dum < 5 && !found; dum++)
394  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
395  if (!found) {
396  ab = INDEX(a, b);
397  cd = INDEX(c, d);
398  bc = INDEX(b, c);
399  ad = INDEX(a, d);
400  if (c >= d) {
401  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
402  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
403  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
404  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
405  }
406  if (b >= c) {
407  Fza_[bc] -= FzDa_[ad] * value;
408  Fa_[bc] -= Da_[ad] * value;
409  Fzb_[bc] -= FzDb_[ad] * value;
410  Fb_[bc] -= Db_[ad] * value;
411  }
412  }
413 
414  a = al[6] = sabs;
415  b = bl[6] = rabs;
416  c = cl[6] = pabs;
417  d = dl[6] = qabs;
418  for (dum = 0, found = 0; dum < 6 && !found; dum++)
419  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
420  if (!found) {
421  ab = INDEX(a, b);
422  cd = INDEX(c, d);
423  bc = INDEX(b, c);
424  ad = INDEX(a, d);
425  if (c >= d) {
426  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
427  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
428  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
429  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
430  }
431  if (b >= c) {
432  Fza_[bc] -= FzDa_[ad] * value;
433  Fa_[bc] -= Da_[ad] * value;
434  Fzb_[bc] -= FzDb_[ad] * value;
435  Fb_[bc] -= Db_[ad] * value;
436  }
437  }
438 
439  a = al[7] = sabs;
440  b = bl[7] = rabs;
441  c = cl[7] = qabs;
442  d = dl[7] = pabs;
443  for (dum = 0, found = 0; dum < 7 && !found; dum++)
444  if (a == al[dum] && b == bl[dum] && c == cl[dum] && d == dl[dum]) found = 1;
445  if (!found) {
446  ab = INDEX(a, b);
447  cd = INDEX(c, d);
448  bc = INDEX(b, c);
449  ad = INDEX(a, d);
450  if (c >= d) {
451  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
452  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
453  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
454  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
455  }
456  if (b >= c) {
457  Fza_[bc] -= FzDa_[ad] * value;
458  Fa_[bc] -= Da_[ad] * value;
459  Fzb_[bc] -= FzDb_[ad] * value;
460  Fb_[bc] -= Db_[ad] * value;
461  }
462  }
463  }
464 };
465 
467  private:
471  int **bucket_map_;
475 
476  public:
477  DPDFillerFunctor(dpdfile4 *file, int this_bucket, int **bucket_map, int **bucket_offset, bool symmetrize,
478  bool have_bra_ket_sym)
479  : file_(file),
480  this_bucket_(this_bucket),
481  bucket_map_(bucket_map),
482  bucket_offset_(bucket_offset),
483  symmetrize_(symmetrize),
484  have_bra_ket_sym_(have_bra_ket_sym) {
485  params_ = file_->params;
486  }
487  void operator()(int p, int q, int r, int s, double value) {
488  if (symmetrize_) {
489  // Symmetrize the quantity (used in density matrix processing)
490  if (p != q) value *= 0.5;
491  if (r != s) value *= 0.5;
492  }
493 
494  bool bra_ket_different = !(p == r && q == s);
495 
496  /* Get the orbital symmetries */
497  int p_sym = params_->psym[p];
498  int q_sym = params_->qsym[q];
499  int r_sym = params_->rsym[r];
500  int s_sym = params_->ssym[s];
501  int pq_sym = p_sym ^ q_sym;
502  int rs_sym = r_sym ^ s_sym;
503 
504  /* The allowed (Mulliken) permutations are very simple in this case */
505  if (bucket_map_[p][q] == this_bucket_) {
506  /* Get the row and column indices and assign the value */
507  int pq = params_->rowidx[p][q];
508  int rs = params_->colidx[r][s];
509  int offset = bucket_offset_[this_bucket_][pq_sym];
510  if ((pq - offset >= params_->rowtot[pq_sym]) || (rs >= params_->coltot[rs_sym]))
511  error("MP Params_make: pq, rs", p, q, r, s, pq, rs, pq_sym, rs_sym);
512  file_->matrix[pq_sym][pq - offset][rs] += value;
513  }
514 
515  /*
516  * We also add in the bra-ket transposed value, as a result of the matrix
517  * storage, but we need to make sure we don't duplicate "diagonal" values.
518  * We don't do this if the quantity does not have bra-ket symmetry, like
519  * in the Alpha-Beta TPDM.
520  */
521  if (bucket_map_[r][s] == this_bucket_ && bra_ket_different && have_bra_ket_sym_) {
522  int rs = params_->rowidx[r][s];
523  int pq = params_->colidx[p][q];
524  int offset = bucket_offset_[this_bucket_][rs_sym];
525  if ((rs - offset >= params_->rowtot[rs_sym]) || (pq >= params_->coltot[pq_sym]))
526  error("MP Params_make: rs, pq", p, q, r, s, rs, pq, rs_sym, pq_sym);
527  file_->matrix[rs_sym][rs - offset][pq] += value;
528  }
529  }
530 
531  private:
532  void error(const char *message, int p, int q, int r, int s, int pq, int rs, int pq_sym, int rs_sym) {
533  outfile->Printf("\n\tDPD Parameter Error in %s\n", message);
534  outfile->Printf("\t-------------------------------------------------\n");
535  outfile->Printf("\t p q r s [ pq] [ rs] pq_symm rs_symm\n");
536  outfile->Printf("\t%5d %5d %5d %5d [%5d] [%5d] %1d %1d\n", p, q, r, s, pq, rs, pq_sym, rs_sym);
537  throw PsiException("DPD idx failure.", __FILE__, __LINE__);
538  }
539 };
540 
541 class NullFunctor {
542  public:
543  /*
544  * Just an empty functor that will be compiled away (hopefully)
545  */
546  void operator()(int pabs, int qabs, int rabs, int sabs, int psym, int prel, int qsym, int qrel, int rsym, int rrel,
547  int ssym, int srel, double value) {}
548  void operator()(int p, int q, int r, int s, double value) {}
549 };
550 
551 template <class DPDFunctor, class FockFunctor>
552 void iwl_integrals(IWL *iwl, DPDFunctor &dpd, FockFunctor &fock) {
553  Label *lblptr = iwl->labels();
554  Value *valptr = iwl->values();
555  int labelIndex, p, q, r, s;
556  double value;
557  bool lastBuffer;
558  do {
559  lastBuffer = iwl->last_buffer();
560  for (int index = 0; index < iwl->buffer_count(); ++index) {
561  labelIndex = 4 * index;
562  p = std::abs((int)lblptr[labelIndex++]);
563  q = (int)lblptr[labelIndex++];
564  r = (int)lblptr[labelIndex++];
565  s = (int)lblptr[labelIndex++];
566  value = (double)valptr[index];
567  dpd(p, q, r, s, value);
568  fock(p, q, r, s, 0, 0, 0, 0, 0, 0, 0, 0, value);
569  } /* end loop through current buffer */
570  if (!lastBuffer) iwl->fetch();
571  } while (!lastBuffer);
572  iwl->set_keep_flag(true);
573 }
574 
575 } // namespace psi
576 #endif // INTEGRALTRANSFORM_FUNCTORS_H
int bl[8]
Definition: integraltransform_functors.h:53
bool have_bra_ket_sym_
Definition: integraltransform_functors.h:474
const double * FzDb_
The beta frozen core density matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:241
int bl[8]
Definition: integraltransform_functors.h:251
int dum
Definition: integraltransform_functors.h:53
Definition: libdpd/dpd.h:87
double * Fa_
The alpha Fock matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:243
Value * values()
Definition: iwl.hpp:69
short int Label
Definition: libiwl/config.h:34
void fetch()
Definition: buf_fetch.cc:40
const double * FzDa_
The alpha frozen core density matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:239
FrozenCoreAndFockUnrestrictedFunctor(const double *Da, const double *Db, const double *FzDa, const double *FzDb, double *Fa, double *Fb, double *Fza, double *Fzb)
Definition: integraltransform_functors.h:266
double * Fz_
The frozen core operator (stored as a lower triangular array)
Definition: integraltransform_functors.h:51
void operator()(int pabs, int qabs, int rabs, int sabs, int psym, int prel, int qsym, int qrel, int rsym, int rrel, int ssym, int srel, double value)
Definition: integraltransform_functors.h:546
int this_bucket_
Definition: integraltransform_functors.h:470
Definition: integraltransform_functors.h:466
#define INDEX(i, j)
Definition: dump_UHF.cc:60
int ** rowidx
Definition: libdpd/dpd.h:64
void rs(int nm, int n, double **array, double *e_vals, int matz, double **e_vecs, double toler)
int * rsym
Definition: libdpd/dpd.h:78
double *** matrix
Definition: libdpd/dpd.h:95
int dl[8]
Definition: integraltransform_functors.h:251
void operator()(int p, int q, int r, int s, double value)
Definition: integraltransform_functors.h:548
Definition: integraltransform_functors.h:232
dpdfile4 * file_
Definition: integraltransform_functors.h:468
dpdparams4 * params_
Definition: integraltransform_functors.h:469
int & last_buffer()
Definition: iwl.hpp:65
int * rowtot
Definition: libdpd/dpd.h:62
const double * D_
The density matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:45
Enter brief description of file here.
int & buffer_count()
Definition: iwl.hpp:66
void iwl_integrals(IWL *iwl, DPDFunctor &dpd, FockFunctor &fock)
Definition: integraltransform_functors.h:552
double bc[MAX_BC][MAX_BC]
Definition: wavefunction.cc:67
const double * Db_
The beta density matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:237
double * Fza_
The alpha frozen core operator (stored as a lower triangular array)
Definition: integraltransform_functors.h:247
std::shared_ptr< PsiOutStream > outfile
Definition: core.cc:102
Definition: integraltransform_functors.h:541
void operator()(int p, int q, int r, int s, double value)
Definition: integraltransform_functors.h:487
Definition: exception.h:56
void operator()(int pabs, int qabs, int rabs, int sabs, int psym, int prel, int qsym, int qrel, int rsym, int rrel, int ssym, int srel, double value)
Definition: integraltransform_functors.h:270
int al[8]
Some temporary arrays for handling permutations.
Definition: integraltransform_functors.h:53
int ** colidx
Definition: libdpd/dpd.h:65
int dum
Definition: integraltransform_functors.h:251
int * psym
Definition: libdpd/dpd.h:76
int al[8]
Some temporary arrays for handling permutations.
Definition: integraltransform_functors.h:251
Label * labels()
Definition: iwl.hpp:68
void set_keep_flag(bool k)
Definition: iwl.hpp:74
int * ssym
Definition: libdpd/dpd.h:79
int * coltot
Definition: libdpd/dpd.h:63
double * Fzb_
The beta frozen core operator (stored as a lower triangular array)
Definition: integraltransform_functors.h:249
double * F_
The Fock matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:49
Definition: libdpd/dpd.h:58
int cl[8]
Definition: integraltransform_functors.h:251
int ** bucket_map_
Definition: integraltransform_functors.h:471
const double * FzD_
The frozen core density matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:47
int dl[8]
Definition: integraltransform_functors.h:53
dpdparams4 * params
Definition: libdpd/dpd.h:93
DPDFillerFunctor(dpdfile4 *file, int this_bucket, int **bucket_map, int **bucket_offset, bool symmetrize, bool have_bra_ket_sym)
Definition: integraltransform_functors.h:477
int found
Definition: integraltransform_functors.h:251
int * qsym
Definition: libdpd/dpd.h:77
double Value
Definition: libiwl/config.h:35
Definition: integraltransform_functors.h:42
int found
Definition: integraltransform_functors.h:53
bool symmetrize_
Definition: integraltransform_functors.h:473
double * Fb_
The beta Fock matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:245
void operator()(int pabs, int qabs, int rabs, int sabs, int psym, int prel, int qsym, int qrel, int rsym, int rrel, int ssym, int srel, double value)
Definition: integraltransform_functors.h:67
FrozenCoreAndFockRestrictedFunctor(const double *D, const double *FzD, double *F, double *Fz)
Definition: integraltransform_functors.h:64
Definition: iwl.hpp:38
int ** bucket_offset_
Definition: integraltransform_functors.h:472
const double * Da_
The alpha density matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:235
void error(const char *message, int p, int q, int r, int s, int pq, int rs, int pq_sym, int rs_sym)
Definition: integraltransform_functors.h:532
int cl[8]
Definition: integraltransform_functors.h:53