From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Thu Apr 11 2013 - 03:20:26 CDT

On Thu, Apr 11, 2013 at 8:53 AM, Gurunath Katagi
<gurunath.katagi_at_gmail.com> wrote:
> Dear all,
> I have a protein in a solvent box (60x60x60 A) from a MD trajectory. Now I
> want to put this molecule into a grid and slice into a cube of 5A each and
> calculate the atoms in each of the 5A grid.
>
>
> My molecule is centerd at the origin(0,0,0)
> and minmax are the follwing: {-30.006000518798828 -32.87799835205078
> -34.95100021362305} {30.01300048828125 32.79600143432617 35.04499816894531}
>
> i have tried the atom selections like ( x > -30.0 and x < -25 and ( y >
> -30.0 and y < -25) and (z > -30 and z < -25)
> this is giving me a 5 A(appx) cube.. similarly i want to extract the atoms
> from the other box by traversing the entire box.

so? what is the problem here?

> Can any please let me know how do i go about it ..?

you already discovered one mechanism. i'd rather just do a 3d
histogram and loop over all atoms and increment them into the
histogram bins as this is more efficient than making a selection for
each box. but then again, it is likely not a time critical operation,
so it doesn't really matter that much.

axel.

>
> Thank you
> Gurunath

--
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.