test_class.declarator: builder = SilentChemObjectBuilder.getInstance()
test_class.modifier: public static
test_class.original_string: public static IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
test_class.type: IChemObjectBuilder
test_class.var_name: builder
test_class.file: tool/group/src/test/java/org/openscience/cdk/group/BondRefinableTest.java
test_class.identifier: BondRefinableTest
test_case.body: @Test
      public void getBondPartitionTest() {
          String acpString = "C0C1C2C3O4 0:1(2),0:4(1),1:2(1),2:3(2),3:4(1)";
          IAtomContainer ac = AtomContainerPrinter.fromString(acpString, builder);
          BondRefinable refinable = new BondRefinable(ac);
          Partition bondPartition = refinable.getInitialPartition();
          Partition expected = Partition.fromString("0,3|1,4|2");
          assertEquals(expected, bondPartition);
      }
test_case.class_method_signature: BondRefinableTest.getBondPartitionTest()
test_case.full_signature: @Test public void getBondPartitionTest()
test_case.identifier: getBondPartitionTest
test_case.invocations: fromString getInitialPartition fromString assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getBondPartitionTest()
focal_class.declarator: atomContainer
focal_class.modifier: private final
focal_class.original_string: private final IAtomContainer atomContainer;
focal_class.type: IAtomContainer
focal_class.var_name: atomContainer
focal_class.declarator: connectionTable
focal_class.modifier: private
focal_class.original_string: private int[][] connectionTable;
focal_class.type: int[][]
focal_class.var_name: connectionTable
focal_class.declarator: ignoreBondOrders
focal_class.modifier: private
focal_class.original_string: private boolean ignoreBondOrders;
focal_class.type: boolean
focal_class.var_name: ignoreBondOrders
focal_class.file: tool/group/src/main/java/org/openscience/cdk/group/BondRefinable.java
focal_class.identifier: BondRefinable
focal_class.interfaces: implements Refinable
focal_class.class_method_signature: BondRefinable.BondRefinable(IAtomContainer atomContainer)
focal_class.full_signature: public  BondRefinable(IAtomContainer atomContainer)
focal_class.identifier: BondRefinable
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.signature:  BondRefinable(IAtomContainer atomContainer)
focal_class.class_method_signature: BondRefinable.BondRefinable(IAtomContainer atomContainer, boolean ignoreBondOrders)
focal_class.full_signature: public  BondRefinable(IAtomContainer atomContainer, boolean ignoreBondOrders)
focal_class.identifier: BondRefinable
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer atomContainer, boolean ignoreBondOrders)
focal_class.signature:  BondRefinable(IAtomContainer atomContainer, boolean ignoreBondOrders)
focal_class.class_method_signature: BondRefinable.getVertexCount()
focal_class.full_signature: @Override public int getVertexCount()
focal_class.identifier: getVertexCount
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getVertexCount()
focal_class.class_method_signature: BondRefinable.getConnectivity(int vertexI, int vertexJ)
focal_class.full_signature: @Override public int getConnectivity(int vertexI, int vertexJ)
focal_class.identifier: getConnectivity
focal_class.modifiers: @Override public
focal_class.parameters: (int vertexI, int vertexJ)
focal_class.return: int
focal_class.signature: int getConnectivity(int vertexI, int vertexJ)
focal_class.class_method_signature: BondRefinable.neighboursInBlock(Set<Integer> block, int vertexIndex)
focal_class.full_signature: @Override public Invariant neighboursInBlock(Set<Integer> block, int vertexIndex)
focal_class.identifier: neighboursInBlock
focal_class.modifiers: @Override public
focal_class.parameters: (Set<Integer> block, int vertexIndex)
focal_class.return: Invariant
focal_class.signature: Invariant neighboursInBlock(Set<Integer> block, int vertexIndex)
focal_class.class_method_signature: BondRefinable.getConnectedIndices(int vertexIndex)
focal_class.full_signature: private int[] getConnectedIndices(int vertexIndex)
focal_class.identifier: getConnectedIndices
focal_class.modifiers: private
focal_class.parameters: (int vertexIndex)
focal_class.return: int[]
focal_class.signature: int[] getConnectedIndices(int vertexIndex)
focal_class.class_method_signature: BondRefinable.getInitialPartition()
focal_class.full_signature: public Partition getInitialPartition()
focal_class.identifier: getInitialPartition
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Partition
focal_class.signature: Partition getInitialPartition()
focal_class.class_method_signature: BondRefinable.setupConnectionTable(IAtomContainer atomContainer)
focal_class.full_signature: private void setupConnectionTable(IAtomContainer atomContainer)
focal_class.identifier: setupConnectionTable
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: void
focal_class.signature: void setupConnectionTable(IAtomContainer atomContainer)
focal_method.body: public Partition getInitialPartition() {
          int bondCount = atomContainer.getBondCount();
          Map<String, SortedSet<Integer>> cellMap = new HashMap<String, SortedSet<Integer>>();
  
          // make mini-'descriptors' for bonds like "C=O" or "C#N" etc
          for (int bondIndex = 0; bondIndex < bondCount; bondIndex++) {
              IBond bond = atomContainer.getBond(bondIndex);
              String el0 = bond.getAtom(0).getSymbol();
              String el1 = bond.getAtom(1).getSymbol();
              String boS;
              if (ignoreBondOrders) {
                  // doesn't matter what it is, so long as it's constant
                  boS = "1";
              } else {
                  boolean isArom = bond.getFlag(CDKConstants.ISAROMATIC);
                  int orderNumber = (isArom) ? 5 : bond.getOrder().numeric();
                  boS = String.valueOf(orderNumber);
              }
              String bondString;
              if (el0.compareTo(el1) < 0) {
                  bondString = el0 + boS + el1;
              } else {
                  bondString = el1 + boS + el0;
              }
              SortedSet<Integer> cell;
              if (cellMap.containsKey(bondString)) {
                  cell = cellMap.get(bondString);
              } else {
                  cell = new TreeSet<Integer>();
                  cellMap.put(bondString, cell);
              }
              cell.add(bondIndex);
          }
  
          // sorting is necessary to get cells in order
          List<String> bondStrings = new ArrayList<String>(cellMap.keySet());
          Collections.sort(bondStrings);
  
          // the partition of the bonds by these 'descriptors'
          Partition bondPartition = new Partition();
          for (String key : bondStrings) {
              SortedSet<Integer> cell = cellMap.get(key);
              bondPartition.addCell(cell);
          }
          bondPartition.order();
          return bondPartition;
      }
focal_method.class_method_signature: BondRefinable.getInitialPartition()
focal_method.full_signature: public Partition getInitialPartition()
focal_method.identifier: getInitialPartition
focal_method.invocations: getBondCount getBond getSymbol getAtom getSymbol getAtom getFlag numeric getOrder valueOf compareTo containsKey get put add keySet sort get addCell order
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Partition
focal_method.signature: Partition getInitialPartition()