/// <summary> /// This method calculates the valence of an atom. /// </summary> /// <param name="atom">The <see cref="IAtom"/> for which the <see cref="Result"/> is requested</param> /// <returns>The valence of an atom</returns> public Result Calculate(IAtom atom) { int atomValence = AtomValenceTool.GetValence(atom); return(new Result(atomValence)); }
private static int GetValenceElectronCount(IAtom atom) { var valency = AtomValenceTool.GetValence(atom); return(valency - atom.FormalCharge.Value); }