The program calculates the number of atoms that will be in the final structure compensating for those atoms omitted from the original unit cell. If x, y and z are the coordinates of an atom, and cx, cy and cz are the coordinates of the unit cell corner opposite the origin, then the coordinates X, Y and Z of a position it occupies in the structure would be calculated using the formulas:
X=x+i*cx
Y=y+j*cy
Z=z+k*cy
where i, j and k can range from -1 to the number of duplications in the x, y or z direction. -1 is included so that atoms with coordinates of 0, which are omitted from the unit cell are included in the final structure. This also produces some atoms whose coordinates in the structure are negative. These are not included in final crystal structure.
HTML
This sections assumes a basic knowledge of HTML.
The atoms we used in the unit cells are of varying elements for two reasons. First,
the different elements are displayed as different colors. Second, it is possible to
cause certain elements to disappear at the push of a button. The following code is
used in our page to display the crystal structure:
<embed src="rcry.xyz" width=500 height=500 script="set boundbox on restrict elemno=1 spacefill 125" align=left display3D=spacefill name="crystal">
<embed align=absmiddle type="application/x-spt" width=25 height=25 button=push target="crystal" script=" restrict not (elemno=3 or elemno=7) spacefill 125">