From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Thu Sep 07 2006 - 20:08:45 CDT

On 9/7/06, Neelanjana Sengupta <senguptan_at_gmail.com> wrote:
> Hi,
> I have a simulation of pepitde-solvent system. During my analysis, I am
> positioning the 4 atoms at each peptide bond in a certain manner at the
> origin and in the X-Y plane.
> Due to the operations, and my system is not centered the origin anymore, and
> the simulation box get rotated too. So, the minimum image convention is no
> longer as straightforward as:
> x_ij = x_ij - boxL*NINT(x_ij/boxL)
>
> Can somebody tell me how to implement the minimum image convention in these
> general cases, where the simulation box is shifted and rotated?

you just have to (temporarily) find a transformation so that
the coordinates are in a simple orthonomal basis again.
please have a look at the pbcwrap script from the vmd script
library. you just need to use some of the lowlevel subroutines
and feed them your shifted origin and rotated cell vectors.

cheers,
   axel.

>
> With thanks,
> Neela
>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
  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.