10. How can I read in a file of atomic Cartesian coordinates?

Babel 1.6

You might find the shareware Babel 1.6 to be helpful in converting between various file formats. The following files are on joplin.biosci.arizona.edu/pub/Babel:

babel-1.6.tar.Z -- unix sources and Makefile
babel16.zip -- MS DOS executable; works also in Win95 DOS box

Please remember to download these files by ftp'ing in binary mode (or set your web browser preferences accordingly).

Windows 3.x and 95 versions of Babel 1.6 are also available from ftp.brunel.ac.uk/pc/chem, as babel16w and babelwin, respectively.

In-house

A DOS program is available in our Software Archive, under Other Software. The program 'XRAY2HIN' (originally designed for crystallographic coordinate data) can read in a Cartesian coordinate file if you reformat it slightly, and then XRAY2HIN will output a HIN (HyperChem input) file.

Keep in mind that a HIN file at its simplest is pretty much just a Cartesian coordinate file. Although there is a lot of other information in a HIN file, a minimal one can be built that looks like this (for ethylene, without the hydrogens):

     mol 1
     atom 1 - C ** - 0.0 -0.67 0.0 0.0 0
     atom 2 - C ** - 0.0 0.67 0.0 0.0 0
     endmol 1

Here is a description of what you need:

You need the mol 1 and endmol 1 lines at the beginning and end of the entire thing.

Each line needs an atom number and element.

You need to put in the dashes, but their column numbers are not important, just so long as there is white space (a space character or a TAB character) between the fields.

The ** is the place for an atom type, and ** is just "unknown". The first 0.0 is the atomic charge (you can leave it zero).

The next three fields are the x, y, z coordinates. (Here -0.67, 0, 0 and +0.67, 0, 0)

The final column is the number of neighbors: zero here as we are not putting in any bonds yet.

So after reading this in, one has a bunch of dots around the screen. The trick to making a guess at the bonding information is to save the system as a Z-matrix file, and then read it in again. The reason this less-than-obvious method works is that the Z-matrix file format has no room for explicit bonding information, and so we had to put a routine in to make a guess at the bonding whenever reading in such a file. Generally the guesses are quite good for organic molecules in regular geometries, but will be less good for inorganic systems or unusual geometries. Also, the user should check the valences after doing this: there is nothing explicit to stop 5-coordinate carbons, etc.

If your coordinate file did not have the hydrogen coordinates in (as is commonly the case with X-ray data) then you can choose "Add hydrogens" from the Build menu to add them on without altering the coordinates of the heavier atoms. If your valences are correct this will work fine for organic systems. For other systems where valences are less well defined, you may need to add hydrogens yourself by drawing them in. If you select the hydrogen atoms and model build, then they alone will be fixed in position, again without altering the positions of the heavier atoms.

[Products] [Sales] [Support] [Science] [News] [Corporate] [Search] [Home]


(c) 2003, Hypercube, Inc. All Rights Reserved.
1115 NW 4th Street, Gainesville, FL 32601 USA
Phone (352) 371-7744 Fax (352) 371-3662 email info@hyper.com