[lammps-users] Correlate.py

Dear all,

I have a question about the python script correlate.py used to calculate the integral of the auto-correlation function for compute heat/flux command. I read the script and also went over a MD textbook, but cannot figure out how to choose a suitable value for the command line option ‘-s’ when calling the python script. Apparently the value of the integral changes with the value chosen for 's’. When I plot the autocorrelation with time, it oscillates about zero.

Any suggestions will be helpful.


P.S.: There was a post a month or so ago on this same issue, but I did not find any discussion on that.

Dear Bala,

Ideally, once the autocorrelation function truly goes to zero, the value of s does not matter. However, as you probably have learnt by now, GK method require very long simulations. So, if your simulation is not long enough, the integral value (which will depend on your -s option) will fluctuate a lot. The best way is to plot the integral of autocorrelation function, graphically and see where is saturates and how much fluctuation is there around saturation point. Good luck.