Psi4
pstensor.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 three_index_ps_H
29 #define three_index_ps_H
30 
31 #include "psi4/psi4-dec.h"
32 
33 namespace psi {
34 
35 class PSIO;
36 class BasisSet;
37 class Matrix;
38 class Vector;
39 class IntVector;
40 class Vector3;
41 class PseudospectralInt;
42 class PseudospectralGrid;
43 
45 
46 protected:
50  std::shared_ptr<BasisSet> primary_;
52  std::vector<std::vector<std::vector<double> > > primary_alpha_;
54  std::vector<std::vector<std::vector<double> > > dealias_alpha_;
56  std::shared_ptr<BasisSet> dealias_;
57 
58  // => Parameters <= //
60  double delta_;
62  double beta_;
66  int ncore_;
68  int ndiffuse_;
70  int ncap_;
72  int nl_;
73 
75  void form_primary_alpha();
76  void form_core();
77  void form_diffuse();
78  void form_intercalater();
79  void form_cap();
80  void form_basis();
81 
82 public:
83  DealiasBasisSet(std::shared_ptr<BasisSet> primary_, Options& options);
84  virtual ~DealiasBasisSet();
85 
87  void setDelta(double delta) { delta_ = delta; }
88  void setBeta(double beta) { beta_ = beta; }
89  void setNCore(double n) { ncore_ = n; }
90  void setNCap(double n) { ncap_ = n; }
91  void setNL(double n) { nl_ = n; }
92  void setNIntercalater(double n) { nintercalater_ = n; }
93  void setNDiffuse(double n) { ndiffuse_ = n; }
94 
96  void buildDealiasBasisSet();
97 
99  std::shared_ptr<BasisSet> dealiasSet() const { return dealias_; }
100 };
101 
102 /*- PSTensorII: Range-Separated Pseudospectral Techniques
103  * This class will eventually be refactored to PSTensor
104  * -*/
105 class PSTensorII {
106 
107 protected:
109  int debug_;
111  int print_;
113  unsigned long int memory_;
114 
116  std::shared_ptr<Molecule> molecule_;
118  std::shared_ptr<BasisSet> primary_;
120  std::shared_ptr<BasisSet> dealias_;
122  std::shared_ptr<PseudospectralGrid> grid_;
125 
132 
136  bool do_omega_;
139 
141  double omega_;
145  double alpha_;
146 
148  void buildGrid();
150  void buildDealiasSet();
151 
153  void buildQuadrature();
155  void buildRenormalized();
157  void buildDealiased();
158 
160  void print_header();
162  void common_init();
163 
165  void form_Rpao();
167  void form_Rpmo();
169  void form_Rdao();
171  void form_Rdmo();
172 
174  void form_Spdao();
176  void form_Spdmo();
178  void form_Sddao();
180  void form_Sddoo();
182  void form_Cdd();
183 
185  void form_Q_quadrature();
187  void form_Q_renormalized();
189  void form_Q_dealiased();
190 
192  int nso_;
194  int nmo_;
196  int ndso_;
198  int ndmo_;
199 
201  int naux_;
202 
204  int nfocc_;
206  int nocc_;
208  int naocc_;
210  int nfvir_;
212  int nvir_;
214  int navir_;
215 
217  std::shared_ptr<Vector> w_;
226 
233 
238 
243 
246 
247 public:
248  PSTensorII(std::shared_ptr<BasisSet> primary,
249  SharedMatrix C,
250  int nocc,
251  int nvir,
252  int naocc,
253  int navir,
254  unsigned long int memory,
255  Options& options);
256  ~PSTensorII();
257 
258  SharedMatrix Q();
259  SharedMatrix Qocc();
260  SharedMatrix Qvir();
263 
264  SharedMatrix R();
265  SharedMatrix Rocc();
266  SharedMatrix Rvir();
269 
270  SharedMatrix O();
271 
272  // Begin naive routines for debugging
273  SharedMatrix Aso();
274  SharedMatrix Amo();
275  SharedMatrix Aoo();
276  SharedMatrix Aov();
277  SharedMatrix Avv();
278 
279  SharedMatrix Imo();
282  // End naive routines for debugging
283 };
284 
285 class PSTensor {
286 
287 protected:
288 
290  int debug_;
292  int print_;
293 
295  std::shared_ptr<Molecule> molecule_;
297  std::shared_ptr<BasisSet> primary_;
299  std::shared_ptr<BasisSet> dealias_;
301  std::shared_ptr<PseudospectralGrid> grid_;
304 
311 
316 
318  double omega_;
321 
323  int nso_;
325  int nmo_;
329  int naug_;
330 
332  int nmo2_;
335 
337  int naux_;
338 
340  int nfocc_;
342  int nocc_;
344  int naocc_;
346  int nfvir_;
348  int nvir_;
350  int navir_;
351 
352  void common_init();
353  void print_header();
354  void buildDealiasSet();
355  void buildGrid();
356  void buildR();
357 
358  void form_Spdao();
359  void form_Spdmo();
360 
361  void form_Rpao();
362  void form_Rdao();
363  void form_Rpmo();
364  void form_Rdmo();
365  void form_Ra();
366 
367  void buildQ();
368  void buildQ_renormalized();
369  void buildQ_canonical();
370  void buildQ_quadrature();
371  void form_Cpp();
372  void form_U();
373  void form_Cpd();
374  void form_V();
375  void form_Cdd();
376  void form_W();
377  void form_X();
378  void form_Q();
379  void validate_X();
380 
382  std::shared_ptr<Vector> w_;
383 
388 
393 
404 
408 
413 
414 public:
415 
416  PSTensor(std::shared_ptr<BasisSet> primary,
417  SharedMatrix C,
418  int nocc,
419  int nvir,
420  int naocc,
421  int navir,
422  Options& options,
423  double omega = -1.0);
424  ~PSTensor();
425 
426  SharedMatrix Q();
427  SharedMatrix Qocc();
428  SharedMatrix Qvir();
431 
432  SharedMatrix R();
433  SharedMatrix Rocc();
434  SharedMatrix Rvir();
437 
438  SharedMatrix Aso();
439  SharedMatrix Amo();
440  SharedMatrix Aoo();
441  SharedMatrix Aov();
442  SharedMatrix Avv();
443 
444  SharedMatrix Imo();
446 };
447 
448 
449 // Class to demonstrate pseudospectral techniques
450 // given the current molecule and options.
451 //
452 // "C'mon you apes, you want to live forever?!"
453 //
454 class PseudoTrial {
455 
456 protected:
457 
458  // => Starter stuff <= //
459 
460  // Debug flag
461  int debug_;
462  // Print flag
463  int print_;
464  // options
466  // Molecule
467  std::shared_ptr<Molecule> molecule_;
468 
469  // => Bases/Grids <= //
470 
471  // Dealias or not?
473  // Minimum eigenvalue for a primary basis function
475  // Minimum eigenvalue for a dealias basis function
477  // Primary basis set
478  std::shared_ptr<BasisSet> primary_;
479  // Dealias basis set
480  std::shared_ptr<BasisSet> dealias_;
481  // Pseudospectral grid
482  std::shared_ptr<PseudospectralGrid> grid_;
483  // Number of primary basis functions
484  int nso_;
485  // Number of orthogonalized primary basis functions
486  int nmo_;
487  // Number of dealias basis functions
489  // Number of orthogonalized dealias basis functions
491  // Number of primary + dealias basis functions (raw)
492  int naug_;
493  // Number of primary + dealias basis functions (finished)
494  int naug2_;
495  // Number of grid points
496  int naux_;
497 
498  // => Temps <= //
499 
500  // Raw S matrices
501 
502  // Overlap matrix (primary x primary)
504  // Overlap matrix (primary x dealias)
506  // Overlap matrix (dealias x dealias)
508  // Augmented Overlap matrix (aug x aug)
510 
511  // Orthonormal primary
512 
513  // Overlap matrix (primary x dealias)
515  // Augmented Overlap matrix (aug x aug)
517 
518  // Orthogonal primary - dealias
519 
520  // Overlap matrix (dealias x dealias)
522  // Augmented Overlap matrix (aug x aug) (finished)
524 
525  // Orthonormal primary - dealias
526 
527  // Augmented Overlap matrix (aug' x aug') (finished)
529 
530  // X matrix, primary (primary x primary')
532  // X matrix, dealias (dealias x dealias')
534  // Orthogonalization matrix (dealias x primary')
536 
537  // Collocation matrix (primary)
539  // Collocation matrix (dealias)
541  // Collocation matrix (primary')
543  // Collocation matrix (dealias')
545  // Collocation matrix (augmented')
547 
548  // Weight Vector
549  std::shared_ptr<Vector> w_;
550  // C matrix
552  // Cinv matrix
554  // Full Q matrix
556  // Full Q matrix
558  // Projector matrix
560  // Transformer matrix
562 
563  // => Targets <= //
564 
565  // Q_m^P
567  // R_n^P
569  // A_ls^P
571  // QR_mn^P
573 
574  // => Final Targets <= //
575 
576  // AO basis (mn|ls) tensor (exact)
578  // AO basis (mn|ls) tensor (PS)
580 
581  // => Helpers <= //
582 
583  // Build everything
584  void common_init();
585  void print_header();
586 
587  void form_molecule();
588  void form_bases();
589  void form_grid();
590 
591  void form_Spp();
592  void form_Spd();
593  void form_Sdd();
594 
595  void form_Sa();
596  void form_Sa3();
597  void form_Sa4();
598  void form_Sa2();
599 
600  void form_Xpp();
601  void form_Spd3();
602  void form_Cdp();
603  void form_Sdd4();
604  void form_Xdd();
605 
606  void form_Rp();
607  void form_Rd();
608  void form_Rp2();
609  void form_Rd2();
610  void form_Ra();
611 
612  void form_Q();
613  void form_P();
614  void form_SX();
615  void form_A();
616 
617  void form_I();
618  void form_Ips();
619  void verify();
620 
621 public:
622 
623  PseudoTrial();
624  ~PseudoTrial();
625 
626  SharedMatrix getI() const;
627  SharedMatrix getIPS() const;
628 
629  SharedMatrix getQ() const;
630  SharedMatrix getR() const;
631  SharedMatrix getA() const;
632 
633 };
634 
635 }
636 #endif
void form_diffuse()
Definition: dealias.cc:161
int debug_
Debug level.
Definition: pstensor.h:109
void form_Q()
Definition: pstensor.cc:1470
void form_Rpmo()
Build the primary MO collocation matrix.
Definition: pstensor.cc:732
bool do_dealias_
Dealias or not?
Definition: pstensor.h:134
SharedMatrix Q_
Definition: pstensor.h:566
SharedMatrix R()
Definition: pstensor.cc:456
std::shared_ptr< Vector > w_
Grid weights (hopefully SPD)
Definition: pstensor.h:217
SharedMatrix Sa_
Definition: pstensor.h:509
void form_basis()
Definition: dealias.cc:212
int nso_
Primary AO functions.
Definition: pstensor.h:192
SharedMatrix Caocc_
Active occupied C Matrix (for convenience)
Definition: pstensor.h:129
void form_Spdao()
Build the Primary AO x Dealias AO overlap matrix.
Definition: pstensor.cc:770
SharedMatrix Cinv_
Definition: pstensor.h:553
Options & options_
options reference
Definition: pstensor.h:303
void form_W()
Definition: pstensor.cc:1366
SharedMatrix Imo()
Definition: pstensor.cc:622
void buildQ_quadrature()
Definition: pstensor.cc:1213
void form_grid()
Definition: pseudotrial.cc:189
void form_A()
Definition: pseudotrial.cc:700
double alpha_
Alpha value in rotated fitting. 1.0 is conventional.
Definition: pstensor.h:145
SharedMatrix Ra_
Finished augmented collocation matrix (naug x naux)
Definition: pstensor.h:403
void form_Rd2()
Definition: pseudotrial.cc:563
double min_S_dealias_
Minimum eigenvalue of a function to keep in the dealias basis.
Definition: pstensor.h:143
SharedMatrix Raocc()
Definition: pstensor.cc:470
void form_Xpp()
Definition: pseudotrial.cc:281
int nmo_
Primary MO functions.
Definition: pstensor.h:194
SharedMatrix getIPS() const
Definition: pseudotrial.cc:776
void buildDealiasBasisSet()
Master build routine.
Definition: dealias.cc:66
void setNDiffuse(double n)
Definition: pstensor.h:93
SharedMatrix C_
Definition: pstensor.h:551
SharedMatrix Avv()
Definition: pstensor.cc:1665
void form_Rdmo()
Definition: pstensor.cc:1093
SharedMatrix Qmo_
Target Q tensor (nmo x naux)
Definition: pstensor.h:385
SharedMatrix Rpmo_
Primary MO collocation matrix.
Definition: pstensor.h:221
DealiasBasisSet(std::shared_ptr< BasisSet > primary_, Options &options)
Definition: dealias.cc:48
void setDelta(double delta)
Parameter entry.
Definition: pstensor.h:87
double min_S_dealias_
Definition: pstensor.h:476
SharedMatrix Rdmo_
Dealias MO collocation matrix.
Definition: pstensor.h:225
Options & options_
Definition: pstensor.h:465
int nvir_
Total number of virtuals.
Definition: pstensor.h:348
bool do_renormalize_
Renormalize or not? False implies do_dealias_ = false.
Definition: pstensor.h:138
int ndealias2_
Number of dealias functions felt by the grid.
Definition: pstensor.h:334
void form_Rpao()
Definition: pstensor.cc:1028
void common_init()
Definition: pseudotrial.cc:83
void form_Cdd()
Definition: pstensor.cc:1336
Options & options_
The options object.
Definition: pstensor.h:48
SharedMatrix Rpao_
AO primary collocation matrix (primary x naux)
Definition: pstensor.h:395
void buildQ_canonical()
Definition: pstensor.cc:1142
SharedMatrix Cdp_
Definition: pstensor.h:535
SharedMatrix X_
Definition: pstensor.h:412
int nfocc_
Number of frozen occupieds.
Definition: pstensor.h:204
int print_
Print level.
Definition: pstensor.h:292
SharedMatrix Sdd4_
Definition: pstensor.h:521
std::shared_ptr< Molecule > molecule_
Molecule (for convenience)
Definition: pstensor.h:116
SharedMatrix Sa3_
Definition: pstensor.h:516
int nvir_
Total number of virtuals.
Definition: pstensor.h:212
SharedMatrix Aoo()
Definition: pstensor.cc:529
std::shared_ptr< PseudospectralGrid > grid_
Pseudospectral grid.
Definition: pstensor.h:301
void buildGrid()
Definition: pstensor.cc:971
void print_header()
Print header, including algorithms to use.
Definition: pstensor.cc:159
double delta_
Base for core and diffuse functions (~2)
Definition: pstensor.h:60
SharedMatrix Spdmo_
Primary MO x Dealias AO overlap matrix.
Definition: pstensor.h:235
SharedMatrix Aso()
Definition: pstensor.cc:500
void form_Ra()
Definition: pseudotrial.cc:590
SharedMatrix Qfull_
Definition: pstensor.h:555
SharedMatrix Cdd_
Definition: pstensor.h:407
SharedMatrix Cdd_
Dealias Orthogonalization matrix.
Definition: pstensor.h:237
SharedMatrix getI() const
Definition: pseudotrial.cc:775
int naocc_
Number of active occupieds.
Definition: pstensor.h:344
SharedMatrix Qavir()
Definition: pstensor.cc:446
SharedMatrix W_
Definition: pstensor.h:411
SharedMatrix Spd3_
Definition: pstensor.h:514
int ncap_
Number of cap functions (~1)
Definition: pstensor.h:70
SharedMatrix U_
Definition: pstensor.h:409
double omega_
Omega to use for low-pass smoothing.
Definition: pstensor.h:318
SharedMatrix Rp_
Definition: pstensor.h:538
std::shared_ptr< PseudospectralGrid > grid_
Definition: pstensor.h:482
SharedMatrix SX_
Definition: pstensor.h:561
int naug_
Definition: pstensor.h:492
int nintercalater_
Number of intercalaters per window (~1)
Definition: pstensor.h:64
int nmo_
Definition: pstensor.h:486
void buildQ()
Definition: pstensor.cc:1122
SharedMatrix Qaocc()
Definition: pstensor.cc:426
void form_Q_dealiased()
Build the Q R pair from dealiased renormalization.
Definition: pstensor.cc:318
SharedMatrix Aso()
Definition: pstensor.cc:1589
void form_molecule()
Definition: pseudotrial.cc:149
int ndmo_
Dealias MO functions.
Definition: pstensor.h:198
SharedMatrix C_
Full C matrix (must provide orthonormal MO basis)
Definition: pstensor.h:306
SharedMatrix Rpmo_
MO primary collocation matrix (primary&#39; x naux)
Definition: pstensor.h:399
SharedMatrix O()
Definition: pstensor.cc:380
~PseudoTrial()
Definition: pseudotrial.cc:79
void form_Spdmo()
Build the Primary MO x Dealias AO overlap matrix.
Definition: pstensor.cc:781
std::shared_ptr< Vector > w_
Definition: pstensor.h:549
SharedMatrix Qmo_
Target Q tensor (nmo x naux)
Definition: pstensor.h:240
void form_I()
Definition: pseudotrial.cc:727
void buildQ_renormalized()
Definition: pstensor.cc:1180
SharedMatrix Rvir()
Definition: pstensor.cc:480
SharedMatrix Qaocc()
Definition: pstensor.cc:1515
bool use_omega_
Use omega integrals or not?
Definition: pstensor.h:320
void validate_X()
Definition: pstensor.cc:1433
int ndealias_
Definition: pstensor.h:488
void buildDealiasSet()
Build the BasisSet dealias_.
Definition: pstensor.cc:203
int naug2_
Definition: pstensor.h:494
void form_Cpd()
Definition: pstensor.cc:1292
std::shared_ptr< BasisSet > primary_
Primary basis set.
Definition: pstensor.h:118
std::shared_ptr< BasisSet > primary_
Definition: pstensor.h:478
void form_Cdp()
Definition: pseudotrial.cc:324
SharedMatrix T_
Definition: pstensor.h:572
void form_Sa3()
Definition: pseudotrial.cc:414
PseudoTrial()
Definition: pseudotrial.cc:73
int naux_
Number of grid points.
Definition: pstensor.h:337
void buildQuadrature()
Build using the naive, nondealiased quadrature algorithm.
Definition: pstensor.cc:128
SharedMatrix Imo()
Definition: pstensor.cc:1711
void form_primary_alpha()
Helper functions.
Definition: dealias.cc:76
Definition: pstensor.h:44
double min_S_primary_
Minimum eigenvalue to keep in the primary basis.
Definition: pstensor.h:313
SharedMatrix Rd_
Definition: pstensor.h:540
int nl_
Number of higher cardinal numbers to cap with.
Definition: pstensor.h:72
Options & options_
options reference
Definition: pstensor.h:124
SharedMatrix Q()
Definition: pstensor.cc:1501
void form_X()
Definition: pstensor.cc:1407
SharedMatrix Rdmo_
MO dealias collocation matrix (dealias x naux)
Definition: pstensor.h:401
SharedMatrix Ra_
Definition: pstensor.h:546
int print_
Definition: pstensor.h:463
std::shared_ptr< Molecule > molecule_
Molecule (fo convenience)
Definition: pstensor.h:295
SharedMatrix R_
Definition: pstensor.h:568
double min_S_dealias_
Minimum eigenvalue to keep in the dealias basis.
Definition: pstensor.h:315
void form_Cdd()
Build the Dealias orthonormalization matrix.
Definition: pstensor.cc:817
int navir_
Number of active virtuals.
Definition: pstensor.h:214
void form_cap()
Definition: dealias.cc:179
int nfocc_
Number of frozen occupieds.
Definition: pstensor.h:340
SharedMatrix Ipsmo()
Definition: pstensor.cc:1716
SharedMatrix I_
Definition: pstensor.h:577
std::shared_ptr< BasisSet > dealias_
Dealias basis set.
Definition: pstensor.h:299
SharedMatrix P_
Definition: pstensor.h:559
void form_Xdd()
Definition: pseudotrial.cc:339
void form_Sddao()
Build the Dealias AO x Dealias AO overlap matrix.
Definition: pstensor.cc:795
void form_Sa2()
Definition: pseudotrial.cc:465
std::shared_ptr< Molecule > molecule_
Definition: pstensor.h:467
SharedMatrix Raocc()
Definition: pstensor.cc:1559
SharedMatrix Sddoo_
Dealias OO x Dealias OO overlap matrix.
Definition: pstensor.h:232
unsigned long int memory_
Memory available to this algorithm, in doubles.
Definition: pstensor.h:113
SharedMatrix Spdao_
Primary AO x Dealias MO overlap matrix.
Definition: pstensor.h:228
void buildGrid()
Build the PseudospectralGrid grid_.
Definition: pstensor.cc:187
SharedMatrix Ips_
Definition: pstensor.h:579
void common_init()
Definition: pstensor.cc:874
int navir_
Number of active virtuals.
Definition: pstensor.h:350
SharedMatrix Rd2_
Definition: pstensor.h:544
void form_Spdmo()
Definition: pstensor.cc:1014
SharedMatrix Cpp_
Definition: pstensor.h:405
SharedMatrix Xpp_
Definition: pstensor.h:531
SharedMatrix Qavir()
Definition: pstensor.cc:1535
void buildDealiasSet()
Definition: pstensor.cc:938
SharedMatrix Qvir()
Definition: pstensor.cc:436
SharedMatrix Rocc()
Definition: pstensor.cc:1549
SharedMatrix O_
Possible target O tensor (naux x naux)
Definition: pstensor.h:245
SharedMatrix Sa4_
Definition: pstensor.h:523
int nocc_
Total number of occupieds.
Definition: pstensor.h:342
void form_Q_renormalized()
Build the Q R pair from renormalization.
Definition: pstensor.cc:261
void form_Rpmo()
Definition: pstensor.cc:1078
void form_Sdd4()
Definition: pseudotrial.cc:264
SharedMatrix C_
Full C matrix (must provide orthonormal MO basis)
Definition: pstensor.h:127
SharedMatrix Aov()
Definition: pstensor.cc:552
int ndso_
Dealias AO functions.
Definition: pstensor.h:196
SharedMatrix Q()
Definition: pstensor.cc:412
std::shared_ptr< BasisSet > dealias_
Dealias basis set.
Definition: pstensor.h:120
Definition: pstensor.h:285
void form_Sdd()
Definition: pseudotrial.cc:237
void form_Q()
Definition: pseudotrial.cc:610
int nfvir_
Number of frozen virtuals.
Definition: pstensor.h:210
std::shared_ptr< BasisSet > primary_
Primary basis set.
Definition: pstensor.h:297
SharedMatrix Amo()
Definition: pstensor.cc:599
SharedMatrix Qmo_
Definition: pstensor.h:557
int naug_
nmo_ + ndealias_
Definition: pstensor.h:329
void form_Sa4()
Definition: pseudotrial.cc:442
SharedMatrix Qocc()
Definition: pstensor.cc:1505
virtual ~DealiasBasisSet()
Definition: dealias.cc:62
void form_Rp()
Definition: pseudotrial.cc:489
void print_header()
Definition: pseudotrial.cc:137
Definition: liboptions.h:359
Definition: pstensor.h:105
void form_Rp2()
Definition: pseudotrial.cc:548
std::vector< std::vector< std::vector< double > > > primary_alpha_
The effective alphas of the primary set [center][am][index].
Definition: pstensor.h:52
SharedMatrix Rp2_
Definition: pstensor.h:542
SharedMatrix V_
Definition: pstensor.h:410
SharedMatrix Sa2_
Definition: pstensor.h:528
SharedMatrix Idpsmo()
Definition: pstensor.cc:651
PSTensor(std::shared_ptr< BasisSet > primary, SharedMatrix C, int nocc, int nvir, int naocc, int navir, Options &options, double omega=-1.0)
Definition: pstensor.cc:858
std::shared_ptr< PseudospectralGrid > grid_
Pseudospectral grid.
Definition: pstensor.h:122
SharedMatrix Cpd_
Definition: pstensor.h:406
void form_U()
Definition: pstensor.cc:1253
int nfvir_
Number of frozen virtuals.
Definition: pstensor.h:346
SharedMatrix Rpao_
Primary AO collocation matrix.
Definition: pstensor.h:219
void form_Rpao()
Build the primary AO collocation matrix.
Definition: pstensor.cc:682
SharedMatrix A_
Definition: pstensor.h:570
SharedMatrix Rmo_
Target R tensor (nmo x naux)
Definition: pstensor.h:387
void print_header()
Definition: pstensor.cc:928
int nso_
Definition: pstensor.h:484
SharedMatrix Avv()
Definition: pstensor.cc:576
SharedMatrix getR() const
Definition: pseudotrial.cc:779
void setBeta(double beta)
Definition: pstensor.h:88
void form_Ips()
Definition: pseudotrial.cc:734
SharedMatrix Ravir()
Definition: pstensor.cc:490
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:50
void form_Spp()
Definition: pseudotrial.cc:211
int nmo2_
Number of primary functions felt by the grid.
Definition: pstensor.h:332
void form_V()
Definition: pstensor.cc:1327
std::shared_ptr< BasisSet > primary_
The primary basis set.
Definition: pstensor.h:50
void buildDealiased()
Build using the renormalized, dealiased algorithm.
Definition: pstensor.cc:142
int debug_
Debug level.
Definition: pstensor.h:290
SharedMatrix Aoo()
Definition: pstensor.cc:1618
SharedMatrix Rmo_
Target R tensor (nmo x naux)
Definition: pstensor.h:242
int delta(const int i, const int j)
Definition: bend.cc:175
void form_Rd()
Definition: pseudotrial.cc:517
int nmo_
Number of MO primary functions.
Definition: pstensor.h:325
void verify()
Definition: pseudotrial.cc:762
void buildR()
Definition: pstensor.cc:990
void form_intercalater()
Definition: dealias.cc:140
std::shared_ptr< Vector > w_
Grid weights (hopefully SPD)
Definition: pstensor.h:382
SharedMatrix Ipsmo()
Definition: pstensor.cc:627
void form_Q_quadrature()
Build the Q R pair from quadrature.
Definition: pstensor.cc:232
int ndealias_
Number of AO dealias functions.
Definition: pstensor.h:327
SharedMatrix Spdao_
AO-basis overlap (nso x dealias)
Definition: pstensor.h:390
SharedMatrix Spp_
Definition: pstensor.h:503
std::shared_ptr< BasisSet > dealias_
Definition: pstensor.h:480
SharedMatrix Sddao_
Dealias AO x Dealias AO overlap matrix.
Definition: pstensor.h:230
void form_Spd3()
Definition: pseudotrial.cc:251
void form_core()
Definition: dealias.cc:122
SharedMatrix Rdao_
Dealias AO collocation matrix.
Definition: pstensor.h:223
int print_
Print level.
Definition: pstensor.h:111
void form_Rdmo()
Build the dealias MO collocation matrix.
Definition: pstensor.cc:746
void setNCore(double n)
Definition: pstensor.h:89
std::shared_ptr< BasisSet > dealias_
The resultant dealias set.
Definition: pstensor.h:56
SharedMatrix Rdao_
AO dealias collocation matrix (dealias x naux)
Definition: pstensor.h:397
void buildRenormalized()
Build using the renormalized, nondealiased algorithm.
Definition: pstensor.cc:135
~PSTensor()
Definition: pstensor.cc:871
SharedMatrix Xdd_
Definition: pstensor.h:533
void form_Spdao()
Definition: pstensor.cc:1003
double beta_
Base for even-tempered cap functions (~3.5)
Definition: pstensor.h:62
SharedMatrix Ravir()
Definition: pstensor.cc:1579
int naocc_
Number of active occupieds.
Definition: pstensor.h:208
void form_Sa()
Definition: pseudotrial.cc:386
int ncore_
Number of core functions per block (~1)
Definition: pstensor.h:66
void form_bases()
Definition: pseudotrial.cc:155
std::shared_ptr< BasisSet > dealiasSet() const
Convenience routine.
Definition: pstensor.h:99
int ndealias2_
Definition: pstensor.h:490
void form_Spd()
Definition: pseudotrial.cc:223
bool do_dealias_
Definition: pstensor.h:472
void form_Ra()
Definition: pstensor.cc:1108
SharedMatrix Amo()
Definition: pstensor.cc:1688
void form_Sddoo()
Build the Dealias OO x Dealias OO overlap matrix.
Definition: pstensor.cc:806
SharedMatrix Aov()
Definition: pstensor.cc:1641
int debug_
Definition: pstensor.h:461
SharedMatrix Cavir_
Active virtual C Matrix (for convenience)
Definition: pstensor.h:310
bool do_omega_
Omega or not?
Definition: pstensor.h:136
SharedMatrix Caocc_
Active occupied C Matrix (for convenience)
Definition: pstensor.h:308
PSTensorII(std::shared_ptr< BasisSet > primary, SharedMatrix C, int nocc, int nvir, int naocc, int navir, unsigned long int memory, Options &options)
Definition: pstensor.cc:56
SharedMatrix Sdd_
Definition: pstensor.h:507
SharedMatrix Spdmo_
Overlap matrix (nmo x dealias)
Definition: pstensor.h:392
~PSTensorII()
Definition: pstensor.cc:69
int ndiffuse_
Number of diffuse functions per block (~1)
Definition: pstensor.h:68
void setNCap(double n)
Definition: pstensor.h:90
SharedMatrix R()
Definition: pstensor.cc:1545
SharedMatrix getQ() const
Definition: pseudotrial.cc:778
SharedMatrix getA() const
Definition: pseudotrial.cc:780
std::vector< std::vector< std::vector< double > > > dealias_alpha_
The alphas of the dealias set [center][am][index].
Definition: pstensor.h:54
void form_SX()
Definition: pseudotrial.cc:686
SharedMatrix Qvir()
Definition: pstensor.cc:1525
double omega_
Omega value to use.
Definition: pstensor.h:141
void setNL(double n)
Definition: pstensor.h:91
SharedMatrix Rvir()
Definition: pstensor.cc:1569
SharedMatrix Rocc()
Definition: pstensor.cc:460
Definition: pstensor.h:454
double min_S_primary_
Definition: pstensor.h:474
void form_Rdao()
Build the dealias AO collocation matrix.
Definition: pstensor.cc:707
SharedMatrix Spd_
Definition: pstensor.h:505
int nso_
Number of AO primary functions.
Definition: pstensor.h:323
void setNIntercalater(double n)
Definition: pstensor.h:92
void form_Rdao()
Definition: pstensor.cc:1053
void form_P()
Definition: pseudotrial.cc:668
SharedMatrix Qocc()
Definition: pstensor.cc:416
void form_Cpp()
Definition: pstensor.cc:1233
int naux_
Definition: pstensor.h:496
void common_init()
Initialize, build R and Q.
Definition: pstensor.cc:72
int naux_
Number of grid points.
Definition: pstensor.h:201
int nocc_
Total number of occupieds.
Definition: pstensor.h:206
SharedMatrix Cavir_
Active virtual C Matrix (for convenience)
Definition: pstensor.h:131