I have published several blogs for the calculation of residence time of water. I thought the distribution of residence time should be ok for the analysis. But the advisor asked me to calculate the mean residence time. This requires the integration of the mean residence time of all chosen water molecules.
This is introduced at http://en.wikipedia.org/wiki/Residence_time.
- is the total number of groups
- is the average time in the body
- is the number of molecules in the ith group
- is the total number of molecules introduced into the system
For the example, there are 1000 frames. Each frame is 1ps. I chose 100ps for one round calculation. Since there are 1000 frames. I did a set of loops from 1 to 100… to 901 to 1000. The output is the mean residence time in 100ps of one water molecule at each loop. And then I can use excel to get the mean and standard deviation.