[lammps-users] lattice and create_atoms using basis

Hi,

I am trying to create a GaN structure using 8 basis atoms where the first 4 are assigned to Gallium and the other 4 are assigned to Nitrogen. Below is the input script that I have put together and was wondering if this is the correct way of using the lattice and create_atoms command with basis. I am getting an “Illegal lattice command” error.

units metal
dimension 3
atom_style atomic
lattice custom 3.189 a1 1.0 0.0 0.0 a2 0.0 1.732 0.0 a3 0.0 0.0 1.624 & basis 1.0 0.666 0.0 basis 0.5 0.166 0.0 basis 1.0 0.333 0.5 basis 0.5 0.833 0.5 basis 1.0 0.666 0.36 basis 0.5 0.166 0.36 basis 1.0 0.333 0.86 basis 0.5 0.833 0.86
region box block 0 4 0 4 0 4
create_box 2 box
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
mass 1 69.723
mass 2 14.0067

Is there a way for me to assign names to these atoms as say Ga and N?

Thanks,
Mihir.

From the lattice doc page:

basis arguments are fractional coordinates (0.0 <= x,y,z < 1.0)

You are using 1.0 as an arg, it needs to be < 1.0, not <= 1.0.
This is b/c 1.0 is the same as 0.0.

Steve

Hi Steve,

Thanks for your response. I tried changing these to <1.0 but it still gives me an “Illegal lattice command” error. Attached is the input script with this change. The basis atom positions specified earlier were directly from a DFT calculation. I even tried reducing the significant decimal digits to 2 from 3 but even then it gives me an error.

Mihir.

in.GaN300K (774 Bytes)

Your input script has an end-of-line character & in the lattice
command, but its embedded in one long line. Remove it
and the command worked for me.

Steve