CDKMCS { public static List<CDKRMap> getSubgraphMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<CDKRMap> result = null; List<List<CDKRMap>> rMapsList = search(sourceGraph, targetGraph, new BitSet(), getBitSet(targetGraph), false, false, shouldMatchBonds); if (!rMapsList.isEmpty()) { result = rMapsList.get(0); } return result; }  static boolean isIsomorph(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds); static List<CDKRMap> getIsomorphMap(IAtomContainer sourceGraph, IAtomContainer targetGraph,
            boolean shouldMatchBonds); static List<CDKRMap> getIsomorphAtomsMap(IAtomContainer sourceGraph, IAtomContainer targetGraph,
            boolean shouldMatchBonds); static List<List<CDKRMap>> getIsomorphMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph,
            boolean shouldMatchBonds); static List<List<CDKRMap>> getSubgraphMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph,
            boolean shouldMatchBonds); static List<CDKRMap> getSubgraphMap(IAtomContainer sourceGraph, IAtomContainer targetGraph,
            boolean shouldMatchBonds); static List<List<CDKRMap>> getSubgraphAtomsMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph,
            boolean shouldMatchBonds); static List<CDKRMap> getSubgraphAtomsMap(IAtomContainer sourceGraph, IAtomContainer targetGraph,
            boolean shouldMatchBonds); static boolean isSubgraph(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds); static List<IAtomContainer> getOverlaps(IAtomContainer sourceGraph, IAtomContainer targetGraph,
            boolean shouldMatchBonds); static BitSet getBitSet(IAtomContainer atomContainer); static CDKRGraph buildRGraph(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds); static List<List<CDKRMap>> search(IAtomContainer sourceGraph, IAtomContainer targetGraph,
            BitSet sourceBitSet, BitSet targetBitSet, boolean findAllStructure, boolean findAllMap,
            boolean shouldMatchBonds); static IAtomContainer project(List<CDKRMap> rMapList, IAtomContainer graph, int key); static ArrayList<IAtomContainer> projectList(List<List<CDKRMap>> rMapsList, IAtomContainer graph, int key); static List<CDKRMap> checkSingleAtomCases(IAtomContainer sourceGraph, IAtomContainer targetGraph); static List<List<CDKRMap>> makeAtomsMapsOfBondsMaps(List<List<CDKRMap>> list, IAtomContainer sourceGraph,
            IAtomContainer targetGraph); static List<CDKRMap> makeAtomsMapOfBondsMap(List<CDKRMap> list, IAtomContainer sourceGraph,
            IAtomContainer targetGraph); synchronized static boolean isTimeOut();  }
@Test public void testGetSubgraphMap_IAtomContainer_IAtomContainer() throws Exception { String molfile = "data/mdl/decalin.mol"; String queryfile = "data/mdl/decalin.mol"; IAtomContainer mol = new AtomContainer(); IAtomContainer temp = new AtomContainer(); QueryAtomContainer query1 = null; QueryAtomContainer query2 = null; InputStream ins = this.getClass().getClassLoader().getResourceAsStream(molfile); MDLV2000Reader reader = new MDLV2000Reader(ins, Mode.STRICT); reader.read(mol); ins = this.getClass().getClassLoader().getResourceAsStream(queryfile); reader = new MDLV2000Reader(ins, Mode.STRICT); reader.read(temp); query1 = QueryAtomContainerCreator.createBasicQueryContainer(temp); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer atomContainer = sp.parseSmiles("C1CCCCC1"); query2 = QueryAtomContainerCreator.createBasicQueryContainer(atomContainer); List<CDKRMap> list = CDKMCS.getSubgraphMap(mol, query1, true); Assert.assertEquals(11, list.size()); list = CDKMCS.getSubgraphMap(mol, query2, true); Assert.assertEquals(6, list.size()); }