Unreported error for velocity command in LAMMPS documentation, Questions about seed value


I am doing research about soot formation using LAMMPS. I am currently investigating the impacts of various factors (density, temperature, REAXFF force field potential, seed value of velocity command, initial configuration) on soot formation in a system. I am currently attempting to alter my simulation by varying the seed value of the velocity command. For all of my previous runs, I have been using a seed value that was suggested by one of my mentors. I have now attempted to rerun my simulation using a new seed value. I have researched documentation regarding the seed value and its purpose, but I have not been able to find much information about how to select a seed value. The general advice appears to be that a larger seed value is better.

My system consists of the following molecules:

  • C9H7 (1-indenyl): 2 molecules
  • H: 20 molecules
  • OH: 2 molecules
  • C2H3 (Vinyl): 3 molecules
  • C3H3 (Propargyl): 3 molecules
  • C6H5 (Phenyl): 2 molecules
  • C10H8 (Naphthalene): 2 molecules
  • C2H2 (Acetylene): 100 molecules
  • C2H4 (Ethylene) : 75 molecules
  • H2: 15 molecules
  • O2: 350 molecules
  • Total: 1227 atoms

The seed value I had been initially using was: 1645103637

The seed value I attempted to use was: 136301546700 which I chose arbitrarily by reversing the digits of the original seed except for the first and last digit and adding two zeros.

When I attempted to run the case with the larger seed value, I received the following error message:

“ERROR: Illegal velocity create command”

I looked into the 21 Nov 2023 LAMMPS documentation to read more about this error message, but I did not find it on the list of error messages. I thought that perhaps my seed value was too large, so I removed a zero (new seed: 13630154670) and attempted to rerun the simulation, and it ran without any issues.

In addition to reporting this type of error message so it can be added to the documentation, I have the following questions:

  • From my research into the documentation, I understand that the purpose of the seed value is to allow results to be reproducible. Is there a methodology to selecting a seed value? Is a bigger seed value always better than a small one?
  • How is the seed value utilized in the velocity command? Is there a size restriction because it appears there may be based on the error message I received.

For reference, I am using 8 processors to run my simulation, and I am using the 29 sep 2021 version of Lammps.

Additionally, here is my input file for your reference:

Thank you in advance for any help that can be provided.

It is extreme annoying when people attach images instead of (properly) quoted text, since it requires me to manually type in everything instead of a simple cut-n-paste.

The problem with this seed is that it is larger than what can be represented with a 32-bit signed integer (largest value is: 2147483648). The previous one was within range.

Yes, but it is not the only component. More importantly, every so-called “pseudo random number generator” that is used in simulations requires a seed. Some codes take that from the current date and time. LAMMPS requires an explicit input.

Not really, if it is within range is mostly sufficient. Some pRNG implementations are producing not very well distributed number sequences, if started from numbers with most bits are 0 or 1. Thus 0 or very small numbers are often a bad choice, similar for very large numbers close to the maximum.

No. Please read up on random number generators (any text book on monte carlo simulations will do). Usually all seeds are equal (except for the known notorious cases for a few pRNG algorithms, e.g. the popular Mersenne-Twister algorithm is usually seeded by creating a buffer full of numbers with a different pRNG algorithm), as they step into the sequence of pseudo-random number just at a different point.

It seeds a pRNG algorithm.

You would not receive an error message, if you would be using a current LAMMPS version.

FYI, with the next LAMMPS feature release you would get an error again indicating that you have entered an out-of-range number: Collected small changes and updates by akohlmey · Pull Request #4004 · lammps/lammps · GitHub