From: Jérôme Hénin (
Date: Tue Apr 02 2013 - 10:05:11 CDT

Hi everyone,

I'd like to mention a tool for people who often wrap large MD trajectories in PBC, and are impatient like me. It's a Tcl proc implemented in C++ and called qwrap.

$ tar xf qwrap.tar.gz (in own directory)
$ make

> load path/to/
> qwrap [first n] [last n] [compound none|res|beta]

Compared with PBCTools it's a coarse and rigid tool, mostly built to answer my own needs (e.g. orthorhombic cells only, the center of the cell is (0,0,0)...). But in my hands, it is 10 to 30 times faster.

The compound-based wrapping doesn't use a specific reference atom, but the center of the wrapping group. Which btw can be defined either as residues, or by setting custom flags in the beta field, so you can keep a macromolecule in one piece. The flags should be integers, and could be alternating 0s and 1s or anything else, they only need to change when the next atom belongs to a different wrapping group.

A more mature version of this could eventually provide a fast back-end for the pure-Tcl pbc wrap.

It's work in progress, with the usual caveats as to bugs etc. Please let me know if it is useful, and if you improve it, share it back! Here, let's say I release it under the GPL.