[lammps-users] Question about rewriting the existed velocity data

Hi all,

I’m trying to restart a simulation with ten replicates where I have exactly the same settings but different velocity maps, i.e., in these 10 simulations, the velocities of atoms are different but the global temperature, pressure, volume etc will be the same. Searching the mail list, I saw that the command “velocity all create {T} {random seed}” works to generate different velocity maps with different seeds. However I’m not sure whether this works fine to rewrite the velocity map which is pre-existing from the previous simulation. And it is recommended to use a big integer for seed, but how big should it be?

Thanks in advance.

Sincerely,
Joe

Hi all,

I’m trying to restart a simulation with ten replicates where I have exactly the same settings but different velocity maps, i.e., in these 10 simulations, the velocities of atoms are different but the global temperature, pressure, volume etc will be the same. Searching the mail list, I saw that the command “velocity all create {T} {random seed}” works to generate different velocity maps with different seeds. However I’m not sure whether this works fine to rewrite the velocity map which is pre-existing from the previous simulation.

velocity create will “create” new velocities. that means the old ones are gone. there is only one set of variables to store per-atom velocities.

And it is recommended to use a big integer for seed, but how big should it be?

there is no specific size, but don’t use 1, 2, 3, 4 and so on. but have numbers, say, > 10000 that are also differing for multiple invocations by different intervals.
the pseudo random number generator used for velocities is chosen to be very fast, but not to be very good. but then again, MD is a chaotic system, so even small differences will grow exponentially and thus with a sufficient equilibration time you can assume sufficiently decorrelated trajectories.

if you want to increase the efficiency of that decorrelation step, you can also use displace_atoms with a small delta to also have small differences added to the positions.
your system will be taken out of equilibrium by the newly assigned velocities, so you will have to re-equilibrate anyway.

axel.

Dr. Kohlmeyer,

Thanks for your detailed information. However I have a question about your comment:
“your system will be taken out of equilibrium by the newly assigned velocities, so you will have to re-equilibrate anyway”

Do you mean the equilibrium will be broken if I reassign the velocities with the same temperature? Since the NPT ensemble is used for the previous simulation with specific stress fields, should I equilibrate my new system using NVT first, then use NPT with the same stress fields for the previous simulation to continue my simulation?

Sincerely,
Joe

Dr. Kohlmeyer,

Thanks for your detailed information. However I have a question about your comment:
“your system will be taken out of equilibrium by the newly assigned velocities, so you will have to re-equilibrate anyway”

Do you mean the equilibrium will be broken if I reassign the velocities with the same temperature?

sure. you assign completely new velocities that will not be in any correlation with the individual atom’s potential energy.

you cannot decorrelate your system without breaking the equilibrium between positions and velocities. that is a disruptive process.

Since the NPT ensemble is used for the previous simulation with specific stress fields, should I equilibrate my new system using NVT first, then use NPT with the same stress fields for the previous simulation to continue my simulation?

impossible to say from the outside. you need to make some tests to determine how much of a disruption you will create and how long it will take to re-equilibrate.

axel.

Dr. Kohlmeyer,

Thanks a lot, sir.

Sincerely,
Joe