I am looking for a way to convert XYZ coordinates into z-matrix for Gaussian input files. I need to specify certain coordinates in the matrix, therefore, the automatic built-in function from gaussview isn't of much help. Do you know of a program that can help me? Thanks in advance for your help!

  • 4
    $\begingroup$ molden can write z-matrices, you can load in a xyz file and save it as z-matrix $\endgroup$
    – user37142
    Jun 14, 2017 at 13:14
  • 6
    $\begingroup$ Chemcraft has a very descent built-in constructor of Z-matrices. $\endgroup$
    – Wildcat
    Jun 14, 2017 at 14:56
  • $\begingroup$ +1 for chemcraft. you can define the coordinates you need and even let the software do the rest. $\endgroup$
    – DSVA
    Jun 14, 2017 at 22:48

4 Answers 4


Try Open Babel, the windows GUI has a lot of features that may be of help depending on what are those specifics you need in your Z-matrix.


Avogadro, nice, clean and very user friendly. Just draw the molecule, then navigate to menu Extensions → Gaussian. Here you can format and select z-matrix for Gaussian input.


As mentioned in the comment by Fl.pf, the program molden has a very powerful ZMAT Editor:

  • You can hand pick the atoms that define bond lengths, angles and dihedrals
  • You can save as: GamessUS, GamessUK, Gaussian z-mat, mopac, xyz

If you want to convert back to xyz with obabel (for example after replacing a variable in the zmat with a range of values), use mopac (mopin in obabel).

Molden takes a bit to get used to, but this task can be done quite well there.


Gaussian provides all you need to do this with the newzmat program. It literally does all this, no need for 3rd party software.

I found it works best to put the Cartesian coordinates in a file by themselves and save it as xyz, then in the command line just run (Note the atom types need to be in front of the coordinates so

i.e. C XXXX YYYYY ZZZZZ would be one line in the file if your first atom was carbon)

newzmat -ixyz name_of_xyz_file

It will output name_of_xyz_file.com in z-matrix format.

  • $\begingroup$ This is not particularly useful to those that cannot afford Gaussian, and certainly not to those of us who are unable to use it because we are developers of other codes. It would be nice to add to your answer that this is a commercial program with a restrictive license. $\endgroup$ Jan 6, 2021 at 19:10
  • $\begingroup$ Sorry but the question is implicitly involves Gaussian. This answer is quite useful. $\endgroup$
    – B. Kelly
    Jan 6, 2021 at 19:12
  • 1
    $\begingroup$ I appreciate that perspective but I stumbled on this looking for a generic solution for z-matrices (other codes accept formats that are trivially difference from Gaussian’s) and the other responses were quite useful to this end. $\endgroup$ Jan 6, 2021 at 19:44
  • $\begingroup$ +1 to them then. I already gave them my +1. I think it is crazy to add clauses to answers. Should I advertise your software as well? Gaussian bad, X good. Let me know what X is. $\endgroup$
    – B. Kelly
    Jan 7, 2021 at 15:16
  • $\begingroup$ X is any software that’s accessibly to anyone reading StackOverflow. $\endgroup$ Jan 7, 2021 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.