Change box from hexagonal to orthorhombic

Hello!

I have a system in triclinic box saved in data-file. Box is actually almost hexagonal, i.e. two edges are equal, angle between them is 60 and other angles are 90. In lammps terms it means that xy ~ (xhi-xlo)/2, yz=xz=0.

I want to represent this system as orthorhombic one, to do it I just need to redefine boundary conditions and to remap atoms that are outside of the new box. New box has same volume as the old one.

I have tried several ways:

  1. change_box command: it applies transformation matrix to atom coordinates according to the basis change, which distorts distances between atoms(at least it looks like this).

  2. explicitly change box parameters in data-file

  3. explicitly change box parameters in data-file and remap manually atoms into the new box

Both 2 and 3 lead to the lost atoms for bonds right after start.

So what is the easiest way to redefine box without distortion of atom positions? All I need is just to discard old boundary conditions and to add new ones with atoms remap into the new box.

Thanks!

Hello!
I have a system in triclinic box saved in data-file. Box is actually
almost hexagonal, i.e. two edges are equal, angle between them is 60 and
other angles are 90. In lammps terms it means that xy ~ (xhi-xlo)/2,
yz=xz=0.
I want to represent this system as orthorhombic one, to do it I just need
to redefine boundary conditions and to remap atoms that are outside of the
new box. New box has same volume as the old one.

I have tried several ways:
1) change_box command: it applies transformation matrix to atom
coordinates according to the basis change, which distorts distances between
atoms(at least it looks like this).

​if you leave out the "remap" option to the change_box command, it should
do what you want. you have to make certain, though, that your communication
cutoff is large enough, or you may lose atoms.​

2) explicitly change box parameters in data-file

​that should work for as long as your atoms have no image flags != 0
if you have an atomic system, simply using the set command to reset all
image flags to 0 is a workaround., but it will fail for systems with bonds.

3) explicitly change box parameters in data-file and remap manually atoms
into the new box
Both 2 and 3 lead to the lost atoms for bonds right after start.

​as noted above, you need to increase your communication cutoff with
comm_modify to make certain, that through the sudden change of box
geometry, atoms, which need to be rewrapped, are not suddenly located
​outside the communication cutoff and thus get lost. the remapping in 3)
can be tricky if you also need to consider image flags.

​axel.​