示例#1
0
        /// <summary>
        /// Returns the largest (number of atoms) ring set in a molecule
        /// </summary>
        /// <param name="ringSystems">RingSystems of a molecule</param>
        /// <returns>The largestRingSet</returns>
        public static IRingSet GetLargestRingSet(IEnumerable <IRingSet> ringSystems)
        {
            IRingSet       largestRingSet = null;
            int            atomNumber     = 0;
            IAtomContainer container      = null;

            foreach (var ringSystem in ringSystems)
            {
                container = RingSetManipulator.GetAllInOneContainer(ringSystem);
                if (atomNumber < container.Atoms.Count)
                {
                    atomNumber     = container.Atoms.Count;
                    largestRingSet = ringSystem;
                }
            }
            return(largestRingSet);
        }
示例#2
0
        public void TestGetAllInOneContainer_IRingSet()
        {
            IAtomContainer ac = RingSetManipulator.GetAllInOneContainer(ringset);

            Assert.AreEqual(10, ac.Atoms.Count);
        }