[gmx-users] g_velacc bug?

David spoel at xray.bmc.uu.se
Wed Dec 3 22:28:01 CET 2003


On Wed, 2003-12-03 at 19:24, Claudio J. Margulis wrote:
> Dear David, these are my conclusions so far:
> 
> I believe that replacing XX and XX for YY and ZZ gives the correct
> answer and fixes the g_velacc bug.
> 
>  
> 
> The for loop should be left as it was in the original g_velacc.c code,
> [i.e for(j=0; j<atndx[index[i]+1] - atndx[index[i]]; j++)]
> 
I think that in the above meaning it only takes the first atom of each
molecule, which should roughly give you the same as your phosphor ACF. 
If you do replace the line as I suggest you would do real averaging
(unless I misinterpret the code). Did you try it ?


> To come to these results I had to do a lot of trjconv into gro files
> and then a bunch of perl. It would be very helpful to me if I knew
> exactly what goes into the trr files so that I could try to find some
> xdr reader in fortran (which I am more comfortable with than C) and I
> could pull out the data. 
Have you tried gmxdump?
The files are simple, a header and then a dump of the arrays x y z x y z
etc, then vx vy vz and finally fx fy fz .

> 
> Does anybody have a fortran program that reads trr files?
> 
You would probably be better off making a fortran wrapper around the
read_trn routine and then link to the gmxlib.


> If not, can anybody point out to the xdr decoding routines in fortran?
> and also to the exact data that is written into the trr files?
xtc won't give you velocities.



> 
>  
> 
> Thank you!
> 
> Cheers,
> 
> Claudio.
> 
>  
> 
> On Tue, 2003-12-02 at 23:00, Claudio J. Margulis wrote:
> 
> > Dear David, 
> 
> > 
> 
> > I already did that, and my impression is that it is still broken.
> 
> > 
> 
> try replacing
> 
> for(j=0; j<atndx[index[i]+1] - atndx[index[i]]; j++) {
> 
> by
> 
> for(j=0; j<atndx[index[i+1]] - atndx[index[i]]; j++) {
> 
> > I have a liquid that includes the ions PF6- 
> 
> > 
> 
> > Obviously P is for all purposes at the center of mass of the
> 
> > molecules.
> 
> > 
> 
> > If I compute the velocity autocorrelation function for P I get a
> 
> > function
> 
> > 
> 
> > that is totally different from the one I get for PF6-
> 
> > 
> 
> > I know the correlation function for P is right because I computed it
> 
> > separately.
> 
> > 
> 
> >  
> 
> > 
> 
> >  
> 
> > 
> 
> > Thanks for looking into this.
> 
> > 
> 
> > Claudio.
> 
> > 
> 
> >  
> 
> > 
> 
> >  
> 
> > 
> 
> > >> Hi, I’m trying to use g_velacc to compute the velocity
> 
> > autocorrelation
> 
> > 
> 
> > >> function for a set of molecules.
> 
> > 
> 
> > >> 
> 
> > 
> 
> > >> When I compute g_velacc for atoms it gives the correct answer (I
> 
> > wrote
> 
> > 
> 
> > >> my own program to check)
> 
> > 
> 
> > >> 
> 
> > 
> 
> > >> When I compute it for molecules (with option –mol and and index
> 
> > file
> 
> > 
> 
> > >> with molecules not atoms)
> 
> > 
> 
> > >> 
> 
> > 
> 
> > >> I get strange results.
> 
> > 
> 
> > >> 
> 
> > 
> 
> > >>  
> 
> > 
> 
> > >> 
> 
> > 
> 
> > >> I looked at the source code (admitedly I’m a much better fortran
> 
> > 
> 
> > >> programmer than c) but these few lines look weird to me.
> 
> > 
> 
> > >> 
> 
> > 
> 
> > >> Can anybody tell me if  line 7 to 9 they are right or not?
> 
> > 
> 
> > >> 
> 
> > 
> 
> > --please replace by YY and ZZ and test. Could you report back
> whether
> 
> > that
> 
> > 
> 
> > --solves the problem? I'm afraid this program is not very often
> used,
> 
> > and
> 
> > 
> 
> > --hence not well tested.
> 
> >
> 
>  
> 
> -----------------------------------------------------------------------------------------
> 
> Claudio J. Margulis
> 
> Assistant Professor
> 
> Department of Chemistry
> 
> University of Iowa
> 
> 319 CB
> 
> 319-335-0615 (office)
> 
> http://www.uiowa.edu/~chemdept/faculty/margulis/index.html
> 
> -----------------------------------------------------------------------------------------
> 
>  
-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assist. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




More information about the gromacs.org_gmx-users mailing list