Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fbischoff committed Aug 2, 2023
1 parent b19e0f3 commit 6879f5c
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
5 changes: 1 addition & 4 deletions src/apps/mp2/mp2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ int main(int argc, char** argv) {

if (world.rank() == 0) printf("\nstarting at time %.1fs\n", wall_time());

if (do_test) mp2.test(testfilename);
else {
const double hf_energy=mp2.get_hf().value();
const double mp2_energy=mp2.value();
// const double mp2_energy=0.0;
Expand All @@ -96,8 +94,7 @@ int main(int argc, char** argv) {
printf("final hf/mp3/total energy %12.8f %12.8f %12.8f\n",
hf_energy,mp3_energy,hf_energy+mp3_energy);
}
}
} catch (std::exception& e) {
} catch (std::exception& e) {

if (world.rank() == 0) {
print("\ncaught an exception: \n", e.what());
Expand Down
4 changes: 2 additions & 2 deletions src/madness/chem/CCPotentials.h
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,9 @@ class CCPotentials {

// update the intermediates
void update_intermediates(const CC_vecfunction& t) {
g12.update_elements(mo_bra_, t);
g12->update_elements(mo_bra_, t);
// g12.sanity();
f12.update_elements(mo_bra_, t);
f12->update_elements(mo_bra_, t);
// f12.sanity();
}

Expand Down
7 changes: 0 additions & 7 deletions src/madness/chem/mp2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -708,13 +708,6 @@ double MP2::asymmetry(const real_function_6d& f, const std::string s) const {
return diff;
}

void MP2::test(const std::string filename) {
if (world.rank() == 0)
printf("starting coupling at time %8.1fs\n", wall_time());
if (world.rank() == 0)
printf("ending coupling at time %8.1fs\n", wall_time());
}

/// compute the matrix element <ij | g12 Q12 f12 | phi^0>

/// scales quartically. I think I can get this down to cubically by
Expand Down
2 changes: 0 additions & 2 deletions src/madness/chem/mp2.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,6 @@ class MP2 : public OptimizationTargetInterface, public QCPropertyInterface {

double asymmetry(const real_function_6d& f, const std::string s) const;

void test(const std::string filename);

/// compute the matrix element <ij | g12 Q12 f12 | phi^0>

/// scales quartically. I think I can get this down to cubically by
Expand Down
10 changes: 0 additions & 10 deletions src/madness/mra/mra.h
Original file line number Diff line number Diff line change
Expand Up @@ -2138,22 +2138,13 @@ namespace madness {

if (op.modified()) {

MADNESS_ASSERT(not op.is_slaterf12);
ff.get_impl()->make_redundant(true);
result = apply_only(op, ff, fence);
ff.get_impl()->undo_redundant(false);
result.get_impl()->trickle_down(true);

} else {

// the slaterf12 function is
// 1/(2 mu) \int d1 (1 - exp(- mu r12)) f(1)
// = 1/(2 mu) (f.trace() - \int d1 exp(-mu r12) f(1) )
// f.trace() is just a number
R ftrace=0.0;
if (op.is_slaterf12) ftrace=f.trace();
// print("ftrace",ftrace);

// saves the standard() step, which is very expensive in 6D
// Function<R,NDIM> fff=copy(ff);
Function<R,NDIM> fff=(ff);
Expand Down Expand Up @@ -2185,7 +2176,6 @@ namespace madness {
} else {
ff.standard();
}
if (op.is_slaterf12) result=(result-ftrace).scale(-0.5/op.mu());

}
if (print_timings) result.print_size("result after reconstruction");
Expand Down

0 comments on commit 6879f5c

Please sign in to comment.