MD analysis Code