|
Emacs major mode for editing Z-matrixes
Part of Toomas Tamm's website
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!
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:
Home | Site map |
Last modified: 30 January 1997 |