Avoid Boundary Artifacts When Pulling Molecules: A Simple Guide to Simulation Box Sizing

One of the most common pitfalls in molecular dynamics simulations—particularly involving pulling experiments—is improper box sizing in the direction of pulling. If your molecule gets too close to the edge of the simulation box, periodic boundary conditions can create unwanted artifacts that ruin your simulation.

The GROMACS Wizard in SAMSON provides an intuitive way to avoid this issue. Here’s how you can set up your box the right way, using a molecule like 2BEG as an example, and how to think about the consequences of pulling with periodicity in mind.

Why box sizing matters

When you pull on a molecular structure—especially over nanometers of distance—you must ensure that your simulation box is large enough in the pulling direction. Otherwise, the molecule might interact with its periodic image, resulting in unrealistic forces and a failed experiment.

Here’s the basic rule: if you plan to pull a molecule by X nanometers, the box in that direction should be at least 2X, because the minimum image convention in periodic boundary conditions assumes that particles only interact with the closest image of another particle. In practice, it is safer to go even slightly beyond 2X.

How this is done in SAMSON

In the tutorial example involving chain A being pulled away from chain B in the 2BEG protein complex, the plan is to pull chain A by 5 nm in the z-direction. So we set the box z-length to 12 nm to be on the safe side:

  • 5 nm (pulling distance)
  • ×2 = 10 nm minimum due to periodicity
  • +1 nm buffer on both sides = 12 nm

Step-by-step in GROMACS Wizard

  1. Set the box type to Orthorhombic.
  2. Click Compute fitted box to auto-calculate initial dimensions.
  3. Manually override dimensions under Box lengths to:
    • 6.5 nm x 4.5 nm x 12 nm
  4. Disable Center in box and set the center to 0.5 x 0.5 x 0.2 so the system shifts away from the top face and leaves enough room in pulling direction.

This resized box shows up immediately in the Viewport, helping you visually confirm before launching any simulations:

COM Pulling box in the Viewport

Bonus tip: Reorient before defining the box

If your pulling direction isn’t aligned with the default axes, SAMSON offers a quick way to reorient your system. Right-click your molecule in the Document view, then select Move selection > Align… and choose your pulling axis or plane. This step ensures clean box boundaries and more intuitive behavior during pulling.

Conclusion

Simulation setup—especially box sizing—is easy to overlook but essential for reliable results. Taking a few extra seconds to properly define your simulation box in the pulling direction can save hours of debugging or rerunning simulations later.

Learn more in the full tutorial.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.

Comments are closed.