code: private static PermutationParity fill3DCoordinates(IAtomContainer container, IAtom a, List<IBond> connected,
              Point3d[] coordinates, int offset) {
  
          int i = 0;
          int[] indices = new int[2];
  
          for (IBond bond : connected) {
              if (!isDoubleBond(bond)) {
                  IAtom other = bond.getOther(a);
                  coordinates[i + offset] = other.getPoint3d();
                  indices[i] = container.indexOf(other);
                  i++;
              }
          }
  
          // only one connection, use the coordinate of 'a'
          if (i == 1) {
              coordinates[offset + 1] = a.getPoint3d();
              return PermutationParity.IDENTITY;
          } else {
              return new BasicPermutationParity(indices);
          }
      }
docs: Fill the {@literal coordinates} from the given offset index. If there is
  only one connection then the second entry (from the offset) will use the
  coordinates of <i>a</i>. The permutation parity is also built and
  returned.
  
  @param container   atom container
  @param a           the central atom
  @param connected   bonds connected to the central atom
  @param coordinates the coordinates array to fill
  @param offset      current location in the offset array
  @return the permutation parity