calculate oxidation state of transition metal complex