Esempio n. 1
0
        public override void SearchMCS(bool shouldMatchBonds)
        {
            IList <IReadOnlyList <int> > mappings = null;

            try
            {
                if (source.Atoms.Count >= target.Atoms.Count)
                {
                    mappings = MCSPlus.GetOverlaps(source, target, shouldMatchBonds);
                }
                else
                {
                    flagExchange = true;
                    mappings     = MCSPlus.GetOverlaps(target, source, shouldMatchBonds);
                }
                PostFilter.Filter(mappings);
                SetAllMapping();
                SetAllAtomMapping();
                SetFirstMapping();
                SetFirstAtomMapping();
            }
            catch (CDKException)
            {
                mappings = null;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Creates index new instance of Bron Kerbosch Cazals Karande Koch Clique Finder
        /// This class implements Bron-Kerbosch clique detection algorithm as it is
        /// described in [F. Cazals, vertexOfCurrentClique. Karande: An Algorithm for reporting maximal c-cliques;
        /// processedVertex.Comp. Sc. (2005); vol 349; pp.
        /// 484-490]
        /// </summary>
        /// <param name="compGraphNodesOrg"></param>
        /// <param name="cEdgesOrg">C-Edges set of allowed edges</param>
        /// <param name="dEdgesOrg">D-Edges set of prohibited edges</param>
        internal BKKCKCF(IReadOnlyList <int> compGraphNodesOrg, IReadOnlyList <int> cEdgesOrg, IReadOnlyList <int> dEdgesOrg)
        {
            MCSPlus.SetTimeManager(new TimeManager());
            this.compGraphNodes = compGraphNodesOrg;
            this.cEdges         = cEdgesOrg;
            this.dEdges         = dEdgesOrg;
            bestCliqueSize      = 0;

            //Orignal assignment as per paper
            dEdgeIterationSize = dEdges.Count / 2;

            //Orignal assignment as per paper
            cEdgeIterationSize = cEdges.Count / 2;

            //Initialization maxCliquesSet

            maxCliquesSet = new List <IReadOnlyList <int> >();

            Init();
        }
Esempio n. 3
0
 public void TestSomeMethod()
 {
     // TODO review the generated test code and remove the default call to fail.
     Assert.IsNotNull(MCSPlus.GetOverlaps(new AtomContainer(), new AtomContainer(), true));
 }