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