Restarting calculation with MACE forcefields

Hi I have been trying to run MD simulation using MACE potentials.

There are two issues I am encountering;

  1. Restarting with latest dump file would cause the temperature to drop and by the time same number of steps have passed it would come back to the temperature where it started from, making the system to be stuck in the same ranges of temperatures.

  2. I have trying to do the restart in a different way, i.e using read_restart and write_start, unfortunately no luck with that as I get the following error while saving the restart file

WARNING: Pair style restartinfo set but has no restart support (src/pair.cpp:755)
WARNING: Pair style restartinfo set but has no restart support (src/pair.cpp:755)
WARNING: Pair style restartinfo set but has no restart support (src/pair.cpp:755)

And when I read the file, as it is a warning it gives me a hard stop as following.

Reading data file ...
ERROR: Unknown identifier in data file:
For more information see https://docs.lammps.org/err0001 (src/read_data.cpp:1482)
Last command: read_data dump.restart.77854

Any suggestion/help would be appreciated.

Thanks!

MACE is not part of LAMMPS. You have to contact the MACE developers. We don’t know any details.

Some notes:

If your dump file does not contain velocities, it is not surprising that “the temperature drops”. Temperature is the result of kinetic energy of particles and if your particles are all restarting from zero kinetic energy then their temperature will also be zero.

You cannot use read_data to restart from a restart file. You use read_restart. Or, you can use write_data to write a data file.

Thank you for the reply, yes I have tried both, and restart files contain velocities too.

If velocities are being read in correctly then there should be no difference between the temperature logged at the end of the previous simulation and the temperature logged following the restart, since temperature should be calculated purely based on velocities.

I think you should spend some time working out exactly what is happening there before you go any further. It should be possible for you to use write_data and read_data to confirm that velocities are being output and re-read back in, as data files contain this information in human-readable format.

Yes, as I have been doing that too, so following are my velocities, as before using read_data/write_data, I have also been previously reading from dump files which had velocities (in human readable format). The following is reading dump velocities from the file below,

read_dump dump.relax.1.077850 77850 x y z vx vy vz box yes  replace yes


neighbor        2.0 bin
neigh_modify    delay 10

region 1 block  INF INF INF INF 4.0 6.7
group regionAtoms1 region 1
group free subtract all regionAtoms1
fix  constraint  regionAtoms1  setforce 0.0  0.0  0.0

fix             1 free nvt temp 1000.0 1200.0 $(100.0*dt)
thermo         200
thermo_style   custom step lx ly lz temp pe ke etotal press
dump            1 all custom 200 dump.relax.1.* id type x y z vx vy vz
dump_modify     1 sort id flush yes pad 6

And I know the velocities are read, as given my first comment above, after being read from dump and after the following the first step of NVT the velocities drop and then after number of steps it comes back to the same temperature as if stuck in a cycle.

TEM: TIMESTEP
77850
ITEM: NUMBER OF ATOMS
632
ITEM: BOX BOUNDS xy xz yz pp pp mm
0.0000000000000000e+00 2.2068099975599999e+01 0.0000000000000000e+00
0.0000000000000000e+00 3.1209007263200000e+01 0.0000000000000000e+00
0.0000000000000000e+00 3.5000000000000000e+01 0.0000000000000000e+00
ITEM: ATOMS id type x y z vx vy vz
193 1 11.0715 0.114284 8.90938 -0.793473 2.30804 3.52777
194 1 10.9521 15.582 9.0243 -4.33017 -2.7897 0.396036
195 1 22.0061 31.1393 8.78918 -1.84588 2.25636 3.15672
196 1 0.0281595 15.5226 8.86024 -1.31752 1.17988 -0.449381
197 1 2.69376 0.0398005 8.95542 1.36849 -0.836873 -1.84311
198 1 2.77199 15.5587 8.91404 -1.93752 3.63443 2.36537
199 1 13.8924 0.142925 8.75424 -1.23003 1.03076 1.24706
200 1 13.8614 15.5747 8.92136 -2.82338 -2.74163 1.36124
201 1 5.73955 31.0935 8.91066 -2.71872 -1.24483 2.90583
202 1 5.40466 15.6705 8.88324 0.266463 -2.35175 -2.8464
203 1 16.5458 0.142459 8.90312 2.0619 -0.786029 -1.13124
204 1 16.5244 15.5698 8.98441 -2.45881 0.651578 -1.91567
205 1 8.32041 31.106 8.81874 0.666995 1.34266 -0.147448
206 1 8.18343 15.6308 8.86346 3.85487 2.06493 0.297868
207 1 19.3575 31.2055 8.74193 2.82849 1.83122 -0.578192
208 1 19.2695 15.664 8.81925 -0.011343 2.06036 -0.261855
209 1 1.80656 2.55184 8.89788 0.648423 1.23552 -0.323176
210 1 1.75953 18.0422 8.77107 0.835203 1.72621 -1.52949

Unless, my velocities are somehow reinitialized after reading in the first step!

This is an expected behaviour. The line fix 1 free nvt temp 1000.0 1200.0 $(100.0*dt) introduces a temperature ramp from 1000K to 1200K. If you restarted the simulation, it would start from the beginning, i.e. the thermostat will decrease the temperature to 1000K and then increase is throughout the run to 1200K.