Personal tools
You are here: Home Documentation Reference Manual Usage Example Transform Operations
Document Actions

Transform Operations

by Karl Norby last modified 2006-09-08 11:02

A walk through each of the transform operations in the example, with the output of each.

In this example, the data is sent through five transforms. You can view the transform file here. The following table goes through each of the transforms, and what each one does:

Explanation
Corresponding Data
The first transform does not modify the data at all. It prints it out. In this case, XML is not the desired format.  The transform class FormatForVisit is used in this example. The class puts the data into a format like the format to the right. Another program then formats the data correctly for a visualizer program. This data is for the primitive cell in the data, which is the data in the tree when pyXSD first starts the transforms. For space reasons, future examples will not show this data.
1
3.85 0.0 0.0
0.0 3.85 0.0
0.0 0.0 3.71525
4
Fe 0.0 0.0 0.0
Fe 0.5 0.5 0.0
Pt 0.5 0.0 0.5
Pt 0.0 0.5 0.5
The data above was used to make the image to the right. The cell only contains four atoms, which is the same number specified above. All images courtesy of Paul Kent.
Primitive cell
For the second transform, the transform class ExpandCell is used. For this class, the user must specify how much he or she wants to expand the cell in terms of each of its vectors. In this case, the user specified an expansion factor of 10 in each direction. The resulting cell has four thousand atoms. The third transform is FormatForVisit again; its output was used to make the image on the right.
Expanded Cell
The fourth transform is the SphereCutter transform. This transform class cleaves off atom in order to make a sphere out of a cell. The user must specify a radius that is in the Cartesian unit used (in these examples, this unit is angstroms, but it does not matter as long as everything is consistent). The user can specify the point to has as the center of the sphere, but it is the center of the cell by default. pyXSD can take about a minute to run when SphereCutter is run on a cell of this size. The fifth and final transform is FormatForVisit, which was used to make the image to the right.
Sphere Cut with 15 radius

Related content

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: