Since we coupled our code to the symbolic algebra package sympy it is even possible to perform structure optimizations with respect to arbitrary differentiable expressions in the Zmatrix. This allows much more flexible constraints than keeping linear combinations of coordinates constant. 27 These non-linearly constrained optimizations can be used to reduce the degrees of freedom, enforce symmetries, or guide the search for transition states. Especially with a chemically meaningful Z-matrix these constraints can easily match chemical intuition and are easy to define for the user which makes Z-matrices superior compared to non-hierarchical internal coordinates in that regard. Also the relative movement of fragments, with a fixed structure for each fragment is easily described in Z-matrix coordinates. On the other hand we also have to note that unconstrained geometry optimization in nonhierarchical internal coordinates outperforms Zmatrices. One example of a constrained optimization in this work is the highly symmetric cubane where the cubic symmetry can be imposed in Z-matrix coordinates and by opti-mizing only r CC , r CH , and α the problem size is reduced to three degrees of freedom (from 3 • 16 -6 = 42).