[lammps-users] restart file & velocity at previous time


I have 2 question which need your advice:

1. it seems the restart file doesn't store the atoms' velocity, is
there a way or option to do so? i want the atoms' velocity restored
after the "read_restart" command

2. in my module, I have to use the atom velocity of the previous
timestep, Steve told me LAMMPS doesn't store the previous timestep's
velocity, so I am wondering if I there exist a good and efficient way
to get that.

your advice are gratefully appreciated, thanks.

The restart file does store the atom velocity. It is restored
when you read_restart or tools/restart2data


In response to your second question:

Add **v_previous to class Atom. Create an atom style based on say
atom_vec_full. Add v_previous to the subsequent functions in this style to
reflect the addition (including restart routines). Add

  memcpy(atom->v_previous[0], atom->v[0], 3*atom->nlocal);

to Verlet::force_clear() and Respa::force_clear().