When preparing a molecular dynamics simulation, one often-overlooked but important decision is the shape of the unit cell used for applying periodic boundary conditions. This decision can impact both the accuracy and performance of your simulation. If you’ve ever wondered why your simulations take longer than expected or consume more resources than necessary, the shape of your unit cell might be a contributing factor.
This post introduces unit cell shapes in the context of GROMACS simulations using the GROMACS Wizard in SAMSON. You will learn how choosing the right shape can reduce computational cost—without compromising accuracy.
What Are Unit Cells?
In simulations with periodic boundary conditions, unit cells define the basic repeating volume that contains your molecular system. GROMACS supports a variety of unit cells:
- Cubic
- Orthorhombic
- Triclinic
- Rhombic dodecahedron
- Truncated octahedron
Not all unit cells are created equal. Some, like the rhombic dodecahedron and the truncated octahedron, are better suited for spherical or flexible molecules.
| Unit cell shape | Representation |
|---|---|
| Cubic | ![]() |
| Rhombic dodecahedron | ![]() |
| Truncated octahedron | ![]() |
Why Shape Matters
The most common default is the cubic box, which has the advantage of being simple and easy to implement. However, it often contains more solvent than necessary, especially when simulating an approximately spherical molecule like a protein. This leads to larger system sizes and longer simulation times.
In contrast, rhombic dodecahedron and truncated octahedron boxes are more compact and closer in shape to a sphere. For spherical molecules, using one of these can:
- Include fewer solvent molecules for the same minimum image distance
- Reduce the simulation volume (up to 29% in the case of the rhombic dodecahedron)
- Save substantial CPU time and memory
This makes them a smart choice for studies where computational efficiency is key.
How to Choose in Practice
When preparing a system in the GROMACS Wizard inside SAMSON, you can select the unit cell shape via an intuitive graphical interface:

Consider your molecule’s shape when choosing the unit cell:
- Use rhombic dodecahedron if your molecule is roughly spherical and you want to optimize simulation time.
- Use truncated octahedron for similar benefits, particularly if you’re concerned about edge effects or want a slightly less compact alternative.
- Stick with cubic or orthorhombic shapes for boxier or anisotropic systems.
Keep in mind that GROMACS always keeps particles in a brick-shaped volume internally, but SAMSON will attempt to detect and visualize the actual unit cell type upon loading a trajectory.
To learn more about space-filling cells and how they affect simulations, read the full documentation: GROMACS Wizard – Periodic Boundary Conditions.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.



