Building Crystals and Slabs

In this tutorial we demonstrate the working of several tools that combined give you great flexibility to build periodic structures.

If you are not interested in periodic structures (for example, if you only use ADF), you can skip this tutorial.

The instruments at your disposal are:

  • The crystal structures tool.
  • The predefined crystal structures in the database (via the search field).
  • CIF file importer.
  • Crystal builder from space group information.
  • Super cell tool to enlarge the unit cell.
  • Slice tool to cut out slabs from any crystal.

To use these tools you need to use ADFinput in periodic mode. For example, by switching to the BAND mode, or by switching to DFTB or Mopac and next changing the periodicity.

The Crystal Structures Tool

If you are lucky your crystal structure is already included in ADFinput. Most of the common structures are there. NaCl is one of them.

Start ADFinput and switch to BAND (or to DFTB, and switch the periodicity to ‘Bulk’)
Click on the snowflake-like pictogram on the toolbar.
Select a “Cubic” lattice and then NaCl

Next a dialog pops up where you can change the parameters of the structure, such as lattice constants


In this case there is no need to change anything.

Click OK

You can adjust the details like lattice constants by hand. For example LiF: it has the same crystal structure as NaCl, but other elements and a different lattice constant, namely 4.01:

Open again the NaCl dialog
Change the lattice constant and the elements as shown
Click OK

The NaCl crystal structure will be replaced by the new LiF crystal structure.

Some crystal structures have more parameters.

Select “Tetragonal” and then “Rutile” from the snowflake tool
Click OK

As you can see, it has two lattice parameters that need to be specified. But now also the positions of the oxygens have a parameter “x”

After clicking ‘Ok’ your screen will look like this


The Crystal Structures Database

All crystal structures known to the crystal structures tool are also available via the search tool.

Just as you can search for a molecule, you can search for a crystal. So lets make NaCl again:

File → New
Click on the search icon, or press control or command - F
Type ‘NaCl’ (without the quotes)

You should get a couple of matches:


Select the NaCl crystal result (not the molecule!):

Click on the ‘NaCl’ search result (in the Crystals section)

You now should have a NaCl crystal again.


Currently the structures of many simple crystals are included, as well as a few complex structure (optimized by MOPAC). The zeolite frameworks are also included as a starting point to make your zeolite structure.

Crystal builder (from space group information)

The structure database is very convenient but by necessity incomplete. A more powerful approach is to build 3D crystals from the space group information. Here we give an example on how to build TiO2 (Rutile) again, now from its space group.

Open the crystal builder:
Click on the snowflake tool and select “From Space Group”

And the following window pops up


Rutile has the symmetry of space group 136

in the “Number” field, and press return (enter key on Windows).

Note how the Browser reflects the change and also how the “Name” and “Lattice” values change

Now set the two lattice parameters as below


We still need to define the atomic coordinates. For starters click on the plus below “Coordinates”


In a book on crystal structures you can find that Rutile has two sites occupied. The Ti atom is on the “a” site

Select the Ti atom and select the “a” site

The oxygens occupy the “f” site.

Click on the plus to add a site
Change the atom type to “O” and the site to “f”

As you can see in the “Coords” column and the “Parameters” column, this site has an undetermined parameter “x”. (It represents a symmetry line for this space group.) In the book you can find that for TiO2 “x=0.3”.

Set “x” to 0.3

The final dialog looks like

Press “Apply” and if that looks any good press “Close”

In the toolbar there is another tool that may be of use: the star button. Just like the similar button for molecules this button will try to detect the symmetry of your system and make small changes to adjust to perfect symmetry. It does this via spglib, see the help balloon for details.

Click the Symmetrize button (the star in the toolbar)

You already had perfect symmetry, so nothing much changes. The detected symmetry should be reported:


You can view a larger part of the crystal and still see the unit cell clearly:

Right-click on the periodic display button (the 4 dots)
In the dialog that pops up type 2 in the top-left cell (other elements will follow)
Click OK
Use ctrl/cmd-J and ctrl/cmd-K to make neighbor cells more or less transparent (or use the menu commands in the View menu)

This will give you a view like this:


Slicer: building slabs

The slicer is a very easy, yet powerful tool to make slabs from any crystal structure. In this example we build a three layer slab of the Cu(111) surface.

Select fcc from the “Cubic” crystals

The element and lattice constant are already correct for Cu.

Press “OK” to generate the Cu lattice

Let us invoke the slicer tool to cut out the slab. The slice tool icon looks like this:

Click on the slicer tool icon in the toolbar

The following dialog appears

Set the Miller indices to (1,1,1)
Select Cartesian
Set the number of layers to 3

The “Cartesian” option is needed because the Miller indices are usually (with cubic lattices) thought in the conventional unit cell rather than the primitive (minimal) unit cell.

Press OK

After pressing OK you will see (from the top)


You may want to rotate it or press the side view buttons in the toolbar to convince yourself that it is a three layer slab.


Creating a supercell

Thus far, we have always created primitive unit cells: the smallest possible. Quite often you want to use a larger, less symmetric unit cell. You can do this for chains, slabs, and crystals, but we will demonstrate how it works for a slab.

We will continue to work with the 3-layer Cu slab:

Select the Edit → Crystal → Generate Super Cell... command

Thus invoking the Super Cell Tool


Here you see how new lattice vectors are expressed in terms of old ones. Because we have a slab this is a 2x2 matrix.

Select the “sqrt(3) x sqrt(3)” option from the “Preset” menu

The matrix has now changed into 2,-1,-1,2.

Press OK

and you get a unit cell with three atoms per layer:

Close ADFinput