test_class.declarator: handler = new CDKRMapHandler()
test_class.modifier: private final
test_class.original_string: private final CDKRMapHandler handler = new CDKRMapHandler();
test_class.type: CDKRMapHandler
test_class.var_name: handler
test_class.file: legacy/src/test/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRMapHandlerTest.java
test_class.identifier: CDKRMapHandlerTest
test_case.body: @Test
      public void testCalculateOverlapsAndReduceExactMatch() throws Exception {
          IChemObjectBuilder builder = DefaultChemObjectBuilder.getInstance();
          SmilesParser sp = new SmilesParser(builder);
          IAtomContainer Molecule1 = sp.parseSmiles("O1C=CC=C1");
          IAtomContainer Molecule2 = sp.parseSmiles("O1C=CC=C1");
          CDKRMapHandler instance = new CDKRMapHandler();
          instance.calculateOverlapsAndReduceExactMatch(Molecule1, Molecule2, true);
          // TODO review the generated test code and remove the default call to fail.
          Assert.assertNotNull(FinalMappings.getInstance().getSize());
      }
test_case.class_method_signature: CDKRMapHandlerTest.testCalculateOverlapsAndReduceExactMatch()
test_case.full_signature: @Test public void testCalculateOverlapsAndReduceExactMatch()
test_case.identifier: testCalculateOverlapsAndReduceExactMatch
test_case.invocations: getInstance parseSmiles parseSmiles calculateOverlapsAndReduceExactMatch assertNotNull getSize getInstance
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCalculateOverlapsAndReduceExactMatch()
focal_class.declarator: mappings
focal_class.modifier: private
focal_class.original_string: private List<Map<Integer, Integer>> mappings;
focal_class.type: List<Map<Integer, Integer>>
focal_class.var_name: mappings
focal_class.declarator: source
focal_class.modifier: private
focal_class.original_string: private IAtomContainer       source;
focal_class.type: IAtomContainer
focal_class.var_name: source
focal_class.declarator: target
focal_class.modifier: private
focal_class.original_string: private IAtomContainer       target;
focal_class.type: IAtomContainer
focal_class.var_name: target
focal_class.declarator: timeoutFlag = false
focal_class.modifier: private
focal_class.original_string: private boolean                     timeoutFlag = false;
focal_class.type: boolean
focal_class.var_name: timeoutFlag
focal_class.file: legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRMapHandler.java
focal_class.identifier: CDKRMapHandler
focal_class.class_method_signature: CDKRMapHandler.CDKRMapHandler()
focal_class.full_signature: public  CDKRMapHandler()
focal_class.identifier: CDKRMapHandler
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  CDKRMapHandler()
focal_class.class_method_signature: CDKRMapHandler.getSource()
focal_class.full_signature: public IAtomContainer getSource()
focal_class.identifier: getSource
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer getSource()
focal_class.class_method_signature: CDKRMapHandler.setSource(IAtomContainer aSource)
focal_class.full_signature: public void setSource(IAtomContainer aSource)
focal_class.identifier: setSource
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer aSource)
focal_class.return: void
focal_class.signature: void setSource(IAtomContainer aSource)
focal_class.class_method_signature: CDKRMapHandler.getTarget()
focal_class.full_signature: public IAtomContainer getTarget()
focal_class.identifier: getTarget
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer getTarget()
focal_class.class_method_signature: CDKRMapHandler.setTarget(IAtomContainer aTarget)
focal_class.full_signature: public void setTarget(IAtomContainer aTarget)
focal_class.identifier: setTarget
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer aTarget)
focal_class.return: void
focal_class.signature: void setTarget(IAtomContainer aTarget)
focal_class.class_method_signature: CDKRMapHandler.calculateOverlapsAndReduce(IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.full_signature: public void calculateOverlapsAndReduce(IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.identifier: calculateOverlapsAndReduce
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.return: void
focal_class.signature: void calculateOverlapsAndReduce(IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.class_method_signature: CDKRMapHandler.calculateOverlapsAndReduceExactMatch(IAtomContainer molecule1, IAtomContainer molecule2,
              boolean shouldMatchBonds)
focal_class.full_signature: public void calculateOverlapsAndReduceExactMatch(IAtomContainer molecule1, IAtomContainer molecule2,
              boolean shouldMatchBonds)
focal_class.identifier: calculateOverlapsAndReduceExactMatch
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer molecule1, IAtomContainer molecule2,
              boolean shouldMatchBonds)
focal_class.return: void
focal_class.signature: void calculateOverlapsAndReduceExactMatch(IAtomContainer molecule1, IAtomContainer molecule2,
              boolean shouldMatchBonds)
focal_class.class_method_signature: CDKRMapHandler.calculateSubGraphs(IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.full_signature: public void calculateSubGraphs(IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.identifier: calculateSubGraphs
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.return: void
focal_class.signature: void calculateSubGraphs(IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.class_method_signature: CDKRMapHandler.calculateIsomorphs(IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.full_signature: public void calculateIsomorphs(IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.identifier: calculateIsomorphs
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.return: void
focal_class.signature: void calculateIsomorphs(IAtomContainer molecule1, IAtomContainer molecule2, boolean shouldMatchBonds)
focal_class.class_method_signature: CDKRMapHandler.removeSubGraph(List<List<CDKRMap>> overlaps)
focal_class.full_signature: protected List<List<CDKRMap>> removeSubGraph(List<List<CDKRMap>> overlaps)
focal_class.identifier: removeSubGraph
focal_class.modifiers: protected
focal_class.parameters: (List<List<CDKRMap>> overlaps)
focal_class.return: List<List<CDKRMap>>
focal_class.signature: List<List<CDKRMap>> removeSubGraph(List<List<CDKRMap>> overlaps)
focal_class.class_method_signature: CDKRMapHandler.removeRedundantMappingsForSingleAtomCase(List<CDKRMap> overlaps)
focal_class.full_signature: protected List<CDKRMap> removeRedundantMappingsForSingleAtomCase(List<CDKRMap> overlaps)
focal_class.identifier: removeRedundantMappingsForSingleAtomCase
focal_class.modifiers: protected
focal_class.parameters: (List<CDKRMap> overlaps)
focal_class.return: List<CDKRMap>
focal_class.signature: List<CDKRMap> removeRedundantMappingsForSingleAtomCase(List<CDKRMap> overlaps)
focal_class.class_method_signature: CDKRMapHandler.makeAtomsMapOfBondsMap(List<CDKRMap> rMapList, IAtomContainer graph1,
              IAtomContainer graph2)
focal_class.full_signature: private static List<List<CDKRMap>> makeAtomsMapOfBondsMap(List<CDKRMap> rMapList, IAtomContainer graph1,
              IAtomContainer graph2)
focal_class.identifier: makeAtomsMapOfBondsMap
focal_class.modifiers: private static
focal_class.parameters: (List<CDKRMap> rMapList, IAtomContainer graph1,
              IAtomContainer graph2)
focal_class.return: List<List<CDKRMap>>
focal_class.signature: List<List<CDKRMap>> makeAtomsMapOfBondsMap(List<CDKRMap> rMapList, IAtomContainer graph1,
              IAtomContainer graph2)
focal_class.class_method_signature: CDKRMapHandler.makeAtomsMapOfBondsMapSingleBond(List<CDKRMap> list, IAtomContainer sourceGraph,
              IAtomContainer targetGraph)
focal_class.full_signature: private static List<List<CDKRMap>> makeAtomsMapOfBondsMapSingleBond(List<CDKRMap> list, IAtomContainer sourceGraph,
              IAtomContainer targetGraph)
focal_class.identifier: makeAtomsMapOfBondsMapSingleBond
focal_class.modifiers: private static
focal_class.parameters: (List<CDKRMap> list, IAtomContainer sourceGraph,
              IAtomContainer targetGraph)
focal_class.return: List<List<CDKRMap>>
focal_class.signature: List<List<CDKRMap>> makeAtomsMapOfBondsMapSingleBond(List<CDKRMap> list, IAtomContainer sourceGraph,
              IAtomContainer targetGraph)
focal_class.class_method_signature: CDKRMapHandler.getMaximum(List overlaps)
focal_class.full_signature: protected List getMaximum(List overlaps)
focal_class.identifier: getMaximum
focal_class.modifiers: protected
focal_class.parameters: (List overlaps)
focal_class.return: List
focal_class.signature: List getMaximum(List overlaps)
focal_class.class_method_signature: CDKRMapHandler.getAllMaximum(List<List<CDKRMap>> overlaps)
focal_class.full_signature: protected Stack<List<CDKRMap>> getAllMaximum(List<List<CDKRMap>> overlaps)
focal_class.identifier: getAllMaximum
focal_class.modifiers: protected
focal_class.parameters: (List<List<CDKRMap>> overlaps)
focal_class.return: Stack<List<CDKRMap>>
focal_class.signature: Stack<List<CDKRMap>> getAllMaximum(List<List<CDKRMap>> overlaps)
focal_class.class_method_signature: CDKRMapHandler.identifyMatchedParts(List<List<CDKRMap>> list, IAtomContainer source, IAtomContainer target)
focal_class.full_signature: protected void identifyMatchedParts(List<List<CDKRMap>> list, IAtomContainer source, IAtomContainer target)
focal_class.identifier: identifyMatchedParts
focal_class.modifiers: protected
focal_class.parameters: (List<List<CDKRMap>> list, IAtomContainer source, IAtomContainer target)
focal_class.return: void
focal_class.signature: void identifyMatchedParts(List<List<CDKRMap>> list, IAtomContainer source, IAtomContainer target)
focal_class.class_method_signature: CDKRMapHandler.identifySingleAtomsMatchedParts(List<CDKRMap> list, IAtomContainer source, IAtomContainer target)
focal_class.full_signature: protected void identifySingleAtomsMatchedParts(List<CDKRMap> list, IAtomContainer source, IAtomContainer target)
focal_class.identifier: identifySingleAtomsMatchedParts
focal_class.modifiers: protected
focal_class.parameters: (List<CDKRMap> list, IAtomContainer source, IAtomContainer target)
focal_class.return: void
focal_class.signature: void identifySingleAtomsMatchedParts(List<CDKRMap> list, IAtomContainer source, IAtomContainer target)
focal_class.class_method_signature: CDKRMapHandler.isSubgraph(List<CDKRMap> rmaps1, List<CDKRMap> rmaps2)
focal_class.full_signature: protected boolean isSubgraph(List<CDKRMap> rmaps1, List<CDKRMap> rmaps2)
focal_class.identifier: isSubgraph
focal_class.modifiers: protected
focal_class.parameters: (List<CDKRMap> rmaps1, List<CDKRMap> rmaps2)
focal_class.return: boolean
focal_class.signature: boolean isSubgraph(List<CDKRMap> rmaps1, List<CDKRMap> rmaps2)
focal_class.class_method_signature: CDKRMapHandler.isSameRMap(CDKRMap sourceRMap, CDKRMap targetRMap)
focal_class.full_signature: protected boolean isSameRMap(CDKRMap sourceRMap, CDKRMap targetRMap)
focal_class.identifier: isSameRMap
focal_class.modifiers: protected
focal_class.parameters: (CDKRMap sourceRMap, CDKRMap targetRMap)
focal_class.return: boolean
focal_class.signature: boolean isSameRMap(CDKRMap sourceRMap, CDKRMap targetRMap)
focal_class.class_method_signature: CDKRMapHandler.getMappings()
focal_class.full_signature: public List<Map<Integer, Integer>> getMappings()
focal_class.identifier: getMappings
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Map<Integer, Integer>>
focal_class.signature: List<Map<Integer, Integer>> getMappings()
focal_class.class_method_signature: CDKRMapHandler.setMappings(List<Map<Integer, Integer>> mappings)
focal_class.full_signature: public void setMappings(List<Map<Integer, Integer>> mappings)
focal_class.identifier: setMappings
focal_class.modifiers: public
focal_class.parameters: (List<Map<Integer, Integer>> mappings)
focal_class.return: void
focal_class.signature: void setMappings(List<Map<Integer, Integer>> mappings)
focal_class.class_method_signature: CDKRMapHandler.isTimeoutFlag()
focal_class.full_signature: public boolean isTimeoutFlag()
focal_class.identifier: isTimeoutFlag
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isTimeoutFlag()
focal_class.class_method_signature: CDKRMapHandler.setTimeoutFlag(boolean timeoutFlag)
focal_class.full_signature: public void setTimeoutFlag(boolean timeoutFlag)
focal_class.identifier: setTimeoutFlag
focal_class.modifiers: public
focal_class.parameters: (boolean timeoutFlag)
focal_class.return: void
focal_class.signature: void setTimeoutFlag(boolean timeoutFlag)
focal_method.body: public void calculateOverlapsAndReduceExactMatch(IAtomContainer molecule1, IAtomContainer molecule2,
              boolean shouldMatchBonds) throws CDKException {
  
          setSource(molecule1);
          setTarget(molecule2);
  
          setMappings(new ArrayList<Map<Integer, Integer>>());
  
          //System.out.println("Searching: ");
          //List overlaps = UniversalIsomorphismTesterBondTypeInSensitive.getSubgraphAtomsMap(source, target);
  
          if ((getSource().getAtomCount() == 1) || (getTarget().getAtomCount() == 1)) {
  
              List<CDKRMap> overlaps = CDKMCS.checkSingleAtomCases(getSource(), getTarget());
              int nAtomsMatched = overlaps.size();
              nAtomsMatched = (nAtomsMatched > 0) ? 1 : 0;
              if (nAtomsMatched > 0) {
                  identifySingleAtomsMatchedParts(overlaps, getSource(), getTarget());
              }
  
          } else {
  
              List<List<CDKRMap>> overlaps = CDKMCS.search(getSource(), getTarget(), new BitSet(), new BitSet(), true,
                      true, shouldMatchBonds);
  
              List<List<CDKRMap>> reducedList = removeSubGraph(overlaps);
              Stack<List<CDKRMap>> allMaxOverlaps = getAllMaximum(reducedList);
  
              while (!allMaxOverlaps.empty()) {
                  List<List<CDKRMap>> maxOverlapsAtoms = makeAtomsMapOfBondsMap(allMaxOverlaps.peek(), getSource(),
                          getTarget());
                  identifyMatchedParts(maxOverlapsAtoms, getSource(), getTarget());
                  allMaxOverlaps.pop();
              }
          }
          FinalMappings.getInstance().set(getMappings());
      }
focal_method.class_method_signature: CDKRMapHandler.calculateOverlapsAndReduceExactMatch(IAtomContainer molecule1, IAtomContainer molecule2,
              boolean shouldMatchBonds)
focal_method.full_signature: public void calculateOverlapsAndReduceExactMatch(IAtomContainer molecule1, IAtomContainer molecule2,
              boolean shouldMatchBonds)
focal_method.identifier: calculateOverlapsAndReduceExactMatch
focal_method.invocations: setSource setTarget setMappings getAtomCount getSource getAtomCount getTarget checkSingleAtomCases getSource getTarget size identifySingleAtomsMatchedParts getSource getTarget search getSource getTarget removeSubGraph getAllMaximum empty makeAtomsMapOfBondsMap peek getSource getTarget identifyMatchedParts getSource getTarget pop set getInstance getMappings
focal_method.modifiers: public
focal_method.parameters: (IAtomContainer molecule1, IAtomContainer molecule2,
              boolean shouldMatchBonds)
focal_method.return: void
focal_method.signature: void calculateOverlapsAndReduceExactMatch(IAtomContainer molecule1, IAtomContainer molecule2,
              boolean shouldMatchBonds)