# Sample Z-matrix inputs

A Z-matrix is used to define connectivity between atoms in a molecule. The parameters one needs are distances, angles and dihedral angles. We will show a few simple examples of how to make Z-matrices in this text.

Sometimes it is a good idea to think before attempting to write a Z-matrix. What is it you are planning on doing with the molecule? If you are going to do a geometry optimization for the ground state, then it would be a good idea to enforce symmetry. Looking at the benzene example below, one can see that the D6h symmetry will never be broken. When optimizing, only the bond distances have a chance of changing, since the angles are forced to 120 degrees.

However, if one is going to do a transition state search, then the Z-matrix should be as flexible as possible, to allow for any symmetry-breaking geometry changes. Taking the time to plan what one is going to do can save time hunting for why the desired output was not achieved.

## Water

```        H
O 1 OH
H 2 OH 1 OHO

OH = 1.08
OHO = 107.5
```

For water, all we need is a bond distance and an angle. We start with the first atom, hydrogen, on a line of its own. The next line begins with the second atom, oxygen, and then states with which atom to measure the bond distance OH from, in this case, atom one. On the next line, the third atom, hydrogen, is OH distance away from atom two and has a bond angle of OHO in relation to atom one.

## Acetylene

```        H
C 1 HC
X 2 XL 1 A1
C 2 CC 3 A1 1 D1
X 3 XL 2 A1 4 D2
H 4 HC 5 A1 2 D1

HC = 1.08
XL = 1.0
CC = 1.2
A1 = 90.0
D1 = 180.0
D2 = 0.0
```

For acetylene, it is necessary to use dummy atoms. This is because the Z-matrix does not accept bond angles equal to 180 degrees. With these dummy atoms, one can define acceptable bond angles. When the input is read into a computer code, these dummy atoms are just used as reference points, and do not enter into any calculation. Judicious use of dummy atoms can simplify a problem hundred-fold. Let us examine benzene as an example of this.

## Benzene

```        X
X 1 1.0
C 2 XC 1 A1
C 2 XC 1 A1 3 60.0
C 2 XC 1 A1 4 60.0
C 2 XC 1 A1 5 60.0
C 2 XC 1 A1 6 60.0
C 2 XC 1 A1 7 60.0
X 3 1.0 2 A1 1 0.0
H 3 HC 9 A1 2 180.0
H 4 HC 3 A2 2 180.0
H 5 HC 4 A2 2 180.0
H 6 HC 5 A2 2 180.0
H 7 HC 6 A2 2 180.0
H 8 HC 7 A2 2 180.0

A1 = 90.0
A2 = 120.0
XC = 1.3
HC = 1.08
```

A naïve attempt would be to pick a carbon on the ring, and work one's way around, attaching hydrogens as needed. However, one would find it very difficult to get the C6-C1 bond distance to work out to be exact. As one can see here, a much better way is to use dummy atoms. By using three dummy atoms, the input is much easier to write, and a minimum number of variables are required. Notice that it is possible to put numbers directly into the Z-matrix. However, obviously, if one needs to change a value, life is easier using variables rather than having to retype each value.

## Ethylene

```        H
C 1 HC
H 2 HC 1 A1
C 2 CC 3 A1 1 D1
H 4 HC 2 A1 1 D1
H 4 HC 2 A1 1 D2

HC = 1.08
CC = 1.4
A1 = 120.0
D1 = 180.0
D2 = 0.0
```

Here one might think they need dummy atoms, but they are not required. Notice the importance of choosing the dihedrals correctly. If one mistakes a 180 degree dihedral for a zero degree dihedral, then the mistake is hard to detect unless one is looking at the molecule. This is one of the more common mistakes in building a Z-matrix.

```        H
C 1 HC
H 2 HC 1 A1
C 2 CC 3 A1 1 D2
H 4 HC 2 A1 1 D1
H 4 HC 2 A1 1 D2

HC = 1.08
CC = 1.4
A1 = 120.0
D1 = 180.0
D2 = 0.0
```