Same or unique box sizes? A practical look at periodic box setup for batch MD in SAMSON

When preparing a molecular dynamics (MD) simulation, defining the periodic box correctly ensures accuracy and stability in the results. But what happens when you’re not just simulating one structure, but a whole batch of conformations? Should each snapshot have a unique box, or is it better to use a uniform box for the entire batch? This is a common dilemma among molecular modelers. Fortunately, the GROMACS Wizard in SAMSON offers you flexible options — here’s how you can choose what works best for you.

Why the periodic box matters

The periodic box is a boundary that wraps around your system during simulation to mimic an infinite environment. GROMACS simulations require this to apply periodic boundary conditions (PBC), which help avoid edge effects and sustain a realistic molecular behavior.

The challenge begins when you have not one, but multiple conformations — maybe from a trajectory or a path — and you want to treat each as a separate MD simulation in a batch. Different conformations might be more or less compact, and the choice of box size will impact memory usage, simulation speed, and minimum image requirements.

The two approaches in SAMSON

In SAMSON’s GROMACS Wizard, you have two main strategies when preparing a batch project with multiple conformations:

  • Same box for all conformations — using the Box lengths option
  • Adaptive box per conformation — using the Solute-box distance option

Option 1: Uniform box size

If you apply uniform box sizes, the simulation box will be based on the spatial extent of all conformations. This ensures that every MD run begins in the same-sized environment. It can be useful when you want consistent simulation conditions across all runs, for example when comparing energetics or structural changes.

This is done by selecting Box lengths. You can fit the box tightly around the system and then expand it appropriately. Don’t forget to account for the minimum image convention — typically by adding at least a few angstroms buffer space.

Option 2: Box adjusted per conformation

Alternatively, if your conformations vary widely in shape or compactness, you might save computational resources by using a tailored box per conformation. SAMSON lets you do this with the Solute-box distance option. Here, you just set the distance between the molecule and the edge of the box — 1 nm is typically enough to satisfy the minimum image convention.

This method helps reduce box volume for compact conformations, leading to fewer water molecules and faster simulations.

Tip

Once the periodic box is set, use the slider in the Batch preparation box to preview how the box fits each conformation.

Making the choice

There’s no universal answer — it depends on your goals. Use a uniform box when you want fair comparison across all simulations or intend to use the same topology. Use a custom box per frame when computational efficiency is a priority and absolute comparisons aren’t necessary.

The good news is: SAMSON makes both options easy to set up visually, right inside the GROMACS Wizard. Whether you’re launching your jobs locally or in the cloud, your batch project will automatically reflect your box decisions in each subproject directory.

To learn more and follow along with step-by-step instructions, check out the full documentation page here:
https://documentation.samson-connect.net/tutorials/gromacs-wizard/batch-computations/

Batch periodic box

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.

Comments are closed.