|
SOLUTIONS
|
MATHEMATICA IMPORT/EXPORT FORMAT
XYZ (.xyz)
MIME type: chemical/x-xyz
XMOL molecule model files.
Used in cheminformatics applications and on the web for storing and exchanging 3D molecule models.
Plain text tabular format.
Represents a single chemical compound.
Stores atomic coordinates and meta-information.
Does not store chemical bond information.
Developed in 1990 at the Minnesota Supercomputer Center.
XMOL molecule model files.
Used in cheminformatics applications and on the web for storing and exchanging 3D molecule models.
Plain text tabular format.
Represents a single chemical compound.
Stores atomic coordinates and meta-information.
Does not store chemical bond information.
Developed in 1990 at the Minnesota Supercomputer Center.
Import and ExportImport and Export
- Import["file.xyz"] reads an XYZ molecule model and gives a visual representation of it.
- Export["file.xyz", expr] exports elements of a molecule model to an XYZ file.
- Import["file.xyz"] returns a Graphics3D object.
- Import["file.xyz", elem] imports the specified element from an XYZ file.
- Import["file.xyz", {elem, suba, subb, ...}] imports a subelement.
- Import["file.xyz", {{elem1, elem2, ...}}] imports multiple elements.
- The import format can be specified with Import["file", "XYZ"] or Import["file", {"XYZ", elem, ...}].
- Export["file.xyz", expr, elem] creates an XYZ file by treating expr as specifying element elem.
- Export["file.xyz", {expr1, expr2, ...}, {{elem1, elem2, ...}}] treats each
as specifying the corresponding
. - Export["file.xyz", expr, opt1->val1, ...] exports expr with the specified option elements taken to have the specified values.
- Export["file.xyz", {elem1->expr1, elem2->expr2, ...}, "Rules"] uses rules to specify the elements to be exported.
- See the reference pages for full general information on Import and Export.
- ImportString and ExportString support the XYZ format.
ElementsElements
- General Import elements:
-
"Elements" list of elements and options available in this file "Rules" full list of rules for each element and option "Options" list of rules for options, properties, and settings - Graphics element:
-
"Graphics3D" XYZ file rendered as a Graphics3D object - Import uses the
element by default for the XYZ format. - Data representation elements:
-
"VertexCoordinates" atomic coordinates, typically given in picometers "VertexTypes" all atoms or groups constituting the molecule, typically given as a list of chemical element abbreviations - Export["file.xyz", {vert, coord}, {{"VertexTypes", "VertexCoordinates"}}] creates an XYZ model from a specification of atom types and their 3D coordinates.
OptionsOptions
- General Import options:
-
ImageSize Automatic specifies the overall size of the graphics to display Background White specifies what background color to use ViewPoint Automatic point in space from which the 3D model is to be viewed - With the default setting "ViewPoint"->Automatic, Mathematica automatically calculates the optimal viewing angle for the imported molecule model.
- Selecting a 3D rendering style:
-
"Rendering" "BallAndStick" specifies the visualization method - Possible settings for
are: -
"BallAndStick" displays atoms and bonds as a ball-and-stick model "Spacefilling" atoms shown as overlapping spheres "Wireframe" bonds rendered as lines
New in 6
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »




