-
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
Calculating virial stress in lammps #42
Comments
Hi @Tawfiq1448 , We do not support per-atom virials; likely your LAMMPS script is unnecessarily requesting them, somehow. (They are not necessary to run NPT simulations.) |
Thanks for your reply. I am also trying to implement Green-Kubo formulation for my system. For that, I need per-atom stress. |
You may try this repo which supports per-atom virials with ParaStressForceOutput: https://github.com/koheishimamura/nequip_allegro_tc with details in http://arxiv.org/abs/2403.14130 and https://journals.aps.org/prb/abstract/10.1103/PhysRevB.109.144426. Hope it helps. |
@Hongyu-yu Thanks for your response. Which branch of pair_allegro do I need to use for my lammps calculations? Can I retrain my model trained with StressForceOutput using ParaStressForceOutput? |
@Tawfiq1448 You can try with https://github.com/Hongyu-yu/pair_allegro or just add related lines in you pair_allegro.cpp with https://github.com/Hongyu-yu/pair_allegro/blob/1061c6ec414b8cf597ceb54387b86f1e8678a088/pair_allegro.cpp#L486-L503
|
Hi @Hongyu-yu , My simulation crashes with a segmentation fault error:
I have torch version 1.11.0+cu113 in my environment. The lammps branch I cloned is stable_2Aug2023. I also tried it with the latest develop branch of lammps. Please, let me know if you know any solution to this. Thanks. |
@Tawfiq1448 I haven't encountered this kind of error, maybe you can try this version of lammps “stable_29Sep2021_update2”. |
Hello, I also need per-atom stress so I am trying to follow above steps. With the latest version of LAMMPS (git clone --depth=1 https://github.com/lammps/lammps), Therefore I tried: git clone -b stable_29Sep2021_update2 --depth 1 https://github.com/lammps/lammps.git Do you have any solution for this problem? Thank you in advance. |
Hi, @Hongyu-yu . I encountered the following problems when deploying the trained model using the PR 0.6.0 version of nequip:
I'm not sure if it's because of my torch version? I use two conda environments that are exactly the same except for nequip (one is PR 0.6.0 nequip (PR) for deploy, the other is the normal 0.6.0 version nequip (mir) for train,because it seems to be getting slower and slower when training with the PR 0.6.0 version of nequip), Here is a list of my conda environments:
If possible, could you share with me the version of the dependency package in your environment? Best wishes! |
@rbjiawen if you think you've reproduced mir-group/nequip#311, please post your code and torch versions in that thread---thanks! Regarding "Error(s) in loading state_dict for GraphModel", are you trying to reload a model trained on a different version of the code? That could explain the error. |
Hello, I used pytorch=1.13.1 and cudatoolkit=11.7, and the nequip 6.0(https://github.com/koheishimamura/nequip_allegro_tc/tree/main/nequip) is getting slower and slower during training, but the problem is solved when I use pytorch=1.11.1. Regarding the model deploy of PR 0.6.0, I have solved it, thank you! |
Hi,
I am trying to calculate virial stress in lammps using pair_allegro. I have trained the model with stress. I am using the develop branch of Nequip and the main branch of Allegro. For pair_allegro, I am using the stress branch. I am encountering the following error:
ERROR: Pair style Allegro does not support per-atom virial
I have compiled lammps with pytorch version 1.11.0. Please, let me know if you have any suggestions. Thanks.
The text was updated successfully, but these errors were encountered: