dtmax in Water Orientation Relaxation

13 views
Skip to first unread message

Laura Hargreaves

unread,
Aug 24, 2022, 11:17:11 AMAug 24
to MDnalysis discussion
Hi, 

Could anyone explain in more detail or suggest resources that explain the 'dtmax' argument in the water orientation relaxation function? 


Many thanks,

Laura 

Hugo Macdermott-Opeskin

unread,
Aug 24, 2022, 8:21:07 PMAug 24
to MDnalysis discussion
Hi Laura,

I will preface this by saying I'm no expert on the water orientational relaxation function, but from my reading of the code it is the number of windows to create for your analysis.  If some one with a better understanding of the module sees this please correct me if I am wrong. 

To understand what I mean by a window  think about some kind of timeseries, illustrated here by dots.

..............

A window function takes a "view through a window" of a certain size at a certain place so to speak. So for example the first window (t0=0) of length  3 (tau=3) looks like this

[...]..........

Now imagine computing some kind of function within the window. 

Now we can combine this with another idea, 

You could imagine taking all possible windows of length 3 

E.g. the first 3 windows of length 3

[...].......... ,  .[...]......... , ..[...].......,

(t0=0, tau=3), (t0=1, tau=3), (t0=2, tau=3)

And averaging our function over all the windows of the same tau, but different t0. 

These kinds of functions are used often in analysis of time-series correlations eg in water orientational relaxation and MSD (although the implementation is slightly different). Some additional reading is https://en.wikipedia.org/wiki/Autocorrelation. In the context of molecular simulation I recommend https://livecomsjournal.org/index.php/livecoms/article/view/v1i1e6324

Returning to our dtmax, according to my reading dtmax is the number of windows. The docs give the following example

t0 = 0, tf = 1000 and dtmax = 20. In this way we create 20 windows timesteps (20 values in the x axis), the first window is created with 1000 timestep average (1000/1), the second window is created with 500 timestep average(1000/2), the third window is created with 333 timestep average (1000/3) and so on.

This means we have requested 20 windows, with a maximum of tf/dtmax frames per window , so the final window of this series will have 1000/20 = 50 frames as the value for tau.

 This is also the reason you cannot have dtmax > tf as you would get 1000/1001 frames ~= 0.99 timesteps, which is not possible. 

Hopefully this helps. 

Cheers

Hugo
Reply all
Reply to author
Forward
0 new messages