[gmx-developers] stuff in double precision

Erik Lindahl lindahl at cbr.su.se
Mon Feb 5 19:37:06 CET 2007


Hi,

On Feb 5, 2007, at 7:20 PM, David van der Spoel wrote:

>
> If you do an operation in C in which a double is involved, then as  
> far as I know everything is converted to double, possibly unless  
> you use brackets.
>

Formally yes, but modern compilers relax this unless you enforce IEEE- 
conformance at the cost of performance.

> The problem David experienced is just due to an in a sense ill- 
> posed problem, since looking for 1 in 10^6 energy differences (i.e.  
> subtracting large numbers) is asking for trouble (think diverging  
> trajectories due to round off with different average energies).  
> This is why people generally shy away from absolute free energies.
>
> A very simple workaround would be to always use the free energy  
> loops, also for "reference no-free energy simulations", then you  
> are running the same code twice.

That might actually be a smarter option. I'll see if I can find my  
once-upon-a-time-smart-optimization to skip the free energy loop when  
lambda==0 and disable it.

Cheers,

Erik




More information about the gromacs.org_gmx-developers mailing list