Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XYZ(3)		      User Contributed Perl Documentation		XYZ(3)

NAME
       Chemistry::File::XYZ - XYZ molecule format reader/writer

SYNOPSIS
	   use Chemistry::File::XYZ;

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

	   # write an 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	or atomic number), 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.

OUTPUT OPTIONS
       On writing, the default format is the following,	giving H2 as an
       example.

	   2
	   Hydrogen molecule
	   H	0.0000	 0.0000	  0.0000
	   H	0.0000	 0.7000	  0.0000

       That is:	count line, name line, and atom	lines (symbol, x, y, z). These
       format can be modified by means of certain options:

       name
	   Control whether or not to include the name.

       count
	   Control whether or not to include the count line.

       symbol
	   If false, use the atomic numbers instead of the atomic symbols.

       For example,

	   $mol->write("out.xyz", count	=> 0, name => 0, symbol	=> 0);

       gives the following output:

	   1	0.0000	 0.0000	  0.0000
	   1	0.0000	 0.7000	  0.0000

VERSION
       0.11

SEE ALSO
       Chemistry::Mol, <http://www.perlmol.org/>.

AUTHOR
       Ivan Tubert-Brohman <itub@cpan.org>

perl v5.32.0			  2004-08-03				XYZ(3)

NAME | SYNOPSIS | DESCRIPTION | OUTPUT OPTIONS | VERSION | SEE ALSO | AUTHOR

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Chemistry::File::XYZ&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help