3D Crystal Viewer Help

Rotation Controls

The model can be rotated in spherical polar coordinate space(θ,φ) through mouse dragging on application window or by pressing arrow-keys on keyboard(UP/DOWN and LEFT/RIGHT). Current view angles in degrees are displayed on sidebar.

*By hitting keys with SHIFT-key down, you can enhance the rotation.

Visual Parameters

Zoom and perspective level can be changed by clicking on respective spin-buttons([+]/[-]). Perspective level is reciprocal focal length of 3D view. By lowering the value, the 3d view approaches parallel projection.

Export of Scalable Vector Graphics(SVG 1.1)

You can capture the current view as vector image by clicking on [SVG] button. To use SVG, copy xml text that appears in textfield and paste it to notepad. And save it to a file (with file-extension ".svg", if required). The .svg file can be viewed on a web browser which supports SVG format, or can be imported to a vector drawing software which has SVG-importer.

Model Data(XML)

You can edit model by clicking on [EDIT] button. Model data is written in XML format and is composed of some elements such as atom-site("<site />") and inter-atomic-bonding("<bond />"). For detail of data format, refer to the next section. The example below shows the data of simple molecule, Methane.

<?xml version="1.0" ?>
<crystal title="Methane">
<site id="C1" position=" 0.0, 0.0, 0.0" color="#33cc00" />
<site id="H1" position=" 0.5, 0.5, 0.5" color="#ffcc00" />
<site id="H2" position="-0.5,-0.5, 0.5" color="#ffcc00" />
<site id="H3" position=" 0.5,-0.5,-0.5" color="#ffcc00" />
<site id="H4" position="-0.5, 0.5,-0.5" color="#ffcc00" />
<bond site1="C1" site2="H1" />
<bond site1="C1" site2="H2" />
<bond site1="C1" site2="H3" />
<bond site1="C1" site2="H4" />

Reference for Model Data XML

"crystal" (root element)

<crystal title="Title">
 : <!-- put site, bond, and other elements here! -->
Title : title text
- Put a descriptive title of the data, which appears on the header of 3D Viewer.

"vector" fundamental translational vectors(optional)

<vector a1="x1,y1,z1" a2="x2,y2,z2" a3="x3,y3,z3" />
x1,y1,z1:components of vector a1
x2,y2,z2:components of vector a2
x3,y3,z3:components of vector a3
- These optional vectors define non-orthogonal coodinate system for orthorhombic structures.

* When this element is omitted, orthogonal unit vectors are used by default.

* Diameter of atom is automatically adjusted to be 1/4 of the shortest vector's length.

"center" offset of the 3d model(optional)

<center position="i, j, k" /> 
i, j, k:coordinate of the view center
- three dimensional offset in 3D Viewer.

*When this element is omitted, the view center gets the origin(0,0,0).

"site" atom sites

<site id="SiteID" position="i, j, k" color="Color" /> 
SiteID : identifier of the site
- Put a unique atom site ID consist of alphabets and numerical symbols. The ID is to be used for bonding.
i, j, k : coordinates of the atom position
Color : color of the atom
- Set atom color in 24 bits hexadecimal format; #RRGGBB.

"bond"interatomic bond

<bond site1="SiteID1" site2="SiteID2" color="Color" /> 
SiteID1,SiteID2 : IDs of atom sites
- Choose two IDs of atom sites that are to be bonded.

* You can visually confirm site IDs by clicking on atoms in 3D Viewer.

Color : color of bond
- Set bond color in 24 bits hexadecimal format; #RRGGBB.

* Default bond color is black(#000000).

to page top