// three or four are not in a ring. So let's find the shortest two
// branches and invert them.
int[] lengths = new int[nb];
int[] points = new int[nb];
int ni = 0;
for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1), ni++) {
lengths[ni] = viewer.getBranchBitSet(i, atomIndex).cardinality();
points[ni] = i;
}
for (int j = 0; j < nb - 2; j++) {
int max = Integer.MIN_VALUE;