I. A Z-matrix specifies the positions of atoms in a molecule relative to each other, whereas Cartesian coordinates specify absolute atomic positions in Cartesian space. Z-matrices offer two major advantages as input format for ab initio and semi-empirical molecular orbital calculations: (1) they can be coded by hand; and (2) they make specification of molecular symmetry straightforward.

The specified symmetry means that C1 is unique, C2 and C4 are equivalent, and C3 and C5 are equivalent. Similarly, H9 is unique; and H8/H10, H7/H11, and H6/H12 are equivalent pairs. This in turn means that the C1-C4 bond length is the same as C1-C2 (r12 = r14). Similarly: r23 = r45; r28 = r210; r37 = r511; and r36 = r512.
Establishing just what the given molecular symmetry means in terms of equivalent atoms, bond lengths, and bond and dihedral angles is the first step in constructing a Z-matrix.
| C1 |
| H9 | 1 | r19 |
| C2 | 1 | r12 | 2 | a219 |
In sequence, this says: atom C2 is connected to input atom 1 (C1), at a distance of r12. Together with input atom 2 (H9) and input atom 1 (C1) it defines the bond angle variable a219.
| C4 | 1 | r12 | 2 | a219 | 3 | 180.0 |
C4 is attached to input atom 1 (C1), with which it makes the same bond length (by symmetry) that C2 makes. Hence we use the same variable name for this bond length. With input atom 2 (H9), C4 makes the same bond angle as does C2, so we use the same variable name. With input atom 3 (C2), C4 makes a dihedral that, if the molecule is to have C2v symmetry, must be 180 degrees. Thus, we specify a numeric value. This dihedral could be treated as a parameter to optimize, but to compute a value we know by symmetry would be silly.
| C1 | ||||||
| H9 | 1 | r19 | ||||
| C2 | 1 | r12 | 2 | a219 | ||
| C4 | 1 | r12 | 2 | a219 | 3 | 180.0 |
| C3 | 3 | r23 | 1 | a123 | 2 | 0.0 |
| C5 | 4 | r23 | 1 | a123 | 2 | 0.0 |
| H6 | 5 | a36 | 3 | a236 | 1 | 0.0 |
| H12 | 6 | r36 | 4 | a236 | 1 | 0.0 |
| H7 | 5 | a37 | 3 | a237 | 1 | 180.0 |
| H11 | 6 | a37 | 4 | a237 | 1 | 180.0 |
| H8 | 3 | r28 | 5 | a328 | 9 | 0.0 |
| H10 | 4 | r28 | 6 | a328 | 10 | 0.0 |
Although the same structure could be specified by several different Z-matrices, depending upon choice of dihedrals, variable names, and so on, the general symmetry and cleanliness of this format make it easy for a user to read the matrix at a glance.

