-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a deep learning model in Keras to find CG potential #216
Comments
Let's wait for TF 2.0 port for this one, as that will make it much easier. You could start though with creating layers |
Hi all. I'm working on a first pass at something like this, though it's not a deep network yet (but could become one). I'm posting a "working" example in the attached zip. I have a few different energy layers that are based on the TrainableLJ layer from the Force Matching Notebook, including LJ, bonds, angles and dihedrals. For the first pass I'm naively trying to directly fit the coefficients of these for the CG particles in a polymer system. For simplicity it's only using the LJ energy layer right now, but feel free to uncomment the others as you like. The issue I'm having is that regardless of which layer or combo of layers I run, I always get
when running the simulation. Some googling turned up that this can be an issue with the input dimensions for the TF model, but I thought the inputs were determined by HOOMD-TF, so I'm not sure what's wrong with them. Would love another pair of eyes or two to help out on this one. To reproduce the error:
|
Hey @RainierBarrett. What version of tensorflow were you using? |
I also forgot to include the .py file! I'll attach here. |
I'm guessing this is related to #285 which was merged in a few hours ago? Try updating to latest or downgrading TF to 2.3.2. |
Great, that pull fixed the issue. Now I just have to make my dimensions match with the CG energies for training. I'll keep you posted. |
Good news! I have a working CG model example which can be found in the script here. If you want to run it, the required files '1-length-4-peek-para-only.gsd' and '100-length-4-peek-para-only-production.gsd' can be generated with the following code (make sure to clone from my branch/fork): import uli_init.simulate as simulate
import hoomd
system = simulate.System(molecule='PEEK', para_weight=1.0,
density=0.8, n_compounds=[100],
polymer_lengths=[4], forcefield='gaff',
assert_dihedrals=True, remove_hydrogens=True)
sim = simulate.Simulation(system, gsd_write=1000, mode='gpu', dt=0.0001)
sim.quench(kT=1., n_steps=1e4, shrink_steps=1e4) ... with The specific system used in my example doesn't really matter as much for this issue, and the uli-init code is only a wrapper for setting up polymer sims quickly. The relevant model-building code starts on line 131 I've been running this code from a docker container but this may not run on all machines. I had to compile TF from source and this image was compiled only for specific CUDA compute-capable devices (6.0 & 7.0). All this to say, this should provide a scaffold to put together an example notebook with, if you guys want to slot this into your workflow instead! |
No description provided.
The text was updated successfully, but these errors were encountered: