28 #ifndef _mpqc_src_lib_chemistry_qc_mbptr12_singles_casscf_h
29 #define _mpqc_src_lib_chemistry_qc_mbptr12_singles_casscf_h
32 #if defined(MPQC_NEW_FEATURES)
33 #include <chemistry/qc/mbptr12/sr_r12intermediates.h>
41 CabsSingles() =
default;
43 CabsSingles(std::shared_ptr <SingleReference_R12Intermediates<double>> srr12intrmds,
bool extra_basis) : singles_r12intrmds_(srr12intrmds), extra_basis_(extra_basis){}
45 ~CabsSingles() =
default;
47 double compute(
const std::string &h0);
48 void obsolete() { singles_r12intrmds_ = NULL; }
51 const bool extra_basis() {
return extra_basis_;}
52 const std::shared_ptr <SingleReference_R12Intermediates<double>> r12intermediates() {
return singles_r12intrmds_; }
60 typedef TA::Array<T, 4> Array4;
61 typedef TA::Array<T, 2> Array2;
63 const Array4& Bmatrix;
65 CabsSingles_(
const Array4& B) : Bmatrix(B){
72 void operator()(
const Array2& C, Array2& BC) {
73 BC(
"x,B'") = Bmatrix(
"x,B',y,A'") * C(
"y,A'");
80 typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> EigenMatrixX;
81 DiagPrecond2(
const EigenMatrixX& O1_mat,
82 const EigenMatrixX& O2_mat) :
83 O1_mat_(O1_mat), O2_mat_(O2_mat) {
85 template <
typename Index> T operator()(
const Index& i) {
86 return 1.0 / (- O1_mat_(i[0], i[0]) + O2_mat_(i[1], i[1]));
94 std::shared_ptr <SingleReference_R12Intermediates<double>> singles_r12intrmds_;
98 double CabsSinglesFock();
100 double CabsSinglesDyall(
const std::string &h0);
106 #endif // end of header guard CABS_SINGLE