ReadXYZ - Maple Help

QuantumChemistry

 read molecular geometry from an XYZ file and return a Maple list

Parameters

 file - string; string of the filename containing the molecular geometry in XYZ format

Description

 • The ReadXYZ command reads the molecule's geometry from an XYZ file.
 • The ReadXYZ() command without a parameter opens a file dialogue for selecting the XYZ file.
 • The ReadXYZ(file) command with the string parameter file opens the XYZ file named file.
 • The string file requires the file's full path if the file is not located in Maple's current working directory, i.e. on Linux or MacOS the file might be "/home/john/ozone.xyz" or on Windows 64 bit it might be "C:/Users/John/Documents/ozone.xyz".
 • The Maple command currentdir can be used to change the current working directory of the Maple session.  Changing the current directory to "/home/john/" on Linux or MacOS, for example, would allow us to set file to "ozone.xyz" without the file's full path.
 • The output is a Maple list of lists.  Each list has 4 elements, the string of an atom's symbol and atom's x, y, and z coordinates.
 • The format of the output is the standard format for molecular geometries in the QuantumChemistry package.
 • Note: The XYZ format for a molecule with n number of atoms is as follows:     n comment line A${}_{\mathbit{1}}$  X${}_{\mathbit{1}}$  ${\mathbit{Y}}_{\mathbit{1}}$  A${}_{\mathbit{2}}$  X${}_{\mathbit{2}}$   ...    A${}_{\mathbit{n}}$  X${}_{\mathbit{n}}$   where

Examples

 > $\mathrm{with}\left(\mathrm{QuantumChemistry}\right):$
 > $\mathrm{molecule}≔\left[\left["H",0.,0.,0.\right],\left["F",0.,0.,0.95\right]\right]$
 ${\mathrm{molecule}}{≔}\left[\left[{"H"}{,}{0.}{,}{0.}{,}{0.}\right]{,}\left[{"F"}{,}{0.}{,}{0.}{,}{0.95000000}\right]\right]$ (1)
 > $\mathrm{SaveXYZ}\left("hf.txt",\mathrm{molecule}\right)$
 >
 ${\mathrm{molecule}}{≔}\left[\left[{"H"}{,}{0.}{,}{0.}{,}{0.}\right]{,}\left[{"F"}{,}{0.}{,}{0.}{,}{0.95000000}\right]\right]$ (2)
 >