The basis for the implementation is a grid model. The atoms occupy sites in the grid and the dynamics consists of atoms moving from one site to another. Periodic boundary conditions are applied for the grid.

We assume that there is a pair-wise interaction between atoms on the grid.

To represent the grid we define an abstract data type, site in the form of a struct:

#define NBRNUM 4
struct SITE
{
       struct SITE    *nbr[NBRNUM];
       int             id;
       int             env;
       int             seq;
       int             flag;
}              *site;

NBRNUM is the number of neighbor sites, 4 for a quadratic lattice and 6 for a hexagonal lattice.

In the site struct the nbr array points to the neighbor sites. As the sites do not move, the values stored in the nbr never change.

id is the identity of the atom occupying the site with the convention that empty sites have id=0.

env contains an index for the environment of the site. This variable is not strictly necessary but in some cases it simplifies the algorithm and in most cases it speeds up the simulation. Generally, the index should be designed to allow the determination of the interaction energy to be made by using env as an index in a look-up table.

As we have only empty sites (id=0) and A-atoms (id=1), we use the number of occupied neighbor-sites as the index.

flag is used in the treatment of fast reactions.


Source
Start
Back
Author Per Stoltze stoltze@fysik.dtu.dk