I am running a 3D molecular dynamics solution of a Lennard-Jones fluid with $N$ particles in a box, and I want to plot the velocity autocorrelation function. From this resource, I see that $$\psi(t) = \left\langle \sum_{i=1} ^N v_i(t) \cdot v_i(0) \right\rangle$$
is the non-normalized VACF. My problem is that I don't understand how to evaluate such a thing for my simulation.
The angle bracket convention from statistical mechanics is a convention used for time-averages. So, I know that $$\langle A \rangle = \lim_{\tau \rightarrow \infty }\int_0^{\tau} A(t) dt$$ or $$\langle A \rangle = \lim_{N\rightarrow \infty}\frac{1}{N}\sum_{i=1}^N A_i$$
So for my simulation which I run once, how do I find the average value of $$\sum_{i=1} ^N v_i(t) \cdot v_i(0) \quad (??)$$
This is how I run my simulation:
- Initialize positions and velocities of particles
- Evaluate forces on particles (using $F=-\nabla U$)
- Perform a time-step using a symplectic integrator with some time-step $\Delta t$
- find positions and velocities of particles in the new configuration
- Repeat steps 2-3 until you reach your end time
I could run this simulation multiple times, and then take the velocity averages, but if my initial conditions and parameters are the same, I should get the same results... Any advice would be appreciated.