Lattice Custom

Hello Everyone,

I am trying to create a hexagonal sheet comprising of 2 alternate types of atoms but the error “Illegal Lattice command” is coming up. I used the lattice custom according to the manual but am not understanding why this error is coming up.

dimension 3

units metal
atom_style molecular
atom_modify map array
boundary p p p
atom_modify sort 0 0.0

# BN unit cell

lattice custom 5.009 a1 0.433 0.25 0.0 a2 0.433 -0.25 0.0 & basis 0.433 0.25 0.0 basis 0.5773 0.5 0.0 basis 0.5773 0.0 0.0 basis 0.14435 0.25 0.0
ERROR: Illegal lattice command (lattice.cpp:215)

Thanks a lot.

Upamanyu

You have used dimension 3, but in the lattice command, you didn’t specify the a3 vector. Maybe thats why it is throwing you an error.

Plus, you don’t need to use ‘&’ before basis unless you’re putting it in the next line.

Thanks a lot for the reply. But is that necessary that there have to be 3 primitive vectors for a 3 dimension? Can there not be 2 primitive vectors?

I will check the “&” sign . I used that because of one of the examples stated in the manual here : http://lammps.sandia.gov/doc/lattice.html#Description

Thanks for the help.

There could, provided that the material coordinate is orthogonal. But since you’re specifying it as custom, i doubt this feature could guess the third axis!