NAME

Chemistry::File::XYZ

SYNOPSIS

use Chemistry::File::XYZ;

# read a XYZ file
my $mol = Chemistry::Mol->read("myfile.xyz");

# write a XYZ file
$mol->write("out.xyz");

DESCRIPTION

This module reads XYZ files. It automatically registers the 'xyz' format with Chemistry::Mol, so that XYZ files may be identified and read by Chemistry::Mol->read().

The XYZ format is not strictly defined and there are various versions floating around; this module accepts the following:

First line: atom count (optional)

Second line: molecule name or comment (optional)

All other lines: symbol, x, y, and z coordinates separated by spaces, tabs, or commas.

If the first line doesn't look like a number, the atom count is deduced from the number of lines in the file. If the second line looks like it defines an atom, it is assumed that there was no name or comment.

VERSION

0.10

SEE ALSO

Chemistry::Mol, http://www.perlmol.org/.

AUTHOR

Ivan Tubert-Brohman <itub@cpan.org>