# Re: [AMBER] rdf in one dimmension

From: Tom Kurtzman <simpleliquid.gmail.com>
Date: Mon, 17 Sep 2018 22:49:35 -0400

Hi Hadi, it sounds as if Dan has already written an analysis command to do
what you want.

It's probably worthwhile to understand what you are actually calculating
though so here is a brief explanation.

What you are looking for is the single particle distribution function
g(\vec r) which is defined as the number density at position \rho(\vec r)
divided by the density of the neat fluid \rho. The way this is calculated
in molecular dynamics simulations is by defining a volume element \vec r +
d \vec r about the position \vec r and calculating the average number of
particles found in that volume element (averaged over the frames of your MD
simulation). Generally the volume element is small enough so that there is
one particle in the region or zero particles. You calculate this average
then divide by the number that you would expect to find in the neat fluid.
The rdf, btw is related in a trivial manner to the two particle
distribution function: g(\vec r_1, \vec r_2).

To define a g(z) along the z axis that you propose, for each value of z,
you'd define a region (a volume element) about the axis (e.g. a cube with
sides x-dx/2 to x+ dx/2, y-dy/2 to y+dy/2, and z-dz/2 to z+dz/2) where the
x,y are the values of the axis and z varies as you move up and down the
axis. For each volume element you'd calculate the average number of
particles found in the region (averaged over the frames of your MD
simulation) and divide by the number you'd expect to find in a volume of
that size.

This is likely similar to or exactly what Dan's code already does.

Tom

On Mon, Sep 17, 2018 at 7:23 AM Daniel Roe <daniel.r.roe.gmail.com> wrote:

> Hi,
>
> Try looking at the ‘density’ command, which can calculate density along a
> single axis.
>
> -Dan
>
> On Sun, Sep 16, 2018 at 8:32 PM Hadi Rahmaninejad <ha.rahmaani.gmail.com>
> wrote:
>
> > Hello Tom,
> >
> > Thank you, but could you pleas clarify what you mean by volume element
> > around each z value? rdf in amber is measuring average distribution
> > function in volume elements which are like spherical shells, and so z is
> > not constant. I saw figure 4 but I couldn't find the method you used to
> > obtain that figure.
> >
> > Thanks,
> >
> > On Fri, Sep 14, 2018 at 9:49 PM Tom Kurtzman <simpleliquid.gmail.com>
> > wrote:
> >
> > > That works well for fluctuating surfaces and very inhomogeneous
> surfaces.
> > > You can also do something much simpler as we did (and I'm sure others
> > have
> > > done) where you do some averaging in a volume element around each z
> value
> > > and divide by the bulk density.
> > >
> > > See figure 4 in JCP 137, 044101 (2012).
> > >
> > > Tom
> > >
> > > On Fri, Sep 14, 2018 at 9:36 PM Tom Kurtzman <simpleliquid.gmail.com>
> > > wrote:
> > >
> > > >
> > > > I always liked what Brooks and Karplus did:
> > > >
> > > > Brooks, C. L.; Karplus, M. J. Mol. Biol. 1989, 208, 159
> > > >
> > > > Tom
> > > >
> > > > On Fri, Sep 14, 2018 at 4:29 PM Hadi Rahmaninejad <
> > ha.rahmaani.gmail.com
> > > >
> > > > wrote:
> > > >
> > > >> Dear Amber Users,
> > > >>
> > > >> I am using "rdf" to calculate the density of water around an
> especial
> > > >> atom.
> > > >> As you know, it is "radial" and so it is calculating radial
> > distribution
> > > >> function which is an average on x,y and z dimension. However,
> because
> > I
> > > am
> > > >> interested in calculating density of water on a surface as a
> function
> > of
> > > >> distance to it (say z dimension), I have to obtain rdf in just one
> > > >> dimension(z). I highly appreciate any help if any of you who know a
> > way
> > > to
> > > >> do it,
> > > >>
> > > >> Thank you in advance,
> > > >> _______________________________________________
> > > >> AMBER mailing list
> > > >> AMBER.ambermd.org
> > > >> http://lists.ambermd.org/mailman/listinfo/amber
> > > >>
> > > >
> > > >
> > > > --
> > > > ************************************************
> > > > Tom Kurtzman, Ph.D.
> > > > Associate Professor
> > > > Department of Chemistry
> > > > Lehman College, CUNY
> > > > 250 Bedford Park Blvd. West
> > > > Bronx, New York 10468
> > > > 718-960-8832
> > > > http://www.lehman.edu/faculty/tkurtzman/
> > > > <http://www.lehman.edu/faculty/tkurtzman/index.html>
> > > > ************************************************
> > > >
> > >
> > >
> > > --
> > > ************************************************
> > > Tom Kurtzman, Ph.D.
> > > Associate Professor
> > > Department of Chemistry
> > > Lehman College, CUNY
> > > 250 Bedford Park Blvd. West
> > > Bronx, New York 10468
> > > 718-960-8832
> > > http://www.lehman.edu/faculty/tkurtzman/
> > > <http://www.lehman.edu/faculty/tkurtzman/index.html>
> > > ************************************************
> > > _______________________________________________
> > > 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
> >
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>

--
************************************************
Tom Kurtzman, Ph.D.
Associate Professor
Department of Chemistry
Lehman College, CUNY
250 Bedford Park Blvd. West
Bronx, New York 10468
718-960-8832
http://www.lehman.edu/faculty/tkurtzman/
<http://www.lehman.edu/faculty/tkurtzman/index.html>
************************************************
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber

Received on Mon Sep 17 2018 - 20:00:02 PDT
Custom Search