Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use central atom as coordinates of implicit hydrogen or lone pair. Fixes
  • Loading branch information
johnmay committed Oct 12, 2017
1 parent e8d7417 commit 21c9308
Showing 1 changed file with 3 additions and 9 deletions.
Expand Up @@ -916,15 +916,9 @@ private int[] rubricTetrahedral(int aidx) {
int[] adj = atomAdj[aidx];
if (adjc == 3) {
adj = appendInteger(adj, -1);
xp[3] = -(xp[0] + xp[1] + xp[2]);
yp[3] = -(yp[0] + yp[1] + yp[2]);
zp[3] = -(zp[0] + zp[1] + zp[2]);
float dsq = xp[3] * xp[3] + yp[3] * yp[3] + zp[3] * zp[3];
if (dsq < 0.01f * 0.01f) return null;
float inv = 1.0f / (float) Math.sqrt(dsq);
xp[3] *= inv;
yp[3] *= inv;
zp[3] *= inv;
xp[3] = x0;
yp[3] = y0;
zp[3] = z0;
}

// make the call on permutational parity
Expand Down

0 comments on commit 21c9308

Please sign in to comment.