# Initial velocities in a Molecular Dynamics simulation

In classical Molecular Dynamics simulations Newton's equations of motion are solved to get the evolution of particle positions and velocities. To do the integration of the equation of motion, one needs to specify the inital velocities and positions of the particles. In many simulations the initial velocities are given random values which correspond to a certain temperature (say, T) because of the following relation :
$$\big<\frac{1}{2}\Sigma_im_i v_i^2\big>=\frac{3}{2}Nk_BT$$.
In those simulations, the random initial velocities are chosen such that, they correspond to a certain desired temperature ( say, $$T_d$$ ). The system of particles which is being simulated is expected to go to equilibrium at this temperature ($$T_d$$) after running for a couple of time steps.
My questions are: Why the initial velocities are chosen so that they correspond to a certain desired temperature ( $$T_d$$ ) ? The alternative may be to choose the initial velocities randomly so that they don't correspond to the desired temperature say, $$T_d$$ but some different temperature say, $$T$$. If one doesn't choose the initial velocites in this way, can the velocities be relaxed to the desired equilibrium value of temperature ( $$T_d$$ ) ? Can I choose inital velocities as zero in the simulation ?

• Please one question at once. Also it's a little unclear what your are asking. "Why the initial velocities are chosen so that they correspond to a certain desired temperature?" What would be the alternative? To have an undefined temperature? Please try to clarify the question a bit. Commented Aug 27, 2022 at 7:01
• The alternative may be to choose the initial velocities randomly so that they don't correspond to the desired temperature $T_d$ but some different temperature say, $T$. Commented Aug 27, 2022 at 7:05
• The other two questions are just yes no questions. But you seem to be after since information, what do you actually want to know. Because the answer to both is yes, but that is still nonsense to do. Commented Aug 27, 2022 at 7:05
• I assume that your goal is to simulate a NVT ensemble. This means that you have a thermostat( for example Nose-Hoover or Langevin or Andersen) that will regulate the temperature. Your initial set of velocity simply affects the time it takes to equilibrate your system. You could take any starting velocities in principle but a poor choice of velocities simply increases the time it takes to equilibrate your system. So yes, you can set all of them to zero, but then you need to simulate your system for a longer time until it is equilibrated. Commented Aug 27, 2022 at 7:10
• Yeah, now its clear to me. Commented Aug 27, 2022 at 7:30

The first is establishing the correct velocity distribution for the simulated ensemble (notice that this is the Maxwell-Boltzmann distribution for canonical and grand-canonical ensembles, but it is different for the microcanonical ensemble, the difference vanishing as $$\frac{1}{N}$$ for large systems).
A final note about your formula connecting kinetic energy and temperature. Temperature is the average kinetic energy in the reference frame where the center of mass is at rest. Therefore the formula is correct only within $$\frac{1}{N}$$ corrections.