MPQC 2.3.1
mbptr12.h
1//
2// mbptr12.h
3//
4// Copyright (C) 2001 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#ifndef _chemistry_qc_mbptr12_mbptr12_h
29#define _chemistry_qc_mbptr12_mbptr12_h
30
31#ifdef __GNUC__
32#pragma interface
33#endif
34
35#include <string>
36#include <util/misc/compute.h>
37#include <util/group/memory.h>
38#include <util/group/message.h>
39#include <util/group/thread.h>
40#include <chemistry/qc/basis/obint.h>
41#include <chemistry/qc/basis/tbint.h>
42#include <chemistry/qc/scf/scf.h>
43#include <chemistry/qc/mbpt/mbpt.h>
44#include <chemistry/qc/mbptr12/linearr12.h>
45//#include <chemistry/qc/mbptr12/vxb_eval.h>
46#include <chemistry/qc/mbptr12/r12int_eval.h>
47#include <chemistry/qc/mbptr12/vxb_eval_info.h>
48#include <chemistry/qc/mbptr12/mp2r12_energy.h>
49#include <chemistry/qc/mbptr12/twobodygrid.h>
50
51namespace sc {
52
53// //////////////////////////////////////////////////////////////////////////
54
55class R12IntEval;
56class R12IntEvalInfo;
57class MP2R12Energy;
58
61class MBPT2_R12: public MBPT2 {
62
63 Ref<R12IntEval> r12eval_; // the R12 intermediates evaluator
64
67 Ref<MP2R12Energy> r12a_energy_;
68 Ref<MP2R12Energy> r12ap_energy_;
69 Ref<MP2R12Energy> r12b_energy_;
70
71 Ref<GaussianBasisSet> aux_basis_; // This is the auxiliary basis set (ABS)
72 Ref<GaussianBasisSet> vir_basis_; // This is the virtuals basis set (VBS)
73 Ref<SCVector> epair_0_, epair_1_; // Singlet/triplet pair energies if spin-adapted
74 // Alpha-beta/alpha-alpha pair energies if spin-orbital
75
76 Ref<TwoBodyGrid> twopdm_grid_aa_; // The set of 2 particle positions on which to compute values of alpha-alpha 2-PDM
77 Ref<TwoBodyGrid> twopdm_grid_ab_; // The set of 2 particle positions on which to compute values of alpha-beta 2-PDM
78
79#define ref_to_mp2r12_acc_ 100.0
80
81 double mp2_corr_energy_;
82 double r12_corr_energy_;
83 LinearR12::StandardApproximation stdapprox_;
84 LinearR12::ABSMethod abs_method_;
85 R12IntEvalInfo::StoreMethod r12ints_method_;
86 std::string r12ints_file_;
87 bool gbc_;
88 bool ebc_;
89 bool spinadapted_;
90 bool include_mp1_;
91
92 void init_variables_();
93
94 // This checks if the integral factory is suitable for R12 calculations
95 void check_integral_factory_();
96
97 // calculate the MP2-R12 energy in std approximations A and A'
98 void compute_energy_a_();
99
100 protected:
101 // implement the Compute::compute() function,
102 // overrides MBPT2::compute()
103 void compute();
104
105 public:
220 ~MBPT2_R12();
221
223
224 Ref<GaussianBasisSet> aux_basis() const;
225 Ref<GaussianBasisSet> vir_basis() const;
226 bool gbc() const;
227 bool ebc() const;
228 LinearR12::ABSMethod abs_method() const;
229 LinearR12::StandardApproximation stdapprox() const;
230 bool spinadapted() const;
231 R12IntEvalInfo::StoreMethod r12ints_method() const;
232 const std::string& r12ints_file() const;
233
234 double corr_energy();
235 double r12_corr_energy();
236
238
239 void obsolete();
240 int gradient_implemented() const;
241 int value_implemented() const;
242
243 void print(std::ostream&o=ExEnv::out0()) const;
244};
245
246}
247
248#endif
249
250// Local Variables:
251// mode: c++
252// c-file-style: "CLJ"
253// End:
static std::ostream & out0()
Return an ostream that writes from node 0.
The MBPT2_R12 class implements several linear R12 second-order perturbation theory methods.
Definition: mbptr12.h:61
MBPT2_R12(const Ref< KeyVal > &)
The KeyVal constructor.
void compute()
Recompute at least the results that have compute true and are not already computed.
int value_implemented() const
Information about the availability of values, gradients, and hessians.
RefSymmSCMatrix density()
Returns the SO density.
void obsolete()
Marks all results as being out of date.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void print(std::ostream &o=ExEnv::out0()) const
Print information about the object.
The MBPT2 class implements several second-order perturbation theory methods.
Definition: mbpt.h:48
StoreMethod
Describes the method of storing transformed MO integrals. See MBPT2_R12.
Definition: vxb_eval_info.h:58
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:261
A template class that maintains references counts.
Definition: ref.h:332
Restores objects that derive from SavableState.
Definition: statein.h:70
Serializes objects that derive from SavableState.
Definition: stateout.h:61

Generated at Thu Jul 20 2023 00:00:00 for MPQC 2.3.1 using the documentation package Doxygen 1.9.6.