41
42
#include <chemistry/qc/scf/scf.h>
42
43
#include <chemistry/qc/mbpt/mbpt.h>
43
44
#include <chemistry/qc/mbptr12/linearr12.h>
44
#include <chemistry/qc/mbptr12/vxb_eval.h>
45
//#include <chemistry/qc/mbptr12/vxb_eval.h>
46
#include <chemistry/qc/mbptr12/r12int_eval.h>
45
47
#include <chemistry/qc/mbptr12/vxb_eval_info.h>
46
48
#include <chemistry/qc/mbptr12/mp2r12_energy.h>
49
#include <chemistry/qc/mbptr12/twobodygrid.h>
65
68
Ref<MP2R12Energy> r12ap_energy_;
66
69
Ref<MP2R12Energy> r12b_energy_;
68
Ref<GaussianBasisSet> aux_basis_;
71
Ref<GaussianBasisSet> aux_basis_; // This is the auxiliary basis set (ABS)
72
Ref<GaussianBasisSet> vir_basis_; // This is the virtuals basis set (VBS)
69
73
Ref<SCVector> epair_0_, epair_1_; // Singlet/triplet pair energies if spin-adapted
70
74
// Alpha-beta/alpha-alpha pair energies if spin-orbital
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
72
79
#define ref_to_mp2r12_acc_ 100.0
74
81
double mp2_corr_energy_;
75
82
double r12_corr_energy_;
76
83
LinearR12::StandardApproximation stdapprox_;
84
LinearR12::ABSMethod abs_method_;
77
85
R12IntEvalInfo::StoreMethod r12ints_method_;
86
std::string r12ints_file_;
81
92
void init_variables_();
83
94
// This checks if the integral factory is suitable for R12 calculations
84
95
void check_integral_factory_();
86
/* calculate the MP2-R12 energy in std approximations A and A' */
97
// calculate the MP2-R12 energy in std approximations A and A'
87
98
void compute_energy_a_();
96
107
/** The KeyVal constructor.
110
<dt><tt>gbc</tt><dd> This boolean specifies whether Generalized Brillouin
111
Condition (GBC) is assumed to hold. The default is "true". This keyword is
112
only valid if stdapprox=A'.
113
The effect of setting this keyword to true is rather small --
114
hence it is not recommended to use this keyword.
116
<dt><tt>ebc</tt><dd> This boolean specifies whether Extended Brillouin
117
Condition (EBC) is assumed to hold. The default is "true". This keyword
118
is only valid if stdapprox=A'.
119
The effect of setting this keyword to true is rather small --
120
hence it is not recommended to use this keyword.
99
122
<dt><tt>stdapprox</tt><dd> This gives a string that must take on one
100
of the values below. The default is A.
123
of the values below. The default is A'.
104
<dt><tt>A</tt><dd> Use second order M\o{}ller-Plesset perturbation theory
127
<dt><tt>A</tt><dd> Use second order Møller-Plesset perturbation theory
105
128
with linear R12 terms in standard approximation A (MP2-R12/A).
106
129
Only energies can be computed with the MP2-R12/A method.
108
<dt><tt>A'</tt><dd> Use second order M\o{}ller-Plesset perturbation theory
131
<dt><tt>A'</tt><dd> Use second order Møller-Plesset perturbation theory
109
132
with linear R12 terms in standard approximation A' (MP2-R12/A').
110
133
This will cause MP2-R12/A energies to be computed also.
111
134
Only energies can be computed with the MP2-R12/A' method.
113
<dt><tt>B</tt><dd> Use second order M\o{}ller-Plesset perturbation theory
136
<dt><tt>B</tt><dd> Use second order Møller-Plesset perturbation theory
114
137
with linear R12 terms in standard approximation B.
115
138
This method is not implemented yet.
119
<dt><tt>spinadapted</tt><dd> This specifies whether to compute spin-adapted
143
<dt><tt>spinadapted</tt><dd> This boolean specifies whether to compute spin-adapted
120
144
or spin-orbital pair energies. Default is to compute spin-adapted energies.
122
146
<dt><tt>aux_basis</tt><dd> This specifies the auxiliary basis to be used for the resolution
123
147
of the identity. Default is to use the same basis as for the orbital expansion.
149
<dt><tt>vir_basis</tt><dd> This specifies the basis to be used for the virtual orbitals.
150
Default is to use the same basis as for the orbital expansion.
152
<dt><tt>include_mp1</tt><dd> This specifies whether to compute MP1 correction to
153
the MP2 and MP2-R12 energies. This option only has effect if vir_basis is not the same as basis.
154
MP1 correction is a perturbative estimate of the difference between the HF energy computed
155
in vir_basis and basis. Usually, it is a very poor estimate -- therefore this keyword should
156
be avoided by non-experts. Default is false.
158
<dt><tt>abs_method</tt><dd> This string specifies whether the old ABS method, introduced
159
by Klopper and Samson, or the new ABS variant, CABS, introduced by Valeev, should be used.
160
Valid values are "ABS" (Klopper and Samson), "ABS+", "CABS", and "CABS+", where the "+" labels
161
a method where the union of OBS and ABS is used to construct the RI basis. The default is "ABS".
162
The default in 2.3.0 and later will be "CABS+".
164
<dt><tt>lindep_tol</tt><dd> The tolerance used to detect linearly
165
dependent basis functions in the RI basis set.
166
The precise meaning depends on the
167
orthogonalization method. The default value is 1e-8.
125
169
<dt><tt>r12ints</tt><dd> This specifies how to store transformed MO integrals.
126
170
Valid values are:
130
174
<dt><tt>mem-posix</tt><dd> Store integrals in memory for single-pass situations
131
175
and in a binary file on task 0's node using POSIX I/O for multipass situations.
132
176
<tt>posix</tt> is usually less efficient than <tt>mpi</tt> for distributed
133
parallel multipass runs since the I/O is performed by one task only. However, this method guaranteed to
177
parallel multipass runs since the I/O is performed by one task only. However, this method is guaranteed to
134
178
work in all types of environments, hence <tt>mem-posix</tt> is the default.
136
180
<dt><tt>posix</tt><dd> Store integrals in a binary file on task 0's node using POSIX I/O.
157
202
If user wishes to use MPI-I/O, pending its availability, for higher parallel efficiency,
158
203
<tt>r12ints</tt> should be explicitly set to <tt>mem-mpi</tt>.
160
<dt><tt>r12ints_file</tt><dd> This specifies which file to use to store transformed
161
MO integrals if <tt>r12ints=posix-io</tt> or <tt>r12ints=mpi-io</tt> is used.
162
Default is "./<inputbasename>.r12ints.dat", where <inputbasename> is the name of the input
205
<dt><tt>r12ints_file</tt><dd> This specifies the prefix for the transformed
206
MO integrals file if <tt>r12ints</tt> is set to <tt>posix</tt>, <tt>mpi</tt>, <tt>mem-posix</tt>
207
or <tt>mem-mpi</tt> is used.
208
Default is "./<i>inputbasename</i>.r12ints", where <i>inputbasename</i> is the name of the input
163
209
file without ".in". If MPI-I/O is used then it is user's responsibility to ensure
164
210
that the file resides on a file system that supports MPI-I/O.
212
<dt><tt>twopdm_grid_aa</tt><dd> This optional keyword specifies a TwoBodyGrid object which to
213
use for coordinates at which to compute alpha-alpha part of 2-PDM.
215
<dt><tt>twopdm_grid_ab</tt><dd> This optional keyword specifies a TwoBodyGrid object which to
216
use for coordinates at which to compute alpha-beta part of 2-PDM.
167
219
MBPT2_R12(const Ref<KeyVal>&);
170
222
void save_data_state(StateOut&);
172
224
Ref<GaussianBasisSet> aux_basis() const;
225
Ref<GaussianBasisSet> vir_basis() const;
228
LinearR12::ABSMethod abs_method() const;
173
229
LinearR12::StandardApproximation stdapprox() const;
174
230
bool spinadapted() const;
175
231
R12IntEvalInfo::StoreMethod r12ints_method() const;
176
char* r12ints_file() const;
232
const std::string& r12ints_file() const;
178
234
double corr_energy();
179
235
double r12_corr_energy();