MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
mbptr12.h
1//
2// mbptr12.h
3//
4// Copyright (C) 2001 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_mbptr12_mbptr12_h
29#define _chemistry_qc_mbptr12_mbptr12_h
30
31#include <string>
32#include <util/misc/compute.h>
33#include <util/group/memory.h>
34#include <util/group/message.h>
35#include <util/group/thread.h>
36#include <chemistry/qc/basis/obint.h>
37#include <chemistry/qc/basis/tbint.h>
38#include <chemistry/qc/scf/scf.h>
39#include <chemistry/qc/mbpt/mbpt.h>
40#include <chemistry/qc/mbptr12/r12int_eval.h>
41#include <chemistry/qc/mbptr12/r12wfnworld.h>
42#include <chemistry/qc/mbptr12/mp2r12_energy.h>
43#include <chemistry/qc/mbptr12/twobodygrid.h>
44
45namespace sc {
46
47// //////////////////////////////////////////////////////////////////////////
48
49class R12IntEval;
50class R12WavefunctionWorld;
51class MP2R12Energy;
52
55class MBPT2_R12: public MBPT2 {
56
57 Ref<R12IntEval> r12eval_; // the R12 intermediates evaluator
58 Ref<R12WavefunctionWorld> r12world_; // parameters for r12eval_
59
62 Ref<MP2R12Energy> r12a_energy_;
63 Ref<MP2R12Energy> r12ap_energy_;
64 Ref<MP2R12Energy> r12app_energy_;
65 Ref<MP2R12Energy> r12b_energy_;
66 Ref<MP2R12Energy> r12c_energy_;
67
68 Ref<TwoBodyGrid> twopdm_grid_; // The set of 2 particle positions on which to compute values of pair function
69 unsigned int plot_pair_function_[2];// Which pair function to plot
70
71 static double ref_to_mp2r12_acc() { return 0.01; }
72
73 double mp2_corr_energy_;
74
75 bool cabs_singles_;
76 double cabs_singles_energy_;
77
78 std::string occ_orbs_;
79 std::string uocc_orbs_;
80 double uocc_orbs_pno_truncate_threshold_;
81
82 int gf2_orbital_; // orbital index to use for Green's function calcs, -1 = HOMO, +1 = LUMO, 0 = skip GF2
83
84 // calculate the MP2-R12 energy (or energies, depending on which approximation is chosen)
85 void compute_energy_();
86
95 std::vector< std::pair<RefSCMatrix,RefSCMatrix> >
96 mp1_pno(SpinCase2 spin,
97 bool deflate_geminal,
98 double truncate_threshold = 1e-8);
99
100 protected:
101 // implement the Compute::compute() function,
102 // overrides MBPT2::compute()
103 void compute();
104
105 public:
131 ~MBPT2_R12();
132
134
135 const Ref<R12WavefunctionWorld>& r12world() const { return r12world_; }
136 const Ref<R12IntEval>& r12eval() const { return r12eval_; }
139
141 double corr_energy();
146
148
149 void obsolete();
151 int value_implemented() const;
153
154 void print(std::ostream&o=ExEnv::out0()) const;
155};
156
157}
158
159#endif
160
161// Local Variables:
162// mode: c++
163// c-file-style: "CLJ"
164// End:
static std::ostream & out0()
Return an ostream that writes from node 0.
The MBPT2_R12 class implements several R12 second-order Moeller-Plesset perturbation theory methods.
Definition mbptr12.h:55
MBPT2_R12(const Ref< KeyVal > &)
The KeyVal constructor uses keywords of MBPT2, WavefunctionWorld, and R12WavefunctionWorld,...
void compute()
Recompute at least the results that have compute true and are not already computed.
int value_implemented() const
RefSymmSCMatrix density()
Returns the SO density.
void obsolete()
Marks all results as being out of date.
double cabs_singles_energy()
CABS singles contribution to the total energy.
double corr_energy()
total MBPT(2)-R12 energy (does not include CABS singles)
bool analytic_gradient_implemented() const
must overload this in a derived class if analytic gradient can be computed
void corrfactor(const Ref< R12Technology::CorrelationFactor > &)
this changes the correlation factor
double r12_corr_energy()
R12 doubles contribution to the MBPT(2)-R12 energy.
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.
void set_desired_value_accuracy(double acc)
set the value accuracy
The MBPT2 class implements several second-order perturbation theory methods.
Definition mbpt.h:44
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition matrix.h:265
A template class that maintains references counts.
Definition ref.h:361
Restores fundamental and user-defined types from images created with StateOut.
Definition statein.h:79
Serializes fundamental and user-defined types.
Definition stateout.h:71
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

Generated at Wed Sep 25 2024 02:45:29 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.