[gmx-users] G_rmsf, reference structur

Tsjerk Wassenaar tsjerkw at gmail.com
Tue Apr 7 10:51:07 CEST 2015


Hi Floris,

I had a brief look at the code again, as it was a while ago. So I see where
the confusion comes from. The RMSF is calculated using a single-pass over
the trajectory. The RMSF is defined as:

rmsf = sqrt( 1/n sum((xi - xav)**2) )

Which is the square root of the positional variance. You can rewrite the
sum using

sum (xi-xav)(xi-xav) = sum(xi**2) - 2 xav sum(xi) + n xav**2

Since sum(xi) == n xav this becomes:

sum(xi) - n xav

So the RMSF can be written as

RMSF = sqrt( 1/n (sum(xi) - n xav) )

That's why you don't see the average structure subtracted in the loop over
frames.

Cheers,

Tsjerk


On Tue, Apr 7, 2015 at 9:45 AM, Eerden, van, F.J. <f.j.van.eerden at rug.nl>
wrote:

> Hi Tsjerk,
>
> thanks for your fast answer!
> But did you got this information from the -help option or from the code?
> Because to me the help option of g_rmsf is a bit ambigous.
>
> Floris
>
> On Fri, Apr 3, 2015 at 5:53 PM, <
> gromacs.org_gmx-users-request at maillist.sys.kth.se> wrote:
>
> > Send gromacs.org_gmx-users mailing list submissions to
> >         gromacs.org_gmx-users at maillist.sys.kth.se
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
> > or, via email, send a message with subject or body 'help' to
> >         gromacs.org_gmx-users-request at maillist.sys.kth.se
> >
> > You can reach the person managing the list at
> >         gromacs.org_gmx-users-owner at maillist.sys.kth.se
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of gromacs.org_gmx-users digest..."
> >
> >
> > Today's Topics:
> >
> >    1. G_rmsf, reference structure (Eerden, van, F.J.)
> >    2. Re: G_rmsf, reference structure (Tsjerk Wassenaar)
> >    3. Re: GMX-compatible DNA coordinates (Alex)
> >    4. Re: GMX-compatible DNA coordinates (Tsjerk Wassenaar)
> >    5. Re: GMX-compatible DNA coordinates (Mark Abraham)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Fri, 3 Apr 2015 12:36:28 +0200
> > From: "Eerden, van, F.J." <f.j.van.eerden at rug.nl>
> > To: gromacs.org_gmx-users at maillist.sys.kth.se
> > Subject: [gmx-users] G_rmsf, reference structure
> > Message-ID:
> >         <CAFaYwfjrzJ7HCXYLiJQwBQZmCnoAy+69o=
> > eOdYU50YsWxeOe+A at mail.gmail.com>
> > Content-Type: text/plain; charset=UTF-8
> >
> > Dears,
> >
> > I have calculated the RMSF from a protein trajectory in Gromacs 4.5.5.
> >
> > My question is how the RMSF is calculated:
> > A)
> > 1) fitting of the trajectory to the tpr file supplied by -s
> > 2) calculating the averaged atom coordinates over time (x~)
> > 3) calculating the deviation from the averaged structure (x-x~), for each
> > time frame
> > 4) averaging over all time frames <x-x~>
> >
> > OR
> > B)
> > 1) fitting of the trajectory to the tpr file supplied by -s
> > 2) calculating the deviation from the TPR structure (x-x*), for each time
> > frame
> > 3) averaging over all time frames <x-x*>
> >
> > This question has already popped up multiple times in the mailing list:
> > https://www.mail-archive.com/gmx-users@gromacs.org/msg25391.html
> > and
> > http://comments.gmane.org/gmane.science.biology.gromacs.user/38359
> >
> > The problem is that there are multiple answers given:
> > In the first one, it is argued that method A is used
> > in the second mailing list, Marc Abraham states that method B is being
> > used, while Tsjerk mentions method A.
> >
> > I tried to resolve this by looking into thee source code,
> > and although to me it seems that it is option, B, I do not trust my
> Gromacs
> > code reading capabilities that well ;)
> >
> > Happy Easter!
> >
> > Floris
> >
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Fri, 3 Apr 2015 13:13:02 +0200
> > From: Tsjerk Wassenaar <tsjerkw at gmail.com>
> > To: Discussion list for GROMACS users <gmx-users at gromacs.org>
> > Subject: Re: [gmx-users] G_rmsf, reference structure
> > Message-ID:
> >         <CABzE1SgJdhy_dnK86vU0LeduuGDWMPw4Rx=
> > 6R_SNxCGQwsNhLQ at mail.gmail.com>
> > Content-Type: text/plain; charset=UTF-8
> >
> > Hi Floris,
> >
> > By default it's A. There is an option for doing B. But B makes no sense.
> >
> > Cheers,
> >
> > Tsjerk
> > On Apr 3, 2015 1:10 PM, "Eerden, van, F.J." <f.j.van.eerden at rug.nl>
> wrote:
> >
> > > Dears,
> > >
> > > I have calculated the RMSF from a protein trajectory in Gromacs 4.5.5.
> > >
> > > My question is how the RMSF is calculated:
> > > A)
> > > 1) fitting of the trajectory to the tpr file supplied by -s
> > > 2) calculating the averaged atom coordinates over time (x~)
> > > 3) calculating the deviation from the averaged structure (x-x~), for
> each
> > > time frame
> > > 4) averaging over all time frames <x-x~>
> > >
> > > OR
> > > B)
> > > 1) fitting of the trajectory to the tpr file supplied by -s
> > > 2) calculating the deviation from the TPR structure (x-x*), for each
> time
> > > frame
> > > 3) averaging over all time frames <x-x*>
> > >
> > > This question has already popped up multiple times in the mailing list:
> > > https://www.mail-archive.com/gmx-users@gromacs.org/msg25391.html
> > > and
> > > http://comments.gmane.org/gmane.science.biology.gromacs.user/38359
> > >
> > > The problem is that there are multiple answers given:
> > > In the first one, it is argued that method A is used
> > > in the second mailing list, Marc Abraham states that method B is being
> > > used, while Tsjerk mentions method A.
> > >
> > > I tried to resolve this by looking into thee source code,
> > > and although to me it seems that it is option, B, I do not trust my
> > Gromacs
> > > code reading capabilities that well ;)
> > >
> > > Happy Easter!
> > >
> > > Floris
> > > --
> > > 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.
> > >
> >
> >
> > ------------------------------
> >
> > Message: 3
> > Date: Fri, 3 Apr 2015 07:40:26 -0600
> > From: Alex <nedomacho at gmail.com>
> > To: Discussion list for GROMACS users <gmx-users at gromacs.org>
> > Subject: Re: [gmx-users] GMX-compatible DNA coordinates
> > Message-ID: <1795469025.20150403074026 at gmail.com>
> > Content-Type: text/plain; charset="us-ascii"
> >
> > An HTML attachment was scrubbed...
> > URL: <
> >
> http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20150403/47274e09/attachment-0001.html
> > >
> >
> > ------------------------------
> >
> > Message: 4
> > Date: Fri, 3 Apr 2015 16:47:25 +0200
> > From: Tsjerk Wassenaar <tsjerkw at gmail.com>
> > To: Discussion list for GROMACS users <gmx-users at gromacs.org>,  Alex
> >         <nedomacho at gmail.com>
> > Subject: Re: [gmx-users] GMX-compatible DNA coordinates
> > Message-ID:
> >         <CABzE1SgeVaCK+zLje+fWDbR-C+qWnZ47Yc-Ans9jqhc0Tx=
> > J1A at mail.gmail.com>
> > Content-Type: text/plain; charset=UTF-8
> >
> > Hi Alex,
> >
> > You've solved the issue of getting a DNA structure, but now you're
> facing a
> > problem of getting Gromacs to prune it. That has to do with the naming
> > scheme mainly. Your best bet is using sed to do name substitution.
> Probably
> > google will give some good hints about such substitutions in PDB files.
> >
> > Cheers,
> >
> > Tsjerk
> > On Apr 3, 2015 3:40 PM, "Alex" <nedomacho at gmail.com> wrote:
> >
> > >  Mark,
> > >
> > >
> > > Not to troll, but why did you assume that I didn't do my due diligence
> > > before posting here?
> > >
> > > Because, you see, you could have left that second part of your reply
> > > (which only confirms the legitimacy of my initial question), and it
> would
> > > make it less insulting.
> > >
> > >
> > > Alex
> > >
> > >
> > >
> > >   >
> > >
> > > Hi,
> > >
> > > Googling things like "gromacs DNA structure" is a good bet. There are
> no
> > > fully standardised naming schemes or workflows, so you will likely not
> > have
> > > something do everything for you.
> > >
> > > Mark
> > >
> > > On 03/04/2015 7:03 am, "Alex" <nedomacho at gmail.com> wrote:
> > >
> > >
> > > I'm fully aware that this is a forum for discussing Gromacs, but
> there's
> > a
> > > bit of a frustrating situation that involves using it.
> > >
> > > I need a linear ssDNA chain, sequence of my choosing, anything that
> will
> > > work with, say, AMBER99SB-ILDN. Not trying to find any funny
> forcefields
> > > for it, everything as is. You suggested AMBER in the past, so AMBER it
> > is.
> > >
> > >
> > > ChemOffice produced a PDB with incompatible atom types. make-na server
> (
> > > http://structure.usc.edu/make-na/server.html) also produced something
> > > pdb2gmx hates. Is there absolutely any way to get a PDB that will
> > produce a
> > > usable topology out of the box with an established potential
> implemented
> > in
> > > Gromacs? Anything that will not involve manual modification of PDBs or
> > > writing text-processing scripts will make me very happy.
> > >
> > >
> > > I will really appreciate any suggestions.
> > >
> > >
> > > Thank you,
> > >
> > >
> > > Alex
> > >
> > >
> > >
> > >
> > > --
> > >
> > > 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.
> > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Best regards,
> > >
> > >  Alex                            mailto:nedomacho at gmail.com
> > > <nedomacho at gmail.com>
> > >
> > > --
> > > 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.
> > >
> >
> >
> > ------------------------------
> >
> > Message: 5
> > Date: Fri, 3 Apr 2015 17:53:03 +0200
> > From: Mark Abraham <mark.j.abraham at gmail.com>
> > To: Alex <nedomacho at gmail.com>,         Discussion list for GROMACS
> users
> >         <gmx-users at gromacs.org>
> > Subject: Re: [gmx-users] GMX-compatible DNA coordinates
> > Message-ID:
> >         <CAMNuMAT21AC1oJ6Un=
> > 122-_kpx5-Ju6QGLrXKvQxAgyFNpBh6w at mail.gmail.com>
> > Content-Type: text/plain; charset=UTF-8
> >
> > Hi,
> >
> > I tried that search myself and found some things that looked potentially
> > useful to you, so I suggested that search. Either you might find
> something
> > useful there, or the dialogue could progress about what you need.
> Requiring
> > perfect input for pdb2gmx is a fairly stringent expectation.
> >
> > Mark
> > On 03/04/2015 3:40 pm, "Alex" <nedomacho at gmail.com> wrote:
> >
> > >  Mark,
> > >
> > >
> > > Not to troll, but why did you assume that I didn't do my due diligence
> > > before posting here?
> > >
> > > Because, you see, you could have left that second part of your reply
> > > (which only confirms the legitimacy of my initial question), and it
> would
> > > make it less insulting.
> > >
> > >
> > > Alex
> > >
> > >
> > >
> > >   >
> > >
> > > Hi,
> > >
> > > Googling things like "gromacs DNA structure" is a good bet. There are
> no
> > > fully standardised naming schemes or workflows, so you will likely not
> > have
> > > something do everything for you.
> > >
> > > Mark
> > >
> > > On 03/04/2015 7:03 am, "Alex" <nedomacho at gmail.com> wrote:
> > >
> > >
> > > I'm fully aware that this is a forum for discussing Gromacs, but
> there's
> > a
> > > bit of a frustrating situation that involves using it.
> > >
> > > I need a linear ssDNA chain, sequence of my choosing, anything that
> will
> > > work with, say, AMBER99SB-ILDN. Not trying to find any funny
> forcefields
> > > for it, everything as is. You suggested AMBER in the past, so AMBER it
> > is.
> > >
> > >
> > > ChemOffice produced a PDB with incompatible atom types. make-na server
> (
> > > http://structure.usc.edu/make-na/server.html) also produced something
> > > pdb2gmx hates. Is there absolutely any way to get a PDB that will
> > produce a
> > > usable topology out of the box with an established potential
> implemented
> > in
> > > Gromacs? Anything that will not involve manual modification of PDBs or
> > > writing text-processing scripts will make me very happy.
> > >
> > >
> > > I will really appreciate any suggestions.
> > >
> > >
> > > Thank you,
> > >
> > >
> > > Alex
> > >
> > >
> > >
> > >
> > > --
> > >
> > > 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.
> > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Best regards,
> > >
> > >  Alex                            mailto:nedomacho at gmail.com
> > > <nedomacho at gmail.com>
> > >
> > > --
> > > 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.
> >
> > End of gromacs.org_gmx-users Digest, Vol 132, Issue 13
> > ******************************************************
> >
> --
> 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.
>



-- 
Tsjerk A. Wassenaar, Ph.D.


More information about the gromacs.org_gmx-users mailing list