When setting up molecular dynamics simulations, especially those involving biomolecules in solution, minimizing unnecessary computation is essential. One often-overlooked factor that can dramatically improve efficiency is the choice of unit cell shape when defining periodic boundary conditions (PBCs).
If you’ve ever worked with GROMACS or other simulation engines, you’ve likely defaulted to using cubic boxes simply because they’re the most intuitive. But did you know that more efficient shapes can save up to 29% of simulation time in some scenarios?
Why unit cell shape matters
Periodic boundary conditions simulate a bulk environment by wrapping your molecules in a box that repeats infinitely in all directions. To avoid artifacts, molecules shouldn’t interact with their own images, which is where the minimum image convention comes in. The amount of solvent needed to fill this box — and therefore the computational work — depends on the shape of the unit cell.
For roughly spherical macromolecules (like globular proteins), boxes that more closely resemble spheres are more space-efficient than cubes, requiring fewer solvent molecules to maintain the same minimum image distance. This translates directly into less computation.
Options supported by the GROMACS Wizard in SAMSON
The GROMACS Wizard in SAMSON supports five unit cell shapes:
- Cubic
- Orthorhombic
- Triclinic
- Rhombic dodecahedron
- Truncated octahedron
Each has its own geometry and use case:
| Unit cell shape | Representation |
|---|---|
| Cubic | ![]() |
| Orthorhombic | ![]() |
| Triclinic | ![]() |
| Rhombic dodecahedron | ![]() |
| Truncated octahedron | ![]() |
Efficiency gains for spherical molecules
The rhombic dodecahedron and truncated octahedron are particularly well-suited to simulating nearly spherical macromolecules. Compared to a cube with the same image distance, the rhombic dodecahedron has only 71% of the volume — reducing the number of solvent molecules needed and saving around 29% of CPU time. This is especially helpful for longer simulations or ensemble runs.
Which shape should you choose?
If your molecule is roughly spherical or globular, and you’re primarily concerned with solvation and minimizing computational load, try the rhombic dodecahedron. For elongated or irregular systems, a triclinic or orthorhombic box may better fit the geometry of your model.
In system preparation, the GROMACS Wizard allows you to select the unit cell shape and configure its size using two strategies:
- Box lengths – explicitly set the dimensions of the box. Useful in batch simulations requiring consistent box sizes.
- Solute-box distance – define how far the molecule should be from the boundary. At least 1.0 nm is recommended to satisfy the minimum image convention.
Keep in mind: GROMACS internally wraps all coordinates into a rectangular volume, but SAMSON can detect and display the intended unit cell shape when importing trajectories.
To learn more about unit cell options and how they affect simulation performance, visit the GROMACS Wizard documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.





