The undefined dihedral in Figure appears as a definition problem when converting from cartesian to Z-matrix coordinates. If the angle α = (i, b, a) equals 180°there are infinitely many possible values for the dihedral and the result of s -1 is undefined. It is assumed that energy and all other quantities of interest may be formulated solely using cartesian coordinates, so the surjectivity of s is sufficient and the dihedral is set to 0°in this case. When an angle α of 180°is encountered upon converting from Z-matrix to cartesian coordinates, the atom i is simply set to