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