When setting up a molecular simulation in GROMACS, an important yet often overlooked decision is the shape of the unit cell used to apply periodic boundary conditions. Many researchers default to cubes simply because they’re familiar, but this choice can affect both the accuracy and efficiency of your simulation — especially when simulating macromolecules in solution.
Let’s look at how GROMACS Wizard in SAMSON makes this decision easier and what options you might want to consider.
What’s a Unit Cell?
Under periodic boundary conditions, your simulated system is surrounded by infinite images of itself. The “unit cell” defines the shape and size of the space that will be repeated. GROMACS supports a variety of space-filling unit cells, including:
- Cubic
- Orthorhombic
- Triclinic
- Rhombic dodecahedron
- Truncated octahedron

Why Shape Matters
For simulations involving approximately spherical macromolecules — like many proteins — non-cubic unit cells can significantly reduce the amount of solvent needed to keep periodic images from interacting, without compromising on accuracy.
For example, a rhombic dodecahedron is closer to a sphere than a cube and fills space more efficiently. SAMSON’s GROMACS Wizard notes that its volume is only 71% that of a cube with the same image distance. That translates to fewer solvent molecules, which in turn means a ~29% reduction in CPU time — a helpful optimization when running multiple or long simulations.
Which One Should You Use?
If your molecule is roughly spherical or flexible:
Use a rhombic dodecahedron or truncated octahedron to save computation time while maintaining the appropriate distance between periodic images.
If your molecule is elongated or irregular:
An orthorhombic or triclinic box might suit you better to tightly fit the molecule and minimize excess water.
If you’re doing batch preparation:
You have two initial fitting options:
Box lengths– lets you specify dimensions; useful when you want a consistent box size across conformations.Solute-box distance– defines a distance between solute and box edge; adapts box size to each conformation.
Practical Tip
Regardless of the shape, always ensure the minimum image convention is satisfied — this means adding at least 1.0 nm between your solute and the box edge. It’s a simple rule of thumb that avoids costly pitfalls in computed forces due to solvent-solute image interactions.
Final Thoughts
Unit cell shape is not just a technical detail — it directly affects simulation performance and reliability. Through SAMSON’s GROMACS Wizard, switching to a more efficient shape takes just a few clicks, but can lead to meaningful savings in time and resources for your project.
To learn more, visit the complete documentation page: GROMACS Wizard – Periodic boundary conditions.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.
