Skip to content
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

Error with restarting LAMMPS simulation with PLUMED and SHAKE #924

Open
ppegolo opened this issue Apr 14, 2023 · 8 comments
Open

Error with restarting LAMMPS simulation with PLUMED and SHAKE #924

ppegolo opened this issue Apr 14, 2023 · 8 comments

Comments

@ppegolo
Copy link

ppegolo commented Apr 14, 2023

Dear developers,

there seems to be an issue with restarting a LAMMPS simulation that uses both PLUMED and the SHAKE algorithm.
When I try to restart a biased simulation from a LAMMPS restart file, I immediately receive the error Non-numeric box dimensions - simulation unstable. If the simulation had continued from the same point without restarting, I would not have encountered this error at this stage.

I have attached a ZIP archive with the LAMMPS (v. 23 Jun 2022) and PLUMED (v. 2.8.1) input files for reproducing the error.
The error appears when running step 4.
Does anybody have any idea if this is a bug of some sort?

Thanks,
Paolo

error_restart.zip

@invemichele
Copy link
Contributor

There seems to be an issue with restart when a bias acts on the energy and the simulation is NPT.
Here test_restart.zip is a minimal setup to reproduce the error. The plumed input is:

ene: ENERGY
metad: METAD ARG=ene PACE=200 SIGMA=20 HEIGHT=1

Upon restart I get a huge spike in the pressure (from 380 to -10^227) and the simulation breaks.
There are no problems if a CV different from the energy is biased.

If I turn off the barostat and do NVT, I still get the pressure spike, but the simulation continues without issues.
In both cases, NPT and NVT, the kinetic energy after restart is identical, while the potential energy changes only slightly

@PabloPiaggi
Copy link
Contributor

Hi @invemichele, we had never seen this error before. I believe it should be due to recent changes in either LAMMPS or Plumed. Did you test the same versions @ppegolo used? That is to say, LAMMPS (v. 23 Jun 2022) and PLUMED (v. 2.8.1). Thanks.

@invemichele
Copy link
Contributor

yes, I used the latest LAMMPS stable (v. 23 Jun 2022) and let it download PLUMED (v. 2.8.1)

@ppegolo
Copy link
Author

ppegolo commented Apr 24, 2023

I also tried LAMMPS v. 29 Sep 2021 with PLUMED 2.7.4 with Michele's minimal setup and I get the same error.

@invemichele
Copy link
Contributor

It might be connected to how the virial is handled in a restart...

Maybe related to shake? see here.
We should test if the jump in pressure happens also without the shake fix (probably smaller time step is needed with flexible water)

@ppegolo
Copy link
Author

ppegolo commented Apr 24, 2023

Yes, the error is related to shake. Removing shake (and reducing the time-step) makes the error disappear.

@invemichele
Copy link
Contributor

I did the following test: add fix_modify shake1 virial no after fix shake1 and run with NVT (in NPT volume explodes)
With this setup, at restart there is no jump in the pressure.

@ppegolo
Copy link
Author

ppegolo commented Apr 24, 2023

Ah, I see. I'm not sure it's related, but in NVT simulations the Non-numeric box dimensions error does not show up at restart even without adding fix_modify shake1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants