/// <summary>
        /// Assigns Gasteiger partial charges to molecule
        /// </summary>
        /// <returns>OBMol with Gasteiger partial charges assigned</returns>
        public static OBMol AssignGasteigerCharges(this OBMol mol)
        {
            var newMol = mol.AddExplicitHydrogens();

            newMol.UnsetPartialChargesPerceived();
            foreach (var atom in newMol.Atoms())
            {
                atom.GetPartialCharge();
            }
            return(newMol);
        }
        /// <summary>
        /// Calculates the Crippen SLogP VSA contributions from each atom
        /// </summary>
        /// <param name="mol"></param>
        /// <returns></returns>
        public static double[] CrippenSLogPVsaContributions(this OBMol mol, bool includeHydrogens)
        {
            var newMol = includeHydrogens ? mol.AddExplicitHydrogens() : mol;
            var result = new List <double>();

            foreach (var atom in newMol.Atoms())
            {
                var key = atom.GetCrippenKey();
                if (!string.IsNullOrEmpty(key))
                {
                    result.Add(CrippenConstants.GetLogP(key));
                }
            }
            return(result.ToArray());
        }
        /// <summary>
        /// Perform depth limited search of each atom to a depth of length
        /// </summary>
        /// <param name="mol"></param>
        /// <param name="length"></param>
        /// <param name="useHydrogens"></param>
        /// <returns></returns>
        public static IEnumerable <Path> PathsOfLengthN(this OBMol mol, int length, bool useHydrogens = false)
        {
            var newMol = useHydrogens ? mol.AddExplicitHydrogens() : mol;
            var paths  = new List <Path>();

            foreach (var atom in newMol.Atoms())
            {
                var foundPaths  = new List <IEnumerable <OBAtom> >();
                var currentPath = new List <OBAtom>();
                Search.DepthLimitedSearch(atom, length, currentPath, ref foundPaths);
                foreach (var foundPath in foundPaths)
                {
                    if (foundPath.Count() == length + 1)
                    {
                        paths.Add(new Path(foundPath));
                    }
                }
            }
            return(paths.Distinct(new PathComparer()));
        }