Tilt factors become too large when perturbing hexagonal lattice

Hi

I am trying to calculate the elastic constants of a hexagonal lattice. As a starting point, I am using the ELASTIC example. However, since a hexagonal lattice is at a maximum of the allowed tiltfactors (xy/[xhi-xlo] = -0.5), an error occurs in displace_box. So far, I am using a hack, where I have changed 0.5 to 0.51 in lines 310-312 in displace_box.cpp. Is there a "more legal" way of overcoming this?

My LAMMPS version is an svn check-out from Oct. 3.

Thanks
Lasse

That should be fine. Why don't you modela hexagonal
lattice as a orthogonal rectangular unit cell? E.g. width
of 1.0., height of sqrt(3), 2 basis atoms, like the lattice hex command
does?

Steve