[gmx-developers] single precision, double precision hybrid GROMACS
Mark Abraham
Mark.Abraham at anu.edu.au
Thu Apr 6 23:46:00 CEST 2006
D. Ensign wrote:
> Greetings,
>
> I have been charged with allowing some quantities (most specifically, the forces) to be
> computed in single precision, while the rest are computed in double precision. We hope
> this will allow us to get the best precision for the least computational cost. There are
> several ways I can think of implementing this, and I list them here for your insightful
> criticism and heartless ridicule (you can ridicule nicely if you want, too):
This sounds like the sort of programming project I wouldn't give to my
worst enemy :-) Tracking the flow of type information would be a nightmare.
It seems you want the integration-of-forces part of the MD to run as if
it were single precision, but calculate energies, etc. at double
precision. One strategy for doing that would be to run the simulation at
single precision, and then use mdrun -rerun at double precision
(possibly with code modification, I don't know) which should calculate
non-force quantities at double precision.
The tacit question in all of this is why you would bother. Such an
approach would give you an MD simulation with at most an infinitesimal
perturbation from the single precision one. This makes it seem unlikely
you'll improve the sampling of configuration space meaningfully. Nobody
would pretend that the absolute energies produced by an MM force field
have more then a few digits of useful precision, and the same obviously
goes for relative energies found by comparing two states.
Accuracy at "single" machine-precision level is already being swamped by
the assumptions inherent in the construction of the force-field -
uniformity of atom-typing, point-charge representation - and the MD
protocol - bond length constraints, temperature & pressure regulation,
electrostatics treatment, leap-frog integrator. There's probably more
effects that haven't occurred to me in the last two minutes! To quote
one of my doctoral advisers, once you have an MM force field
representing your physics, chasing too much accuracy here is like
"trying to jump over your own head."
Mark
More information about the gromacs.org_gmx-developers
mailing list