MPQC  3.0.0-alpha
psicc_pt2r12.h
1 //
2 // psicc_pt2r12.h
3 //
4 // Copyright (C) 2002 Edward Valeev
5 //
6 // Author: Edward Valeev <evaleev@vt.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 #ifndef _chemistry_qc_psi_psiccpt2r12_h
29 #define _chemistry_qc_psi_psiccpt2r12_h
30 
31 #include <chemistry/qc/basis/integral.h>
32 #include <chemistry/qc/mbptr12/mbptr12.h>
33 #include <chemistry/qc/psi/psicc.h>
34 
35 namespace sc {
36 
39  class PsiCC_PT2R12 : public PsiCC {
40  Ref<R12IntEval> r12eval_; // the R12 intermediates evaluator
41  Ref<R12WavefunctionWorld> r12world_; // parameters for r12eval_
42  Ref<MP2R12Energy> mp2r12_energy_;
43  bool spinadapted_;
44  bool cabs_singles_;
45  double cabs_singles_energy_;
46  double pccsd_alpha_;
47  double pccsd_beta_;
48  double pccsd_gamma_;
49  protected:
51  static const bool replace_Lambda_with_T_ = true;
54  static const bool need_lambda_ = false;
60  static const unsigned int completeness_order_ = 4;
61 
62  void write_basic_input(int conv);
63 
64  void compute_ept2r12();
65 
66  public:
85  PsiCC_PT2R12(const Ref<KeyVal>&);
87  ~PsiCC_PT2R12();
89 
90  const Ref<R12WavefunctionWorld>& r12world() const { return r12world_; }
91  const Ref<R12IntEval>& r12eval() const { return r12eval_; }
92  // CABS singles contribution to the total energy
93  double cabs_singles_energy();
94 
95  // CCSD_F12 orbital relaxation contribution to 1rdm
96  void compute_onerdm_relax(const Ref<R12EnergyIntermediates>& r12intermediates,
97  RefSCMatrix& Dorbs_alpha,
98  RefSCMatrix& Dorbs_beta);
99 
101  void print(std::ostream&o=ExEnv::out0()) const;
102 
103  void obsolete();
104  };
105 
108  class PsiCCSD_PT2R12 : public PsiCC_PT2R12 {
109  double eccsd_;
110  void write_input(int conv);
111  public:
114  PsiCCSD_PT2R12(const Ref<KeyVal>&);
116  ~PsiCCSD_PT2R12();
117  void save_data_state(StateOut&);
118  void compute();
120  void print(std::ostream&o=ExEnv::out0()) const;
121  };
122 
125  class PsiCCSD_PT2R12T : public PsiCC_PT2R12 {
126  double eccsd_;
127  double e_t_;
128  void write_input(int conv);
129  public:
134  ~PsiCCSD_PT2R12T();
135  void save_data_state(StateOut&);
136  void compute();
138  void print(std::ostream&o=ExEnv::out0()) const;
139  };
140 
143  class PsiCC3_PT2R12 : public PsiCC_PT2R12 {
144  double ecc3_;
145  void write_input(int conv);
146  public:
149  PsiCC3_PT2R12(const Ref<KeyVal>&);
151  ~PsiCC3_PT2R12();
152  void save_data_state(StateOut&);
153  void compute();
155  void print(std::ostream&o=ExEnv::out0()) const;
156  };
157 
158 }
159 
160 #endif /* header guard */
sc::PsiCCSD_PT2R12T::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::PsiCC_PT2R12::completeness_order_
static const unsigned int completeness_order_
default was to include up to 3rd-order terms in the energy (V.T2) current default is to include highe...
Definition: psicc_pt2r12.h:60
sc::PsiCCSD_PT2R12T
PsiCCSD_PT2R12T is a concrete implementation of the method.
Definition: psicc_pt2r12.h:125
sc::PsiCC_PT2R12::print
void print(std::ostream &o=ExEnv::out0()) const
print
sc::PsiCC_PT2R12::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::Ref
A template class that maintains references counts.
Definition: ref.h:361
sc::PsiCCSD_PT2R12::print
void print(std::ostream &o=ExEnv::out0()) const
print
sc::PsiCC3_PT2R12::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::PsiCC_PT2R12
PsiCC_PT2R12 is used to implement methods.
Definition: psicc_pt2r12.h:39
sc::PsiCCSD_PT2R12::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::PsiCC_PT2R12::obsolete
void obsolete()
Marks all results as being out of date.
sc::StateIn
Definition: statein.h:79
sc::PsiCCSD_PT2R12T::print
void print(std::ostream &o=ExEnv::out0()) const
print
sc::PsiCCSD_PT2R12
PsiCCSD_PT2R12 is a concrete implementation of the method.
Definition: psicc_pt2r12.h:108
sc::PsiCC3_PT2R12
PsiCC3_PT2R12 is a concrete implementation of the ground-state method.
Definition: psicc_pt2r12.h:143
sc::PsiCCSD_PT2R12::PsiCCSD_PT2R12
PsiCCSD_PT2R12(const Ref< KeyVal > &)
The KeyVal constructor uses keywords of PsiCC_PT2R12.
sc::PsiCC3_PT2R12::compute
void compute()
Recompute at least the results that have compute true and are not already computed.
sc::PsiCC3_PT2R12::print
void print(std::ostream &o=ExEnv::out0()) const
print
sc::PsiCCSD_PT2R12T::PsiCCSD_PT2R12T
PsiCCSD_PT2R12T(const Ref< KeyVal > &)
The KeyVal constructor uses keywords of PsiCC_PT2R12.
sc::StateOut
Definition: stateout.h:71
sc::PsiCC_PT2R12::write_basic_input
void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
sc::PsiCCSD_PT2R12T::compute
void compute()
Recompute at least the results that have compute true and are not already computed.
sc::PsiCC3_PT2R12::PsiCC3_PT2R12
PsiCC3_PT2R12(const Ref< KeyVal > &)
The KeyVal constructor uses keywords of PsiCC_PT2R12.
sc::PsiCCSD_PT2R12::compute
void compute()
Recompute at least the results that have compute true and are not already computed.
sc::ExEnv::out0
static std::ostream & out0()
Return an ostream that writes from node 0.
sc::PsiCC_PT2R12::need_lambda_
static const bool need_lambda_
EXPERTS-ONLY: if you want to enable TA-based evaluation of higher-order terms turn this on.
Definition: psicc_pt2r12.h:54
sc::PsiCC_PT2R12::PsiCC_PT2R12
PsiCC_PT2R12(const Ref< KeyVal > &)
The KeyVal constructor uses keywords of PsiCC, WavefunctionWorld, and R12WavefunctionWorld,...
sc::PsiCC
PsiCC is a Psi coupled cluster wave function.
Definition: psicc.h:40
sc::PsiCC_PT2R12::replace_Lambda_with_T_
static const bool replace_Lambda_with_T_
set to true to use Ts instead of Lambdas
Definition: psicc_pt2r12.h:51
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14

Generated at Sun Jan 26 2020 23:23:59 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.