Structure Input in Internal Coordinates: The Z-Matrix

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.

  1. To illustrate the construction of a Z-matrix, we will consider pentadienyl anion, CH2=CH-CH=CH-CH2-, in the planar E,E- geometry, which has C2v symmetry. The atoms are numbered as shown here:

    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.

  2. The Z-matrix consists of one line for each atom of the input structure.

    1. The first line contains only the atomic symbol of the first atom, followed by an identifying number if desired. The atomic symbol specifies the nuclear charge to GAMESS or GAUSSIAN. In our case the first line will be:

      C1

    2. The second line begins with the symbol/number of an atom connected to the atom specified on the first line, the line number of the atom to which the present one is connected (that is, the serial number of the atom's input), and the distance between the two atoms. If the distance is to be optimized, it is given a variable name; if it is given a numeric value, it will be treated as constant. Our second line will be:

      H9 1 r19

    Spacing on the line is irrelevant, but it is easier to read your own input if you keep columns aligned.

    1. The third line starts with the symbol/number of an atom which, together with the first two, defines a bond angle. Our third line looks like this:

      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.

    1. The fourth line now will specify for a fourth atom the same three things as line 3, and also a dihedral angle. Atom C4 is symmetry-equivalent to C2, so we will enter it next:

      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.

    1. Subsequent lines have the same format as line 4.

    2. Here is the entire Z-matrix:

      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

    • Note the overall structure: the pairing of symmetry-related atoms in the input file, the neat alignment of columns, the use of the numeric values of angles required by symmetry to have those values, the use of the same variable names for lengths and angles that must be the same by symmetry.

      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.

    • Dihedral angles may require an algebraic sign. When the dihedral is viewed from front to rear, if the rear atom is clockwise from the front, the dihedral is positive. If the rear atom is anticlockwise, the dihedral is negative, as shown in the sketch:

    • Anytime named variables are used in a Z-matrix, the matrix must be followed by a series of lines assigning initial values to those variables. Thus:

      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

  1. Here is the input file for a GAUSSIAN 6-31G* full optimization on the pentadienyl anion, with Z-matrix input:

    #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          

  2. Below is the input file for a UHF/3-21G* geometry optimization on the methyl guaiacol radical using GAUSSIAN. The input structure is in Cartesians:

    #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

  3. Here is how the input file would look to do a 6-31G* geometry optimization on the pentadienyl anion using GAMESS:

    $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

  4. Here is an input for the radical obtained by removing an a-H from propanethiol: CH3CH2CHSH. The calculation is a 6-31+G* single-point, again using GAMESS.

    GBASIS=N31
    $CONTRL
    SCFTYP=UHF MULT=2 COORD=CART
    $END
    $BASIS
    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!)


    This page last modified 1:22 PM on Monday June 5th, 2006.
    Webmaster, Department of Chemistry, University of Maine, Orono, ME 04469