| r19 | 1.09 |
| a219 | 120.0 |
and so on. Try to use standard values, as in the examples. A typical C(sp2)-H bond length is 1.09 A and a typical C(sp2) bond angle is 120 degrees. Use of such values avoids placing the starting point for minimization far away from the minimum on the potential energy surface, and leads to efficient use of CPU cycles.
II. Sample Input Files
| #T | RHF/6-31G(d) | OPT | POP=Regular | |||
| Pentadienyl anion in C2v symmetry | ||||||
| -1 | 1 | |||||
| C1 | ||||||
| H9 | 1 | r19 | ||||
| C2 | 1 | r12 | 2 | a219 | ||
| C4 | 1 | r12 | 2 | a219 | 3 | 180.0 |
| C3 | 3 | r23 | 1 | a123 | 2 | 0.0 |
| C5 | 4 | r23 | 1 | a123 | 2 | 0.0 |
| H6 | 5 | a36 | 3 | a236 | 1 | 0.0 |
| H12 | 6 | r36 | 4 | a236 | 1 | 0.0 |
| H7 | 5 | a37 | 3 | a237 | 1 | 180.0 |
| H11 | 6 | a37 | 4 | a237 | 1 | 180.0 |
| H8 | 3 | r28 | 5 | a328 | 9 | 0.0 |
| H10 | 4 | r28 | 6 | a328 | 10 | 0.0 |
| Variables: | ||||||
| r19 | 1.09 | |||||
| r12 | 1.34 | |||||
| r23 | 1.33 | |||||
| r36 | 1.08 | |||||
| r37 | 1.10 | |||||
| r28 | 1.11 | |||||
| a219 | 120.0 | |||||
| a123 | 120.1 | |||||
| a236 | 120.2 | |||||
| a237 | 119.9 | |||||
| a328 | 120.5 | |||||
| #T UHF/3-21G* OPT | |||
| Methyl Guaiacyl Radical | |||
| 0 2 | |||
| C | -0.093107106 | 0.751187231 | -3.108246947 |
| C | -0.137741757 | 0.733416461 | -1.594267688 |
| C | -0.206941281 | 0.642694357 | 1.234424576 |
| C | 0.142071483 | -0.463809300 | -0.907785363 |
| C | -0.452069455 | 1.883674853 | -0.858687368 |
| C | -0.485643460 | 1.838562779 | 0.524947870 |
| C | 0.112825087 | -0.525735497 | 0.472174794 |
| H | 0.381079937 | -1.336443551 | -1.480461982 |
| H | -0.666638928 | 2.799924032 | -1.371890526 |
| H | -0.723823276 | 2.707235664 | 1.103261283 |
| O | 0.371472940 | -1.645094715 | 1.205386623 |
| O | -0.242776935 | 0.617135690 | 2.534313797 |
| H | -0.808333743 | 0.046783533 | -3.520648025 |
| C | 0.705670071 | -2.887224214 | 0.565853623 |
| H | 1.614364031 | -2.798107738 | -0.016531807 |
| H | -0.099262016 | -3.230502816 | -0.072180007 |
| H | 0.856968549 | -3.590046731 | 1.367941278 |
| H | 0.894127834 | 0.476218818 | -3.465406444 |
| H | -0.328808415 | 1.735108728 | -3.493114681 |
| $CONTRL | ||||||
| RUNTYP=OPTIMIZE | COORD=ZMT | ICHARG=-1 | ||||
| $END | ||||||
| $BASIS | ||||||
| GBASIS=N31 | NGAUSS=6 | POLAR=POPLE | NDFUNC=3 | |||
| $END | ||||||
| $DATA | ||||||
| Pentadienyl anion in C2v Symmetry | ||||||
| CNV | NAXIS=2 | |||||
| C1 | ||||||
| H9 | 1 | r19 | ||||
| C2 | 1 | r12 | 2 | a219 | ||
| C4 | 1 | r12 | 2 | a219 | 3 | 180.0 |
| C3 | 3 | r23 | 1 | a123 | 2 | 0.0 |
| C5 | 4 | r23 | 1 | a123 | 2 | 0.0 |
| H6 | 5 | r36 | 3 | a236 | 1 | 0.0 |
| H12 | 6 | r36 | 4 | a236 | 1 | 0.0 |
| H7 | 5 | r37 | 3 | a237 | 1 | 180.0 |
| H11 | 6 | r37 | 4 | a237 | 1 | 180.0 |
| H8 | 3 | r28 | 5 | a328 | 9 | 0.0 |
| H10 | 4 | r28 | 6 | a328 | 10 | 0.0 |
| r19 | 1.09 | |||||
| r12 | 1.34 | |||||
| r23 | 1.33 | |||||
| r36 | 1.08 | |||||
| r37 | 1.10 | |||||
| r28 | 1.11 | |||||
| a219 | 120.0 | |||||
| a123 | 120.1 | |||||
| a236 | 120.2 | |||||
| a237 | 119.9 | |||||
| a328 | 120.5 | |||||
| $END | ||||||
| $SCF | ||||||
| DIRSCF=.TRUE. | ||||||
| $END |
| $CONTRL | ||||
| SCFTYP=UHF | MULT=2 | COORD=CART | ||
| $END | ||||
| $BASIS | ||||
| GBASIS=N31 | NGAUSS=6 | DIFFSP=.TRUE. | ||
| POLAR=POPLE | NDFUNC=3 | |||
| $END | ||||
| $DATA | ||||
| AlphaC propanethiol radical, most stable conformer, 6-31+G*single point | ||||
| C1 | ||||
| H1 | 1 | 0.4380711 | 2.3542014 | -1.4602764 |
| C2 | 6 | 0.4961845 | 2.3108968 | -0.3783159 |
| H3 | 1 | 1.5404006 | 2.2622121 | -0.0933405 |
| C4 | 6 | -0.2671268 | 1.0816486 | 0.1559698 |
| H5 | 1 | 0.0732978 | 3.2258829 | 0.0201934 |
| C6 | 6 | 0.3075165 | -0.2038195 | -0.3879387 |
| H7 | 1 | -1.3183441 | 1.1598782 | -0.1162061 |
| H8 | 1 | -0.2228341 | 1.0718979 | 1.2410697 |
| H9 | 1 | -0.2909700 | -1.4312299 | 1.5122429 |
| H10 | 1 | 0.6958985 | -0.2228152 | -1.3894047 |
| S11 | 16 | -0.1444474 | -1.7762900 | 0.2390109 |
| $END | ||||
| $SCF | ||||
| DIRSCF=.TRUE. | ||||
| $END | ||||
(Many thanks to Dave Hrovat, Department of Chemistry, University of North Texas, for his patient lessons in writing Z-matrices!)