# [gmx-users] g_covar average.pdb calculation

Tsjerk Wassenaar tsjerkw at gmail.com
Fri Sep 20 14:29:22 CEST 2013

```Hi Deniz,

The option -ref/-noref is not what you think it is. You want to use -nofit.

Cheers,

Tsjerk

On Fri, Sep 20, 2013 at 2:26 PM, Deniz Aydin <denizaydin at ku.edu.tr> wrote:

> Dear All,
>
> I would like to get information on how g_covar calculates the average
> structure file (average.pdb)
>
> My aim was actually to get a covariance matrix (<deltaR*deltaR>) so I
> started off by writing my own code, I use MDAnalysis package, so I give psf
> and traj files as an input and I generate the coordinates for each frame,
> and if I have 3 frames, I take the average of each coordinate element for 3
> frames. So for the 1st CA atom, I have x, y, z values for 3 frames. So I
> x1, x2, x3 values and divide by the number of frames. So this gives me the
> average x coordinate of the 1st CA atom. I do the same for y and z and then
> for all CA atoms. So if x1, x2, x3 for CA1 is 49.5 49.0 and 49.4 for 3
> frames, the average x i get is 49.3. This is what I call an average
> structure.
>
> After doing this, I wanted to compare this with what g_covar gives me
> (average.pdb) but found out that the result that I get from my own
> calculations and the result I get from g_covar are very very different. The
> g_covar command that I use is the following:
>
> g_covar -f traj.xtc -s topol.tpr -ascii covar.dat -xpm covar.xpm -noref
>
> Here I use -noref because I already use trjconv on my initial trajectory to
> generate a new trajectory so I do -pbc mol and center and -fit rot+trans to
> remove translation, rotation and to fit the structure. So I thought I could
> use -nofit in g_covar to not to fit to the reference structure again.
>
> So, coming back to my question, why would g_covar give me a very different
> result than what I find with my simple code? What does g_covar do to
> calculate this average structure? I thought maybe it does some fitting or
> additional stuff to what I'm doing in my code or changes the units, that in
> the end it doesn't give me the same coordinates for the average.pdb.
>
> -----
> Deniz Aydin, BSc.
>
> Chemical & Biological Engineering
> Graduate School of Sciences and Engineering
> Koç University, Istanbul, Turkey
> --
> View this message in context:
> http://gromacs.5086.x6.nabble.com/g-covar-average-pdb-calculation-tp5011339.html
> Sent from the GROMACS Users Forum mailing list archive at Nabble.com.
> --
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> * Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>

--
Tsjerk A. Wassenaar, Ph.D.

```