Ab initio valence calculations in chemistry