RANDOM SEED: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 3: Line 3:
Description: {{TAG|RANDOM_SEED}} specifies the seed of the random-number generator (compile VASP with [[Precompiler options#-Dtbdyn|-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) generates a sequence of random numbers for molecular-dynamics simulations for example to initialize atomic velocities and for the Andersen thermostat ({{TAG|MDALGO}}=1 {{!}} 11).
The random-number generator (RNG) generates a sequence of random numbers, which is initialized by the tag {{TAG|RANDOM_SEED}}.
The seed for the RNG determines the trajectory a molecular-dynamics simulation takes.
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.
Set the {{TAG|RANDOM_SEED}} tag to reproduce a previously performed calculation.
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)


A typical input for the {{TAG|RANDOM_SEED}} looks like this:
A typical input for the {{TAG|RANDOM_SEED}} looks like this:
Line 11: Line 14:


The initial value of {{TAG|RANDOM_SEED}} and the value after each MD step are written to 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.}}
{{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 ==
== Related tags and articles ==
{{TAG|IBRION}}, {{TAG|MDALGO}}
{{TAG|IBRION}}, {{TAG|MDALGO}}

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