Пример #1
0
        internal static bool TestIsAlk_x_ne(IAtomContainer mol, BondOrder order)
        {
            if (mol == null)
            {
                return(false);
            }

            if (!mol.IsHydrocarbon())
            {
                return(false);
            }

            foreach (var bond in mol.Bonds)
            {
                if (bond.Begin.Symbol != "C" || bond.End.Symbol != "C")
                {
                    continue;
                }
                if (bond.Order != order)
                {
                    continue;
                }
                return(true);
            }

            return(false);
        }