# [gmx-users] How can i calculate the (ADF)angular distribution of the angles between water molecule water and surface?

João Henriques joao.m.a.henriques at gmail.com
Wed Sep 12 18:45:27 CEST 2018

```Did you try with gmx gangle again, after my reply? Before writing code you
should always make sure that what is at hand can't do the job first.

Also, I've already directed you to an example in my previous email. Check
the MDAnalysis link again. If Python isn't your thing, feel free to use any
other language. Even the PLUMED driver could do the trick with some work.

J

On Wed, Sep 12, 2018 at 6:04 PM Nick Johans <johans.nick93 at gmail.com> wrote:

> Sorry i'm nick's friend and i couldn't access to my email so i had to send
> it by his account.
>
> Rose
>
> On Wed, 12 Sep 2018, 20:16 Nick Johans, <johans.nick93 at gmail.com> wrote:
>
> > Thank you so much Joao for detailed answer. You are right, i think i
> > should write my own code. But since i don't have much experience in
> > programming, would you please introduce me some useful examples?
> >  And(see below; our former conversations)
> >
> > Best
> > Rose
> > On Wed, 12 Sep 2018, 20:04 João Henriques, <joao.m.a.henriques at gmail.com
> >
> > wrote:
> >
> >> Ok, being that the reference is a surface gmx gangle might work. Notice
> >> that I wrote might, because I believe it will still be cumbersome for
> the
> >> many water molecules in the box. For the example of the two planes, you
> >> just basically need to set "-g1 plane", "-g2 plane" and pass the
> >> selections
> >> of the surface and water molecule H-O-H plane to "-group1" and
> "-group2",
> >> respectively. For the example of the surface and the H-O vector, you
> >> it accordingly ("-g1 plane", "-g2 vector" and the corresponding
> >> selections). I easily can see this working for a single water molecule,
> >> but
> >> for all the water molecules in the box this might get tricky. Specially
> if
> >> you're gonna try to tackle them all under a single selection. You could
> >> aways run the command in a loop for each water molecule in the box, but
> >> that doesn't look very "smart" and/or fast.
> >>
> >> I'd still probably look into doing my own code using some third party
> >> module/package to parse and analyze trajectories.
> >>
> >> J
> >>
> >> On Wed, Sep 12, 2018 at 5:01 PM rose rahmani <rose.rhmn93 at gmail.com>
> >> wrote:
> >>
> >> > On Wed, 12 Sep 2018, 19:13 João Henriques, <
> >> joao.m.a.henriques at gmail.com>
> >> > wrote:
> >> >
> >> > > "It gives me the histogram of angles" ---> what is "it" in this
> >> sentence?
> >> > >
> >> > It= -oh output of gmx gangle which writes the histogram of 'angleS'
> not
> >> the
> >> > angle that i have already defined.( THE beta angle= angle between HOH
> >> plane
> >> > of water molecules and surface plane , THE alpha angke= angle between
> >> OH of
> >> > water molecules and surface plane. The surface is ZnS surface(i have
> an
> >> > slab of ZnS) not protein.
> >> >
> >> > > There are 26 emails on the link I shared. What did you actually
> try? I
> >> > > mean, an histogram and a distribution function aren't that far
> >> apart...
> >> > > Also, I believe understand what you want to do, you want to
> calculate
> >> the
> >> > > ADF of the water molecules with the protein surface as the
> reference.
> >> > > Something
> >> > > like this <https://pubs.acs.org/doi/abs/10.1021/jp0604241> (see
> >> Figures
> >> > 3
> >> > > and 5). Well, I've played around with a similar problem and there's
> no
> >> > > simple answer. I ended up using MDAnalysis
> >> > > <
> >> > >
> >> >
> >>
> https://www.mdanalysis.org/docs/documentation_pages/analysis/waterdynamics.html
> >> > > >
> >> > > (click on the link, see 4.8.3.1.3. AngularDistribution).
> >> >
> >>
> > How can i use it in gromacs?
> >
> >> > Thank you.
> >> >
> >> > > I tried doing the
> >> > > same with the native Gromacs tools but found it too be too much of a
> >> pain
> >> > > in the a**.
> >> > >
> >> > I think gromacs can do it. But first i should define all O-H and in
> box
> >> > then calculate the angle between .... for ALPHA
> >> > Maybe should define H-O-H plane then.... for BETA).
> >> >
> >> > I found the documentation of gmx gangle gmx angle so complicated and
> >> > confusing. I don't know how can i hsethem priperly...
> >> >
> >> > Best
> >> >
> >> > >
> >> > > I hope this is at least somewhat useful.
> >> > >
> >> > > Cheers,
> >> > > João
> >> > >
> >> > >
> >> > >
> >> > > On Wed, Sep 12, 2018 at 3:41 PM rose rahmani <rose.rhmn93 at gmail.com
> >
> >> > > wrote:
> >> > >
> >> > > > Thank you Joao,
> >> > > >
> >> > > > On Wed, 12 Sep 2018, 14:04 João Henriques, <
> >> > joao.m.a.henriques at gmail.com
> >> > > >
> >> > > > wrote:
> >> > > >
> >> > > > > Dear Rose,
> >> > > > >
> >> > > > > Spamming is not the answer. There have been quite a few threads
> >> > > > this
> >> > > > > subject in the recent past. Searching the mailing list before
> >> posting
> >> > > is
> >> > > > > usually good practice. If then something remains unclear, please
> >> feel
> >> > > > free
> >> > > > > to ask. I remember having quite long discussions with a Dilip H.
> >> N.
> >> > > > > this subject (on and off the mailing list).
> >> > > > >
> >> > > > > A simple query fetched 26 results:
> >> > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> https://www.mail-archive.com/search?l=gromacs.org_gmx-users%40maillist.sys.kth.se&q=dilip+h+n+angle&x=0&y=0
> >> > > >
> >> > > > I search and read about but it didn't help me. It gives me the
> >> > histogram
> >> > > of
> >> > > > angles but what i really want is the distribituion of special
> >> defined
> >> > > > angle(between two plane) during simulation. I refer you ahain to
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> >> > > >
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> https://www.researchgate.net/post/How_can_i_calculate_the_distribution_of_water_polarization_above_surface
> >> > > >
> >> > > >  I asked different questions several times last 2 days and i
> >> thought my
> >> > > > email doesn't recieve and share in mailing-list.
> >> > > >
> >> > > > I'm really confused about what people suggest. I'm a student and i
> >> > > think, i
> >> > > > clearly explained what i want after huge searches, it's not
> because
> >> of
> >> > > > indolence and i would be appreciated if any one could answer me.
> >> > > >
> >> > > > Regards
> >> > > >
> >> > > >
> >> > > >
> >> > > > > Play with the query a bit and it should get you a lot of info on
> >> your
> >> > > > > problem.
> >> > > > >
> >> > > > > Best regards,
> >> > > > > João
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > On Mon, Sep 10, 2018 at 10:29 AM rose rahmani <
> >> rose.rhmn93 at gmail.com
> >> > >
> >> > > > > wrote:
> >> > > > >
> >> > > > > > Hi,
> >> > > > > > How can i calculate the angular distribution of the angles
> >> between
> >> > > > water
> >> > > > > > molecule water and surface? surface during molecular dynamics
> >> > > > simulation?
> >> > > > > >  is it possible by GROMACS? gmx gangle?
> >> > > > > >
> >> > > > > >
> >> > > > > > To be clear; i refer you to these plots
> >> > > > > >
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >> > > > > >
> >> > > > > >
> >> > > > > > Best regards
> >> > > > > >
> >> > > > > > Rose
> >> > > > > > --
> >> > > > > > Gromacs Users mailing list
> >> > > > > >
> >> > > > > > * Please search the archive at
> >> > > > > > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List
> >> before
> >> > > > > > posting!
> >> > > > > >
> >> > > > > > * Can't post? Read
> http://www.gromacs.org/Support/Mailing_Lists
> >> > > > > >
> >> > > > > > * For (un)subscribe requests visit
> >> > > > > >
> >> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
> >> > > or
> >> > > > > > send a mail to gmx-users-request at gromacs.org.
> >> > > > > >
> >> > > > > --
> >> > > > > Gromacs Users mailing list
> >> > > > >
> >> > > > > * Please search the archive at
> >> > > > > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List
> >> before
> >> > > > > posting!
> >> > > > >
> >> > > > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >> > > > >
> >> > > > > * For (un)subscribe requests visit
> >> > > > >
> >> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
> >> > or
> >> > > > > send a mail to gmx-users-request at gromacs.org.
> >> > > > --
> >> > > > Gromacs Users mailing list
> >> > > >
> >> > > > * Please search the archive at
> >> > > > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List
> before
> >> > > > posting!
> >> > > >
> >> > > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >> > > >
> >> > > > * For (un)subscribe requests visit
> >> > > >
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
> >> or
> >> > > > send a mail to gmx-users-request at gromacs.org.
> >> > > --
> >> > > Gromacs Users mailing list
> >> > >
> >> > > * Please search the archive at
> >> > > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> >> > > posting!
> >> > >
> >> > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >> > >
> >> > > * For (un)subscribe requests visit
> >> > > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
> or
> >> > > send a mail to gmx-users-request at gromacs.org.
> >> > --
> >> > Gromacs Users mailing list
> >> >
> >> > * Please search the archive at
> >> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> >> > posting!
> >> >
> >> > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >> >
> >> > * For (un)subscribe requests visit
> >> > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> >> > send a mail to gmx-users-request at gromacs.org.
> >> --
> >> Gromacs Users mailing list
> >>
> >> * Please search the archive at
> >> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> >> posting!
> >>
> >> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >>
> >> * For (un)subscribe requests visit
> >> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> >> send a mail to gmx-users-request at gromacs.org.
> >
> >
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
```