Beispiel #1
0
        /// <summary>
        /// The method calculates the sigma electronegativity of a given bond
        ///  t is needed to call the addExplicitHydrogensToSatisfyValency method from the class tools.HydrogenAdder.
        /// </summary>
        /// <returns>return the sigma electronegativity</returns>
        public Result Calculate(IBond bond)
        {
            var electroAtom1 = electronegativity.CalculateSigmaElectronegativity(clonedContainer, clonedContainer.Bonds[container.Bonds.IndexOf(bond)].Begin);
            var electroAtom2 = electronegativity.CalculateSigmaElectronegativity(clonedContainer, clonedContainer.Bonds[container.Bonds.IndexOf(bond)].End);

            return(new Result(Math.Abs(electroAtom1 - electroAtom2)));
        }
Beispiel #2
0
        /// <summary>
        /// The method calculates the sigma electronegativity of a given atom
        /// It is needed to call the addExplicitHydrogensToSatisfyValency method from the class tools.HydrogenAdder.
        /// </summary>
        /// <param name="atom">The <see cref="IAtom"/> for which the <see cref="Result"/> is requested</param>
        /// <returns>return the sigma electronegativity</returns>
        public Result Calculate(IAtom atom)
        {
            var index     = container.Atoms.IndexOf(atom);
            var localAtom = clonedContainer.Atoms[index];
            var value     = electronegativity.CalculateSigmaElectronegativity(clonedContainer, localAtom);

            return(new Result(value));
        }