# Occupancy rules

- Page 1
- Page 2

The occupancy rules implemented in GAMGI, determining which nodes in crystallographic cells should be occupied, is a powerful tool to build non crystalline structures, for example to generate starting configurations to simulate liquid mixtures.

This tutorial shows how to use occupancy rules to create usefull structures in a spherical cell volume and in a conventional cell volume. We create first a spherical volume and second a conventional volume, for a cubic cell, plus Si, C template atoms, and link them together using several different occupancy rules, to exemplify the method.

Structures as those created in this tutorial can be seen in the figure at http://www.gamgi.org/images/screenshot08_4b.png.

### Spherical volume

1. Press Cell->Create and set System to c, Lattice to P and the lattice parameter a to 1. In the Type page, choose Sphere, with radius Length equal to 5. Press Ok to create the cell.
2. To improve visibility, press Layer->Modify, change Projection to Orthographic and press Ok.
3. Press Atom->Create, write Si in the Element entry and press the mouse over the screen (outside the cell), to create a Si template atom. Repeat the task to create a C template atom.
4. Press Cell->Link, then press over the cell, then press over the Si atom, and select the method Independent. Go to the Occupancy page, set the Rules to (*2, *2, *2) and press Ok. A cube with 3x3x3 nodes in the center of the sphere is now occupied with Si atoms.
5. Repeat the Cell->Link task, this time linking the cell with the C atom, using as pattern rule (___*****, ___*****, ___*****), and press Ok. All nodes around the 3x3x3 central nodes are now occupied with C atoms.

Home