/// <summary>
 /// Calculates the valence number as defined by the number of outer shell electrons minus the total number of hydrogens
 /// (implicit and explicit)
 /// </summary>
 /// <param name="atom"></param>
 /// <returns></returns>
 public static int ValenceNumber(this OBAtom atom)
 {
     return(atom.NOuterShellElectrons() - (int)atom.TotalNumHydrogens());
 }