Re: [AMBER] cpptraj: grid and gist

From: Steven Ramsey <vpsramsey.gmail.com>
Date: Mon, 7 Dec 2015 11:34:29 -0500

Hi,

Thanks for the report! Indeed the logic to where the gist origin lies is
internal and in this case does seem to be offset by half the voxel
resolution. This 'offsetting' was hardcoded most likely to correct a
previous inconsistency. I've removed that, tested it, and it is consistent
with the grid command.

As for the density peaks themselves being inconsistent: once the grid
origin was fixed on my end the peaks line up in a non-preprocessed
trajectory. They are different magnitudes, but that seems correct since
Gist is calculating a normalized quantity (g(O)) whereas grid is binning.
I'm not sure yet as to whether imaging could change our density
calculations in gist. If that's the case I won't be able to quickly fix it.

If it would be desirable to attain the origin fix immediately I'd be happy
to share the source code (you'll have to recompile cpptraj locally).
Assuming making such an offer is kosher at least. Also it would be of great
help if I could have some test files from your system to test the peak
inconsistency further.

Thanks,

--Steve


On Mon, Dec 7, 2015 at 10:39 AM, Daniel Roe <daniel.r.roe.gmail.com> wrote:

> Hi,
>
> The reason that OpenDX output from 'grid' and 'gist' do not match is
> that the GIST code uses it's own internal logic when calculating and
> writing out grids. The reason for this is when the GIST authors were
> first incorporating the code into CPPTRAJ I was doing a major overhaul
> of the the internal data set/data file framework, which wasn't ready
> at the time. Since then making GIST use the data set/data file
> framework has been on my to-do list (I feel like I say that a lot...).
> As for whether there is a deeper reason for the difference I'm not
> certain yet - I was not one of the primary authors of GIST so I'll
> have to look into it further.
>
> Thanks for the report!
>
> -Dan
>
>
> On Mon, Dec 7, 2015 at 3:22 AM, Thomas Fox <thomas_fox.gmx.net> wrote:
> >
> > Hi,
> >
> > I think I stumbled over another inconsistency w.r.t. grid
> calculations.
> >
> > With the following cpptraj input:
> > parm 2JAI_Mod_SolvIon_4Amber.top
> > trajin 2JAI.nc
> > parmbox 0. 0. 0.
> > grid grid.dx 4 1. 4 1. 4 1. gridcenter 20. -2. 50. :WAT.O bincenter
> > gist gridcntr 20. -2. 50. griddim 4 4 4 gridspacn 1. out gist.out
> >
> > I get two dx files for the water oxygen density, grid.dx (from the
> grid
> > command) and gist-gO.dx (from the gist command)
> > which I thought should produce a very similar output, as in both
> cases I
> > calculate the same quantity.
> >
> > However, the dx headers read:
> > grid.dx : origin 18.5 -3.5 48.5
> > gist-gO.dx : origin 17.5 -4.5 47.5
> >
> > While the grid box definition is how I would expect it, the gist
> origin
> > seems to be off by half a grid spacing.
> > I would expect as x-values either 18,19,20,21,22 ( in case griddim
> refers to
> > the number of grid bins - this is how I would
> > understand the manual as it says "Integer number of grid increments
> along
> > each coordinate axis")
> > or 18.5., 19.5, 20.5, 21.5 (if grddim refers to the number of grid
> points in
> > each direction which needs to
> > shift by half a spacing to make up for the even number of points =
> uneven
> > number of bins).
> >
> > Consequently, when I plot the two grids, first of all the grid boxes
> are
> > shifted, but I also see differences in the grids;
> > and more differences that I would have expected.
> > For a single frame, this means that in some cases the two minima are
> on the
> > same grid point, sometimes they
> > are shifted into one direction in some cases in two directions by one
> grid
> > point.
> > For multiple frames the "structure" of the resulting grid maps looks
> very
> > different - some of the contours (especially those
> > with high occupancy) are in similar areas, but many of the contours
> appear
> > at very different locations - is this to be expected?
> >
> > One more thing:
> > In my above example, the trajectory has already been preprocessed,
> e.g.
> > imaged and superposed. Yet, gist insists on getting
> > box information, even if it is as useful as the command parmbox 0. 0.
> 0.
> >
> > Thanks for looking into this,
> > Th.
> > _______________________________________________
> > AMBER mailing list
> > AMBER.ambermd.org
> > http://lists.ambermd.org/mailman/listinfo/amber
>
>
>
> --
> -------------------------
> Daniel R. Roe, PhD
> Department of Medicinal Chemistry
> University of Utah
> 30 South 2000 East, Room 307
> Salt Lake City, UT 84112-5820
> http://home.chpc.utah.edu/~cheatham/
> (801) 587-9652
> (801) 585-6208 (Fax)
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Dec 07 2015 - 09:00:03 PST
Custom Search