Choosing the Right Unit Cell Shape Can Save You CPU Time

When setting up molecular simulations, especially for solvated macromolecules, an often-overlooked yet crucial detail is the shape of the unit cell. If you’re a molecular modeler working with periodic boundary conditions (PBC), the choice of cell shape can make a significant difference—not only in simulation size, but also in computational efficiency ⏱.

In molecular dynamics, we simulate a small part of a much larger system by wrapping a box-shaped cell around molecules and treating it as if it were surrounded by infinite copies of itself. This creates an illusion of a larger system while only computing a small one. But not all shapes of unit cells are born equal.

Why the Unit Cell Shape Matters

Imagine you’re simulating a roughly spherical protein in water. You could wrap it in a cubic box—but this results in a lot of extra water molecules you’ll need to include just to meet the minimum image convention. Some other shapes can wrap more tightly around your solute, reducing the number of solvent molecules required (and thus the CPU time spent).

The GROMACS Wizard in SAMSON supports several PBC-compatible unit cell shapes:

Unit cell shape Image
Cubic Cubic
Orthorhombic Orthorhombic
Triclinic Triclinic
Rhombic dodecahedron Rhombic dodecahedron
Truncated octahedron Truncated octahedron

Smaller Box, Faster Simulation

Of particular interest are the rhombic dodecahedron and truncated octahedron boxes. These shapes approximate a sphere more closely than a cube, making them particularly useful for systems like proteins or small flexible molecules in solvent.

Why does this matter? The rhombic dodecahedron overlaps a cube-shaped box by about 71% of its volume—meaning you use 29% fewer particles for the same minimum image distance. In practical simulations, this can translate into 29% less computation time with no loss in precision ⚡.

Choosing and Applying Unit Cells in SAMSON

In the GROMACS Wizard’s preparation step, you can easily choose the desired shape and size of your unit cell:

Choose unit cell

You get two fitting methods:

  • Box lengths: specify box dimensions to match all conformations. Ideal for batch simulations with fixed box size.
  • Solute-box distance: define how far the solute should be from the box edge. SAMSON adjusts box size per conformation. Recommended distance: at least 1.0 nm to satisfy the minimum image convention.

Note: Even if your unit cell is a dodecahedron or truncated octahedron, GROMACS stores particles in a brick-shaped volume for performance. When loading simulation results into SAMSON, the software tries to detect the original shape, and you can always make manual adjustments when importing the trajectory.

Choosing your unit cell wisely can improve sampling, reduce required solvent—and save CPU hours. This is especially important when dealing with dozens or hundreds of simulations in a pipeline. It’s a small setting that can lead to meaningful efficiency gains.

To learn more, visit the full documentation on periodic boundary conditions and unit cell types in the SAMSON GROMACS Wizard guide.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.

Comments are closed.