Z-Matrix Editor

Z-Matrix Editor


The Z-Matrix Editor in molden lets the user create and/or manipulate stuctures on screen. Additional helper applications may be used to optimise the stuctures on a force field level. The final structure can be saved as a Z-matrix file or as a variety of cartesian formats. It is also possible to start up Ab Initio/Semi Empirical packages from this window.

Below is a Clickable Map of the Z-Matrix Editor:


The Variables/Connectivity editing window

In the Z-Matrix approach the position of each atom (except the first three) is defined with respect to three previously defined atoms.

Each Z-matrix line (except the first three) consists of the following fields:

In this example

Of course the first atom in the Z-matrix has no previously defined atoms to refer to and is the origin if you like, the second atom is always connected to the first atom by just a bond distance variable, and the third atom is connected to the first two by just a bond distance and a bond angle.

In the variables editing window color is used to indicated the Status of a variable and to high-light the atoms which are involved in this internal degree of freedom. If you click on a variable field:

When you click on a atom in the molecular display, its corresponding Z-Matrix line will become visible in the Variables/Connectivity editing window and its atom label field will turn to color red.

Changing the status of a variable

When a variable field is active, indicated by a thick rectangle drawn around it, you can change is status by clicking in it with the Middle Mouse Button.


The different statuses are:

The different statuses are color coded:


The status of variables: Variable, Constant, Linked

This will reset the status of all variable to the state: variable.

Apply Changes to the current Z-Matrix

When you click the Apply Changes to the current Z-Mat button or hit the Return key in an active variable textfield, the current Z-matrix will be converted to cartesian coordinates and the changes will take affect in the molecular display. This can also be accomplished by hitting the Return key when in an active variable editing textfield.

Cancel Non-Applied Changes

When you click the Cancel Non-Applied Changes button, you will undo all changes to the Z-Matrix since the last time you clicked the Apply Changes to the current Z-Mat button or hit the Return key.

Add a line/atom to the Z-matrix

When you Click the Add Line button, you are going to add a new line/atom to your Z-Matrix. The Z-matrix window will look as follows:


Click the button of the atom type you want to add. Then you will be asked to select three atoms from the molecular display to define its connectivity. The cursor will change shape to indicate this. This can be done by simply clicking on the atoms, each successfull atom selection is confirmed by a beep. ( For the first three atoms in the Z-Matrix less atoms are needed to define their connectivity). Molden has a small internal table of bond distances for the most common elements, it discriminates between Single,Double and Triple bonds. So before selecting an atom you could tell Molden to guess a bond length according to its multiplicity, by checking one of the following:


For atoms which are not in moldens table of bond distances, the bond length is estimated from the sum of their van der Waals radii

PS: The Molden Z-Matrix editor is chemically not very smart, that is it doesnt keep track of the hybridisation state of an atom, although it will try to guess it from the atoms to which it will be connected to.

Delete a line/atom from the Z-matrix

When you click the Delete Line button, the active Z-Matrix line is deleted, you can activate a Z-Matrix by clicking one of its editable fields. Be sure to first delete any atoms which Z-Matrix lines refer to this atom.

Replace an atom by a fragment

Clear the current Z-matrix

Start with a empty Z-Matrix. The Molecular display will also be emptied.

Map an XYZ file to the current Z-Matrix or Optimise the current Z-Matrix on the force field level


This option is intended to either:

Create a new Z-Matrix for the current structure in a user-supplied sequence of atoms

Let molden create a new Z-Matrix for part/whole structure

Write out the Z-Matrix in Gamess, Gaussian or Mopac format

Submit the Z-Matrix to Gamess-UK, Gaussian or Mopac

Have a look at set up helper programs.

Commandline flags affecting the Z-Matrix

 -a        no automatic cartesian -> zmat conversion

 -A        Keep order of atoms when creating a Z-matrix

 -u        With GAMESS-US optimisation output, molden
           generates a z-matrix, (default: read from output)

 -Z        Map the Z-matrix file mapfile onto a crystal.
           mapfile contains a Z-matrix followed by keyword
           MAP and per line an integer that maps a
           Z-matrix line onto a cartesian line

When a structure has no Z-Matrix, molden will generate one for it. The order of atoms in the Z-Matrix will not correspond with the order of atoms which were read in. When molden creates a Z-Matrix it will first look for atoms part of a ring and build from there, first the heavy atoms (all non Hydrogen) and then the Hydrogens. In the worst case, molden will even add dummy atoms, this will be done when there are 3 or more atoms on a line. So if you see dummy atoms where you didnt expect them and you want to get rid of them try the -a commandline flag. Molden internally keeps track of which Z-Matrix atom is mapped to which 'Cartesian' atom. Once you click Apply Changes to the current Z-Mat button or hit the Return key in an active field, the current Z-Matrix is parsed to cartesians and the Z-Matrix ordering will be the same as the cartesian ordering. For Gamess-US there is an additional problem that the forces on the atoms read from the Gamess-US outputfile are in a different orientation than cartesian coordinates generated from the Z-Matrix on the output. In this case the Z-Matrix is not mapped to the cartesians as read in from the Gamess-US output. So with Gamess-US you should always first click the Apply Changes to the current Z-Mat button if you want to manipulate the Z-Matrix, after that the display of forces will no longer be valid. You can circumvent this problem by supplying the -u commandline flag, in this case the Z-Matrix on the output is ignored and molden creates one which is mapped to the cartesians read from the outputfile.