From: Axel Kohlmeyer (
Date: Sun May 11 2008 - 03:35:53 CDT

On Sun, 11 May 2008, Neelanjana Sengupta wrote:

NS> Dear VMD users,
NS> Can anybody ascertain if the 'within' command takes into account periodic
NS> boundary conditions? In other words, for obtaining the atoms 'within' a
NS> certain distance of a selection, is the distance between the selection and
NS> each atom recalculated as:
NS> dx=dx - cell_a*NINT(dx/cell_a), etc?

no. 'within' does _not_ take PBC into account.

proper PBC support is high on many people's TODO lists,
but it is not a simple to implement without sacrificing
too much performance for the 'normal', non-pbc case.


NS> This is for a dcd file where the unit cell dimensions are specified at each
NS> step.
NS> Thanks,
NS> Neelanjana Sengupta
NS> --

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.