Skip to content

Commit

Permalink
Resolving failing unit test, hidx needs to check i,j (local index) no…
Browse files Browse the repository at this point in the history
…r a,b (labels).
  • Loading branch information
johnmay committed Apr 18, 2016
1 parent 0f8d3cb commit ceaa623
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -448,7 +448,6 @@ public void writeMolecule(IAtomContainer container) throws Exception {
line += " 0 0 0 0 0";
} else {
int parity = tc.getStereo() == ITetrahedralChirality.Stereo.CLOCKWISE ? 1 : 2;
int swaps = 0;
IAtom focus = tc.getChiralAtom();
IAtom[] carriers = tc.getLigands();

Expand All @@ -466,9 +465,9 @@ public void writeMolecule(IAtomContainer container) throws Exception {
for (int j = i + 1; j < 4; j++) {
int a = atomindex.get(carriers[i]);
int b = atomindex.get(carriers[j]);
if (a == hidx)
if (i == hidx)
a = container.getAtomCount();
if (b == hidx)
if (j == hidx)
b = container.getAtomCount();
if (a > b)
parity ^= 0x3;
Expand Down

0 comments on commit ceaa623

Please sign in to comment.