code: static public SimpleGraph getMoleculeGraph(IAtomContainer molecule) {
          SimpleGraph graph = new SimpleGraph();
          for (int i = 0; i < molecule.getAtomCount(); i++) {
              IAtom atom = molecule.getAtom(i);
              graph.addVertex(atom);
          }
  
          for (int i = 0; i < molecule.getBondCount(); i++) {
              IBond bond = molecule.getBond(i);
  
              /*
               * int order = (int) bond.getOrder(); for (int j=0; j<order; j++) {
               * graph.addEdge(bond.getAtoms()[0], bond.getAtoms()[1]); }
               */
              graph.addEdge(bond.getBegin(), bond.getEnd());
          }
          return graph;
      }
docs: Creates a molecule graph for use with jgrapht.
  Bond orders are not respected.
  
  @param molecule the specified molecule
  @return a graph representing the molecule