Basis part of custom lattice command

Hello Everyone,

I am trying to create a simple cube structure (with 8 atoms) whose bond length is 1.42A (side length of the orthogonal cube). I plan to use the “lattice custom” command to avoid scaling. The manual says a1,a2, and a3 specify the orthogonal sides of the cube, and atoms should be added using the “basis”. So I set a1,a2, a3 equal to the side length of the cube. The manual also says that the position vector of the basis is x= bx a1 + by a2 +bz a3.

So I thought the command should be defined as:

lattice custom 1 a1 1.42 0.0 0.0 a2 0.0 1.42 0.0 a3 0.0 0.0 1.42 &
basis 0.0 0.0 0.0 basis 0.0 1.0 0.0

but the manual says that elements of the basis have to be ( 0<= xy,z <1). So I changed it to:

lattice custom 1 a1 1.42 0.0 0.0 a2 0.0 1.42 0.0 a3 0.0 0.0 1.42 &
basis 0.0 0.0 0.0 basis 0.0 0.5 0.0

I would appreciate it if you could please give suggestions on how a1,a2,a3, and basis are defined.

Also, I am not sure how many atoms should be placed using the basis. Should I place all the 8 atoms?

Many thanks,
Alex

I think you need to read the documentation again and with more care and probably take a look or two into a text book about crystallography.

I would have thought that you would have this:

lattice custom 1.42 a1 1 0 0 a2 0 1 0 a3 0 0 1
[...]

That defines a cubic box with a lattice spacing of 1.42 length units.

Yes. The positions of the atoms in the lattice need to be specified in fractional coordinates. That is so multiplying the fractional coordinates with multiples of the lattice vectors will produce the individual lattice points (plus the offset defined by the “origin” keyword, which defaults to 0 0 0).

That is a very strange question. How can LAMMPS know where to create all 8 atoms of your unit cell, if you don’t tell it where they are located?