[gmx-users] grompp single vs double precisions

Mark Abraham Mark.Abraham at anu.edu.au
Sat Mar 4 07:44:05 CET 2006


Yang Ye wrote:

> grompp generates a tpr at the precision that grompp is compiled. My 
> concern whether the difference introduced by single-precision tpr has 
> made the starting point energy different, especially with automatic LJ 
> and pair interaction generation.

Sure. However the total energy function is a fairly slowly varying 
function of the positions and velocities; the difference in energy 
between one set of generalized coordinates at double precision, and the 
energy of the same set truncated to float precision will be very small. 
I think the same argument goes for things like LJ parameter generation - 
C6(AB) = sqrt( C6(A) * C6(B) ) will differ by only miniscule amounts for 
double precision C6(A) and C6(B), and the same values truncated to float 
precision. Then, you have to add together a large number of C6 terms in 
calculating an energy before such differences propagate meaningfully. 
Even if the magnitude of the C6 energy component is around 0.1 kJ/mol, 
the maximum difference between the value represented at the two 
precisions is going to be 10^-10 kJ/mol or something... you now need to 
add N=10^10 or more of those before you'll notice anything - the 
assumed-normal estimated error growing with sqrt(N) of course.

I think that only for extremely large systems does this have the 
potential to matter much - especially given the general dodginess of the 
assumptions underlying MM force fields - and the system of the original 
poster was a single molecule in vacuo....

Notwithstanding the above, you could probably construct a pathological 
small molecule case where the starting configuration was very near a 
transition state with weirdly spiraling valleys where the difference in 
precision truncation was enough to make a geometry step move from one 
valley to the other...

Mark



More information about the gromacs.org_gmx-users mailing list