[0b990d] | 1 | //
|
---|
| 2 | // mp2r12_energy.h
|
---|
| 3 | //
|
---|
| 4 | // Copyright (C) 2003 Edward Valeev
|
---|
| 5 | //
|
---|
| 6 | // Author: Edward Valeev <edward.valeev@chemistry.gatech.edu>
|
---|
| 7 | // Maintainer: EV
|
---|
| 8 | //
|
---|
| 9 | // This file is part of the SC Toolkit.
|
---|
| 10 | //
|
---|
| 11 | // The SC Toolkit is free software; you can redistribute it and/or modify
|
---|
| 12 | // it under the terms of the GNU Library General Public License as published by
|
---|
| 13 | // the Free Software Foundation; either version 2, or (at your option)
|
---|
| 14 | // any later version.
|
---|
| 15 | //
|
---|
| 16 | // The SC Toolkit 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 Library General Public License for more details.
|
---|
| 20 | //
|
---|
| 21 | // You should have received a copy of the GNU Library General Public License
|
---|
| 22 | // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
|
---|
| 23 | // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 24 | //
|
---|
| 25 | // The U.S. Government is granted a limited license as per AL 91-7.
|
---|
| 26 | //
|
---|
| 27 |
|
---|
| 28 | #ifdef __GNUG__
|
---|
| 29 | #pragma interface
|
---|
| 30 | #endif
|
---|
| 31 |
|
---|
| 32 | #ifndef _chemistry_qc_mbptr12_mp2r12energy_h
|
---|
| 33 | #define _chemistry_qc_mbptr12_mp2r12energy_h
|
---|
| 34 |
|
---|
| 35 | #include <util/ref/ref.h>
|
---|
| 36 | #include <chemistry/qc/mbptr12/linearr12.h>
|
---|
| 37 | //#include <chemistry/qc/mbptr12/vxb_eval.h>
|
---|
| 38 | #include <chemistry/qc/mbptr12/r12int_eval.h>
|
---|
| 39 | #include <chemistry/qc/mbptr12/twobodygrid.h>
|
---|
| 40 |
|
---|
| 41 | namespace sc {
|
---|
| 42 |
|
---|
| 43 | /** Class MP2R12Energy is the object that computes and maintains MP2-R12 energies */
|
---|
| 44 |
|
---|
| 45 | class MP2R12Energy : virtual public SavableState {
|
---|
| 46 |
|
---|
| 47 | Ref<R12IntEval> r12eval_;
|
---|
| 48 | LinearR12::StandardApproximation stdapprox_;
|
---|
| 49 | bool ebc_;
|
---|
| 50 | int debug_;
|
---|
| 51 | bool evaluated_;
|
---|
| 52 |
|
---|
| 53 | RefSCVector er12_aa_, er12_ab_, emp2r12_aa_, emp2r12_ab_;
|
---|
| 54 | // The coefficients are stored ij by kl, where kl is the r12-multiplied pair
|
---|
| 55 | RefSCMatrix Caa_, Cab_;
|
---|
| 56 |
|
---|
| 57 | double emp2tot_aa_() const;
|
---|
| 58 | double emp2tot_ab_() const;
|
---|
| 59 | double er12tot_aa_();
|
---|
| 60 | double er12tot_ab_();
|
---|
| 61 |
|
---|
| 62 | // Initialize SCVectors and SCMatrices
|
---|
| 63 | void init_();
|
---|
| 64 |
|
---|
| 65 | // Computes values of all 2-body products from
|
---|
| 66 | // space1 and space2 if electron 1 is at r1 and
|
---|
| 67 | // electron 2 is at r2. equiv specifies whether electrons
|
---|
| 68 | // are equivalent (same spin) or not
|
---|
| 69 | RefSCVector compute_2body_values_(bool equiv, const Ref<MOIndexSpace>& space1, const Ref<MOIndexSpace>& space2,
|
---|
| 70 | const SCVector3& r1, const SCVector3& r2) const;
|
---|
| 71 |
|
---|
| 72 | public:
|
---|
| 73 |
|
---|
| 74 | MP2R12Energy(StateIn&);
|
---|
| 75 | MP2R12Energy(Ref<R12IntEval>& r12eval, LinearR12::StandardApproximation stdapp, int debug);
|
---|
| 76 | ~MP2R12Energy();
|
---|
| 77 |
|
---|
| 78 | void save_data_state(StateOut&);
|
---|
| 79 | void obsolete();
|
---|
| 80 | void print(std::ostream&o=ExEnv::out0()) const;
|
---|
| 81 | void print_pair_energies(bool spinadapted, std::ostream&so=ExEnv::out0());
|
---|
| 82 |
|
---|
| 83 | Ref<R12IntEval> r12eval() const;
|
---|
| 84 | LinearR12::StandardApproximation stdapp() const;
|
---|
| 85 | /** Returns whether Generalized Brillouin Condition (GBC) was used in evaluation of
|
---|
| 86 | the MP2-R12 intermediates */
|
---|
| 87 | bool gbc() const;
|
---|
| 88 | /** Returns whether Extended Brillouin Condition (EBC) was used in evaluation of
|
---|
| 89 | the MP2-R12 intermediates and the MP2-R12 energy */
|
---|
| 90 | bool ebc() const;
|
---|
| 91 | void set_debug(int debug);
|
---|
| 92 | int get_debug() const;
|
---|
| 93 |
|
---|
| 94 | RefSCDimension dim_aa() const;
|
---|
| 95 | RefSCDimension dim_ab() const;
|
---|
| 96 | RefSCDimension dim_s() const;
|
---|
| 97 | RefSCDimension dim_t() const;
|
---|
| 98 |
|
---|
| 99 | /// Computes the first-order R12 wave function and MP2-R12 energy
|
---|
| 100 | void compute();
|
---|
| 101 | /** Computes the value of the alpha-alpha pair function ij
|
---|
| 102 | when electrons 1 and 2 reside at r1 and r2 */
|
---|
| 103 | double compute_pair_function_aa(int ij, const SCVector3& r1, const SCVector3& r2);
|
---|
| 104 | /** Computes the value of the alpha-beta pair function ij
|
---|
| 105 | when electrons 1 and 2 reside at r1 and r2 */
|
---|
| 106 | double compute_pair_function_ab(int ij, const SCVector3& r1, const SCVector3& r2);
|
---|
| 107 | /** Computes values of the alpha-alpha pair function ij on tbgrid */
|
---|
| 108 | void compute_pair_function_aa(int ij, const Ref<TwoBodyGrid>& tbgrid);
|
---|
| 109 | /** Computes values of the alpha-beta pair function ij on tbgrid */
|
---|
| 110 | void compute_pair_function_ab(int ij, const Ref<TwoBodyGrid>& tbgrid);
|
---|
| 111 |
|
---|
| 112 | /// Returns the vector of MP2 alpha-alpha pair energies
|
---|
| 113 | RefSCVector emp2_aa() const;
|
---|
| 114 | /// Returns the vector of MP2 alpha-beta pair energies
|
---|
| 115 | RefSCVector emp2_ab() const;
|
---|
| 116 | /// Returns the vector of R12 corrections to MP2-R12 alpha-alpha pair energies
|
---|
| 117 | RefSCVector er12_aa() const;
|
---|
| 118 | /// Returns the vector of R12 correction to MP2-R12 alpha-beta pair energies
|
---|
| 119 | RefSCVector er12_ab() const;
|
---|
| 120 | /// Returns the vector of MP2-R12 alpha-alpha pair energies
|
---|
| 121 | RefSCVector emp2r12_aa() const;
|
---|
| 122 | /// Returns the vector of MP2-R12 alpha-beta pair energies
|
---|
| 123 | RefSCVector emp2r12_ab() const;
|
---|
| 124 | /// Returns total MP2-R12 correlation energy
|
---|
| 125 | double energy();
|
---|
| 126 |
|
---|
| 127 | /** Returns the matrix of amplitudes of
|
---|
| 128 | alpha-alpha r12-multiplied occupied orbital pairs in the first-order
|
---|
| 129 | pair function
|
---|
| 130 | */
|
---|
| 131 | RefSCMatrix C_aa();
|
---|
| 132 | /** Returns the matrix of amplitudes of
|
---|
| 133 | alpha-beta r12-multiplied occupied orbital pairs in the first-order
|
---|
| 134 | pair function
|
---|
| 135 | */
|
---|
| 136 | RefSCMatrix C_ab();
|
---|
| 137 | /** Returns the matrix of amplitudes of
|
---|
| 138 | alpha-alpha virtuals orbital pairs in the first-order
|
---|
| 139 | pair function
|
---|
| 140 | */
|
---|
| 141 | RefSCMatrix T2_aa();
|
---|
| 142 | /** Returns the matrix of amplitudes of
|
---|
| 143 | alpha-beta virtuals orbital pairs in the first-order
|
---|
| 144 | pair function
|
---|
| 145 | */
|
---|
| 146 | RefSCMatrix T2_ab();
|
---|
| 147 |
|
---|
| 148 | };
|
---|
| 149 |
|
---|
| 150 | }
|
---|
| 151 |
|
---|
| 152 | #endif
|
---|
| 153 |
|
---|
| 154 | // Local Variables:
|
---|
| 155 | // mode: c++
|
---|
| 156 | // c-file-style: "CLJ"
|
---|
| 157 | // End:
|
---|
| 158 |
|
---|
| 159 |
|
---|