MSD calculations vs time
0
1
Entering edit mode
8.8 years ago

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 selected atom from the trajectory. would also like to calculate MSD and diffusion for all atom. MSD calculates the average time taken by molecule to explore the system.

The formula for MSD would be

\begin{displaymath}
{\rm MSD} = \langle \vert{\bf r}(t) - {\bf r}(0)\vert^2 \rangle\end{displaymath}

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.

I can use the following approach to calculate MSD

import numpy as np
    r = np.sqrt(xdata**2 + ydata**2)
    diff = np.diff(r) #this calculates r(t + dt) - r(t)
    diff_sq = diff**2
    MSD = np.mean(diff_sq)

I cannot figure it out how can I make the whole script which adds and take sqroot of position of atoms in x y and z at particular time interval here in the code it is:

r = np.sqrt(xdata**2 + ydata**2)

How can I select the atomic positions (which I have already obtained coordinates in .xyz file from .DCD file using Catdcd.) .xyz file contain x y and z coordiantes from .DCD file and I need to calculate diffusion across x and Y plane. Now how can I calculate MSD from the positions? Can anyone help me with the coding in python. I will be really grateful.

MDsimulation python computational-biology • 4.8k views
ADD COMMENT
0
Entering edit mode

Hello contact.lifesciences.inc!

We believe that this post does not fit the main topic of this site.

Not a bioinformatics question

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLY
2
Entering edit mode

I have re-opened the question because I think that molecular dynamics simulations is very much on topic. Indeed, I feel it would be a very narrow perspective if computational biology and bioinformatics were restricted to NGS and sequence analysis only.

ADD REPLY
0
Entering edit mode

Looks like I was mistaken. I closed it because I saw nothing bio related - I certainly don't think NGS is the only part of bioinformatics. Thank you for clarifying the MD part.

ADD REPLY
1
Entering edit mode

Sir

This is purely a bioinformatics question, you are mistaken. This lipid diffusion is a very important property which needs to be calculated. It gets calculated by analyzing large data files which are trajectory file. Bioinformatics does not only deals with pdb files. I asked a question related to trajectory file which got data and which is analyzed by making small python scripts.

ADD REPLY
1
Entering edit mode

Yes, I was mistaken. I saw nothing biology related and that's why I closed the question. I apologize.

ADD REPLY
1
Entering edit mode

Kindly make my question live so that I can get answers for my research related problem...

ADD REPLY

Login before adding your answer.

Traffic: 2067 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6