47 const std::vector<libint2::Shell>& basis,
48 const std::vector<std::vector<Index>>& shellpairs)
const {
49 std::vector<std::vector<libint2::ShellPair>> shellpairdata(basis.size());
50 const double ln_max_engine_precision =
51 std::log(std::numeric_limits<double>::epsilon() * 1
e-10);
53#pragma omp parallel for schedule(dynamic)
54 for (
Index s1 = 0; s1 <
Index(shellpairs.size()); s1++) {
55 for (
Index s2 : shellpairs[s1]) {
56 shellpairdata[s1].emplace_back(
57 libint2::ShellPair(basis[s1], basis[s2], ln_max_engine_precision));
64 Eigen::MatrixXd result =
66#pragma omp parallel for schedule(dynamic)
70 for (
Index s2 = 0l; s2 <= s1; ++s2) {
74 result(s2, s1) = dmat.block(bf2, bf1, n2, n1).cwiseAbs().maxCoeff();
77 return result.selfadjointView<Eigen::Upper>();
82 "Please call Initialize before running this");
83 Eigen::MatrixXd ERIs2 = Eigen::MatrixXd::Zero(DMAT.rows(), DMAT.cols());
85#pragma omp parallel for schedule(guided) reduction(+ : ERIs2)
89 const double factor = threecenter.
TraceofProd(dmat_sym);
90 Eigen::SelfAdjointView<Eigen::MatrixXd, Eigen::Upper> m =
91 ERIs2.selfadjointView<Eigen::Upper>();
95 return ERIs2.selfadjointView<Eigen::Upper>();
100 "Please call Initialize before running this");
101 Eigen::MatrixXd EXX = Eigen::MatrixXd::Zero(DMAT.rows(), DMAT.cols());
103#pragma omp parallel for schedule(guided) reduction(+ : EXX)
105 const Eigen::MatrixXd threecenter =
threecenter_[i].UpperMatrix();
106 EXX -= threecenter.selfadjointView<Eigen::Upper>() * DMAT *
107 threecenter.selfadjointView<Eigen::Upper>();
114 "Please call Initialize before running this");
115 Eigen::MatrixXd EXX = Eigen::MatrixXd::Zero(occMos.rows(), occMos.rows());
117#pragma omp parallel for schedule(guided) reduction(+ : EXX)
119 const Eigen::MatrixXd TCxMOs_T =
121 threecenter_[i].UpperMatrix().selfadjointView<Eigen::Upper>();
122 EXX -= TCxMOs_T.transpose() * TCxMOs_T;
Container to hold Basisfunctions for all atoms.
std::vector< Index > getMapToBasisFunctions() const
Index getMaxNprim() const
std::vector< std::vector< Index > > ComputeShellPairs(double threshold=1e-20) const
std::vector< libint2::Shell > GenerateLibintBasis() const
Eigen::MatrixXd CalculateERIs_3c(const Eigen::MatrixXd &DMAT) const
std::vector< std::vector< libint2::ShellPair > > shellpairdata_
std::vector< libint2::Shell > basis_
Eigen::MatrixXd ComputeSchwarzShells(const AOBasis &dftbasis) const
std::vector< std::vector< Index > > shellpairs_
void Initialize_4c(const AOBasis &dftbasis)
std::vector< std::vector< libint2::ShellPair > > ComputeShellPairData(const std::vector< libint2::Shell > &basis, const std::vector< std::vector< Index > > &shellpairs) const
void Initialize(const AOBasis &dftbasis, const AOBasis &auxbasis)
Eigen::MatrixXd schwarzscreen_
Eigen::MatrixXd ComputeShellBlockNorm(const Eigen::MatrixXd &dmat) const
std::vector< Index > starts_
Eigen::MatrixXd CalculateEXX_dmat(const Eigen::MatrixXd &DMAT) const
TCMatrix_dft threecenter_
Eigen::MatrixXd CalculateEXX_mos(const Eigen::MatrixXd &occMos) const
void AddtoEigenUpperMatrix(Eigen::SelfAdjointView< Eigen::MatrixXd, Eigen::Upper > &upper, double factor=1.0) const
double TraceofProd(const Symmetric_Matrix &a) const
void Fill(const AOBasis &auxbasis, const AOBasis &dftbasis)
base class for all analysis tools