Crystal structure models with “Balls & Sticks”

The software Balls & Sticks can be used to make and animate models of crystal structures (Windows only, but I have made it work on Ubuntu Linux 16.04 using Wine). You can use it to make models such as those below: You can generate multiple unit cells using Edit > Boundaries: It’s also possible to make animations: Calcium titanate Caesium chloride (The above are best viewed with red and blue 3D glasses.) An examples class that I made on crystal building using Balls and Sticks can be found here. The J. Appl. Cryst. article describing Balls & Sticks is: T. C. Ozawa; Sung J. Kang; “Balls & Sticks: Easy-to-Use Structure Visualization and Animation Creating Program” J. Appl. Cryst. 2004, 37, 679.

An examples class on crystal building with “Balls and Sticks”[1]


Open “Balls and Sticks” by clicking on the icon

Click on “File > New” and you will see the following dialogue box.

Firstly, we will build a simple cubic lattice. Enter “Cu simple cubic” in the “Phase Name” box (1). This is just a reminder for you – you can put anything you like in here.

The default values for the lattice parameters a, b, c and alpha, beta and gamma (4) will give a cubic lattice, so just leave them as they are for now.

At (5), enter “Cu” in the “Atom” box, “Cu1” in the “Site” box and the coordinates 0, 0, 0, for x, y and z.. This will produce a lattice with an atom at the origin. Click “Add” (6) and then “OK”.

Another dialogue box will appear, but just click the “OK” button for now.

You should get an image looking something like this:

Using the “Tools” panel icon , you can rotate the structure freely.

The program displays one unit cell of the structure (with grey lines) but puts a full atom at each corner. In order to see how many atoms belong to a single unit cell more easily, we can create a 3-D unit cell and look inside it. Select all the atoms using the  arrow while keeping the Strg (CTRL) key pressed. They should be highlighted in red. When all are selected, press the enter key. You should see the following dialogue.

Enter a name, for example “Cube” and press “OK”. Now you should see a cube on your crystal structure. In order to see inside the cube, click on “See inside poly” on the “Tools” panel. A vertical slider labelled “T” should appear. This is the transparency control which you can use to set how transparent you would like the cube to be (fully transparent at the top, fully opaque at the bottom). By rotating the cube, you should be able to satisfy yourself that 1/8 of each corner atom is included in the unit cell. Since there are 8 corners, there is one full atom per unit cell. (This is obvious for this structure, since we only entered one atom, but the transparent cube technique is useful for more complicated structures.)

Save the simple cubic structure using File > Save as. You can also export a bitmap or JPEG image of the structure from the File menu if you wish.

Cubic close-packed structure

As we saw in the lectures, however, copper does not crystallise in a simple cubic structure but in a cubic close-packed (face-centred cubic) lattice. We will now construct a model of this. Click on Edit > Structure. As well as the atoms at 0, 0, 0, we have atoms sitting on the centres of these faces. The one in the centre of the x-y (a-b) plane has co-ordinates 0.5, 0.5, 0, for example, where the co-ordinates are expressed as fractions of the unit cell parameters a, b and c. Enter these values by typing “Cu” into the “Atom” box, “Cu2” into the “site” box (to indicate Cu site no. 2) and 0.5, 0.5 and 0 into the x, y and z boxes[2], then click “Add”. Do the same, giving each site a different number, for the other two face-centring sites. Now we want to make a realistic model of the Cu structure, so enter the real lattice parameter, 3.61Å, for each of the values a, b and c (4). When you have made the structure, use the transparent cube method to verify that there are four full atoms per unit cell.

Space groups

There is a simpler method to enter the crystal co-ordinates, making use of the crystal symmetry. Crystals can be classed into 7 crystal systems (cubic, tetragonal, orthorhombic, hexagonal, rhombohedral, monoclinic and triclinic), based on the most symmetric unit cell that it is possible to draw. Each system has one or more possible lattices (primitive, face-centred, body-centred, c-centred) depending on its symmetry, leading to a total of 14 Bravais lattices. The combination of the lattice and the symmetry of the atomic arrangement at each lattice point (the motif) gives rise to 230 permutations – the space groups. We will not go into details of space groups here – the point to note is that any crystal structure can be described with a space group and a list of atomic co-ordinates, and that in all but the simplest cases this leads to a more concise description than listing all the atomic positions, as the next example demonstrates.

The space group of the cubic close-packed structure is no. 225, F m -3 m. (The “F” here indicates that the lattice is face-centred, and the other two items describe the symmetry operations) You can find the space group of crystal structures of interest by consulting books of crystallographic tables.

