[lammps-users] Lattice orient problem

In versions of LAMMPS since the lattice command was rewritten I have not been able to align my lattice with (111) along the z-direction without problems.

These commands:
lattice fcc 3.615 orient x 1 -2 1 orient y 1 0 -1 orient z 1 1 1 region box block 0 10 0 10 0 10

result in:
LAMMPS (22 Jun 2007)
Lattice spacing in x,y,z = 5.90327 5.11238 6.26136
Created orthogonal box = (0 0 0) to (59.0327 51.1238 62.6136)

Even with shrink wrapped boundaries the temperature increases rapidly. I am using Cu Mishin potential which has a spacing of 3.615. If I align along (011) with:
lattice fcc 3.615 orient x 1 0 0 orient y 0 1 -1 orient z 0 1 1

I get no temperature jump and it thermalizes properly. It also works as expected with no orientation specified.

Please can someone advise if my usage is wrong or if this is a bug. I have read the documentation reasonably carefully and can't see anything to suggest that this behavior should be expected.

It looks to me like the atoms are being created with the wrong spacings.

Many thanks
Giles Kimminau

This section of the lattice doc page is probably relevant:

IMPORTANT NOTE: For non-orthogonal unit cells and/or when a rotation
is applied via the orient keyword, then the lattice spacings may be
less intuitive. In particular, in these cases, there is no guarantee
that the lattice spacing is an integer multiple of the periodicity of
the lattice in that direction. Thus, if you create an orthogonal
periodic simulation box whose size in a dimension is a multiple of the
lattice spacing, and then fill it with atoms via the create_atoms
command, you will NOT necessarily create a periodic system. I.e. atoms
may overlap incorrectly at the faces of the simulation box.

Are you certain you have created a periodic system? If not, you coould get
a temperature spike due to overlapping atoms. Note that you can reset the
lattice spacings yourself or create a box that is a non-integer mutiple of the
spacings if you need to.

Steve

I had never managed to get the spacing command to work. After trying all possible interpretations of the documentation I grepped the source and found that it is implemented as "spacings" not "spacing". Manually setting the x spacing to root(6) rather than the calculated root(8/3) now works.
Is there any way to get around the problem of only being able to orient to lattice directions specified by integers and hence being restricted about the possible orientations that one can use?
Thank you
Giles

Steve Plimpton wrote:

I'll post a patch for the "spacing" vs "spacings" issue today.

Re: arbitrary orientations, you can use the a1,a2,a3 settings
of the lattice command to create a unit cell with any
orientation you want. If you tile a box with it, you shouldn't
expect periodicity in the lattice across
the box faces, however, unless you carefully choose the box
size.

Steve