# Unification of box shapes in molecular simulations

Hi!

I had a bit of a theoretical question. Since GROMACS uses a triclinic representation of all boxes, I was wondering if GROMACS uses the methodology from Bekker’s “Unification of box shapes in molecular simulations” when, for example, running `gmx trjconv ... -pbc mol -center -ur compact`

If so, is there any additional —perhaps more modern—, resource to understand this topic?

Maybe is too of a specific question, but I’d appreciate any pointers. Thanks!

We use some of the methodology of that paper. But we don’t use any linear algebra.

The main point to understand is that a periodicity of a system is completely defined by it periodic vectors, which are 3 in the case of a 3D system. How you handle PBC for different parts of the computation is a choice, but doesn’t affect the results. What you can choose is how you want to show a representation of the system.

trjconv -ur compact simply moves each atom along vectors c, b and a (in that order) until the distance to the chosen box center is smallest.

aaahhh, and it moves it the same magnitude as the box size in the corresponding direction, right?

So, say, for a given vector from a, b and c and a given particle:
1_calculate the distance to the center
2_move the particle 1 unit of the box dimension along the current cordinate and re-calculate the distance to the center
3_move the particle -1 unit of the box dimension along the current cordinate and re-calculate the distance to the center
Pick the minimum distance among the results of 1, 2 and 3.

And I guess that “particle” may be an atom, a residue or a molecule, to prevent the braking of molecules?

Thanks for taking the time!