When performing molecular simulations with periodic boundary conditions (PBC) in GROMACS, one subtle choice can have a measurable impact on both the accuracy and efficiency of your results: the shape of the unit cell. If you’ve ever wondered whether to go with a cubic box or something more exotic like a truncated octahedron, this post is for you. 🧊📦
A common pain molecular modelers face is balancing computational cost with meaningful system behavior—especially when simulating macromolecules like proteins in solution. Choosing the right unit cell shape can help reduce solvent molecules (and thus the number of atoms in your simulation) while maintaining realistic system boundaries.
Why unit cell shape matters
GROMACS uses periodic boundary conditions to simulate bulk systems without edge effects. But not all unit cell shapes are equal. The unit cell influences:
- The number of solvent molecules added to surround your system
- The total number of particles you’ll simulate
- The compliance with the minimum image convention
SAMSON’s GROMACS Wizard supports five unit cell shapes you can choose from when preparing a system:
| Unit Cell Shape | Image |
|---|---|
| Cubic | ![]() |
| Orthorhombic | ![]() |
| Triclinic | ![]() |
| Rhombic dodecahedron | ![]() |
| Truncated octahedron | ![]() |
When to use spherical-like cells
If you are simulating approximately spherical systems—like a globular protein or a flexible macromolecule—choosing a space-efficient unit cell can reduce computation time significantly.
For example, the rhombic dodecahedron is the smallest space-filling unit cell. Compared to a cube with the same image distance, it has only 71% of the volume. That translates to about 29% fewer solvent molecules—and up to 29% faster simulations. The truncated octahedron also performs well in such cases and is widely used in biomolecular simulations for its near-spherical shape.
Two ways to define your box
When preparing your system in the GROMACS Wizard, you can fit the unit cell using either:
- Box lengths – Define the actual box dimensions. The box is tightly fitted to your structure, and you must enlarge it manually to satisfy the minimum image convention. Useful for ensuring same-sized boxes in batch simulations.
- Solute-box distance – Specify the minimum distance from the solute to the box boundaries (e.g., 1 nm). The box is automatically adjusted around different conformations. Ideal when working with flexible or changing structures.

A quick tip on analysis
While GROMACS internally stores boxes as brick-shaped volumes, SAMSON will try to detect and display the original shape correctly when reading trajectories. You can also modify this manually during import.
Conclusion
Selecting the right unit cell allows you to save time and resources without compromising on simulation quality. If you’re studying a roughly spherical molecule in solution, consider using a rhombic dodecahedron or truncated octahedron. It may just be the optimization you’ve been overlooking.
To learn more and explore the supported unit cells in GROMACS Wizard, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.





