# When using a GPU to accelerate NAMD, what are the drawbacks of using a single-precision GPU?

**URL:** <https://ask.cyberinfrastructure.org/t/when-using-a-gpu-to-accelerate-namd-what-are-the-drawbacks-of-using-a-single-precision-gpu/1429>\
**Category:** Q&A\
**Tags:** computational-chemistry, gpu, researcher, namd, simulation\
**Created:** [July 23, 2020, 5:49pm UTC](https://ask.cyberinfrastructure.org/t/when-using-a-gpu-to-accelerate-namd-what-are-the-drawbacks-of-using-a-single-precision-gpu/1429 "2020-07-23T17:49:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgoodhue](https://ask.cyberinfrastructure.org/letter_avatar_proxy/v4/letter/j/ec9cab/32.png) [@jgoodhue](https://ask.cyberinfrastructure.org/u/jgoodhue)\
**Post date:** [July 23, 2020, 5:49pm UTC](https://ask.cyberinfrastructure.org/t/when-using-a-gpu-to-accelerate-namd-what-are-the-drawbacks-of-using-a-single-precision-gpu/1429/1 "2020-07-23T17:49:26Z")

</div>

I see that NAMD has versions for both double precision and single precision GPUs. Single-precision GPUs are attractive because they are less expensive. Can someone say how the lower precision would affect the quality of my simulation results?

---

<div class="post-metadata">

**Author:** ![mmh](https://ask.cyberinfrastructure.org/user_avatar/ask.cyberinfrastructure.org/mmh/32/504_2.png) [@mmh](https://ask.cyberinfrastructure.org/u/mmh)\
**Post date:** [July 24, 2020, 9:20pm UTC](https://ask.cyberinfrastructure.org/t/when-using-a-gpu-to-accelerate-namd-what-are-the-drawbacks-of-using-a-single-precision-gpu/1429/2 "2020-07-24T21:20:38Z")

</div>

Single-precision simulations can have issues with momentum drift and energy conservation. Depending on what questions you are hoping to answer with your simulations, these may be small issues or very big issues.

---

<div class="post-metadata">

**Author:** ![techeatham3](https://ask.cyberinfrastructure.org/letter_avatar_proxy/v4/letter/t/7993a0/32.png) [@techeatham3](https://ask.cyberinfrastructure.org/u/techeatham3)\
**Post date:** [July 27, 2020, 7:57pm UTC](https://ask.cyberinfrastructure.org/t/when-using-a-gpu-to-accelerate-namd-what-are-the-drawbacks-of-using-a-single-precision-gpu/1429/3 "2020-07-27T19:57:27Z")

</div>

With AMBER, single precision was not sufficiently accurate (as mentioned energy conservation, etc) so a mixed single precision / fixed precision model was implemented that is actually more accurate than the double precision and deterministic (so can be used to debug bad GPUs). We run AMBER on commodity GPUs all the time… Note that if there are large forces (bad initial geometry) we can blow the bounds of the SP/FP model so initial minimizations and equilibration should go on CPUs first. For comparisons of the various implementations see: [https://pubmed.ncbi.nlm.nih.gov/26592383/](https://pubmed.ncbi.nlm.nih.gov/26592383/)
