The potential energy curve for the X1Σg+ state of Mg2 calculated with coupled pair many electron theory