change_box with triclinic box

Hello Aidan and users,

I think I found the reason why it was giving ‘too large skew’ error only when shrinking. This is because of lammps nature to execute commands sequentially. If we write change_box command like:’

change_box all x scale 0.9 y scale 0.9 xy final 2.5

i.e. first ‘scale’ and then the tilt value, it changes first box sides and tilt is still the same, so lammps thinks at this moment and skew is too large.

when I scale x or y with >1, it’s expanding and yet not-changed value of the tilt is acceptable.

When I changed the order like:

change_box all xy final 2.5 x scale 0.9 y scale 0.9

it didn’t complain any more.


Yes, good point. This sequential character is unique to change_box and
is described in the change_box.html. The problem you encountered was
not documented, and so I have added the following note:

IMPORTANT NOTE: Because the keywords used in this command are applied
sequentially to the simulation box and the atoms in it, in the order
specified, special care must be taken with triclinic cells to avoid
exceeding the limits on skew after each transformation in the
sequence. If skew is exceeded before the final transformation this can
be avoided by changing the order of the sequence, or breaking the
transformation up in to two or more smaller transformations. For more
information on the allowed limits for box skew see the the doc page
for fix deform.