Mean Squared Displacement

534 views
Skip to first unread message

James Graft

unread,
May 17, 2018, 10:53:37 AM5/17/18
to hoomd-users
I am a new hoomd user and am part of a MD project with the purpose of obtaining viscosities. Typically, to find viscosities, I find the mean squared displacement (from positional data) of the simulation, divide it by 6 (To calculate the Diffusion constant). Then, we apply the Stokes-Einstein relation for spherical particles moving through a liquid: 

Is there any inbuilt routine for calculating the mean squared displacement? I did come across deprecated.analyze, but the issue is that it is deprecated… Does anyone know an alternative way to calculate the mean squared displacement, or perhaps a more direct way to calculate viscosity in hoomd?

Thank you!

Stokes-Einstien.pdf

Jens Glaser

unread,
May 17, 2018, 11:02:38 AM5/17/18
to hoomd...@googlegroups.com
Hi James,

It’s true that the in-build analyze.msd() is deprecated, which doesn’t mean you can’t use it.

However, the attached python code uses some freud to unwrap trajectories and a fast MSD routine somewhere from stackoverflow to compute the MSD fast from a .gsd. Freud is obtained from here:


To use it on a .gsd file, you need to dump the gsd with the option dynamic=[‘property’,’momentum’].

- Jens

msd.py

Sheelan Sengupta Chowdhury

unread,
Jul 18, 2019, 5:02:51 AM7/18/19
to hoomd-users


I am also trying to find out MSD, either hy HOOMD or using freud. deprecated in not available in the HOOMD version I am using.
But found a MSD analyzer in github though didn't understood how or whether to use it (or not).


The attached code is also showing error in my comp. Any lead related to this topic will be very helpful for me. Please reply.

Regards,
Sheelan.
Reply all
Reply to author
Forward
0 new messages