test_class.file: legacy/src/test/java/org/openscience/cdk/graph/MoleculeGraphsTest.java
test_class.identifier: MoleculeGraphsTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testGetMoleculeGraph_IAtomContainer() {
          IAtomContainer apinene = TestMoleculeFactory.makeAlphaPinene();
          SimpleGraph graph = MoleculeGraphs.getMoleculeGraph(apinene);
          Assert.assertEquals(apinene.getAtomCount(), graph.vertexSet().size());
          Assert.assertEquals(apinene.getBondCount(), graph.edgeSet().size());
      }
test_case.class_method_signature: MoleculeGraphsTest.testGetMoleculeGraph_IAtomContainer()
test_case.full_signature: @Test public void testGetMoleculeGraph_IAtomContainer()
test_case.identifier: testGetMoleculeGraph_IAtomContainer
test_case.invocations: makeAlphaPinene getMoleculeGraph assertEquals getAtomCount size vertexSet assertEquals getBondCount size edgeSet
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetMoleculeGraph_IAtomContainer()
focal_class.file: legacy/src/main/java/org/openscience/cdk/graph/MoleculeGraphs.java
focal_class.identifier: MoleculeGraphs
focal_class.class_method_signature: MoleculeGraphs.MoleculeGraphs()
focal_class.full_signature: private  MoleculeGraphs()
focal_class.identifier: MoleculeGraphs
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  MoleculeGraphs()
focal_class.class_method_signature: MoleculeGraphs.getMoleculeGraph(IAtomContainer molecule)
focal_class.full_signature: static public SimpleGraph getMoleculeGraph(IAtomContainer molecule)
focal_class.identifier: getMoleculeGraph
focal_class.modifiers: static public
focal_class.parameters: (IAtomContainer molecule)
focal_class.return: SimpleGraph
focal_class.signature: SimpleGraph getMoleculeGraph(IAtomContainer molecule)
focal_method.body: 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;
      }
focal_method.class_method_signature: MoleculeGraphs.getMoleculeGraph(IAtomContainer molecule)
focal_method.full_signature: static public SimpleGraph getMoleculeGraph(IAtomContainer molecule)
focal_method.identifier: getMoleculeGraph
focal_method.invocations: getAtomCount getAtom addVertex getBondCount getBond addEdge getBegin getEnd
focal_method.modifiers: static public
focal_method.parameters: (IAtomContainer molecule)
focal_method.return: SimpleGraph
focal_method.signature: SimpleGraph getMoleculeGraph(IAtomContainer molecule)