均方位移python(Mean square displacement python)
我有一个轨迹文件,模拟20,000帧,每帧之间有5 ps的时间,我想做的是计算二维(x和y轴)的扩散。 但为了计算2D中的扩散,首先我必须计算研究中分子的均方位移。 MSD计算分子在随机游走中探索系统所需的平均时间。
我是python编程的新手,我真的想要一些帮助来解决这个问题并解决这个问题。 希望得到积极的回应。
I have a trajectory file from simulation of 20,000 frames with 5 ps time in between every frame, what I want to do is to calculate diffusion in 2 dimension (x and y axis). but to calculate diffusion in 2D, first I have to calculate Mean square displacement of the molecule under study. MSD calculates the average time taken by molecule to explore the system in random walks.
I am very new to python programming and I would really want some help to get started this problem and to solve this problem. Hope to get positive response.
原文:https://stackoverflow.com/questions/31264591
2020-09-22 21:09
满意答案
那么MSD就像听起来它是均方位移一样,所以你需要做的是找到每个位置的位置差(r(t + dt)-r(t))然后将其平方并最终取均值。 首先你必须从x和y找到r,这很容易。 我假设你从这里开始使用n