Toomas's Home Page -> Research -> Z-matrix mode Site map

Emacs major mode for editing Z-matrixes
 
Part of Toomas Tamm's website


This piece of code is probably of interest only to theoretical chemists and only those of them, who regularly manually edit Z-matrixes of large molecules. If you are not one of the above, you will probably find little use of this code. The text below assumes familiarity with Z-matrix representation of molecular geometry.

The standard problem when editing Z-matrixes is adding or deleting a line, which causes the sequence numbers of many atoms to change. With larger molecules, it is often easier to substitute a real atom with a dummy, or to add new atoms to the end of the file. If one still decides to re-number the atoms, it is time-consuming and prone to errors.

To alleviate the problem, I have written a piece of LISP code, which, when used properly in conjunction with the GNU Emacs editor, will re-number the atom number references whenever you add or delete a line. It is only able to edit MOPAC/AMPAC style Z-matrixes (three columns of connectivity information at the three rightmost columns), not Gaussian-style ones (connectivity information interleaved with bond length/angle data). It should not, however, be too difficult to provide the extension. If you do so, please let me know!


The following is a HTML version of the comments section of the program.

Copyright © 1996 Toomas Tamm, Quantum Theory Project, University of Florida, USA

You may use this software without charge. You may NOT remove this copyright notice, and you must include this copyright notice into any derivative work. Please read the NO WARRANTY section below.

Author: Toomas Tamm
Version: 1.0
Keywords: Z-matrix, quantum chemistry, mopac

Commentary:

In this mode, deleting or adding a line may (and should, in fact) modify all lines below the one added. It is very specifically designed for editing Z-matrixes for the MOPAC and AMPAC programs, and most likely has no other utility value.

You may want to re-bind the keys to something which better suits your working style. You can do this by modifying the (define-key) lines which almost immediately follow the comments section.

Bugs:

Unpredictable things may happen if you edit anything other than a MOPAC or AMPAC Z-matrix. It is assumed, that the matrix starts at line 4. If a line is found to be of different format, the mode assumes that Z-matrix has ended, and will not attempt to modify lines below the first suspicious line.

Changes are not necessarily reversible; you may use the Emacs undo function to get back what you have lost.

Anything beyond the three columns representing connectivity will be removed. Sometimes this may even be a desirable feature, but sometimes not.

If you have other problems, you may e-mail me but I will not assume any responsibility for correcting the problems you may encounter.

NO WARRANTY

This code comes without any warranty or guarantee of any kind, including the implied warranty of fitness for a particular purpose. The author and/or his employer(s) will not take any responsibility for lost time, data, results, hardware, or anything else. Use this software at your own risk.

Usage:


Click here to download zmat-mode.el.
  Home     Site map  
Last modified: 30 January 1997
(e-mail)
validate