28 #ifndef _chemistry_qc_mbptr12_r12technology_h
29 #define _chemistry_qc_mbptr12_r12technology_h
31 #include <util/state/state.h>
32 #include <chemistry/qc/basis/intdescr.h>
33 #include <math/optimize/gaussianfit.h>
54 enum StandardApproximation {
62 enum ABSMethod {ABS_CABS = 2,
77 enum PositiveDefiniteB {
78 PositiveDefiniteB_no = 0,
79 PositiveDefiniteB_yes = 1,
80 PositiveDefiniteB_weak = 2
83 enum GeminalAmplitudeAnsatz {
84 GeminalAmplitudeAnsatz_fullopt = 0,
85 GeminalAmplitudeAnsatz_fixed = 1,
86 GeminalAmplitudeAnsatz_scaledfixed = 2
89 enum H0_dk_approx_pauli {
90 H0_dk_approx_pauli_true = 0,
91 H0_dk_approx_pauli_fHf = 1,
92 H0_dk_approx_pauli_fHf_Q = 2,
93 H0_dk_approx_pauli_false = 3
152 R12Technology::GeminalAmplitudeAnsatz amplitudes()
const;
160 R12Technology::GeminalAmplitudeAnsatz amplitudes_;
176 std::vector<std::string> params_;
180 GeminalDescriptor(
const std::string& type,
const std::vector<std::string> ¶ms);
182 std::string type()
const;
183 std::vector<std::string> params()
const;
214 const std::string&
label()
const;
218 virtual unsigned int nprimitives(
unsigned int c)
const;
221 virtual double value(
unsigned int c,
double r12)
const =0;
265 virtual void print_params(std::ostream& os,
unsigned int f)
const;
279 double value(
unsigned int c,
double r12)
const;
304 double value(
unsigned int c,
double r12)
const;
308 template<
class IntParam>
310 typedef typename IntParam::PrimitiveGeminal PrimitiveGeminal;
311 typedef typename IntParam::ContractedGeminal ContractedGeminal;
312 typedef std::vector<ContractedGeminal> ContractedGeminals;
315 static double epsilon;
316 static bool equiv(
const ContractedGeminals& A,
317 const ContractedGeminals& B);
320 static bool equiv(
const PrimitiveGeminal& A,
321 const PrimitiveGeminal& B);
330 typedef IntParamsG12::ContractedGeminal ContractedGeminal;
341 const ContractedGeminal&
function(
unsigned int c)
const;
365 double value(
unsigned int c,
double r12)
const;
371 void print_params(std::ostream& os,
unsigned int f)
const;
381 typedef IntParamsG12::ContractedGeminal ContractedGeminal;
392 const ContractedGeminal&
function(
unsigned int c)
const;
414 double value(
unsigned int c,
double r12)
const;
416 static ContractedGeminal product(
const ContractedGeminal& A,
417 const ContractedGeminal& B);
423 void print_params(std::ostream& os,
unsigned int f)
const;
429 const char* invalid_id_;
441 const std::vector<double> &gamma);
447 const unsigned int nf_A = A->nfunctions();
448 const unsigned int nf_B = B->nfunctions();
449 typedef typename CF::CorrelationParameters CorrParams;
450 CorrParams corrparams;
451 for (
int f = 0; f < nf_A; ++f) {
452 for (
int g = 0; g < nf_B; ++g) {
453 corrparams.push_back(CF::product(A->function(f), B->function(g)));
456 return new CF(corrparams);
462 void init_from_kv(
const Ref<KeyVal>& keyval,
463 bool abs_eq_obs =
true,
464 bool vbs_eq_obs =
true);
469 Ref<CorrelationFactor> corrfactor_;
470 StandardApproximation stdapprox_;
471 Ref<R12Ansatz> ansatz_;
472 ABSMethod abs_method_;
473 double abs_lindep_tol_;
475 unsigned int maxnabs_;
480 bool coupling_1rdm_f12b_;
482 H0_dk_approx_pauli H0_dk_approx_pauli_;
485 PositiveDefiniteB posdef_B_;
493 struct GTGFitWeight {
494 typedef enum {TewKlopper, Cusp} Type;
496 GTGFitWeight::Type gtg_fit_weight_;
500 R12Technology(StateIn&);
654 R12Technology(
const Ref<KeyVal>&);
655 R12Technology(
const Ref<KeyVal>&,
656 const Ref<GaussianBasisSet>& bs,
657 const Ref<GaussianBasisSet>& vbs,
658 const Ref<GaussianBasisSet>& abs
664 const Ref<CorrelationFactor>& corrfactor()
const;
666 void corrfactor(
const Ref<CorrelationFactor>&);
667 unsigned int maxnabs()
const;
670 bool coupling()
const;
671 bool compute_1rdm()
const;
672 bool coupling_1rdm_f12b()
const;
673 ABSMethod abs_method()
const;
674 int abs_nlindep()
const;
675 double abs_lindep_tol()
const;
676 StandardApproximation stdapprox()
const;
677 const Ref<R12Ansatz>& ansatz()
const;
678 bool spinadapted()
const;
680 H0_dk_approx_pauli H0_dk_approx()
const;
681 bool H0_dk_keep()
const;
682 bool safety_check()
const;
683 PositiveDefiniteB posdef_B()
const;
692 void check_integral_factory(
const Ref<Integral>& ints);
696 static Ref<GaussianBasisSet> make_auto_cabs(
const Ref<GaussianBasisSet>& bs);
710 template <
class IntParam>
double R12Technology::CorrParamCompare<IntParam>::epsilon(1e-6);
712 template<
class IntParam>
713 bool R12Technology::CorrParamCompare<IntParam>::equiv(
714 const ContractedGeminals& A,
715 const ContractedGeminals& B) {
716 unsigned int nf = A.size();
720 for (
unsigned int f = 0; f < nf; ++f) {
721 const ContractedGeminal& Af = A[f];
722 const ContractedGeminal& Bf = B[f];
723 unsigned int np = Af.size();
726 for (
unsigned int p = 0; p < np; ++p) {
727 if (!equiv(Af[p], Bf[p]))
virtual TwoBodyOper::type tbint_type_t1f12() const
Returns TwoBodyOper::type corresponding to integrals over [T1,f12].
TwoBodyOper::type tbint_type_f12t1f12() const
Reimplementation of CorrelationFactor::tbint_type_f12t1f12()
TwoBodyOper::type tbint_type_t1f12() const
Reimplementation of CorrelationFactor::tbint_type_t1f12()
bool equiv(const Ref< CorrelationFactor > &cf) const
Implementation of CorrelationFactor::equiv()
R12CorrelationFactor stands for no correlation factor.
Definition: r12technology.h:287
IntParamsG12::PrimitiveGeminal PrimitiveGeminal
Definitions of primitive and contracted Geminals.
Definition: r12technology.h:380
TwoBodyOper::type tbint_type_f12() const
Reimplementation of CorrelationFactor::tbint_type_f12()
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
std::vector< ContractedGeminal > CorrelationParameters
Vector of contracted 2 particle functions.
Definition: r12technology.h:383
Ref< TwoBodyIntDescr > tbintdescr(const Ref< Integral > &IF, unsigned int f) const
Overload of CorrelationFactor::tbintdescr(f)
TwoBodyOper::type tbint_type_f12f12() const
Reimplementation of CorrelationFactor::tbint_type_f12f12()
Ref< TwoBodyIntDescr > tbintdescr(const Ref< Integral > &IF, unsigned int f) const
Overload of CorrelationFactor::tbintdescr(f)
static double single_slater_exponent(const Ref< GeminalDescriptor > &gdesc)
Returns a single Slater type geminal exponent. Throws if geminal is not of Slater type and if there i...
G12NCCorrelationFactor stands for Gaussian geminals correlation factor, usable with methods that do n...
Definition: r12technology.h:377
TwoBodyOper::type tbint_type_f12f12_anti() const
Reimplementation of CorrelationFactor::tbint_type_f12f12_anti()
R12Ansatz()
The default constructor creates orbital-invariant ansatz with projector 2.
virtual TwoBodyOper::type tbint_type_f12f12() const
Returns TwoBodyOper::type corresponding to integrals over f12^2.
double value(unsigned int c, double r12) const
Implementation of CorrelationFactor::value()
TwoBodyOper::type tbint_type_f12t1f12() const
Reimplementation of CorrelationFactor::tbint_type_f12t1f12()
Ref< TwoBodyIntDescr > tbintdescr(const Ref< Integral > &IF, unsigned int f) const
Returns TwoBodyIntDescr needed to compute matrix elements where correlation function f appears in eit...
G12CorrelationFactor stands for Gaussian geminals correlation factor, usable with methods that requir...
Definition: r12technology.h:326
virtual TwoBodyOper::type tbint_type_f12t1f12() const
Returns TwoBodyOper::type corresponding to integrals over [f12,[T1,f12]].
A template class that maintains references counts.
Definition: ref.h:361
Definition: r12technology.h:168
Ref< TwoBodyIntDescr > tbintdescr(const Ref< Integral > &IF, unsigned int f) const
Overload of CorrelationFactor::tbintdescr(f)
virtual TwoBodyOper::type tbint_type_eri() const
Returns TwoBodyOper::type corresponding to electron repulsion integrals.
virtual unsigned int max_num_tbint_types() const =0
Returns the maximum number of two-body integral types produced by the appropriate integral evaluator.
virtual unsigned int nfunctions() const
Returns the number of contracted two-particle functions in the set.
unsigned int max_num_tbint_types() const
Implementation of CorrelationFactor::max_num_tbint_types()
Definition: r12technology.h:398
void print(std::ostream &o=ExEnv::out0()) const
Print the object.
bool equiv(const Ref< CorrelationFactor > &cf) const
Implementation of CorrelationFactor::equiv()
const std::string & label() const
Returns label.
void print(std::ostream &o=ExEnv::out0()) const
Print the object.
TwoBodyOper::type tbint_type_f12eri() const
Reimplementation of CorrelationFactor::tbint_type_f12eri()
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 max_num_tbint_types() const
Implementation of CorrelationFactor::max_num_tbint_types()
Definition: r12technology.h:277
virtual TwoBodyOper::type tbint_type_f12eri() const
Returns TwoBodyOper::type corresponding to integrals over f12/r12.
TwoBodyOper::type tbint_type_f12() const
Reimplementation of CorrelationFactor::tbint_type_f12()
TwoBodyOper::type tbint_type_t2f12() const
Reimplementation of CorrelationFactor::tbint_type_t2f12()
IntParamsG12::PrimitiveGeminal PrimitiveGeminal
Definitions of primitive and contracted Geminals.
Definition: r12technology.h:329
virtual void print_params(std::ostream &os, unsigned int f) const
Print out parameters of function f. Base implementation prints nothing.
unsigned int max_num_tbint_types() const
Implementation of CorrelationFactor::max_num_tbint_types()
Definition: r12technology.h:347
CorrelationFactor is a set of one or more two-particle functions of the interparticle distance.
Definition: r12technology.h:198
Compares CorrelationParamaters corresponding to IntParam.
Definition: r12technology.h:309
unsigned int nprimitives(unsigned int c) const
Reimplementation of CorrelationFactor::nprimitives()
unsigned int nfunctions() const
Reimplementation of CorrelationFactor::nfunctions()
TwoBodyOper::type tbint_type_f12eri() const
Reimplementation of CorrelationFactor::tbint_type_f12eri()
TwoBodyOper::type tbint_type_t1f12() const
Reimplementation of CorrelationFactor::tbint_type_t1f12()
double value(unsigned int c, double r12) const
Implementation of CorrelationFactor::value()
virtual TwoBodyOper::type tbint_type_t2f12() const
Returns TwoBodyOper::type corresponding to integrals over [T2,f12].
virtual Ref< TwoBodyIntDescr > tbintdescr(const Ref< Integral > &IF, unsigned int f) const
Returns TwoBodyIntDescr needed to compute matrix elements where correlation function f appears in eit...
const PrimitiveGeminal & primitive(unsigned int c, unsigned int p) const
Returns std::pair<primitive_parameter,coefficient> in primitive p of contraction c.
double value(unsigned int c, double r12) const
Implementation of CorrelationFactor::value()
OrbitalProduct_gg
space of orbital products from which geminal substitutions are allowed
Definition: r12technology.h:72
double value(unsigned int c, double r12) const
Implementation of CorrelationFactor::value()
NullCorrelationFactor stands for no correlation factor; only for test.
Definition: r12technology.h:270
virtual double value(unsigned int c, double r12) const =0
Computes value of function c when electrons are at distance r12.
virtual TwoBodyOper::type tbint_type_f12() const
Returns TwoBodyOper::type corresponding to integrals over correlation operator.
std::vector< ContractedGeminal > CorrelationParameters
Vector of contracted 2 particle functions.
Definition: r12technology.h:332
TwoBodyOper::type tbint_type_f12f12() const
Reimplementation of CorrelationFactor::tbint_type_f12f12()
bool equiv(const Ref< CorrelationFactor > &cf) const
Implementation of CorrelationFactor::equiv()
Definition: stateout.h:71
TwoBodyOper::type tbint_type_f12() const
Reimplementation of CorrelationFactor::tbint_type_f12()
static std::string default_cabs_name(const std::string &obs_name)
tries to translate a library basis set label to the corresponding default value for the CABS
unsigned int nfunctions() const
Reimplementation of CorrelationFactor::nfunctions()
std::pair< double, double > PrimitiveGeminal
std::pair< g, c > as in c * exp( - g*r12^2)
Definition: intparams.h:147
R12Technology describes technical features of the R12 approach.
Definition: r12technology.h:40
bool equiv(const Ref< CorrelationFactor > &cf) const
Implementation of CorrelationFactor::equiv()
type
types of known two-body operators
Definition: operator.h:318
unsigned int max_num_tbint_types() const
Implementation of CorrelationFactor::max_num_tbint_types()
Definition: r12technology.h:294
R12Ansatz specifies the manner in which the R12 geminals are constructed.
Definition: r12technology.h:99
virtual unsigned int nprimitives(unsigned int c) const
Returns the number of primitive functions in contraction c.
void print(std::ostream &os=ExEnv::out0()) const
print the correlation factor
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
static double default_stg_exponent(const std::string &obs_name)
tries to translate a library basis set label to the corresponding default value for the F12 exponent
The base class for all reference counted objects.
Definition: ref.h:192
virtual TwoBodyOper::type tbint_type_f12f12_anti() const
Returns TwoBodyOper::type corresponding to integrals over f12*f12' antisymmetrized wrt exponents,...
Projector
Projector of R12 methods: 0: Q_{12} = 1 1: Q_{12} = (1 - P_1)(1 - P_2) 2: Q_{12} = (1 - V_1 V_2)(1 - ...
Definition: r12technology.h:50
const PrimitiveGeminal & primitive(unsigned int c, unsigned int p) const
Returns std::pair<primitive_parameter,coefficient> in primitive p of contraction c.
unsigned int nprimitives(unsigned int c) const
Reimplementation of CorrelationFactor::nprimitives()
TwoBodyOper::type tbint_type_t2f12() const
Reimplementation of CorrelationFactor::tbint_type_t2f12()
OrbitalProduct_GG
geminal generating space
Definition: r12technology.h:66
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
Definition: r12technology.h:427
Generated at Sun Jan 26 2020 23:23:59 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.