-
Notifications
You must be signed in to change notification settings - Fork 13
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
❓ [QUESTION] Error while using potential in lammps. RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn #15
Comments
Hi @n0w0f , can you please include more information about your setup, what you are doing, and in particular anything you are doing differently from our tutorial on Colab (which includes using LAMMPS?): https://bit.ly/mrs-nequip Thanks. |
Does your model not have forces? |
Hi, I was able to do some nvt and npt run in lammps using the nequip potential, I encountered this error while using compute msd command in lammps , that too after running for some steps. I have copied the lammps , input and full output here, units real region box block 0 16 0 16 0 12 pair_style nequip mass 1 6.941 set type 1 charge 0.8 timestep 1 group Li type 1 compute msd_Li Li msd com yes fix msd_Li Li ave/time 10 1 10 c_t c_msd_Li[4] file msd_Lidumpfile variable twopoint_Li equal c_msd_Li[4]/6/(stepdt+1.0e-6) thermo_style custom step temp etotal c_msd_Li[4] v_twopoint_Li v_fitslope_Li thermo 1000 fix 2 all npt temp 520 520 100 iso 10 10 1000 dump ${temper}eqbm_dump all atom 1000 ${temper}eqbm_dump.atom dump ${temper}eqbm_pos all custom 1000 ${temper}eqbm_positions.lammpstrj type x y z vx vy vz run 100000 write_data ${temper}k_msd.data LAMMPS (14 Dec 2021) Traceback of TorchScript, original code (most recent call last): [1] 39619 abort (core dumped) /home/aswanth/lammps/lammps/build/lmp_mpi -in in.LiPS |
Does the same happen if you run NVE instead? |
I just checked and it is running for NVE. |
Hm strange. @n0w0f can you please re-download (There is also now a test suite you can run using |
also @anjohan |
I am not able to patch again , this is the error Does this mean I will have to reinstall lammps also ? |
You should be able to just copy over the new versions of |
still throwing error after a few steps.
I got the following error after running pytest
|
@n0w0f Hm... very strange, it seems to be failing on something in your nequip install before it ever gets to LAMMPS.
Thanks. |
|
Aha, the tests depend on NequIP version at least 0.5.1, what version are you using? Ideally, please update to the latest stable version 0.5.3 and try the tests again. |
sorry, I was using 0.5.0, I updated and ran the test.
|
hi @n0w0f can you include instead he full output of one of the failed tests, rather than the incomplete summary of all? this pytest summary unfortunately leaves out the actual errors. (One way to do this is to run pytest with the |
|
I'm sorry @n0w0f, my mistake: the test — NOT the plugin itself — requires the updated calculator from the unreleased NequIP 0.5.4 (the That said, this output is enough to say that the failure with an error does not happen in LAMMPS in the test (the failure happens after the LAMMPS call)... Do your NVT simulations still throw this error? |
Is there any update to this problem. I am having similar issues and would like to know if solve |
@lucamurg00 can you file a new issue with your exactly errors? Thanks. |
I found my error. I was using real units in lammps instead of metal which matched training data. I had not realized the nequip does not do unit conversion. The system works now. Thanks |
Glad to hear--- but that mistake should not give these error messages... what messages did you get @lucamurg00 ? |
Lammps runs and terminate after sometim
The text was updated successfully, but these errors were encountered: