Coder Social home page Coder Social logo

Comments (4)

jgreener64 avatar jgreener64 commented on May 28, 2024 1

I added some docs on how to do this, see the end of this section: https://juliamolsim.github.io/Molly.jl/dev/differentiable/#General-interactions.

Basically you need to run the simulation in chunks and accumulate the loss values into a variable.

from molly.jl.

jgreener64 avatar jgreener64 commented on May 28, 2024

Great question, I am currently thinking about how to do this myself. I think I have a way, which is rather hacky since Zygote doesn't support mutation. I'll try and upload an example in the next few days.

The reason the gradients are nothing at the minute is that all loggers are marked as non-differentiable with

@non_differentiable run_loggers!(args...)

which was done since all the loggers currently mutate, and as mentioned that would error with Zygote.

Let me know how you get on with differentiable simulations. There are a lot of rough edges right now, but it's under heavy development and I'd be interested to see how people are using it. I'd advise being on the master branch to get the latest updates.

from molly.jl.

moradza avatar moradza commented on May 28, 2024

I see! Please let me know when you upload the example. I am going to use it in coarse-graining applications in a similar fashion as this repository . They also got around velocity Verlet, but I prefer to do the project in Julia instead of python at the moment. Ping me if there is a specific development, I am new to Julia but eager to work on it.

from molly.jl.

moradza avatar moradza commented on May 28, 2024

I will take a look thanks!

from molly.jl.

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.