added new mean square displacement function and functions to calculate displacement of individual ions