Choosing the Right Unit Cell for Periodic Simulations: A Practical Guide

When setting up molecular dynamics simulations with periodic boundary conditions, one of the first choices you’ll face is the shape of the simulation box. For many molecular modelers, especially when working with approximately spherical molecules in solution (like proteins or flexible RNA structures), this decision can significantly impact both accuracy and performance.

Fortunately, SAMSON’s GROMACS Wizard offers a helpful interface to guide this decision by allowing you to choose from several space-filling unit cell shapes. Below is an overview of the different options and when to use each one.

Understanding Unit Cell Shapes

SAMSON supports these five types of periodic unit cells:

Unit cell shape Representation
Cubic Cubic
Orthorhombic Orthorhombic
Triclinic Triclinic
Rhombic dodecahedron Rhombic dodecahedron
Truncated octahedron Truncated octahedron

Why Shape Matters

For molecules that are roughly spherical or undergo significant conformational changes, box shape can affect both computational cost and simulation accuracy. While the cubic box is intuitive and easy to visualize, it’s not always the best choice.

The rhombic dodecahedron and the truncated octahedron are more spherical, which means they require fewer solvent molecules to reach the same minimum image distance between solute molecules. This reduces the total number of atoms in the simulation, accelerating calculations and saving memory.

To give you a concrete idea: using a rhombic dodecahedron instead of a cube can save up to 29% in CPU time for some systems, simply because you’re simulating a smaller number of solvent molecules. That makes a real difference when running long or repeated simulations, such as during free energy calculations or folding studies.

Configuring the Box

SAMSON provides two main strategies to define box size:

  • Box lengths: fits the box tightly to your system. You can then manually expand it as needed to satisfy the minimum image convention.
  • Solute-box distance: automatically places at least a specified buffer (recommended: 1 nm) between solute and box faces, ensuring proper behavior with most cutoff schemes.

The image below shows how you can select the unit cell shape and configure its size during system preparation:

Choose unit cell

A Note on Interpretation

It’s worth noting that while GROMACS stores simulation data in a brick-shaped format for efficiency, SAMSON tries to reconstruct the actual unit cell shape when loading trajectories. This helps maintain visual and analytical accuracy without you needing to adjust parameters manually.

Choosing the right unit cell isn’t just a theoretical exercise — it can speed up your workflow and enhance the realism of your results. Next time you’re preparing a new system, consider the geometry of your solute and how much solvent you really need.

To learn more, visit the GROMACS Wizard documentation page.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at samson-connect.net.

Comments are closed.