Edit the cubic close-packed structure (Edit > Structure) by selecting no. 225 from the list of space groups (2). You will notice that the text “Cubic (m -3 m) appears in the space group area, and all the lattice parameters apart from a are greyed out since the cubic symmetry requires that b=c=a and all the angles be 90°. Furthermore, the space group describing the face-centred lattice specifies that an atom at 0,0,0 should be reproduced at the face-centring sites such as 0.5, 0.5, 0 so there is no need to enter these co-ordinates any more. Test this by deleting the atoms at the Cu2, Cu3 and Cu4 sites (select with the mouse and click the “delete” button (6), then click “OK” (8). The structure should be the same as before!

In the File menu, choose Export > CIF file. (You will need this file for a later part of the examples class).

Close-packing model

Now we will create a model of close-packing similar to the ones we saw in the lectures, and examine the close-packed planes and directions. For this, we need information about the size of the Cu atoms in the structure. The website “” has information about the atomic and ionic radii of elements in different structures. From this website, find an estimate for the atomic radius of neutral Cu. Divide this by the lattice parameter – the answer should come out at approximately 0.37. Open “Property > Atoms”, select Cu from the list and set its radius to the value you determined, then click OK. (This dialogue also allows you to change the appearance of the atoms – colour, “shininess”, etc.) The resulting model should now have the spheres touching one another. Rotate the unit cell until a corner of the cube is facing you. Select the corner atom with the  arrow and press “Entf” (Delete). You can now see a triangle of 6 atoms. You can highlight them all in red by clicking on them while holding down Strg/Ctrl, and you can also delete the unit cell lines if that helps you to see the close-packed plane better (Property > Unit cell outline > “Show Outline” checkbox) Note that they are touching one another – this is the close-packed plane of the structure. What are the Miller indices of this plane? There are also three types of directions along which the rows of atoms are touching – what are these directions in crystal notation? There is a law in crystallography called the Weiss Zone Law stating that if a direction [U V W] lies in a plane (h k l) then

Uh + Vk + Wl =0

Check that this is true for the plane and directions you have identified.

Export, animation and 3D

You can export the crystal models you make as static pictures to import into your study notes using File > Output JPEG and File > Output Bitmap. Bear in mind that the program automatically names the image file with the name of the active .BS file and will overwrite the image if you save another one from the same .BS file later. To avoid this, you should manually change the names of the image files.

Another possibility of this program is to make animations that allow you to visualise the structures more easily. As an example, we will make models of interstitial structures and draw the co-ordination polyhedra associated with the interstitial atoms.

Start with the CsCl structure (see table). Select the correct space group and enter the lattice parameter and co-ordinates of Cs and Cl. Select the eight Cs atoms and add a polyhedron. Use “see inside poly” to make it transparent. Select “View > Show snapshot window”. A small window should appear. Click “Add” or press F4. Then, using the arrow keys at the bottom of the “Tools” panel, rotate the crystal one step. (The step size is 5° by default but can be changed by selecting from the drop-down list.) Press F4 again to take another snapshot. Repeat until you have completed a full 360° rotation (72 images if the rotation step is 5°). Then in the SnapShot window, select File > Generate BMPs > All (overwrite) and wait while the program makes the bitmaps (it may beep annoyingly!). Then select File > Generate AVI. Accept the default settings in the next window with OK, then select the setting “Microsoft Video 1” with OK in the following one. After a few seconds, you should get a message saying that the animation has been generated, and where the file is located. Rename the file and save it to your USB drive – you can now use this for later study.

Delete the cube around the Cl- ions by selecting it and pressing Entf/Delete. Go to Edit > Boundaries and enter -0.5 for the “Low” value and 1.5 for the “High” value of x, y and z then click OK. Now you can observe the coordination polyhedron around Cs+ ions byextending your view of the structure to include more than one unit cell.

The program includes the capacity to make 3D images and animations for viewing with red and blue glasses. Click on the 3D button to create an anaglyph. 3D movies can be made in the same way as 2D ones, and you might find them more helpful in visualising the structures.

What are the co-ordination numbers and shapes for the following structures? What is the difference between the ZnS-sphalerite and CaF2 structures?


Space group

Lattice param. (Å)


Co-ordination number & shape?


221 P m -3 m


Cs: 0, 0, 0

Cl:  ½ ½ ½




225 F m -3 m


Na: 0, 0, 0

Cl:  ½ ½ ½




216 F -4 3 m


Zn: 0, 0, 0

S: ¼ , ¼, ¼




186 P 63 m c

a: 3.8

c: 6.23

Zn: 1/3 2/3 0

S: 1/3 2/3 0.325




225 F m -3 m


Ca: 0, 0, 0

F: ¼ , ¼, ¼




[1] Note: Balls and Sticks is freeware and can be downloaded from

[2]               Note that the usual German notation 0,5 (with comma) does not work in this program.

Full address of your webpage

For a print version of your webpage, it’s very useful to be able to include the full address of your page somewhere so that peple who print it out know where it has come from. Simplified a bit from the Web Hosting Articles page: <?php // determine the domain using HTTP_HOST $domain = $_SERVER['HTTP_HOST']; //determine the URI using REQUEST_URI $theuri = $_SERVER['REQUEST_URI']; // concatenate to give the full URL $url = "http://" . $domain . $theuri; // output echo $url; ?> Save the above as ‘whereami.php’, then it can be included in another page using: <div class="whereami"> <?php include 'whereami.php'; ?> </div> If you give this script its own css class, “whereami”, then if you make different css style-sheets for the print and the screen version of the page, you can hide the URL on the screen version by adding this line in your “screen” stylesheet: .whereami{display:none;} and just have it appear when you print by leaving this line out of the “print” stylesheet. See the Added Bytes article on printer friendly pages for advice on this.

CSS: Stop menu text breaking across a line

Yesterday I was racking my brains to work out how to deal with this: There are eleven items on this menu and if the window is made too small, English text breaks between words and Japanese text between characters in a single menu item. Although this behaviour is normal in paragraphs, it’s not suitable for menu items so, how to stop it? I eventually found the answer after much searching: white-space: nowrap; (W3schools documentation, tutorial) (I had expected it to have the name word-wrap or text-wrap or something like that…) With this attribute applied to the <li> tag, the menu appears as shown below. Now the word appears on the lower line rather than being broken across two. Hoorah! NB: If applied to large chunks of text, white-space: nowrap; will make the text stick out beyond its containing box unless an overflow: scroll; or overflow: hide; attribute is also used, so white-space: nowrap; is best reserved for small menu items.