Hi Berk,

Thank you for your help, after a short test, it seems to work perfect.

All the best
Tom

On 03/20/2012 10:11 AM, gmx-users-requ...@gromacs.org wrote:
Date: Tue, 20 Mar 2012 10:03:33 +0100
From: Berk Hess<g...@hotmail.com>
Subject: RE: [gmx-users] Re: RE: problem with g_bar
To: Discussion list for GROMACS users<gmx-users@gromacs.org>
Message-ID:<col113-w352a0c2419838bb4790c4f8e...@phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"


Hi,

Apparently I didn't try to compile it myself, there is a pointer dereference 
missing.
Pleae try the fix below.

Cheers,

Berk

--- a/src/tools/gmx_bar.c
+++ b/src/tools/gmx_bar.c
@@ -2049,7 +2049,7 @@ static void read_bar_xvg(char *fn, real *temp, lambda_t 
*lambda_head)
          gmx_fatal(FARGS,"File '%s' contains fewer than two columns", fn);
      }

-    if ( ( *temp != barsim->temp)&&  (*temp>  0) )
+    if ( !gmx_within_tol(*temp,barsim->temp,GMX_FLOAT_EPS)&&  (*temp>  0) )
      {
          gmx_fatal(FARGS,"Temperature in file %s different from earlier files or 
setting\n", fn);
      }


>  Date: Tue, 20 Mar 2012 09:23:38 +0100
>  From:tomki...@mis.mpg.de
>  To:gmx-users@gromacs.org
>  Subject: [gmx-users] Re: RE: problem with g_bar
> > Hi Berk, > > Thanks a lot for your answer. > > I changed the line and recompiled Gromacs, sadly I got this error: > > gmx_bar.c: In function "read_bar_xvg":
>  gmx_bar.c:2052:5: error: incompatible type for argument 1 of
>  "gmx_within_tol"
>  ../../include/maths.h:125:1: note: expected "double" but argument is of
>  type "real *"
>  make[3]: *** [gmx_bar.lo] Error 1
> > Best,
>  Tom
> > On 03/20/2012 03:15 AM,gmx-users-requ...@gromacs.org wrote:
>  >  ------------------------------ Message: 3 Date: Mon, 19 Mar 2012
>  >  18:34:31 +0100 From: Berk Hess<g...@hotmail.com>  Subject: RE:
>  >  [gmx-users] problem with g_bar To: Discussion list for GROMACS users
>  >  <gmx-users@gromacs.org>  Message-ID:
>  >  <col113-w32c019ba58913fec173e168e...@phx.gbl>  Content-Type:
>  >  text/plain; charset="iso-8859-1" Hi, Yes, there is a problem with
>  >  different temperature variables being single and double precision.
>  >  Does the one line change below fix the problem? Cheers, Berk - if ( (
>  >  *temp != barsim->temp)&&  (*temp>  0) ) + if (
>  >  !gmx_within_tol(temp,barsim->temp,GMX_FLOAT_EPS)&&  (*temp>  0) )
>  >>  >    Date: Mon, 19 Mar 2012 13:57:51 +0100
>  >>  >    From:tomki...@mis.mpg.de
>  >>  >    To:gmx-users@gromacs.org
>  >>  >    Subject: [gmx-users] problem with g_bar
> >> > > >> > Dear all, > >> > > >> > Recently I posted my problem with g_bar on this mailing list but got no
>  >>  >    solution for it. After additional testing I decided to send an 
enhanced
>  >>  >    description of my problem.
> >> > > >> > I am doing Free Energy calculation. The dhdl values are put in separate
>  >>  >    .xvg files. The routine g_bar is then started using:
> >> > > >> > g_bar -b 100 -f md_*.xvg -o -oi -oh > >> > > >> > With the result: > >> > > >> > Program g_bar, VERSION 4.5.5
>  >>  >    Source code file: .../src/gromacs-4.5.5/src/tools/gmx_bar.c, line: 
2054
> >> > > >> > Fatal error:
>  >>  >    Temperature in file md_0.05.xvg different from earlier files or 
setting
> >> > > >> > > >> > Checking the header of all .xvg files showed the same line for the
>  >>  >    temperature for all files:
> >> > > >> > @ subtitle "T = 298.15 (K), \xl\f{} = 0.025" > >> > > >> > Changing the temperature manually to any integer (but still with .0) let
>  >>  >    g_bar run fine.
> >> > > >> > sed -i 's/T\ \=\ 298.15/T\ \=\ 298.0/g' md* > >> > > >> > Do you have any suggestions what's wrong here? > >> > > >> > I'm not that familiar with C, but my suggestion would be an error with
>  >>  >    floating point arithmetic in line 2052 of gmx_bar.c
> >> > > >> > if ( ( *temp != barsim->temp)&& (*temp> 0) ) > >> > > >> > where *temp and barsim->temp are compared. Maybe it has something to do
>  >>  >    with the input as long double (%lf) and statement "real *temp" in 
the
>  >>  >    function header?
> >> > > >> > I appreciate any hints. > >> > > >> > Best regards
>  >>  >    Tom

--
gmx-users mailing list    gmx-users@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-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Reply via email to