Pymatgen diffussion analyzer

Hi all,
I am very new to pymatgen and I am trying to use the diffussion analyzer to plot the MSD curves and compute the ionic conductivity from VASP AIMD outputs. However, I am getting MSDs that are oscillating with time but I expect the MSDs to increase with time. Although VASPKIT gives the correct MSDs but it cannot compute the ionic conductivity.
Below is the code I am using:

‘’’
Analyze AIMD results, calculate MSD and conductivity
‘’’
import os
from pymatgen.core.trajectory import Trajectory
from pymatgen.io.vasp.outputs import Xdatcar
from pymatgen.core import Structure
from pymatgen.analysis.diffusion.analyzer import DiffusionAnalyzer
import numpy as np
import pickle

Read the XDATCAR file and get a series of structural information

traj = Trajectory.from_file( ‘XDATCAR’ )

Instantiate the DiffusionAnalyzer class

and initialize this class with the from_structures method; 1600 is the temperature, 1 is the vtime step (POTIM = 1), 1 is the number of interval steps

diff = DiffusionAnalyzer.from_structures(traj, ‘K’ , 1600 , 2 , 5 )

Plotting msd using the built-in plot_msd method to draw MSD images

diff.plot_msd()

Export MSD data to a file by calling the export_msdt() method

diff.export_msdt(filename=‘pymatgen_msd.dat’)

Next, get the ion mobility directly, the unit is mS/cm

C = diff.conductivity
D = diff.diffusivity

with open ( ‘Ionic_Conductivity_results.dat’ , ‘w’ ) as f:
f.write( ‘# AIMD result for K-ion\n’ )
f.write( ‘temp\tconductivity\tDiffusivity\n’ )
f.write(‘d\t.4f\t%.5e\n’ % (1600, C, D))