test_class.declarator: smilesParser
test_class.modifier: static
test_class.original_string: static SmilesParser smilesParser;
test_class.type: SmilesParser
test_class.var_name: smilesParser
test_class.file: tool/fragment/src/test/java/org/openscience/cdk/fragment/FragmentUtilsTest.java
test_class.identifier: FragmentUtilsTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testMakeAtomContainer() {
  
          IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
  
          IAtom atom = builder.newInstance(IAtom.class, "C");
          IAtom exclude = builder.newInstance(IAtom.class, "C");
  
          IAtom a1 = builder.newInstance(IAtom.class, "C");
          IAtom a2 = builder.newInstance(IAtom.class, "C");
  
          IBond[] bonds = new IBond[]{builder.newInstance(IBond.class, atom, exclude),
                  builder.newInstance(IBond.class, a1, a2), builder.newInstance(IBond.class, a1, atom),
                  builder.newInstance(IBond.class, a2, exclude)};
  
          IAtomContainer part = FragmentUtils.makeAtomContainer(atom, Arrays.asList(bonds), exclude);
  
          assertThat(part.getAtomCount(), is(3));
          assertThat(part.getBondCount(), is(2));
  
          Assert.assertTrue(part.contains(atom));
          Assert.assertTrue(part.contains(a1));
          Assert.assertTrue(part.contains(a2));
          Assert.assertFalse(part.contains(exclude));
  
          Assert.assertTrue(part.contains(bonds[1]));
          Assert.assertTrue(part.contains(bonds[2]));
      }
test_case.class_method_signature: FragmentUtilsTest.testMakeAtomContainer()
test_case.full_signature: @Test public void testMakeAtomContainer()
test_case.identifier: testMakeAtomContainer
test_case.invocations: getInstance newInstance newInstance newInstance newInstance newInstance newInstance newInstance newInstance makeAtomContainer asList assertThat getAtomCount is assertThat getBondCount is assertTrue contains assertTrue contains assertTrue contains assertFalse contains assertTrue contains assertTrue contains
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMakeAtomContainer()
focal_class.file: tool/fragment/src/main/java/org/openscience/cdk/fragment/FragmentUtils.java
focal_class.identifier: FragmentUtils
focal_class.class_method_signature: FragmentUtils.splitMolecule(IAtomContainer atomContainer, IBond bond)
focal_class.full_signature: protected static List<IAtomContainer> splitMolecule(IAtomContainer atomContainer, IBond bond)
focal_class.identifier: splitMolecule
focal_class.modifiers: protected static
focal_class.parameters: (IAtomContainer atomContainer, IBond bond)
focal_class.return: List<IAtomContainer>
focal_class.signature: List<IAtomContainer> splitMolecule(IAtomContainer atomContainer, IBond bond)
focal_class.class_method_signature: FragmentUtils.makeAtomContainer(IAtom atom, List<IBond> parts, IAtom excludedAtom)
focal_class.full_signature: protected static IAtomContainer makeAtomContainer(IAtom atom, List<IBond> parts, IAtom excludedAtom)
focal_class.identifier: makeAtomContainer
focal_class.modifiers: protected static
focal_class.parameters: (IAtom atom, List<IBond> parts, IAtom excludedAtom)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer makeAtomContainer(IAtom atom, List<IBond> parts, IAtom excludedAtom)
focal_class.class_method_signature: FragmentUtils.traverse(IAtomContainer atomContainer, IAtom atom, List<IBond> bondList)
focal_class.full_signature: protected static List<IBond> traverse(IAtomContainer atomContainer, IAtom atom, List<IBond> bondList)
focal_class.identifier: traverse
focal_class.modifiers: protected static
focal_class.parameters: (IAtomContainer atomContainer, IAtom atom, List<IBond> bondList)
focal_class.return: List<IBond>
focal_class.signature: List<IBond> traverse(IAtomContainer atomContainer, IAtom atom, List<IBond> bondList)
focal_method.body: protected static IAtomContainer makeAtomContainer(IAtom atom, List<IBond> parts, IAtom excludedAtom) {
          IAtomContainer partContainer = atom.getBuilder().newInstance(IAtomContainer.class);
          partContainer.addAtom(atom);
          for (IBond aBond : parts) {
              for (IAtom bondedAtom : aBond.atoms()) {
                  if (!bondedAtom.equals(excludedAtom) && !partContainer.contains(bondedAtom))
                      partContainer.addAtom(bondedAtom);
              }
              if (!aBond.contains(excludedAtom)) partContainer.addBond(aBond);
          }
          return partContainer;
      }
focal_method.class_method_signature: FragmentUtils.makeAtomContainer(IAtom atom, List<IBond> parts, IAtom excludedAtom)
focal_method.full_signature: protected static IAtomContainer makeAtomContainer(IAtom atom, List<IBond> parts, IAtom excludedAtom)
focal_method.identifier: makeAtomContainer
focal_method.invocations: newInstance getBuilder addAtom atoms equals contains addAtom contains addBond
focal_method.modifiers: protected static
focal_method.parameters: (IAtom atom, List<IBond> parts, IAtom excludedAtom)
focal_method.return: IAtomContainer
focal_method.signature: IAtomContainer makeAtomContainer(IAtom atom, List<IBond> parts, IAtom excludedAtom)