Psi4
jk_independent.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 _jk_independent_h
29 #define _jk_independent_h
30 
31 #include "psi4/psi4-dec.h"
34 
35 #include "psi4/libpsio/psio.hpp"
36 
37 #include <iostream>
38 #include <cstdlib>
39 #include <cstdio>
40 #include <cmath>
41 #include <sstream>
42 
43 #include "psi4/psifiles.h"
44 #include "psi4/libciomr/libciomr.h"
45 #include "psi4/libpsio/psio.h"
46 #include "psi4/libiwl/iwl.h"
47 #include "psi4/libqt/qt.h"
48 
49 #include "psi4/libfock/apps.h"
50 #include "psi4/libfock/jk.h"
51 
52 #include "psi4/libmints/typedefs.h"
53 #include "psi4/libmints/sieve.h"
54 
55 namespace psi {
56 
57  template <class JDriver, class KDriver>
58  class JKIndependent : public JK
59  {
60 
61  protected:
62 
63  JDriver j_driver_;
64  KDriver k_driver_;
65 
66  // true if we need to call j_driver_ for J computation and k_driver_ for K.
67  // if false, then we assume j_driver does everything we need it to
69 
71  virtual bool C1() const { return allow_desymmetrization_; }
73  virtual void preiterations();
75  virtual void compute_JK();
77  virtual void postiterations();
78 
80  void common_init();
81 
82  public:
83  // => Constructors < = //
84 
85  JKIndependent(std::shared_ptr<BasisSet> primary, bool do_separately);
87  virtual ~JKIndependent();
88 
89  // => Accessors <= //
90 
95  virtual void print_header() const;
96 
97  }; // class
98 
99 } // namespace
100 
101 // definitions
102 #include "jk_independent_impl.h"
103 
104 #endif
105 
106 
virtual bool C1() const
Do we need to backtransform to C1 under the hood?
Definition: jk_independent.h:71
bool do_separately_
Definition: jk_independent.h:68
virtual ~JKIndependent()
Destructor.
Definition: jk_independent_impl.h:130
Definition: jk_independent.h:58
virtual void postiterations()
Delete integrals, files, etc.
Definition: jk_independent_impl.h:88
virtual void print_header() const
Definition: jk_independent_impl.h:136
JDriver j_driver_
Definition: jk_independent.h:63
virtual void compute_JK()
Compute J/K for current C/D.
Definition: jk_independent_impl.h:47
bool allow_desymmetrization_
Whether to all desymmetrization, for cases when it&#39;s already been performed elsewhere.
Definition: jk.h:247
Header file for the Quantum Trio LibraryDavid Sherrill 1994.
KDriver k_driver_
Definition: jk_independent.h:64
virtual void preiterations()
Setup integrals, files, etc.
Definition: jk_independent_impl.h:34
void common_init()
Common initialization.
Definition: jk_independent_impl.h:100
Definition: jk.h:228
JKIndependent(std::shared_ptr< BasisSet > primary, bool do_separately)
Definition: jk_independent_impl.h:112