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-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 #ifndef INTEGRALTRANSFORM_FUNCTORS_H
29 #define INTEGRALTRANSFORM_FUNCTORS_H
30 
31 #include "psi4/libdpd/dpd.h"
32 #include "psi4/libiwl/iwl.hpp"
33 #include "psi4/libpsio/psio.hpp"
34 
35 namespace psi{
36 
38 private:
40  const double *D_;
42  const double *FzD_;
44  double *F_;
46  double *Fz_;
48  int al[8], bl[8], cl[8], dl[8], dum, found;
49 public:
50  /*
51  * Generates the fock and frozen core operators, given the density matrices as input
52  *
53  * @param D: The density matrix (stored as a lower triangular array)
54  * @param FzD: The frozen core density matrix (stored as a lower triangular array)
55  * @param F: The Fock matrix (stored as a lower triangular array)
56  * @param Fz: The frozen core operator (stored as a lower triangular array)
57  */
59  const double *FzD,
60  double *F,
61  double *Fz)
62  : D_(D), FzD_(FzD), F_(F), Fz_(Fz)
63  {}
64 
65  void operator()(int pabs, int qabs, int rabs, int sabs,
66  int psym, int prel, int qsym, int qrel,
67  int rsym, int rrel, int ssym, int srel, double value)
68  {
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 public:
253  /*
254  * Generates the fock and frozen core operators, given the density matrices as input
255  *
256  * @param Da: The alpha density matrix (stored as a lower triangular array)
257  * @param Db: The beta density matrix (stored as a lower triangular array)
258  * @param FzDa: The alpha frozen core density matrix (stored as a lower triangular array)
259  * @param FzDb: The beta frozen core density matrix (stored as a lower triangular array)
260  * @param Fa: The alpha Fock matrix (stored as a lower triangular array)
261  * @param Fa: The beta Fock matrix (stored as a lower triangular array)
262  * @param Fza: The alpha frozen core operator (stored as a lower triangular array)
263  * @param Fzb: The beta frozen core operator (stored as a lower triangular array)
264  */
265  FrozenCoreAndFockUnrestrictedFunctor(const double *Da, const double *Db,
266  const double *FzDa, const double *FzDb,
267  double *Fa, double *Fb,
268  double *Fza, double *Fzb)
269  : Da_(Da), Db_(Db), FzDa_(FzDa), FzDb_(FzDb), Fa_(Fa), Fb_(Fb), Fza_(Fza), Fzb_(Fzb)
270  {}
271 
272  void operator()(int pabs, int qabs, int rabs, int sabs,
273  int psym, int prel, int qsym, int qrel,
274  int rsym, int rrel, int ssym, int srel, double value)
275  {
276  int a = al[0] = pabs;
277  int b = bl[0] = qabs;
278  int c = cl[0] = rabs;
279  int d = dl[0] = sabs;
280  int ab = INDEX(a,b);
281  int cd = INDEX(c,d);
282  int bc = INDEX(b,c);
283  int ad = INDEX(a,d);
284  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
285  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
286  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
287  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
288  if(b >= c) {
289  Fza_[bc] -= FzDa_[ad] * value;
290  Fa_[bc] -= Da_[ad] * value;
291  Fzb_[bc] -= FzDb_[ad] * value;
292  Fb_[bc] -= Db_[ad] * value;
293  }
294 
295  a = al[1] = qabs;
296  b = bl[1] = pabs;
297  c = cl[1] = rabs;
298  d = dl[1] = sabs;
299  if(!(a==al[0] && b==bl[0] && c==cl[0] && d==dl[0])){
300  ab = INDEX(a,b);
301  cd = INDEX(c,d);
302  bc = INDEX(b,c);
303  ad = INDEX(a,d);
304  if(c >= d){
305  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
306  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
307  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
308  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
309  }
310  if(b >= c){
311  Fza_[bc] -= FzDa_[ad] * value;
312  Fa_[bc] -= Da_[ad] * value;
313  Fzb_[bc] -= FzDb_[ad] * value;
314  Fb_[bc] -= Db_[ad] * value;
315  }
316  }
317 
318  a = al[2] = pabs;
319  b = bl[2] = qabs;
320  c = cl[2] = sabs;
321  d = dl[2] = rabs;
322  for(dum=0,found=0; dum < 2 && !found; dum++)
323  if(a==al[dum] && b==bl[dum] && c==cl[dum] && d==dl[dum]) found=1;
324  if(!found){
325  ab = INDEX(a,b);
326  cd = INDEX(c,d);
327  bc = INDEX(b,c);
328  ad = INDEX(a,d);
329  if(c >= d){
330  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
331  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
332  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
333  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
334  }
335  if(b >= c){
336  Fza_[bc] -= FzDa_[ad] * value;
337  Fa_[bc] -= Da_[ad] * value;
338  Fzb_[bc] -= FzDb_[ad] * value;
339  Fb_[bc] -= Db_[ad] * value;
340  }
341  }
342 
343  a = al[3] = qabs;
344  b = bl[3] = pabs;
345  c = cl[3] = sabs;
346  d = dl[3] = rabs;
347  for(dum=0,found=0; dum < 3 && !found; dum++)
348  if(a==al[dum] && b==bl[dum] && c==cl[dum] && d==dl[dum]) found=1;
349  if(!found){
350  ab = INDEX(a,b);
351  cd = INDEX(c,d);
352  bc = INDEX(b,c);
353  ad = INDEX(a,d);
354  if(c >= d){
355  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
356  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
357  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
358  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
359  }
360  if(b >= c){
361  Fza_[bc] -= FzDa_[ad] * value;
362  Fa_[bc] -= Da_[ad] * value;
363  Fzb_[bc] -= FzDb_[ad] * value;
364  Fb_[bc] -= Db_[ad] * value;
365  }
366  }
367 
368  a = al[4] = rabs;
369  b = bl[4] = sabs;
370  c = cl[4] = pabs;
371  d = dl[4] = qabs;
372  for(dum=0,found=0; dum < 4 && !found; dum++)
373  if(a==al[dum] && b==bl[dum] && c==cl[dum] && d==dl[dum]) found=1;
374  if(!found){
375  ab = INDEX(a,b);
376  cd = INDEX(c,d);
377  bc = INDEX(b,c);
378  ad = INDEX(a,d);
379  if(c >= d){
380  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
381  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
382  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
383  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
384  }
385  if(b >= c){
386  Fza_[bc] -= FzDa_[ad] * value;
387  Fa_[bc] -= Da_[ad] * value;
388  Fzb_[bc] -= FzDb_[ad] * value;
389  Fb_[bc] -= Db_[ad] * value;
390  }
391  }
392 
393  a = al[5] = rabs;
394  b = bl[5] = sabs;
395  c = cl[5] = qabs;
396  d = dl[5] = pabs;
397  for(dum=0,found=0; dum < 5 && !found; dum++)
398  if(a==al[dum] && b==bl[dum] && c==cl[dum] && d==dl[dum]) found=1;
399  if(!found){
400  ab = INDEX(a,b);
401  cd = INDEX(c,d);
402  bc = INDEX(b,c);
403  ad = INDEX(a,d);
404  if(c >= d){
405  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
406  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
407  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
408  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
409  }
410  if(b >= c){
411  Fza_[bc] -= FzDa_[ad] * value;
412  Fa_[bc] -= Da_[ad] * value;
413  Fzb_[bc] -= FzDb_[ad] * value;
414  Fb_[bc] -= Db_[ad] * value;
415  }
416  }
417 
418  a = al[6] = sabs;
419  b = bl[6] = rabs;
420  c = cl[6] = pabs;
421  d = dl[6] = qabs;
422  for(dum=0,found=0; dum < 6 && !found; dum++)
423  if(a==al[dum] && b==bl[dum] && c==cl[dum] && d==dl[dum]) found=1;
424  if(!found) {
425  ab = INDEX(a,b);
426  cd = INDEX(c,d);
427  bc = INDEX(b,c);
428  ad = INDEX(a,d);
429  if(c >= d){
430  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
431  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
432  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
433  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
434  }
435  if(b >= c){
436  Fza_[bc] -= FzDa_[ad] * value;
437  Fa_[bc] -= Da_[ad] * value;
438  Fzb_[bc] -= FzDb_[ad] * value;
439  Fb_[bc] -= Db_[ad] * value;
440  }
441  }
442 
443  a = al[7] = sabs;
444  b = bl[7] = rabs;
445  c = cl[7] = qabs;
446  d = dl[7] = pabs;
447  for(dum=0,found=0; dum < 7 && !found; dum++)
448  if(a==al[dum] && b==bl[dum] && c==cl[dum] && d==dl[dum]) found=1;
449  if(!found){
450  ab = INDEX(a,b);
451  cd = INDEX(c,d);
452  bc = INDEX(b,c);
453  ad = INDEX(a,d);
454  if(c >= d){
455  Fza_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
456  Fa_[cd] += (Da_[ab] + Db_[ab]) * value;
457  Fzb_[cd] += (FzDa_[ab] + FzDb_[ab]) * value;
458  Fb_[cd] += (Da_[ab] + Db_[ab]) * value;
459  }
460  if(b >= c){
461  Fza_[bc] -= FzDa_[ad] * value;
462  Fa_[bc] -= Da_[ad] * value;
463  Fzb_[bc] -= FzDb_[ad] * value;
464  Fb_[bc] -= Db_[ad] * value;
465  }
466  }
467  }
468 };
469 
471 private:
475  int **bucket_map_;
479 public:
480  DPDFillerFunctor(dpdfile4 *file, int this_bucket, int **bucket_map,
481  int **bucket_offset, bool symmetrize, bool have_bra_ket_sym):
482  file_(file), this_bucket_(this_bucket), bucket_map_(bucket_map),
483  bucket_offset_(bucket_offset), symmetrize_(symmetrize),
484  have_bra_ket_sym_(have_bra_ket_sym)
485  {
486  params_ = file_->params;
487  }
488  void operator()(int p, int q, int r, int s, double value)
489  {
490  if(symmetrize_){
491  // Symmetrize the quantity (used in density matrix processing)
492  if(p!=q) value *= 0.5;
493  if(r!=s) value *= 0.5;
494  }
495 
496  bool bra_ket_different = !(p==r && q==s);
497 
498  /* Get the orbital symmetries */
499  int p_sym = params_->psym[p];
500  int q_sym = params_->qsym[q];
501  int r_sym = params_->rsym[r];
502  int s_sym = params_->ssym[s];
503  int pq_sym = p_sym^q_sym;
504  int rs_sym = r_sym^s_sym;
505 
506  /* The allowed (Mulliken) permutations are very simple in this case */
507  if(bucket_map_[p][q] == this_bucket_) {
508  /* Get the row and column indices and assign the value */
509  int pq = params_->rowidx[p][q];
510  int rs = params_->colidx[r][s];
511  int offset = bucket_offset_[this_bucket_][pq_sym];
512  if((pq-offset >= params_->rowtot[pq_sym]) || (rs >= params_->coltot[rs_sym]))
513  error("MP Params_make: pq, rs", p,q,r,s,pq,rs,pq_sym,rs_sym);
514  file_->matrix[pq_sym][pq-offset][rs] += value;
515  }
516 
517  /*
518  * We also add in the bra-ket transposed value, as a result of the matrix
519  * storage, but we need to make sure we don't duplicate "diagonal" values.
520  * We don't do this if the quantity does not have bra-ket symmetry, like
521  * in the Alpha-Beta TPDM.
522  */
523  if(bucket_map_[r][s] == this_bucket_ && bra_ket_different && have_bra_ket_sym_) {
524  int rs = params_->rowidx[r][s];
525  int pq = params_->colidx[p][q];
526  int offset = bucket_offset_[this_bucket_][rs_sym];
527  if((rs-offset >= params_->rowtot[rs_sym])||(pq >= params_->coltot[pq_sym]))
528  error("MP Params_make: rs, pq", p,q,r,s,rs,pq,rs_sym,pq_sym);
529  file_->matrix[rs_sym][rs-offset][pq] += value;
530  }
531  }
532 
533 private:
534  void error(const char *message, int p, int q, int r, int s,
535  int pq, int rs, int pq_sym, int rs_sym)
536  {
537 
538  outfile->Printf( "\n\tDPD Parameter Error in %s\n", message);
539  outfile->Printf("\t-------------------------------------------------\n");
540  outfile->Printf("\t p q r s [ pq] [ rs] pq_symm rs_symm\n");
541  outfile->Printf("\t%5d %5d %5d %5d [%5d] [%5d] %1d %1d\n", p,q,r,s,
542  pq,rs,pq_sym,rs_sym);
543  throw PsiException("DPD idx failure.", __FILE__, __LINE__);
544  }
545 };
546 
547 class NullFunctor {
548 public:
549  /*
550  * Just an empty functor that will be compiled away (hopefully)
551  */
552  void operator()(int pabs, int qabs, int rabs, int sabs,
553  int psym, int prel, int qsym, int qrel,
554  int rsym, int rrel, int ssym, int srel, double value)
555  {
556  }
557  void operator()(int p, int q, int r, int s, double value)
558  {
559  }
560 };
561 
562 template <class DPDFunctor, class FockFunctor>
563 void iwl_integrals(IWL* iwl, DPDFunctor &dpd, FockFunctor &fock)
564 {
565  Label *lblptr = iwl->labels();
566  Value *valptr = iwl->values();
567  int labelIndex, p, q, r, s;
568  double value;
569  bool lastBuffer;
570  do{
571  lastBuffer = iwl->last_buffer();
572  for(int index = 0; index < iwl->buffer_count(); ++index){
573  labelIndex = 4*index;
574  p = abs((int) lblptr[labelIndex++]);
575  q = (int) lblptr[labelIndex++];
576  r = (int) lblptr[labelIndex++];
577  s = (int) lblptr[labelIndex++];
578  value = (double) valptr[index];
579  dpd(p,q,r,s,value);
580  fock(p,q,r,s,0,0,0,0,0,0,0,0,value);
581  } /* end loop through current buffer */
582  if(!lastBuffer) iwl->fetch();
583  }while(!lastBuffer);
584  iwl->set_keep_flag(1);
585 }
586 
587 } // Namespaces
588 #endif // INTEGRALTRANSFORM_FUNCTORS_H
int bl[8]
Definition: integraltransform_functors.h:48
bool have_bra_ket_sym_
Definition: integraltransform_functors.h:478
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:48
Definition: libdpd/dpd.h:86
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:33
void fetch()
Definition: buf_fetch.cc:39
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:265
double * Fz_
The frozen core operator (stored as a lower triangular array)
Definition: integraltransform_functors.h:46
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:552
int this_bucket_
Definition: integraltransform_functors.h:474
Definition: integraltransform_functors.h:470
#define INDEX(i, j)
Definition: dump_UHF.cc:58
int ** rowidx
Definition: libdpd/dpd.h:63
void rs(int nm, int n, double **array, double *e_vals, int matz, double **e_vecs, double toler)
int * rsym
Definition: libdpd/dpd.h:77
double *** matrix
Definition: libdpd/dpd.h:94
int dl[8]
Definition: integraltransform_functors.h:251
void operator()(int p, int q, int r, int s, double value)
Definition: integraltransform_functors.h:557
Definition: integraltransform_functors.h:232
dpdfile4 * file_
Definition: integraltransform_functors.h:472
dpdparams4 * params_
Definition: integraltransform_functors.h:473
int & last_buffer()
Definition: iwl.hpp:65
int * rowtot
Definition: libdpd/dpd.h:61
const double * D_
The density matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:40
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:563
double bc[MAX_BC][MAX_BC]
Definition: wavefunction.cc:62
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
Definition: integraltransform_functors.h:547
void operator()(int p, int q, int r, int s, double value)
Definition: integraltransform_functors.h:488
Definition: exception.h:53
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:272
int al[8]
Some temporary arrays for handling permutations.
Definition: integraltransform_functors.h:48
int ** colidx
Definition: libdpd/dpd.h:64
int dum
Definition: integraltransform_functors.h:251
int * psym
Definition: libdpd/dpd.h:75
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:78
int * coltot
Definition: libdpd/dpd.h:62
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:44
Definition: libdpd/dpd.h:57
int cl[8]
Definition: integraltransform_functors.h:251
int ** bucket_map_
Definition: integraltransform_functors.h:475
const double * FzD_
The frozen core density matrix (stored as a lower triangular array)
Definition: integraltransform_functors.h:42
int dl[8]
Definition: integraltransform_functors.h:48
dpdparams4 * params
Definition: libdpd/dpd.h:92
DPDFillerFunctor(dpdfile4 *file, int this_bucket, int **bucket_map, int **bucket_offset, bool symmetrize, bool have_bra_ket_sym)
Definition: integraltransform_functors.h:480
int found
Definition: integraltransform_functors.h:251
std::shared_ptr< PsiOutStream > outfile
Definition: core.cc:99
int * qsym
Definition: libdpd/dpd.h:76
double Value
Definition: libiwl/config.h:34
Definition: integraltransform_functors.h:37
int found
Definition: integraltransform_functors.h:48
bool symmetrize_
Definition: integraltransform_functors.h:477
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:65
FrozenCoreAndFockRestrictedFunctor(const double *D, const double *FzD, double *F, double *Fz)
Definition: integraltransform_functors.h:58
Definition: iwl.hpp:37
int ** bucket_offset_
Definition: integraltransform_functors.h:476
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:534
int cl[8]
Definition: integraltransform_functors.h:48