Comments (4)
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.
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.
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.
I will take a look thanks!
from molly.jl.
Related Issues (20)
- Links in Docs are broken HOT 2
- Boltzmann Constant in LAMMPS 'real' units does not work HOT 5
- AtomsBase not properly implemented HOT 4
- GPU error with custom pairwise interactions HOT 5
- Inconsistent Units Crash Simulation HOT 5
- apply_coupling! method is not found for custom coupling function HOT 2
- Example for new MC membrane barostat HOT 12
- How to cite? HOT 6
- [feature request] velocity-dependent forces HOT 2
- Should we pass more properties (e.g. velocities, step number) to `force`/`potential_energy`? HOT 4
- Should we have functions to add and remove atoms to/from a `System`? HOT 3
- open an sdf file HOT 10
- Molly.jl: AD with Enyzme returns 0 gradient HOT 1
- Units in Nose Hoover temperature HOT 1
- GPU error with the example HOT 4
- return type for force for pairwise potential in CUDA HOT 1
- sys.coords does not work as Vector{Vector} HOT 2
- EAM implementation and dimension error HOT 5
- Boundary Conditions HOT 1
- UndefVarError: `σ6` not defined ERROR when simulating the NPT ensemble HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from molly.jl.