code: private String encodeBondExpr(int bondIdx, int beg, int end) {
          IBond bond = mol.getBond(bondIdx);
          if (bond.getOrder() == null)
              return "";
  
          boolean bArom = bond.isAromatic();
          boolean aArom = mol.getAtom(beg).isAromatic() && mol.getAtom(end).isAromatic();
          switch (bond.getOrder()) {
              case SINGLE:
                  if (bArom) {
                      return aArom ? "" : ":";
                  } else {
                      return aArom ? "-" : "";
                  }
              case DOUBLE:
                  return bArom ? "" : "=";
              case TRIPLE:
                  return "#";
              default:
                  throw new IllegalArgumentException("Unsupported bond type: " + bond.getOrder());
          }
      }
docs: Encodes the bond at index (bondIdx) to a SMARTS
  expression that matches itself.
  
  @param bondIdx bond index
  @param beg     atom index of first atom
  @param end     atom index of second atom
  @return SMARTS bond expression