# Wurtzite lattice building using basis

Dear Lammps users,

I’m trying to bulid a wurtzite lattice using follwoing commands:

Lattice custom 3.08 a1 1 0 0 a2 0 1.732 0 a3 0 0 2.2

and thses basis, which two of them are negative.
basis 0 0 0
basis 0 0 0.5
basis 0.33333 0.66666 0.6667
basis 0.66666 0.33333 0.1667
basis 0.33333 0.66666 0.3332
basis 0.66666 0.33333 -0.0416
basis 0 0 0.1254
basis 0 0 0.6254
basis 0.33333 0.66666 0.7919
basis 0.66666 0.33333 0.2919
basis 0.33333 0.66666 0.4584
basis 0.66666 0.33333 -0.1668

My frist question is that how can i convert a negative basis to a posive one? and how can i make sure that the created lattice is correct?

Best wishes,

Dear Lammps users,

I'm trying to bulid a wurtzite lattice using follwoing commands:

Lattice custom 3.08 a1 1 0 0 a2 0 1.732 0 a3 0 0 2.2

and thses basis, which two of them are negative.
basis 0 0 0
basis 0 0 0.5
basis 0.33333 0.66666 0.6667
basis 0.66666 0.33333 0.1667
basis 0.33333 0.66666 0.3332
basis 0.66666 0.33333 -0.0416
basis 0 0 0.1254
basis 0 0 0.6254
basis 0.33333 0.66666 0.7919
basis 0.66666 0.33333 0.2919
basis 0.33333 0.66666 0.4584
basis 0.66666 0.33333 -0.1668

My frist question is that how can i convert a negative basis to a posive
one?

it is a *lattice* and thus periodic, so you can just use its periodic
equivalent.

and how can i make sure that the created lattice is correct?

visualization? comparison of results with reference data?

axel.

Thank you for your help. Can you please explain how to get the “periodic equivalent”? for example, for the “basis 0.666 0.333 -0.166”, is the "basis 0.666 0.333 1-0.166" its periodic equivalent? sorry, my background is not physics or materials sceince.

Best wishes,

The 12 atom basis you were using does not look like wurtzite. Below is
from an old LAMMPS script, but you should be able to modify it to
match the latest LAMMPS syntax:

# Set up 8 atom CdSe wurtzite unit cell,
variable 1_3 equal div(1,3)
variable 2_3 equal div(2,3)
variable 1_6 equal div(1,6)
variable 5_6 equal div(5,6)
variable 1_12 equal div(1,12)
variable 5_12 equal div(5,12)

lattice user 1.0 &
a1 \$a 0.0 0.0 &
a2 0.0 \$b 0.0 &
a3 0.0 0.0 c &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis 0\.0 0\.0 0\.0 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis 0\.5 0\.5 0\.0 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis {1_3} 0.0 0.5 &
basis \{5\_6\} 0\.5 0\.5 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis 0\.0 0\.0 0\.625 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis 0\.5 0\.5 0\.625 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis {1_3} 0.0 0.125 &
basis \${5_6} 0.5 0.125

region myreg block 0 3 &
0 5 &
0 4
create_box 2 myreg

create_atoms 1 &
basis 5 2 &
basis 6 2 &
basis 7 2 &
basis 8 2

add/subtract of 1 to each basis coord is an equivalent atom

in the next unit cell

Steve

Another questiuon is that " is it nessesary to use a prism region to build a suppercell, say 201010 unit cell, for a wurtzite structure?"

Regards

Another questiuon is that " is it nessesary to use a prism region to build a
suppercell, say 20*10*10 unit cell, for a wurtzite structure?"

not automatically, usually a specific multiplicity is required. please
note that this is not really a question about LAMMPS but about
crystallography. there are *lots* of text books introducing concepts
like lattices and primitive vs. conventional vs. supercells. the
purpose of this mailing list is not to make up for your lack of
training in this matter. if you are serious about doing simulations
where this kind of knowledge is required, then it should go without
saying that you'll have to acquire the suitable basic training first.

axel.

Here is an updated version of the LAMMPS commands that generate a
Wurtzite crystal:

# Set up 8 atom wurtzite unit cell
variable a equal 4.340330
variable b equal \$a*sqrt(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 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis 0\.0 0\.0 0\.0 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis 0\.5 0\.5 0\.0 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis {1_3} 0.0 0.5 &
basis \{5\_6\} 0\.5 0\.5 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis 0\.0 0\.0 0\.625 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis 0\.5 0\.5 0\.625 &amp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;basis {1_3} 0.0 0.125 &
basis \${5_6} 0.5 0.125

region myreg block 0 1 &
0 1 &
0 1
create_box 2 myreg

create_atoms 1 box &
basis 5 2 &
basis 6 2 &
basis 7 2 &
basis 8 2

Nice - I’ll add them to the lattice doc page as an example.

Steve