RANDOM SEED: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{TAGDEF|RANDOM_SEED|[integer][integer][integer]|based on the system clock}}
{{DISPLAYTITLE: RANDOM_SEED}}{{TAGDEF|RANDOM_SEED|[integer][integer][integer]|based on the system clock}}


Description: {{TAG|RANDOM_SEED}} specifies the seed of the random-number-generator (in case VASP was compiled with [[Precompiler_flags|-Dtbdyn]]).  
Description: {{TAG|RANDOM_SEED}} specifies the seed of the random-number generator (compile VASP with [[Precompiler options#-Dtbdyn|-Dtbdyn]]).  
----
----
The random-number-generator (RNG) is used at several instances of a molecular dynamics simulation such as the initialization of atomic velocities, the Andersen thermostat ({{TAG|MDALGO}}=1 {{!}} 11), etc. The seed for the RNG can be supplied by the user by means of the {{TAG|RANDOM_SEED}}-tag. This is useful, for instance, if one needs to reproduce a previously performed calculation.
The random-number generator (RNG) generates a sequence of random numbers, which is initialized by the tag {{TAG|RANDOM_SEED}}.
For example, in molecular dynamics simulations, the RNG can be used to initialize atomic velocities. Hence, the seed for the RNG influences the trajectory of a molecular dynamics simulation.
The three integers of {{TAG|RANDOM_SEED}} must fulfill these conditions:
0 <= RANDOM_SEED(1) < 900000000
0 <= RANDOM_SEED(2) < 1000000
0 <= RANDOM_SEED(3)


An input for the random seed should look like the following:
A typical input for the {{TAG|RANDOM_SEED}} looks like this:
  RANDOM_SEED =        248489752                0                0
  {{TAGBL|RANDOM_SEED}} =        248489752                0                0


The initial value of {{TAG|RANDOM_SEED}}, and the value after performing each MD step are written in the {{FILE|REPORT}} file.
The initial value of {{TAG|RANDOM_SEED}} and the value after each MD step are written to the {{FILE|REPORT}} file.
 
{{NB|tip|If multiple molecular dynamics runs with different random seeds result in inconsistent time averages, then not enough configurations were sampled. Hence, longer or more trajectories are required to get converged ensemble averages.}}
== Related Tags and Sections ==
{{NB|mind|If no {{TAG|RANDOM_SEED}} is set in the {{FILE|INCAR}} then the used value will depend on the system time. For example, in molecular dynamics simulations, initial velocities will be different each time {{VASP}} is executed (if {{TAG|TEBEG}} is used and no velocities are provided in the {{FILE|POSCAR}} file). Hence, the trajectories will diverge. If reproducibility is desired the {{TAG|RANDOM_SEED}} has to be set manually.}}
== Related tags and articles ==
{{TAG|IBRION}}, {{TAG|MDALGO}}
{{TAG|IBRION}}, {{TAG|MDALGO}}


Line 16: Line 22:
----
----


[[Category:INCAR]][[Category:Molecular Dynamics]]
[[Category:INCAR tag]][[Category:Molecular dynamics]]

Latest revision as of 11:20, 5 December 2023

RANDOM_SEED = [integer][integer][integer]
Default: RANDOM_SEED = based on the system clock 

Description: RANDOM_SEED specifies the seed of the random-number generator (compile VASP with -Dtbdyn).


The random-number generator (RNG) generates a sequence of random numbers, which is initialized by the tag RANDOM_SEED. For example, in molecular dynamics simulations, the RNG can be used to initialize atomic velocities. Hence, the seed for the RNG influences the trajectory of a molecular dynamics simulation. The three integers of RANDOM_SEED must fulfill these conditions:

0 <= RANDOM_SEED(1) < 900000000
0 <= RANDOM_SEED(2) < 1000000
0 <= RANDOM_SEED(3)

A typical input for the RANDOM_SEED looks like this:

RANDOM_SEED =         248489752                0                0

The initial value of RANDOM_SEED and the value after each MD step are written to the REPORT file.

Tip: If multiple molecular dynamics runs with different random seeds result in inconsistent time averages, then not enough configurations were sampled. Hence, longer or more trajectories are required to get converged ensemble averages.
Mind: If no RANDOM_SEED is set in the INCAR then the used value will depend on the system time. For example, in molecular dynamics simulations, initial velocities will be different each time VASP is executed (if TEBEG is used and no velocities are provided in the POSCAR file). Hence, the trajectories will diverge. If reproducibility is desired the RANDOM_SEED has to be set manually.

Related tags and articles

IBRION, MDALGO

Examples that use this tag