A molecular system can look perfectly reasonable in a viewer and still be poorly prepared for simulation. With periodic boundary conditions, the box is repeated in every direction. That means a solute is not surrounded by empty space: copies of it sit just beyond the box boundaries. If those periodic images are too close, the solute may interact with its own copy, compromising the forces you intended to calculate.
This is a common box-preparation headache: how much space is enough, and does the shape of the box matter? A simple way to make the decision is to think about two things separately: the distance between the solute and the box boundary, and how efficiently the box shape surrounds the solute.
First, leave room between the solute and the boundary
A practical rule of thumb is to keep at least 1.0 nm between the solute and the box boundary. Because periodic copies lie across that boundary, this gives at least 2.0 nm between periodic images of the solute. The point is not simply to make the box look spacious; it is to reduce the risk that the solute interacts with its own image under the minimum image convention.
When setting up a box, check the padding around the system in every direction—not just the distance visible in one view. A box fitted tightly around a molecule may be a useful starting point, but it does not automatically provide enough clearance. If you choose box lengths, the box fits tightly to the system initially, so increase its size as needed. Alternatively, set a solute-to-box distance; the GROMACS Wizard documentation recommends at least 1 nm for this purpose.
Then choose a shape that fits the job
A cube is familiar, but it is not always the most economical choice for a roughly spherical macromolecule in solution. Rhombic dodecahedra and truncated octahedra are more sphere-like. For a given minimum distance between macromolecular images, they can require fewer solvent molecules than a cubic box.
The rhombic dodecahedron is the smallest and most regular space-filling unit cell described here. Its volume is about 71% of a cube with the same image distance—roughly 29% less volume. In the documented context of simulating a spherical or flexible molecule in solvent, that can mean less solvent to simulate and a corresponding reduction in computational work. The shape is not a reason to reduce the required image distance: choose the shape for efficiency, while still checking the spacing rule.

GROMACS Wizard also supports cubic, orthorhombic, triclinic, and truncated-octahedron unit cells. The best choice depends on the system and the setup you need; the key practical question is whether the selected cell gives the solute enough separation from its periodic images.

A quick box-checking workflow
- Identify the solute’s overall shape. For an approximately spherical macromolecule in solvent, consider a rhombic dodecahedron or truncated octahedron rather than defaulting automatically to a cube.
- Choose how to define the initial box. Use box lengths when you want to specify the dimensions or position the box around the system. Use solute-box distance when you want to specify the padding around the solute.
- Check the clearance in all directions. Aim for at least 1.0 nm between the solute and the box boundary as a practical rule of thumb, corresponding to at least 2.0 nm between periodic images.
- Consider what happens across a batch. With box lengths, the initial size can be based on all conformations or the whole path, which is useful if you want one box size for the batch. With solute-box distance, box sizes can differ for each conformation or path frame.
One detail can be surprising when inspecting results: GROMACS keeps particles in a brick-shaped volume for efficiency. When GROMACS results are loaded, SAMSON attempts to detect the unit-cell type, and the type can also be modified in the trajectory importer dialog.
For the full explanation and the unit-cell options, see the GROMACS Wizard guide to periodic boundary conditions. For related setup steps, consult Step 1: Prepare.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
