Hi Viswanath.V
What kind of average do you want. The average position?
If so you will need to collect the positions in a numpy array and then average them using numpy.mean()
Something like this would work.
positions = []
for ts in u.trajectory:
positions.append(ts.positions)
# 3D array, atoms, xyz, time
positions_array = np.asarray(positions)
average = np.mean(positions_array, axis=-1)
You may need to double check i have the right axis for the mean etc.
Cheers
Hugo