34#define LIBINT2_CONSTEXPR_STATICS 0
36#pragma clang diagnostic push
37#pragma clang diagnostic ignored "-W#warnings"
38#elif defined(__GNUC__)
39#pragma GCC diagnostic push
40#pragma GCC diagnostic ignored "-Warray-bounds"
41#pragma GCC diagnostic ignored "-Wcpp"
44#include <libint2/statics_definition.h>
46#pragma clang diagnostic pop
47#elif defined(__GNUC__)
48#pragma GCC diagnostic pop
55 double threshold)
const {
62 std::vector<libint2::Engine> engines;
63 engines.reserve(nthreads);
65 for (
Index i = 1; i != nthreads; ++i) {
66 engines.push_back(engines[0]);
69 std::vector<std::vector<Index>> pairs(shells.size());
71#pragma omp parallel for schedule(dynamic)
72 for (
Index s1 = 0; s1 <
Index(shells.size()); ++s1) {
75 libint2::Engine& engine = engines[thread_id];
76 const libint2::Engine::target_ptr_vec& buf = engine.results();
77 Index n1 = shells[s1].size();
79 for (
Index s2 = 0; s2 <= s1; ++s2) {
80 bool on_same_center = (shells[s1].O == shells[s2].O);
81 bool significant = on_same_center;
82 if (!on_same_center) {
83 Index n2 = shells[s2].size();
84 engine.compute(shells[s1], shells[s2]);
85 Eigen::Map<const Eigen::MatrixXd> buf_mat(buf[0], n1, n2);
86 significant = (buf_mat.norm() >= threshold);
89 pairs[s1].push_back(s2);
92 std::sort(pairs[s1].
begin(), pairs[s1].
end());
98 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
100template <libint2::Operator obtype,
101 typename OperatorParams =
102 typename libint2::operator_traits<obtype>::oper_params_type>
103std::array<MatrixLibInt, libint2::operator_traits<obtype>::nopers>
105 OperatorParams oparams = OperatorParams()) {
112 Index nopers =
static_cast<Index>(libint2::operator_traits<obtype>::nopers);
113 std::array<MatrixLibInt, libint2::operator_traits<obtype>::nopers> result;
118 std::vector<libint2::Engine> engines(nthreads);
119 engines[0] = libint2::Engine(obtype, aobasis.
getMaxNprim(),
120 static_cast<int>(aobasis.
getMaxL()), 0);
121 engines[0].set_params(oparams);
122 for (
Index i = 1; i < nthreads; ++i) {
123 engines[i] = engines[0];
128#pragma omp parallel for schedule(dynamic)
131 libint2::Engine& engine = engines[thread_id];
132 const libint2::Engine::target_ptr_vec& buf = engine.results();
134 Index bf1 = shell2bf[s1];
135 Index n1 = shells[s1].size();
137 for (
Index s2 : shellpair_list[s1]) {
139 engine.compute(shells[s1], shells[s2]);
140 if (buf[0] ==
nullptr) {
143 Index bf2 = shell2bf[s2];
144 Index n2 = shells[s2].size();
145 for (
unsigned int op = 0; op != nopers; ++op) {
146 Eigen::Map<const MatrixLibInt> buf_mat(buf[op], n1, n2);
147 result[op].block(bf1, bf2, n1, n2) = buf_mat;
150 result[op].block(bf2, bf1, n2, n1) = buf_mat.transpose();
173 libint2::Shell::do_enforce_unit_normalization(
false);
174 libint2::Operator obtype = libint2::Operator::overlap;
176 libint2::Engine engine(obtype, shell.
getSize(),
177 static_cast<int>(shell.
getL()), 0);
179 const libint2::Engine::target_ptr_vec& buf = engine.results();
182 engine.compute(s, s);
184 Eigen::Map<const MatrixLibInt> buf_mat(buf[0], shell.
getNumFunc(),
187 }
catch (
const libint2::Engine::lmax_exceeded& error) {
188 std::ostringstream oss;
189 oss <<
"\nA libint error occured:\n"
190 << error.what() <<
"\n"
191 <<
"\nYou requested a computation for a shell with angular momentum "
192 << error.lmax_requested()
193 <<
",\nbut your libint package only supports angular momenta upto "
194 << error.lmax_limit() - 1 <<
".\n"
195 <<
"\nTo fix this error you will need to reinstall libint with "
197 "for higher angular momenta. If you installed your own libint it\n"
198 "should be reconfigured and installed with the option "
199 "--with-max-am=<maxAngularMomentum>.\n"
200 "If you installed libint with your OS package manager, you will\n"
201 "need to setup you own libint installation with the \n"
202 "--with-max-am=<maxAngularMomentum> option set."
204 throw std::runtime_error(oss.str());
213 std::array<libint2::Shell::real_t, 3>>(
216 for (
Index i = 0; i < 3; i++) {
238 std::vector<libint2::Engine> engines(nthreads);
240 libint2::Engine(libint2::Operator::coulomb, aobasis.
getMaxNprim(),
241 static_cast<int>(aobasis.
getMaxL()), 0);
242 engines[0].set(libint2::BraKet::xs_xs);
243 for (
Index i = 1; i != nthreads; ++i) {
244 engines[i] = engines[0];
247#pragma omp parallel for schedule(dynamic)
250 const libint2::Engine::target_ptr_vec& buf = engine.results();
252 Index bf1 = shell2bf[s1];
253 Index n1 = shells[s1].size();
256 for (
Index s2 = 0; s2 <= s1; ++s2) {
258 engine.compute2<libint2::Operator::coulomb, libint2::BraKet::xs_xs, 0>(
259 shells[s1], libint2::Shell::unit(), shells[s2],
260 libint2::Shell::unit());
262 if (buf[0] ==
nullptr) {
265 Index bf2 = shell2bf[s2];
266 Index n2 = shells[s2].size();
268 Eigen::Map<const MatrixLibInt> buf_mat(buf[0], n1, n2);
269 aomatrix_.block(bf1, bf2, n1, n2) = buf_mat;
272 aomatrix_.block(bf2, bf1, n2, n1) = buf_mat.transpose();
282 Eigen::MatrixXd result = Eigen::MatrixXd::Zero(noshells, noshells);
284 std::vector<libint2::Engine> engines(nthreads);
285 double epsilon = 0.0;
286 engines[0] = libint2::Engine(libint2::Operator::coulomb, basis.
getMaxNprim(),
287 static_cast<int>(basis.
getMaxL()), 0, epsilon);
289 for (
Index i = 1; i < nthreads; ++i) {
290 engines[i] = engines[0];
295#pragma omp parallel for schedule(dynamic)
298 libint2::Engine& engine = engines[thread_id];
299 const libint2::Engine::target_ptr_vec& buf = engine.results();
300 Index n1 = shells[s1].size();
302 for (
Index s2 = 0l; s2 <= s1; ++s2) {
303 Index n2 = shells[s2].size();
307 .compute2<libint2::Operator::coulomb, libint2::BraKet::xx_xx, 0>(
308 shells[s1], shells[s2], shells[s1], shells[s2]);
310 Eigen::Map<const MatrixLibInt> buf_mat(buf[0], n12, n12);
312 result(s2, s1) = std::sqrt(buf_mat.cwiseAbs().maxCoeff());
315 return result.selfadjointView<Eigen::Upper>();
318template <
bool with_exchange>
320 double error)
const {
322 "Please call Initialize_4c before running this");
325 Eigen::MatrixXd hartree = Eigen::MatrixXd::Zero(dmat.rows(), dmat.cols());
326 Eigen::MatrixXd exchange;
328 exchange = Eigen::MatrixXd::Zero(dmat.rows(), dmat.cols());
331 double fock_precision = error;
335 double engine_precision = std::min(fock_precision / dnorm_block.maxCoeff(),
336 std::numeric_limits<double>::epsilon()) /
338 std::vector<libint2::Engine> engines(nthreads);
339 engines[0] = libint2::Engine(libint2::Operator::coulomb,
int(
maxnprim_),
341 engines[0].set_precision(engine_precision);
345 for (
Index i = 1; i < nthreads; ++i) {
346 engines[i] = engines[0];
350#pragma omp parallel for schedule(dynamic) reduction(+ : hartree) \
351 reduction(+ : exchange)
352 for (
Index s1 = 0; s1 < nshells; ++s1) {
354 libint2::Engine& engine = engines[thread_id];
355 const auto& buf = engine.results();
357 const libint2::Shell& shell1 =
basis_[s1];
358 Index n1 = shell1.size();
363 const libint2::Shell& shell2 =
basis_[s2];
364 Index n2 = shell2.size();
365 double dnorm_12 = dnorm_block(s1, s2);
366 const libint2::ShellPair* sp12 = &(*sp12_iter);
369 for (
Index s3 = 0; s3 <= s1; ++s3) {
372 const libint2::Shell& shell3 =
basis_[s3];
373 Index n3 = shell3.size();
375 double dnorm_123 = std::max(dnorm_block(s1, s3),
376 std::max(dnorm_block(s2, s3), dnorm_12));
377 Index s4max = (s1 == s3) ? s2 : s3;
384 const libint2::ShellPair* sp34 = &(*sp34_iter);
388 std::max(dnorm_block(s1, s4),
389 std::max(dnorm_block(s2, s4),
390 std::max(dnorm_block(s3, s4), dnorm_123)));
397 const libint2::Shell& shell4 =
basis_[s4];
399 .compute2<libint2::Operator::coulomb, libint2::BraKet::xx_xx, 0>(
400 shell1, shell2, shell3, shell4, sp12, sp34);
401 const auto* buf_1234 = buf[0];
402 if (buf_1234 ==
nullptr) {
406 Index n4 = shell4.size();
407 Index s12_deg = (s1 == s2) ? 1 : 2;
408 Index s34_deg = (s3 == s4) ? 1 : 2;
409 Index s12_34_deg = (s1 == s3) ? (s2 == s4 ? 1 : 2) : 2;
410 Index s1234_deg = s12_deg * s34_deg * s12_34_deg;
412 for (
Index f1 = 0, f1234 = 0; f1 != n1; ++f1) {
413 const Index bf1 = f1 + start_1;
414 for (
Index f2 = 0; f2 != n2; ++f2) {
415 const Index bf2 = f2 + start_2;
416 for (
Index f3 = 0; f3 != n3; ++f3) {
417 const Index bf3 = f3 + start_3;
418 for (
Index f4 = 0; f4 != n4; ++f4, ++f1234) {
419 const Index bf4 = f4 + start_4;
421 const double value = buf_1234[f1234];
423 const double value_scal_by_deg = value * double(s1234_deg);
425 hartree(bf1, bf2) += dmat(bf3, bf4) * value_scal_by_deg;
426 hartree(bf3, bf4) += dmat(bf1, bf2) * value_scal_by_deg;
428 exchange(bf1, bf3) -= dmat(bf2, bf4) * value_scal_by_deg;
429 exchange(bf2, bf3) -= dmat(bf1, bf4) * value_scal_by_deg;
430 exchange(bf2, bf4) -= dmat(bf1, bf3) * value_scal_by_deg;
431 exchange(bf1, bf4) -= dmat(bf2, bf3) * value_scal_by_deg;
441 std::array<Eigen::MatrixXd, 2> result2;
443 result2[0] = 0.25 * (hartree + hartree.transpose());
446 result2[1] = 0.125 * (exchange + exchange.transpose());
452 const Eigen::MatrixXd& dmat,
double error)
const;
454 const Eigen::MatrixXd& dmat,
double error)
const;
457 const AOBasis& dftbasis,
const Eigen::MatrixXd& metric,
458 double pair_threshold)
const {
460 std::vector<std::vector<Index>> kept(nshells);
461 if (pair_threshold <= 0.0) {
462 for (
Index a = 0; a < nshells; ++a) {
463 kept[a].resize(a + 1);
464 std::iota(kept[a].begin(), kept[a].end(),
Index(0));
469 const double max_aux = std::sqrt(metric.diagonal().cwiseAbs().maxCoeff());
471 std::vector<libint2::Engine> engines(nthreads);
473 libint2::Engine(libint2::Operator::coulomb, dftbasis.
getMaxNprim(),
474 static_cast<int>(dftbasis.
getMaxL()), 0, 0.0);
475 for (
Index i = 1; i < nthreads; ++i) {
476 engines[i] = engines[0];
479#pragma omp parallel for schedule(dynamic)
480 for (
Index a = nshells - 1; a >= 0; --a) {
482 const libint2::Engine::target_ptr_vec& buf = engine.results();
483 for (
Index b = 0; b < a; ++b) {
484 engine.compute2<libint2::Operator::coulomb, libint2::BraKet::xx_xx, 0>(
485 shells[a], shells[b], shells[a], shells[b]);
486 if (buf[0] ==
nullptr) {
490 const double schwarz =
491 std::sqrt(Eigen::Map<const Eigen::MatrixXd>(buf[0], n, n)
494 if (max_aux * schwarz >= pair_threshold) {
495 kept[a].push_back(b);
498 kept[a].push_back(a);
504 double pair_threshold,
Index build_columns) {
505 std::vector<std::vector<Index>> kept;
507 auto metric_start = std::chrono::steady_clock::now();
509 auxAOcoulomb.
Fill(auxbasis);
513 std::chrono::steady_clock::now() - metric_start)
537 std::vector<Unit> units;
547 rows + na *
Index(dftshells[kept[a][last]].
size()) <=
549 rows += na *
Index(dftshells[kept[a][last]].
size());
552 max_rows = std::max(max_rows, rows);
553 units.push_back({a, first, last});
559 std::vector<libint2::Engine> engines(nthreads);
560 engines[0] = libint2::Engine(
561 libint2::Operator::coulomb,
563 static_cast<int>(std::max(dftbasis.
getMaxL(), auxbasis.
getMaxL())), 0);
564 engines[0].set(libint2::BraKet::xs_xx);
565 for (
Index i = 1; i < nthreads; ++i) {
566 engines[i] = engines[0];
572 const libint2::Engine::target_ptr_vec& buf = engine.results();
574 Eigen::MatrixXd raw(max_rows, naux);
575 Eigen::MatrixXd transformed(max_rows, naux);
576 std::vector<Index> row_start;
577 std::vector<Index> chunk_pos;
579#pragma omp for schedule(dynamic)
580 for (
Index u = 0; u <
Index(units.size()); ++u) {
581 const Unit& unit = units[u];
582 const libint2::Shell& shell_a = dftshells[unit.a];
584 const Index start_a = shell2bf[unit.a];
585 const bool has_diagonal = kept[unit.a][unit.last - 1] == unit.a;
588 chunk_pos.assign(1, 0);
589 for (
Index k = unit.first; k < unit.last; ++k) {
590 chunk_pos.push_back(chunk_pos.back() +
591 Index(dftshells[kept[unit.a][k]].size()));
593 const Index width = chunk_pos.back();
595 row_start.assign(1, 0);
596 for (
Index i = 0; i < na; ++i) {
597 const Index len = has_diagonal ? width - (na - i - 1) : width;
598 row_start.push_back(row_start.back() + len);
600 const Index rows = row_start.back();
601 raw.topRows(rows).setZero();
603 for (
Index aux = 0; aux <
Index(auxshells.size()); ++aux) {
604 const libint2::Shell& auxshell = auxshells[aux];
605 const Index aux_start = auxshell2bf[aux];
606 for (
Index k = unit.first; k < unit.last; ++k) {
607 const Index b = kept[unit.a][k];
608 const libint2::Shell& shell_b = dftshells[b];
610 .compute2<libint2::Operator::coulomb, libint2::BraKet::xs_xx, 0>(
611 auxshell, libint2::Shell::unit(), shell_a, shell_b);
612 if (buf[0] ==
nullptr) {
616 Eigen::Tensor<const double, 3, Eigen::RowMajor>
const>
617 result(buf[0], auxshell.size(), shell_a.size(), shell_b.size());
619 const Index pos = chunk_pos[k - unit.first];
620 for (
Index i = 0; i < na; ++i) {
622 const Index ncol = (b == unit.a) ? std::min(nb, i + 1) : nb;
623 for (
Index c = 0; c < ncol; ++c) {
624 for (
Index f = 0; f <
Index(auxshell.size()); ++f) {
625 raw(row_start[i] + pos + c, aux_start + f) = result(f, i, c);
633 transformed.topRows(rows).noalias() =
634 raw.topRows(rows) *
inv_sqrt_.transpose();
637 for (
Index k = 0; k < unit.first; ++k) {
638 before +=
Index(dftshells[kept[unit.a][k]].size());
640 for (
Index i = 0; i < na; ++i) {
641 const Index len = row_start[i + 1] - row_start[i];
643 transformed.middleRows(row_start[i], len);
656 libint2::Engine& engine) {
657 std::vector<Eigen::MatrixXd> ao3c = std::vector<Eigen::MatrixXd>(
664 const libint2::Engine::target_ptr_vec& buf = engine.results();
666 for (
Index row = 0; row <
Index(dftshells.size()); row++) {
668 const libint2::Shell& shell_row = dftshells[row];
669 const Index row_start = shell2bf[row];
672 for (
Index col = 0; col <= row; col++) {
673 const libint2::Shell& shell_col = dftshells[col];
674 const Index col_start = shell2bf[col];
676 engine.compute2<libint2::Operator::coulomb, libint2::BraKet::xs_xx, 0>(
677 auxshell, libint2::Shell::unit(), shell_col, shell_row);
679 if (buf[0] ==
nullptr) {
682 Eigen::TensorMap<Eigen::Tensor<const double, 3, Eigen::RowMajor>
const>
683 result(buf[0], auxshell.size(), shell_col.size(), shell_row.size());
685 for (
size_t aux_c = 0; aux_c < auxshell.size(); aux_c++) {
686 for (
size_t col_c = 0; col_c < shell_col.size(); col_c++) {
687 for (
size_t row_c = 0; row_c < shell_row.size(); row_c++) {
689 ao3c[aux_c](row_start + row_c, col_start + col_c) =
690 result(aux_c, col_c, row_c);
698 for (Eigen::MatrixXd& mat : ao3c) {
699 mat.triangularView<Eigen::Upper>() =
700 mat.triangularView<Eigen::Lower>().transpose();
710Eigen::MatrixXd MultiplyLeftRight(
const Eigen::MatrixXd&
L,
711 const Eigen::MatrixXd& A,
712 const Eigen::MatrixXd& R) {
713 const double left_first =
714 double(
L.rows()) * double(A.rows()) * double(A.cols()) +
715 double(
L.rows()) * double(A.cols()) * double(R.cols());
716 const double right_first =
717 double(A.rows()) * double(A.cols()) * double(R.cols()) +
718 double(
L.rows()) * double(A.rows()) * double(R.cols());
719 if (right_first < left_first) {
727 const Eigen::MatrixXd& dft_orbitals) {
729 const Eigen::MatrixXd dftm = dft_orbitals.middleCols(
mmin_,
mtotal_);
730 const Eigen::MatrixXd dftn =
736 std::vector<libint2::Engine> engines(nthreads);
737 engines[0] = libint2::Engine(
738 libint2::Operator::coulomb,
740 static_cast<int>(std::max(dftbasis.
getMaxL(), auxbasis.
getMaxL())), 0);
741 engines[0].set(libint2::BraKet::xs_xx);
742 for (
Index i = 1; i < nthreads; ++i) {
743 engines[i] = engines[0];
750#pragma omp for schedule(dynamic)
751 for (
Index aux = 0; aux <
Index(auxshells.size()); aux++) {
752 const libint2::Shell& auxshell = auxshells[aux];
754 std::vector<Eigen::MatrixXd> ao3c =
760 const Index dim =
static_cast<Index>(ao3c.size());
761 const Index aux0 = auxshell2bf[aux];
762 for (
Index k = 0; k < dim; ++k) {
763 ao3c[k] = MultiplyLeftRight(dftn, ao3c[k], dftm);
765 matrix_[m_level].col(aux0 + k) = ao3c[k].col(m_level);
767 ao3c[k].resize(0, 0);
779 const AOBasis& auxbasis,
const std::vector<Eigen::Vector3d>& points,
780 const std::vector<double>& widths) {
781 if (!widths.empty() && widths.size() != points.size()) {
782 throw std::runtime_error(
"EnvironmentScreening::AuxFieldAtPoints: " +
783 std::to_string(widths.size()) +
" widths for " +
784 std::to_string(points.size()) +
" points.");
795 Eigen::MatrixXd::Zero(auxbasis.
AOBasisSize(), 3 * n_points);
796 if (n_points == 0 || shells.empty()) {
801 std::vector<libint2::Engine> engines(nthreads);
803 libint2::Engine(libint2::Operator::nuclear,
int(auxbasis.
getMaxNprim()),
805 for (
Index i = 1; i < nthreads; ++i) {
806 engines[i] = engines[0];
810 std::vector<libint2::Engine> coulomb(nthreads);
812 libint2::Engine(libint2::Operator::coulomb,
int(auxbasis.
getMaxNprim()),
814 coulomb[0].set(libint2::BraKet::xs_xs);
815 for (
Index i = 1; i < nthreads; ++i) {
816 coulomb[i] = coulomb[0];
821 const double h = 1
e-3;
822 const std::array<double, 4> offset = {2.0 * h, h, -h, -2.0 * h};
823 const std::array<double, 4> weight = {-1.0 / (12.0 * h), 8.0 / (12.0 * h),
824 -8.0 / (12.0 * h), 1.0 / (12.0 * h)};
831#pragma omp parallel for schedule(dynamic)
832 for (
Index p = 0; p < n_points; ++p) {
833 const double width = widths.empty() ? 0.0 : widths[std::size_t(p)];
841 const libint2::Engine::target_ptr_vec& buf = engine.results();
842 const double beta = 1.0 / (width * width);
843 const double charge =
844 std::pow(2.0 * beta / M_PI, 0.75) * std::pow(M_PI / beta, 1.5);
845 for (
Index k = 0; k < 3; ++k) {
846 for (std::size_t s = 0; s < offset.size(); ++s) {
847 Eigen::Vector3d C = points[std::size_t(p)];
849 const libint2::Shell g{
850 {beta}, {{0,
false, {1.0}}}, {{C.x(), C.y(), C.z()}}};
851 for (std::size_t sh = 0; sh < shells.size(); ++sh) {
852 engine.compute2<libint2::Operator::coulomb, libint2::BraKet::xs_xs,
853 0>(shells[sh], libint2::Shell::unit(), g,
854 libint2::Shell::unit());
855 if (buf[0] ==
nullptr) {
858 const Index start = shell2bf[sh];
859 for (std::size_t f = 0; f < shells[sh].size(); ++f) {
860 F(start +
Index(f), 3 * p + k) -= weight[s] * buf[0][f] / charge;
868 const libint2::Engine::target_ptr_vec& buf = engine.results();
869 for (
Index k = 0; k < 3; ++k) {
870 for (std::size_t s = 0; s < offset.size(); ++s) {
871 Eigen::Vector3d C = points[std::size_t(p)];
873 std::vector<std::pair<double, std::array<double, 3>>> charge{
874 {1.0, {C.x(), C.y(), C.z()}}};
875 engine.set_params(charge);
876 for (std::size_t sh = 0; sh < shells.size(); ++sh) {
877 engine.compute(shells[sh], libint2::Shell::unit());
878 if (buf[0] ==
nullptr) {
881 const Index start = shell2bf[sh];
882 for (std::size_t f = 0; f < shells[sh].size(); ++f) {
883 F(start +
Index(f), 3 * p + k) += weight[s] * buf[0][f];
898 Eigen::VectorXd q = Eigen::VectorXd::Zero(auxbasis.
AOBasisSize());
899 libint2::Engine engine(libint2::Operator::overlap,
902 const libint2::Engine::target_ptr_vec& buf = engine.results();
903 for (std::size_t sh = 0; sh < shells.size(); ++sh) {
904 engine.compute(shells[sh], libint2::Shell::unit());
905 if (buf[0] ==
nullptr) {
908 for (std::size_t f = 0; f < shells[sh].size(); ++f) {
909 q(shell2bf[sh] +
Index(f)) = buf[0][f];
Container to hold Basisfunctions for all atoms.
AOShellIterator begin() const
Index AOBasisSize() const
AOShellIterator end() const
std::vector< Index > getMapToBasisFunctions() const
Index getNumofShells() const
Index getMaxNprim() const
std::vector< std::vector< Index > > ComputeShellPairs(double threshold=1e-20) const
std::vector< libint2::Shell > GenerateLibintBasis() const
void Fill(const AOBasis &aobasis) final
Eigen::MatrixXd aomatrix_
const Eigen::MatrixXd & Matrix() const
void computeCoulombIntegrals(const AOBasis &aobasis)
Eigen::MatrixXd Pseudo_InvSqrt(double etol)
Index Removedfunctions() const
std::array< Eigen::MatrixXd, 3 > aomatrix_
std::array< libint2::Shell::real_t, 3 > r_
void Fill(const AOBasis &aobasis) final
void Fill(const AOBasis &aobasis) final
Eigen::MatrixXd aomatrix_
void Fill(const AOBasis &aobasis) final
Eigen::MatrixXd singleShellOverlap(const AOShell &shell) const
Eigen::MatrixXd aomatrix_
libint2::Shell LibintShell() 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_
std::array< Eigen::MatrixXd, 2 > Compute4c(const Eigen::MatrixXd &dmat, double error) const
Eigen::MatrixXd schwarzscreen_
Eigen::MatrixXd ComputeShellBlockNorm(const Eigen::MatrixXd &dmat) const
std::vector< Index > starts_
static Eigen::VectorXd AuxCharges(const AOBasis &auxbasis)
static Eigen::MatrixXd AuxFieldAtPoints(const AOBasis &auxbasis, const std::vector< Eigen::Vector3d > &points, const std::vector< double > &widths={})
F: the electric field at each point produced by each auxiliary basis function, taken as a charge dens...
std::vector< Index > col_offset_
std::vector< std::vector< Index > > SignificantPairs(const AOBasis &dftbasis, const Eigen::MatrixXd &metric, double pair_threshold) const
Index size() const
Number of aux functions.
void Fill(const AOBasis &auxbasis, const AOBasis &dftbasis, double pair_threshold=0.0, Index build_columns=kBuildColumns)
void SetupLayout(const AOBasis &dftbasis, const std::vector< std::vector< Index > > &kept)
void Fill3cMO(const AOBasis &auxbasis, const AOBasis &dftbasis, const Eigen::MatrixXd &dft_orbitals)
std::vector< Eigen::MatrixXd > matrix_
Eigen::MatrixXd inv_sqrt_
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixLibInt
std::vector< Eigen::MatrixXd > ComputeAO3cBlock(const libint2::Shell &auxshell, const AOBasis &dftbasis, libint2::Engine &engine)
std::array< MatrixLibInt, libint2::operator_traits< obtype >::nopers > computeOneBodyIntegrals(const AOBasis &aobasis, OperatorParams oparams=OperatorParams())
Provides a means for comparing floating point numbers.