❓ [QUESTION] Training a model to perform Molecular Dynamics simulations on Copper Formate System #207
Replies: 8 comments
-
Hi Jim and Bart, Yes. I did manage to run MD simulations with my formate model. It is quite a tricky thing to tune and it involves one unpublished feature that I'm writing about. If you don't mind, you can contact us via email and we can chat more on that. One quick observation is that your force error is on the high end. The C, H, and O are all a little bit too high. It may be worth trying to the particular species '0' lower than 0.05 eV/A for MAE. Best, |
Beta Was this translation helpful? Give feedback.
-
And I think Simon did upload our Formate+Cu data, the version used in the paper. Maybe you can try that dataset. @simonbatzner |
Beta Was this translation helpful? Give feedback.
-
Hi @bartdemooij, thank you for the detailed issue. As @nw13slx, both her and I were able to run MD simulations (independently of each other) for the system. Also as Lixin said, this is one of the hardest systems we've encountered. Looking at your LAMMPS input file, it looks like you're using |
Beta Was this translation helpful? Give feedback.
-
A few other comments:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi Bart, that's good to hear. Re the spikes, this can sometimes happen in Deep Learning (and is not particular to NequIP). What happens is that during training the network encounters a bad batch which leads to large gradients which leads to a bad step in weight space, causing the network to blow up. Usually this recovers to the loss value it was at before and keeps improving. In your case, it looks however like the learning rate scheduler kicked in. If there is no improvement for _ epochs, the LR will be reduced. Due to the spike, there was no improvement and the LR dropped. We are looking into ways of fixing this adaptively, but I think more generally no perfect solution in Deep Learning exists. Until then, one thing that works is to either reduce the LR (0.001 should also work well) or increase the batch size. Regarding train/val/test set sizes, that is as you can imagine highly system specific. For many bulk systems, 1,000 is a good start. For heterogeneous catalysis, including bond breaking, part of the challenge is that you have a super diverse energy landscape with many different possible states. Reactions are notoriously tricky to get right with FFs. In our case, 2.5k was enough for good diffusion, but @nw13slx will know more details (or feel free to email us). |
Beta Was this translation helpful? Give feedback.
-
Hi Simon, Thank you for your explanation. That makes sense. |
Beta Was this translation helpful? Give feedback.
-
Converting this to a discussion. Feel free to reach out via email if you have more questions. |
Beta Was this translation helpful? Give feedback.
-
Dear nequip developers,
We recently started training a model on a copper formate system. In essence, it was similar to the system you described in the nequip paper (48 Copper atoms and 1 formate molecule), however we used a slightly bigger system comprising 144 copper atoms and 1 formate molecule.
We generated training data similar to the approach you described, we performed nudged elastic band simulations, with 20 images, from which we chose 14 images to perform AIMD of 500 0.5fs steps at 300K. We then started training a model on this, which obtained a low prediction error on both energies and forces on the test set. However, when performing MD simulation (with LAMMPS), the model quickly broke down (we saw the formate molecule entering the copper surface, and the copper surface disintegrate badly).
We figured we needed more frames at higher temperatures to inform the model better, therefore we performed additional MD simulations at 500, 2000 and 4000 Kelvin. Besides the temperature, they were the same as the previous AIMD calculation. So, in total a dataset of 28000 structures were obtained.
These 28k structures were split into 80% training and 20% testing sets. The training set was then also divided in 80% for training and 20% for validation. The reason for this was that smaller training sets did not obtain good MD trajectories.
We used the following configuration of the network (example of yaml file):
Early stopping was triggered after approximately 1350 epochs and obtained the following errors (eV). These are quite okay, only maybe that E_mae could be better but that is due to the loss function (weight ratio F:E = 148^2:1).
Unfortunately, upon performing MD simulations, the system was again acting in a non-physical way.
Below are some screenshots at start, 50fs and 150fs, respectively:
We used the following MD example configuration in LAMMPS:
Do you have any insights into what might be going wrong? Have you tried (and succeeded) to perform MD simulations on "Heterogeneous catalysis of formate dehydrogenation" section of your paper?
Thanks in advance,
Jim Boelrijk and Bart de Mooij
Beta Was this translation helpful? Give feedback.
All reactions