In
molecular simulations, periodic boundary conditions
are typically
used to avoid surface effects occurring at the boundaries of the simulation
box. A consequence of this is that molecules and assemblies may appear
split over the boundaries. Broken molecular assemblies make it difficult
to interpret, analyze, and visualize molecular simulation data. We
present a general and fast algorithm that repairs molecular assemblies
that are broken due to periodic boundary conditions. The open source
method presented here, MDVWhole, works for all translation-only crystallographic
periodic boundary conditions. The method consumes little memory and
can fix the visualization of the assembly of millions of particles
in a few seconds. Thus, it is suitable for processing both single
simulation frames and long trajectories with millions of points.