about Wurtzite crystal

Dear lammps users,
In the lattice part of the command I find the commands for generating Wurtzite crystal, and the generated crystal is like this

I find from the wikipedia that in Wurtzite crystal each of the two individual atom types forms a sublattices which is HCP-type (short for “hexagonal close-pack”), The distance between the lower layer of yellow balls and the bottom is 3/8c(the distance between the two layers of yellow balls is 1/2c),like this

I find that lammps-Wurtzite.png and Wurtzite.png are not the same crystal structure, so I write my own commands:

variable a equal 4.340330
variable b equal $asqrt(3.0)
variable c equal $a
sqrt(8.0/3.0)
variable 1_3 equal 1.0/3.0
variable 2_3 equal 2.0/3.0
variable 1_6 equal 1.0/6.0
variable 5_6 equal 5.0/6.0
variable 1_12 equal 1.0/12.0
variable 5_12 equal 5.0/12.0

lattice custom 1.0 &
a1 $a 0.0 0.0 &
a2 0.0 $b 0.0 &
a3 0.0 0.0 c & basis 0.0 0.0 0.0 & basis 0.5 0.5 0.0 & basis 0.0 {2_3} 0.5 &
basis 0.5 {1_6} 0.5 & basis 0.0 0.0 0.375 & basis 0.5 0.5 0.375 & basis 0.0 {2_3} 0.875 &
basis 0.5 ${1_6} 0.875
region myreg block -0.6 1.6 0 1.2 0 1.1
create_box 2 myreg
create_atoms 2 box &
basis 1 1 &
basis 2 1 &
basis 3 1 &
basis 4 1 &
basis 5 2 &
basis 6 2 &
basis 7 2 &
basis 8 2
the generated crystal is like this

Have anyone found the same problem? Is my commands right? or do I misunderstand the Wurtzite crystal structure?
Any discussion would be appreciated.

Best regards,
Michelle

2A2ADC6D@...6143....png

FF4E5541@...6143....png

BBCE6E00@...6143....png

2A2ADC6D@...6143....png

FF4E5541@...6143....png

BBCE6E00@...6143....png

I don’t know that anyone will help you understand Wurtzite.

If you have a Q about the LAMMPS lattice command or think

it is doing the wrong thing, then somone might help, but

you’ll have to explain more clearly what the issue is.

Steve

BBCE6E00@...6143....png

FF4E5541@...6143....png

2A2ADC6D@...6143....png

You did not explain why you think the lattice.html example is not wurtzite. Just eyeballing an image is not a good test. The modified script that you wrote appears to be identical to the original, modulo inversion symmetry. I predict that any properties that you calculate, such as potential energy or stress will be identical for both structures. Let me know if I am wrong.

Aidan

FF4E5541@...6143....png

2A2ADC6D@...6143....png

BBCE6E00@...6143....png