[gmx-users] g_order C code

priyanka srivastava priyankaps4 at yahoo.com
Thu Sep 14 14:48:27 CEST 2006


thanks again for your prompt reply.

Okey, and I am not good at programming at all :-)

By looking at the gmx_order.c program could u tell me
which flag is i.e. index[i] or only [i] is indicating
the elements of a group?

Supppose there are 14 groups (i guess denoted by ngrps
in the code) and each group in turn contains 48
elements, so what I am interested to know is the flag
that is associated with the second part i.e.
individual elements.

regards,
Pri...

--- Erik Marklund <erikm at xray.bmc.uu.se> wrote:

> I have never done any lipid order stuff and I don't
> know that much about
> the underlying theory, so the only help I can offer
> concerns progamming
> only.
> 
> It seems I have a different version of gmx_order.c,
> where the
> problematic parts of the code are around lines 448
> and 497. I think,
> however, that I have found the faulty code. See
> below.
> 
> On Thu, 2006-09-14 at 04:44 -0700, priyanka
> srivastava wrote:
> > Thank you for your reply.
> > 
> > I am also curious to know if this is the right way
> of
> > doing it. I am not sure of the changes that I have
> > made in the code.
> > 
> > Any suggestions on that please? 
> > 
> > Since, when I say "make install" it gives the
> > following error:
> > 
> > cc -DHAVE_CONFIG_H -I. -I. -I../../src
> > -I/usr/X11R6/include -I../../include
> > -DGMXLIBDIR=\"/usr/local/gromacs/share/top\" -O3
> > -fomit-frame-pointer -finline-functions -Wall
> > -Wno-unused -malign-double -funroll-all-loops -MT
> > gmx_order.lo -MD -MP -MF .deps/gmx_order.Tpo -c
> > gmx_order.c -o gmx_order.o
> > gmx_order.c: In function `calc_order':
> > gmx_order.c:251: called object is not a function
> > gmx_order.c:252: called object is not a function
> > gmx_order.c:252: called object is not a function
> > gmx_order.c: In function `order_plot':
> > gmx_order.c:300: `i' undeclared (first use in this
> > function)
> > gmx_order.c:300: (Each undeclared identifier is
> > reported only once
> > gmx_order.c:300: for each function it appears in.)
> > gmx_order.c:301: called object is not a function
> > gmx_order.c:302: called object is not a function
> > gmx_order.c:302: called object is not a function
> > gmx_order.c:303: called object is not a function
> > gmx_order.c:304: called object is not a function
> > make[2]: *** [gmx_order.lo] Error 1
> > make[2]: Leaving directory
> > `/home/histidine/gromacs/gromacs-3.3/src/tools'
> > make[1]: *** [install-recursive] Error 1
> > make[1]: Leaving directory
> > `/home/histidine/gromacs/gromacs-3.3/src'
> > make: *** [install-recursive] Error 1
> > 
> > 
> > thanks and regards,
> > Priyanka.
> > 
> > 
> > 
> > 
> > --- Erik Marklund <erikm at xray.bmc.uu.se> wrote:
> > 
> > > On Thu, 2006-09-14 at 02:21 -0700, priyanka
> > > srivastava wrote:
> > > > Dear Gromacs users,
> > > > Hie,
> > > > 
> > > > I am calculating the order parameters for a
> > > bilayer
> > > > patch using g_order analysis tool in gromacs
> > > version
> > > > 3.3.
> > > > 
> > > > I have a total of 48 elements in the patch and
> I
> > > want
> > > > the order parameter value for each and every
> > > element
> > > > i.e. a total of say 48 values for order
> parameter
> > > > alongwith the average which g_order reports. 
> > > > 
> > > > I tried to fiddle with the code too and tried
> > > changing
> > > > the following section as follows:
> > > > 
> > > > /* average over frames */
> > > >   for (i = 1; i < nr_tails; i++) {
> > > >    /* svmul(1.0/nr_frames, (*order)[i],
> > > > (*order)[i]);*/
> > > >     fprintf(stderr,"Atom %d Tensor: x=%g ,
> y=%g,
> > > > z=%g\n",i,(*order)(index[i])[XX],
> > > >             (*order)(index[i])[YY],
> > > > (*order)(index[i])[ZZ]);
> > > > 
> 
> I think that (*order)(...) makes the compiler try to
> call the function
> *order. Since it is in fact not a function, it
> causes an error. Use
> square brackets for indexing: (*order)[...]. If I'm
> right, this causes
> the error messages for line 251 and 252.
> 
> > > > 
> > > > and also:
> > > > 
> > > > sprintf(buf,"Deuterium order parameters");
> > > >     slOrd = xvgropen(cfile,buf, "Atom",
> "Scd");
> > > > 
> > > >     for (i = 1; i < nr_tails; i++) {
> > > >       fprintf(ord,"%12d   %12g   %12g  
> %12g\n",
> > > atom,
> > > > order(index[i])[XX],
> > > >               order(index[i])[YY],
> > > > order(index[i])[ZZ]);
> > > >       fprintf(slOrd,"%12d   %12g\n", atom, -1
> *
> > > > (0.6667 * order(index[i])[XX] +
> > > >                                               
>  
> > > 0.333
> > > > * order(index[i])[YY]));
> > > > 
> 
> Indeed, i is undefined in order_plot. And once again
> you use parentheses
> for indexing. This causes the remaining errors.
> 
> > > > The problem is I am not sure if that is the
> right
> > > way
> > > > of doing this. Please suggest me something.
> Also
> > > once
> > > > these changes have been incorporated in the C
> > > program
> > > > how do I generate the exe of g_order. Gcc
> gives
> > > many
> > > > undefined errors.
> > > 
> > > In src/tools: make g_order
> > > It may require that various libraries are
> already
> > > compiled, which is why
> > > you should build all of gromacs once too (in
> gmx:
> > > make install). Having
> > > done that once, make g_order should do the trick
> I
> > > think.
> > > 
> > > > 
> > > > Please suggest me something,
> > > > regards,
> > > > Priyanka.
> > > > 
> > > > 
> > > > 
> > > >
> __________________________________________________
> > > > Do You Yahoo!?
> > > > Tired of spam?  Yahoo! Mail has the best spam
> > > protection around 
> > > > http://mail.yahoo.com 
> > > >
> _______________________________________________
> > > > gmx-users mailing list   
> gmx-users at gromacs.org
> > > >
> http://www.gromacs.org/mailman/listinfo/gmx-users
> > > > 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/mailing_lists/users.php
> > > -- 
> > > Erik Marklund, PhD Student, Molecular Biopcysics
> > > group,
> > > Dept. of Cell and Molecular Biology, Uppsala
> > > University.
> > > Husargatan 3, Box 596,          75124 Uppsala,
> > > Sweden
> > > phone: +46 18 471 4537          fax: +46 18 511
> 755
> > > erikm at xray.bmc.uu.se
> > > 
> > > _______________________________________________
> > > gmx-users mailing list    gmx-users at gromacs.org
> > >
> http://www.gromacs.org/mailman/listinfo/gmx-users
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the gromacs.org_gmx-users mailing list