internal static List <IReadOnlyList <int> > GetOverlaps(IAtomContainer ac1, IAtomContainer ac2, bool shouldMatchBonds) { Deque <IReadOnlyList <int> > maxCliqueSet = null; var mappings = new List <IReadOnlyList <int> >(); try { GenerateCompatibilityGraph gcg = new GenerateCompatibilityGraph(ac1, ac2, shouldMatchBonds); var compGraphNodes = gcg.GetCompGraphNodes(); var cEdges = gcg.GetCEgdes(); var dEdges = gcg.GetDEgdes(); BKKCKCF init = new BKKCKCF(compGraphNodes, cEdges, dEdges); maxCliqueSet = init.GetMaxCliqueSet(); //clear all the compatibility graph content gcg.Clear(); while (maxCliqueSet.Count != 0) { var cliqueList = maxCliqueSet.Peek(); int cliqueSize = cliqueList.Count; if (cliqueSize < ac1.Atoms.Count && cliqueSize < ac2.Atoms.Count) { McGregor mgit = new McGregor(ac1, ac2, mappings, shouldMatchBonds); mgit.StartMcGregorIteration(mgit.MCSSize, cliqueList, compGraphNodes); mappings = mgit.mappings; mgit = null; } else { mappings = ExactMapping.ExtractMapping(mappings, compGraphNodes, cliqueList); } maxCliqueSet.Pop(); if (IsTimeOut()) { break; } } } catch (IOException ex) { Trace.TraceError(ex.Message); } return(mappings); }
public void TestSomeMethod() { // TODO review the generated test code and remove the default call to fail. Assert.IsNotNull(ExactMapping.ExtractMapping(new List <IReadOnlyList <int> >(), new List <int>(), new List <int>())); }