hi Taishan,

The most illuminating thing to do is to plot the running integral of the correlation i.e. from 0, to p samples. You’ll need to pick p large enough so this integral plateaus to a well defined value - remember that you’ll have to run for a certain amount of time to reduce the noise in the accumulated correlations. For s you need to pick a value that isn’t so small that the samples are highly correlated but small enough so you resolve the correlation function and are able to integrate it with simple quadrature i.e. the “trap” function.

Hope this helps,

Reese

ps please also see:

# Adaptive Green-Kubo estimates of transport coefficients from molecular dynamics based on robust error analysis# http://jcp.aip.org/resource/1/jcpsa6/v136/i15/p154102_s1

```
>> variable p equal 200 # correlation length
>> variable s equal 10 # sample interval
```

```
Dear Steve and Reese,
Yes, I tested several values of s and p when calculating the thermal
conductivity of bulk Si. After a finite-size study, I am now using systems
of 10x10x10 unit cells. I hope you can help me with these two problems:
1) when I use p=[300,500], the results are very different for s=[10,100].
2) sometimes, k_ii are different to a considerable factor, is this normal?
Thank you very much,
Best
Taishan
```