Skip to content

Commit

Permalink
Overlap implementation looks okay. Test values now
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullah committed Mar 1, 2019
1 parent 01ad5a3 commit 60a9f93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/THO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ float THO::overlap(std::tuple<int, int, int> lmn1,
std::tie(l2, m2, n2) = lmn2;
float gamma = a + b;
Eigen::ArrayXf Q = a * b * A * B / gamma;
float dist2 = (A - B).matrix().squaredNorm();
S_x = overlap_1d(l1, l2, Q[0] - A[0], Q[0] - B[0], gamma);
S_y = overlap_1d(m1, m2, Q[1] - A[1], Q[1] - B[1], gamma);
S_z = overlap_1d(n1, n2, Q[2] - A[2], Q[2] - B[2], gamma);
return S_x * S_y * S_z;
return std::exp(-1 * a * b * dist2 / gamma) * S_x * S_y * S_z;
}

float THO::overlap_1d(int l1, int l2, float PAx, float PBx, float gamma){
Expand Down

0 comments on commit 60a9f93

Please sign in to comment.