Periodicity problem with lattice style custom for non-orthogonal unit cell

Hello everyone,

I have faced a problem to create graphite structure using lattice custom style. As unit cell contain 4 basis atoms i can’t also control the number of particles. periodicity is not observe in any direction, i am using the following command
lattice custom 1 spacing 2.462 2.462 6.708 a1 1.231 -2.13 0 a2 1.231 2.13 0 a3 0 0 6.708 basis 0 0 0 basis 0 0 0.5 basis 0.3334 0.66667 0.0 basis 0.66667 0.3334 0.5
region 1 prism -10 10 -10 10 -1 0 1.23 0 0
create_box 4 1
create_atoms 4 region 1 basis 4 4 # basis 2 2 basis 3 3

Can anyone sort out regarding this issues

Regards
chandan

The best way to deal with problems like this is to set up a script the
outputs a dump file that you can examine in your favorite
visualization tool i.e. AtomeEye. Then start out with something very
simple and add to it until you have what you want. Possible sources
of your problems include:

1. Round-off can sometimes give you extra atoms at the upper
boundaries of the region. Is so, apply a slight reduction (say a
factor of 0.9999) on all quantitieis in your region command.

2. I'm not sure those spacing defs are correct

3. I am pretty sure the second basis site in the first layer is 1/3 1/3 0.

4. In the second layer, you probably want the atoms to be shifted in
the xy plane relative to the first layer.

Aidan