Beispiel #1
0
        //Function is called by the main program and serves as a starting point for the comparision procedure.

        public override void SearchMCS(bool bondTypeMatch)
        {
            SingleMapping singleMapping = new SingleMapping();
            IReadOnlyList <IReadOnlyDictionary <IAtom, IAtom> > mappings = null;

            try
            {
                if (this.smartSource == null)
                {
                    mappings = singleMapping.GetOverLaps(source, target, removeHydrogen);
                }
                else
                {
                    mappings = singleMapping.GetOverLaps(smartSource, target, removeHydrogen);
                }
            }
            catch (CDKException ex)
            {
                Trace.TraceError(ex.Message);
            }

            SetAllAtomMapping(mappings);
            SetAllMapping(mappings);
            SetFirstMapping();
            SetFirstAtomMapping();
            //SetStereoScore();
        }
Beispiel #2
0
        public void TestGetOverLaps()
        {
            IAtom          atomSource = new Atom("R");
            IAtom          atomTarget = new Atom("R");
            IAtomContainer source     = new AtomContainer();

            source.Atoms.Add(atomSource);
            IAtomContainer target = new AtomContainer();

            target.Atoms.Add(atomTarget);
            bool          removeHydrogen = false;
            SingleMapping instance       = new SingleMapping();

            Assert.IsNotNull(instance.GetOverLaps(source, target, removeHydrogen));
        }