[wonderplugin_tab_content]
Description
The newzmat utility was designed primarily for converting molecule specifications between a variety of standard formats. It can also perform many related functions, such as extracting molecule specifications from Gaussian checkpoint files. Its full set of capabilities includes the following:
- newzmat can convert molecule specifications between a variety of data file formats. This includes generating a Z-matrix (and hence input for Gaussian) from the files produced by other programs and also converting between the file formats of any of these programs. The newzmat keyword can thus be used to produce Gaussian input from the data files of many popular graphics and mechanics packages, allowing them to act as graphical input front-ends to Gaussian. The resulting data files have the proper symmetry constraints for efficient computation (if applicable).
- newzmat can also generate Gaussian checkpoint files from other data files, and (more importantly) generate the data files from checkpoint files. This capability can be used to extract data for display with a visualization package.
- newzmat can retrieve intermediate structures from a checkpoint file from (or during) a geometry optimization, for reuse or display.
Known Difficulties with newzmat
- The symmetry averaging process, which guesses the intended symmetry given coordinates which are only approximately symmetric, does not always achieve the intended symmetry. It will take coordinates printed in a Gaussian output file to 6 digits and restore symmetry, and it will usually work given coordinates from molecular mechanics provided that the mechanics optimization was converged reasonably far. In generating coordinates with MacroModel, for example, it is sometimes necessary to do a final full Newton-Raphson step after the normal minimization.
- newzmat computes the nuclear repulsion energy of the initial read-in structure and of the final structure as a consistency check. If these disagree, a warning is printed. Substantial disagreement indicates a failure of the program.
[/wonderplugin_tab_content]
[wonderplugin_tab_content]
Syntax
newzmat has the following general syntax:
newzmat option(s) input-file output-file
where option(s)(s) is one or more options, specifying the desired operations, input-file is the file containing the structure to be converted (or retrieved), and output-file is the file in which to place the new molecule specification (or Gaussian input). The output filename is optional. If omitted, it is given the same base name as the input file, along with a conventional extension denoting its file type. A slightly variant syntax is used when merging information from two files, as described in the “Merging”tab.
The input and output formats can either be deduced from the specified file extension or specified explicitly via options. In the latter case, extensions can be omitted from file specifications. The supported formats along with the corresponding file extensions and newzmat options are listed in the following table:
| Format | Extension | Input Option | Output Option |
| Gaussian checkpoint file | .chk | -ichk | -ochk |
| Gaussian input file (Cart. coordinates or Z-matrix) | .com | -icart, -izmat | -ocart, -ozmat |
| Gaussian binary array file | .baf | -ibaf | -obaf |
| Gaussian Fortran unformatted array file | .faf | -ifaf | -ofaf |
| Gaussian input file: fractional coordinates | .com | -ifract | -ofract |
| Semichem fragment file | .frg | -ifrg | -ofrg |
| Protein Data Bank (PDB) file | .pdb | -ipdb | -opdb |
| QUIPU system data file | .con | -icon | -ocon |
| Model/MM2 data file | .dat | -imodel | -omodel |
| MacroModel formatted data file | .dat | -immodel | -ommodel |
| MacroModel unformatted data file | .dat | -iummodel | -oummodel |
| MOPAC input file | .inp | -imopac | -omopac |
| MOPAC7 .arc format file | .arc | -imoparc | -omoparc |
| PCModel input file | .pcm | -ipcmodel | -opcmodel |
| Unadorned Cartesian coordinates | .xyz | -ixyz | -oxyz |
| Cartesian coordinates as used by the XYZ program in XMol | .xyz | -ixmol | -oxmol |
| Biograf internal data file | .bgf | -obgf | |
| Tektronix CaChe data file | .cac | -ocache | |
| Some PPP program | .ppp | -oppp | |
| Unspecified version of ZIndo | .zin | -ozindo |
Additional Notes on Formats
- The default output format is a Gaussian input file using Cartesian coordinates: -ocart.
- When specifying a Gaussian input file as the input source, the -izmat and -icart options are equivalent as the molecule specification format is automatically detected.
- A dash may be used to skip the input file name if an output file or checkpoint file but not input file is to be given.
- For Gaussian BAF/FAF formats, the options -i4 and -i8 specify 4-byte and 8-byte integers (respectively). The latter is the default except on 32-bit computer systems.
- For fractional coordinates for crystal structures, the structure may be replicated using these options: -repl IJK, which replicates the structure I times in the X direction, J times in the Y direction and K times in the z direction; -offset N, which uses an offset of N angstroms in replicating (the default is 10).
- For MacroModel files, the options -mof1 and -mof2 specify MacroModel format 1 and 2 (respectively). The former is valid only with formatted files (-ommodel), and the latter is the default.
- PDB files may also be specified via the older .ent and .bkv extensions and -ient/-oent and -ibkv/-obkv options.
- The final items in the table are useable only for the output format.
[/wonderplugin_tab_content]
[wonderplugin_tab_content]
Options
Resource Usage Options
-m=n
Specifies the amount of memory to allocate to the utility, where n is an amount optionally followed by units (the default unit is bytes).
-c=cpulist
Specifies the list of CPUs/cores that can be used by the utility. On the command line, the list will typically need to be enclosed in quotation marks to protect it from the shell.
Input Selection Options
-ngeom N
Use geometry from Nth structure on the checkpoint file. This functions in the same manner as Geom=(NGeom=N).
-ot list
Use geometries from the listed structures on the checkpoint file. Lists can include multiple structure numbers (separated by commas) and ranges of structure numbers. For example,
-step N
Use the structure from step N of a geometry optimization that failed to converge (valid only for the -ichk input option).
-ubohr
Input distances in input file are specified in Bohr (the default is Angstroms).
-urad
Input angles in input stream are specified in radians (the default is degrees).
-restrs
When reading a checkpoint file from an ONIOM job, restore the real system.
-btranslate
Read a translation vector (in Bohr) from the input stream, followed by a blank line.
-translate
Read a translation vector (in Angstroms) from the stream, followed by a blank line.
Output Generation Options
-optprompt
Prompt for which parameters should be optimized; used when setting up a molecule specification destined for a geometry optimization and -ozmat is specified (or no output option is included). By default, all parameters not fixed by symmetry are optimized.
-prompt
Prompt for route section and title section lines and for the charge and multiplicity when using -ozmat (or no output option is specified). Gaussian input files produced by newzmat set up HF/6-31G(d) single point energy calculations by default.
-genfc
Generate initial force constants for Gaussian.
-trackio
Generate profiling information.
-noxtra
Do not place force constants or connectivity in the generated input file
Options Related to Connectivity Info, Symmetry and Related Items
-connect
Read connectivity from Gaussian input file.
-deffrag
If no fragment information is found, generate it based on the connectivity.
-allbonded
In generating new connectivity information, assume all atoms are bonded.
-bmodel
Use standard model B bond lengths along with internal values in determining bond distances.
-fudge
Fudge bond distances to make sure they are reasonable, using internal values. This is the default for model input and is not applicable elsewhere.
-gencon
Generate connectivity information using internal radii.
-getfile
Insist on filename specifications for all arguments, making standard input and output unacceptable.
-lsymm
Use loose cutoffs for determining symmetry. This option implies -symav.
-nobond
Assign no bonds in generating connectivity.
-nofudge
Do not fudge bond distances. This is the default and only choice for all cases except model input.
-nogetfile
Cancels -getfile.
-noround
Turns off rounding of Z-matrix parameters.
-nosymav
Turns off averaging of input coordinates.
-nosymm
Turns off all use of symmetry.
-round
Rounds Z-matrix parameters to 0.01 Å and 1 degree.
-symav
Average input coordinates using approximate symmetry operations to achieve exact symmetry.
-symm
Assign molecular symmetry.
-tsymm
Use tight cutoffs for determining symmetry. The option is the default.
-order
Keep the order as close as possible to the input order.
-fixord
Reorder atoms to keep close atoms near each other in the list, based on the read or generated connectivity.
-fixdist R
Reorder atoms to keep close atoms near each other in the list, based on distance threshold of R Bohr (the default is 9 Angstroms).
-goodstruc
Choose an atom ordering which makes close atoms near each other in the list.
-badstruc
Choose an atom ordering which makes distant atoms near each other in the list.
-permute
Read in a new order for atoms and permute accordingly.
-reverse
Reverse the order of atoms in the final file.
-sort
Sort atoms or residues by quadrant.
-sortatoms
Sort atoms even if residue info is present.
-rebuildzmat
Build a new Z-matrix rather than using the read-in one (as would be the default for Z-matrix or MOPAC input). This option implies -gencon, and the option may be abbreviated as -redoz.
Options for MM Charges
-qmul
Mulliken charges.
-qesp
ESP-fit charges.
-qaim
AIM charges.
-qnpa
NPA charges.
-qapt
APT charges.
Options Related to Natural Orbitals (CaChe Files)
-density d
Generate natural orbitals for the specified density, where d is the model used to compute the density.
-mdensity d2
Subtract the specified generalized density from that specified with -density to make a difference density, which is then converted to natural orbitals.
[/wonderplugin_tab_content]
[wonderplugin_tab_content]
Merging
Merging Information from Two Files Using newzmat
newzmat can create an input file where data from two different files have been combined. This feature is helpful for setting up ONIOM calcuations in which one wants to apply a custom setup (ONIOM layers, MM atom types, MM atom charges, etc.) from one file to another structure on a different file. It allows you to specify the custom setup only once, and then later apply that information to other structures.
The -t and -s options request and control the creation of the merged input file. A merge command has the following general form:
$ newzmat -itype [-otype] -tformat -sitemn files
where files is a list of three or four items (see below). The command requires that you specify the locations of the existing input file (input), the new input file you are creating (output), and the template file (template). The order of the input, output and template files on the command line varies depending on whether the input and/or template file(s) are Gaussian checkpoint files:
| input file | template file | file spec. arguments |
| non-checkpoint file | non-checkpoint file | input output ignore template |
| non-checkpoint file | non-checkpoint file | input output ignore template |
| non-checkpoint file | checkpoint file | input output template |
| checkpoint file | non-checkpoint file | ignore output input template |
| checkpoint file | checkpoint file | input output template |
In the preceding table, “ignore” is a placeholder.
-t requires a file type argument like -i and -o, and it accepts the same base values: e.g., -tcart, -tchk.
The -s option, which can be specified multiple times, indicates the various information for the new input file. It accepts the following keywords, each of which is followed by either 1 or 2, which indicates that the item should be taken from the input or template file (respectively):
| XYZn | Geometry (coordinates, nuclear charges, etc.). |
| MMTn | MM types. |
| MMCn | MM charges. If copied, also copied to link atoms if there is ONIOM data present. |
| PDBn | PDB information (including secondary structure). |
| Conn | Connectivity. |
| Onin | ONIOM layer and link atom data. |
| Micn | MicOpt (freezing/optimizing atoms and rigid block info). |
The default for all items is the input file (i.e., n=1).
Here is an example. We have a Gaussian input file, allsetup.gjf, containing the MM atom type, MM charges, PDB information, connectivity, ONIOM layers, and so on. We can apply all of these settings to the structure in the PDB file new.pdb with the following command:
$ newzmat -icart -tpdb -sXYZ2 -sCon2 allsetup.gjf newinput.gjf ignore new.pdb
This command takes only the geometry and connectivity from file 2—the template file new.pdb—and everything else (MM atom types, MM charges, PDB information ONIOM data and optimize/freeze atom data) from file 1, the input file allsetup.gjf. The output file, newinput.gjf, will be the result of this merge.
Template-Related Options
-match
Rotate and translate input coordinates to match those in the template input.
-rmatch
Read an input section with a list of atoms to use in aligning the structures.
[/wonderplugin_tab_content]
[wonderplugin_tab_content]
Examples
The following command reads the molecule specification from the PDB file water.pdb and writes a Gaussian input file containing Cartesian coordinates to the file h2o.com:
| $ newzmat -ipdb water h2o | -ocart is the default, so it can be omitted. |
| Charge and multiplicity [0,1]? | A return accepts the default values shown. |
The following command reads the molecule specification from the PDB file m55.pdb and writes a Gaussian input file, including the equivalent Z-matrix, to the file m55.com:
| $ newzmat -ozmat m55.pdb | |
| Charge and multiplicity [0,1]? | A return accepts the default values shown. |
newzmat prompts for the charge and multiplicity for the Z-matrix since these items cannot be determined from the PDB file.
The following command reads the molecule specification from the Gaussian checkpoint file job-11234.chk and writes the PDB file propell.pdb:
$ newzmat -ichk -opdb job-11234 propell
The following command reads the molecule specification from step 5 of the optimization from the checkpoint file newopt.chk and produces the Mopac file step5.inp:
$ newzmat -ichk -omopac -step 5 newopt step5
The following command reads the molecule specification from the Mopac file newsalt.inp and writes a Gaussian input file including Cartesian coordinatesw to the file newsalt.com, prompting for the route and title sections and the charge and spin multiplicity for the molecule:
$ newzmat -imopac -prompt newsalt Percent or Route card? # B3LYP/6-31G(d,p) Opt Route card? End route section with a blank line. Titles? Optimization of caffeine at B3LYP/6-31G** Titles? End title section with a blank line. Charge and Multiplicity? 0,1
[/wonderplugin_tab_content]
[/wonderplugin_tabs]
Last updated on: 21 May 2025. [G25 Rev. A.01]
