28 #include <util/ref/ref.h>
29 #include <chemistry/qc/mbptr12/r12technology.h>
30 #include <chemistry/qc/mbptr12/r12int_eval.h>
31 #include <chemistry/qc/wfn/spin.h>
32 #include <chemistry/qc/mbptr12/twobodygrid.h>
33 #include <math/mmisc/pairiter.h>
34 #include <chemistry/qc/mbptr12/mp2r12_energy_util.h>
36 #ifndef _chemistry_qc_mbptr12_mp2r12energy_h
37 #define _chemistry_qc_mbptr12_mp2r12energy_h
39 #define MP2R12ENERGY_CAN_COMPUTE_PAIRFUNCTION 1
48 R12Technology::StandardApproximation stdapprox_;
68 bool Onerdm_cc_computed_;
72 bool Onerdm_relax_computed_;
75 typedef enum { V=0,
X=1, B=2, A=3 } IntermediateType;
77 const R12Technology::StandardApproximation stdapp);
83 R12Technology::StandardApproximation stdapprox()
const;
84 bool V_computed()
const;
85 bool X_computed()
const;
86 bool B_computed()
const;
87 bool A_computed()
const;
88 bool T1_cc_computed()
const;
89 bool T2_cc_computed()
const;
90 bool L1_cc_computed()
const;
91 bool L2_cc_computed()
const;
92 bool Onerdm_cc_computed()
const;
93 bool Onerdm_relax_computed()
const;
94 const RefSCMatrix& get_V(
const SpinCase2 &spincase2)
const;
95 void assign_V(
const SpinCase2 &spincase2,
const RefSCMatrix& V);
100 const RefSCMatrix& get_A(
const SpinCase2 &spincase2)
const;
101 void assign_A(
const SpinCase2 &spincase2,
const RefSCMatrix& A);
102 const RefSCMatrix& get_T1_cc(
const SpinCase1 &spincase1)
const;
103 void assign_T1_cc(
const SpinCase1 &spincase1,
const RefSCMatrix& T1_cc);
105 void assign_T2_cc(
const SpinCase2 &spincase2,
const Ref<DistArray4>& T2_cc);
106 const RefSCMatrix& get_L1_cc(
const SpinCase1 &spincase1)
const;
107 void assign_L1_cc(
const SpinCase1 &spincase1,
const RefSCMatrix& L1_cc);
109 void assign_L2_cc(
const SpinCase2 &spincase2,
const Ref<DistArray4>& L2_cc);
110 const RefSCMatrix& get_1rdm_cc(
const SpinCase1 &spincase1)
const;
111 void assign_1rdm_cc(
const SpinCase1 &spincase1,
const RefSCMatrix& Onerdm_cc);
112 const RefSCMatrix& get_1rdm_relax(
const SpinCase1 &spincase1)
const;
113 void assign_1rdm_relax(
const SpinCase1 &spincase1,
const RefSCMatrix& Onerdm_relax);
127 virtual void compute_ef12() =0;
132 bool include_obs_singles_;
136 RefSCVector ef12_[NSpinCases2], emp2f12_[NSpinCases2];
147 bool include_obs_singles,
157 R12Technology::StandardApproximation stdapprox()
const;
158 bool include_obs_singles()
const {
return include_obs_singles_; }
159 void set_debug(
int debug);
160 int get_debug()
const;
166 double emp2f12tot(SpinCase2 S);
167 double ef12tot(SpinCase2 S);
168 void print_pair_energies(
bool spinadapted,
169 double cabs_singles_energy,
172 #if MP2R12ENERGY_CAN_COMPUTE_PAIRFUNCTION
200 bool include_obs_singles,
215 void compute_ef12_10132011();
216 void activate_ints(
const std::string&,
const std::string&,
217 const std::string&,
const std::string&,
221 enum idx_b1b2k1k2{ij_ij, ij_ji, ji_ij, ji_ji};
222 void compute_Y(
const int b1b2_k1k2,
const double prefactor,
223 const unsigned int oper_idx,
225 void compute_YxF(
const int b1b2_k1k2,
const double prefactor,
226 const unsigned int oper1_idx,
const unsigned int oper2_idx,
229 void compute_FxT(
const int b1b2_k1k2,
const unsigned int f12_idx,
232 void compute_VX(
const int b1b2_k1k2, std::vector<std::string>& VX_output,
234 const unsigned int oper1_idx,
const unsigned int oper2_idx,
238 void accumulate_P_YxF(std::vector<std::string>& P_output,
239 std::vector<int>& b1b2_k1k2, std::vector<double>& P_prefactor,
240 const unsigned int oper1_idx,
const unsigned int oper2_idx,
247 const int b1b2_k1k2,
const bool swap_e12_V,
248 const double*
const T1_array,
249 const int nv,
const bool VT1_offset,
252 #ifdef MPQC_NEW_FEATURES
256 double U1T1_plus_C1T1_ta();
266 void compute_density_diag();
269 void obtain_orbitals(
const SpinCase2 spincase,
277 const std::string& descr_f12_key, std::vector<
Ref<DistArray4> >& f12_ints);
281 const int nocc_alpha,
const int nocc_beta,
282 const double C_0,
const double C_1);
285 void compute_RRii_ii(std::vector<std::string>& output,
288 double* RRij_ij,
double* RRji_ij);
291 void compute_Rii_ii(std::vector<std::string>& output,
294 double* RRi1i2_i1i2,
double* RRi1i2_i2i1,
295 double* RRi2i1_i1i2,
double* RRi2i1_i2i1);
299 const double C_0,
const double C_1,
302 double*
const Dm_i_alpha,
double*
const Dm_i_beta);
307 void compute_RR_sum_abj2(
const int RRb1b2_k1k2,
308 const int f12f12_idx,
const int f12_idx,
312 double*
const RR_result);
316 const double C_0,
const double C_1,
319 double*
const Dm_i_alpha,
double*
const Dm_i_beta);
323 const double C_0,
const double C_1);
327 const double C_0,
const double C_1);
331 const double C_0,
const double C_1);
335 const double C_0,
const double C_1);
339 void compute_RR31_32_spin(
const int orbitals_label,
341 const double C_0,
const double C_1,
344 double*
const D_alhpha,
double*
const D_beta);
349 const double C_0,
const double C_1,
352 double* RT2_alpha,
double* RT2_beta);
360 const double C_0,
const double C_1,
363 double*
const RT2_alpha,
double*
const RT2_beta);
368 RefSCMatrix compute_1rdm_mp2(
const SpinCase1 spin);
369 RefSCMatrix compute_1rdm_mp2_test(
const SpinCase1 spin);
373 const int C_0,
const int C_1,
377 RefSCMatrix compute_1rdm_mp2part(
const SpinCase1 spin,
378 const int nocc1_act,
const int nocc2_act,
379 const int nvir1,
const int nvir2,
380 const double*
const T2,
const double*
const T2_ab);
382 RefSCMatrix compute_1rdm_mp2part(
const SpinCase1 spin,
383 const int nocc1_act,
const int nocc2_act,
384 const int nvir1,
const int nvir2,
385 const double*
const T2_left,
const double*
const T2_right,
386 const double*
const T2_ab_left,
const double*
const T2_ab_right);
388 void compute_T2_mp2(
const SpinCase2 spincase,
389 double*
const T2ab_ij);
391 void compute_T2abij_f12corr(
const SpinCase2 spincase,
392 const double C_0,
const double C_1,
393 double*
const T2ab_ij_f12corr);
395 void compute_T2abij_mp2f12(
const int nocc1_act,
const int nocc2_act,
396 const int nvir1,
const int nvir2,
397 const double*
const T2ab_ij_mp2,
398 const double*
const T2ab_ij_f12corr,
399 double*
const T2abij_mp2f12);
401 void compute_T2abij_mp2f12(
const SpinCase2 spincase,
402 const double C_0,
const double C_1,
403 double*
const T2ab_ij_mp2f12);
410 const double C_0,
const double C_1,
413 double*
const D_alpha,
double*
const D_beta);
418 bool include_obs_singles,
426 bool include_obs_singles,
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:265
unsigned int nspincases2(bool spin_polarized)
Returns the number of unique combinations of 2 spin cases (1 or 3)
Class MP2R12Energy is the object that computes and maintains MP2-R12 energies.
Definition: mp2r12_energy.h:117
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition: matrix.h:135
A template class that maintains references counts.
Definition: ref.h:361
Definition: reftestx.h:32
The class MP2R12Energy_Diag is an implementation of MP2R12Energy that supports Ten-no's diagonal orbi...
Definition: mp2r12_energy.h:211
RefSCMatrix C(SpinCase2 S)
Returns the matrix of first-order amplitudes of r12-multiplied occupied orbital pairs.
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 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 the object.
The class MP2R12Energy_SpinOrbital is the original implementation of MP2R12Energy It supports only th...
Definition: mp2r12_energy.h:193
RefSCMatrix T2(SpinCase2 S)
Returns the matrix of first-order amplitudes of conventional orbital pairs.
double energy()
total correlation energy (including OBS singles if include_obs_singles() == true)
void compute()
Computes the first-order R12 wave function and MP2-R12 energy.
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition: matrix.h:55
Definition: stateout.h:71
a 3-element version of SCVector
Definition: vector3.h:43
static std::ostream & out0()
Return an ostream that writes from node 0.
Base class for objects that can save/restore state.
Definition: state.h:45
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
unsigned int nspincases1(bool spin_polarized)
Returns the number of unique spin cases (1 or 2)
void compute_pair_function(unsigned int i, unsigned int j, SpinCase2 spincase2, const Ref< TwoBodyGrid > &tbgrid)
Computes values of pair function ij on tbgrid.
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.