independent of the dihedral value. The undefined local coordinate system in Figure appears if the reference atoms are linearly aligned. In this case the matrix M in equation 3 does not have full rank anymore and the matrix M -1 in equation 4 is undefined. It has to be stressed that this pitfall appears independently of Z-matrix entries r, α, and δ and depends solely on the position of the reference atoms in cartesian coordinates. For this reason it is not possible to test for this pathological case without converting the Z-matrix to cartesian coordinates. To prevent this error it is necessary to assert validity of the Z-matrix upon creation by properly selecting the reference atoms. If any bond, angle, or dihedral is modified later on, it is necessary to convert to cartesian coordinates. If an invalid reference for atom i is found, a dummy atom has to be inserted in the plane spanned by v b , v a , v d before the modification. We would like to emphasize that both cases that cause undefined Z-matrices can appear in usual molecular systems. An illustrative example of the problems faced is included in the Supporting Information, where we compare with OpenBabel, the de-facto standard tool for coordinate transformations, in the community. Up to this point the Z-matrix was just treated as a coordinate system for arbitrary points in space. It is now the aim to obtain a Z-matrix suited for chemical needs. For this purpose the construction table is defined as a Z-matrix with the b, a, and d columns containing only the indices of reference atoms. The problem of defining a chemical Z-matrix reduces to finding a "good" construction table. A specific construction table could also be created manually while the calculation of Z-matrix entries bond, angle, and dihedral is performed by the computer. It has to be emphasized that there is not one single correct solution for choosing a construction table, but the following rules of thumb should give similar results to a human chemist constructing a Z-matrix manually: