Commit faff9517 authored by Andrew Wildman's avatar Andrew Wildman
Browse files

Merge branch 'fix_eri4i_tospinor' into 'minor_rc'

Fixed 4-index ERI spatial to spinor transformation

See merge request chronusq/chronusq_dev!70
parents bcc0e9cd 78f16641
......@@ -83,6 +83,8 @@ namespace ChronusQ {
virtual void computeAOInts(BasisSet&, Molecule&, EMPerturbation&,
OPERATOR, const AOIntsOptions&) = 0;
virtual void clear() = 0;
virtual void output(std::ostream&, const std::string& = "",
bool printFull = false) const = 0;
......
......@@ -216,6 +216,11 @@ namespace ChronusQ {
virtual void computeAOInts(BasisSet&, Molecule&, EMPerturbation&,
OPERATOR, const AOIntsOptions&);
virtual void clear() {
for (OneEInts<IntsT>& c : components_)
c.clear();
}
virtual void output(std::ostream &out, const std::string &s = "",
bool printFull = false) const {
if (printFull) {
......
......@@ -78,6 +78,8 @@ namespace ChronusQ {
virtual void computeAOInts(BasisSet&, Molecule&, EMPerturbation&,
OPERATOR, const AOIntsOptions&) {}
virtual void clear() {}
void computeSchwartz();
virtual void output(std::ostream &out, const std::string &s = "",
......
......@@ -110,6 +110,10 @@ namespace ChronusQ {
virtual void computeAOInts(BasisSet&, Molecule&, EMPerturbation&,
OPERATOR, const AOIntsOptions&);
virtual void clear() {
std::fill_n(ERI, NB2*NB2, IntsT(0.));
}
virtual void output(std::ostream &out, const std::string &s = "",
bool printFull = false) const {
if (s == "")
......
......@@ -126,6 +126,10 @@ namespace ChronusQ {
CErr("AO integral evaluation is NOT implemented in super class InCoreRIERI.");
}
virtual void clear() {
std::fill_n(ERI3J, this->nBasis()*NBNBRI, IntsT(0.));
}
virtual void output(std::ostream &out, const std::string &s = "",
bool printFull = false) const {
if (s == "")
......
......@@ -35,7 +35,8 @@ namespace ChronusQ {
InCore4indexERI<IntsU> InCore4indexERI<IntsT>::spatialToSpinBlock() const {
size_t NB = this->nBasis();
InCore4indexERI<IntsU> spinor(this->memManager(), 2*NB);
/*
spinor.clear();
for (auto spls = 0ul; spls < 2; spls++)
for (auto spmn = 0ul; spmn < 2; spmn++)
for (auto sg = 0ul; sg < NB; sg++)
......@@ -44,11 +45,7 @@ namespace ChronusQ {
for (auto mu = 0ul; mu < NB; mu++) {
spinor(spmn*NB+mu, spmn*NB+nu, spls*NB+lm, spls*NB+sg) = (*this)(mu, nu, lm, sg);
}
*/
IntsT* half_trans = this->memManager().template malloc<IntsT>(4*NB*NB3);
SetMatDiag(NB, NB3, pointer(), NB, half_trans, 2*NB);
SetMatDiag(4*NB3, NB, half_trans, 4*NB3, spinor.pointer(), 8*NB3);
this->memManager().free(half_trans);
return spinor;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment