[gmx-users] Time averaged ramachandran plot

Tsjerk Wassenaar tsjerkw at gmail.com
Mon Oct 27 13:39:23 CET 2014

```Hey :)

That should use circ.awk:

{
x1 += sin(\$1)
x2 += cos(\$1)
}
END {
m = atan2(x1,x2)
print "Number of points = " NR
print "Circular Mean = " m
}

Otherwise, the mean of 180 and -180 gives you a 0 angle.

Cheers,

Tsjerk

On Mon, Oct 27, 2014 at 11:11 AM, andrea <andrea.spitaleri at iit.it> wrote:

> replace with this:
>
> `grep -v '^#\|^@' rama.xvg | grep "ALA1" | awk '{print \$2}' | awk -f
> std.awk
>
>
>
>
> On 27/10/2014 11:04, andrea wrote:
>
>> Hi,
>>
>> on the fly try this using ALA1 as example (it can be any of your
>> residues):
>>
>> `grep -v '^#\|^@' rama.xvg | grep "ALA1" | awk '{if(\$2 == 0) print \$2}' |
>> awk -f std.awk
>>
>>
>> where std.awk contains:
>>
>> {
>>   x1 += \$1
>>   x2 += \$1*\$1
>> }
>> END {
>>   x1 = x1/NR
>>   x2 = x2/NR
>>   sigma = sqrt(x2 - x1*x1)
>>   if (NR > 1) std_err = sigma/sqrt(NR -1)
>>   print "Number of points = " NR
>>   print "Mean = " x1
>>   print "Standard Deviation = " sigma
>>   print "Standard Error = " std_err
>> }
>>
>>
>> hope it helps
>>
>> and
>>
>>
>> On 27/10/2014 01:21, Justin Lemkul wrote:
>>
>>>
>>>
>>> On 10/26/14 5:14 PM, Sanku M wrote:
>>>
>>>> Hi  I plan to plot the ramachandran plot of all the dihedral angles
>>>> each of which is averaged over time-frames of trajectories. But, I find
>>>> g_rama or g_chi gives the time profile of ramachandran plot. But, if I want
>>>> to plot the time-averaged Phi.Psi angles of all residues, is there any
>>>> method to do it.ThanksSanku
>>>>
>>>>
>>> It's a process than can easily be written in any scripting language you
>>> like. You have all the data points, and you want an average.  Just
>>> post-process the output file with whatever kind of script (Perl, Python,
>>> etc) you like.
>>>
>>> -Justin
>>>
>>>
>>
> --
> -------------------------------------------------------
> Andrea Spitaleri PhD
> Principal Investigator AIRC
> D3 - Drug Discovery & Development
> Istituto Italiano di Tecnologia
> Via Morego, 30 16163 Genova
> cell: +39 3485188790
> http://www.iit.it/en/d3-people/andrea-spitaleri.html
> ORCID: http://orcid.org/0000-0003-3012-3557
>
> --
> 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.
```