Giter Site home page Giter Site logo

Precision about oxdna HOT 6 CLOSED

lorenzo-rovigatti avatar lorenzo-rovigatti commented on August 13, 2024
Precision

from oxdna.

Comments (6)

philipturner avatar philipturner commented on August 13, 2024 1

It is rather cumbersome, but it could be useful in some stability-critical parts of the code.

Actually you can emulate the entire thing with IEEE compliance. I've confirmed that it's possible, just not worth my time. Double-single requires less effort. But even that requires nonzero effort, which I'd like to avoid.

from oxdna.

lorenzo-rovigatti avatar lorenzo-rovigatti commented on August 13, 2024

I'm not sure what you mean by "butterfly effect", but I'm familiar with the idea that the same configuration evolved differently will generate trajectories whose mutual "distance" diverges exponentially with time.

As for the difference in the numerical stability of single vs mixed precision, this is a plot of my phd thesis that shows the energy of an NVE simulation performed with oxDNA with single, mixed and double precision on GPUs:

precision.pdf

About your last point, thanks for the reference, I'll give it a look.

from oxdna.

philipturner avatar philipturner commented on August 13, 2024

As for the difference in the numerical stability of single vs mixed precision, this is a plot of my phd thesis that shows the energy of an NVE simulation performed with oxDNA with single, mixed and double precision on GPUs:

My issue is that numerical stability and energy conservation are different. If you're connecting this to a thermal bath, small energy deviations won't matter. I'm worried about numerical stability in quaternion math being an "ill-structured problem". Similar to the reason eigenvalue decomposition always occurs in FP64.

from oxdna.

lorenzo-rovigatti avatar lorenzo-rovigatti commented on August 13, 2024

I don't exactly agree with the dismission of the effect of "small energy deviations" on the simulation performance, since a better energy conservation makes it possible to increase the integration time step and/or decouple the thermostat (which can increase particle diffusion and can therefore help simulating diffusion-limited systems).
Having said that, we periodically re-orthonormalise orientations to limit the kind of numerical issues I think you are referring too, although I'm not an expert in this matter.

from oxdna.

philipturner avatar philipturner commented on August 13, 2024

better energy conservation makes it possible to increase the integration time step and/or decouple the thermostat

I have a GPU that has zero double precision, and I'm trying to port your algorithm to another package. If it's at least possible, the CPU -> GPU jump should outweigh this performance hit?

from oxdna.

lorenzo-rovigatti avatar lorenzo-rovigatti commented on August 13, 2024

Yes, the raw speed-up should be rather large in that case. Also note that there are ways of doing calculations in double precision with only single-precision registers. It is rather cumbersome, but it could be useful in some stability-critical parts of the code.

from oxdna.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.