Freud Analysis

23 views
Skip to first unread message

Alvaro Alexis Coreno Cortes

unread,
Sep 5, 2023, 1:30:14 AM9/5/23
to freud-users
Hello Everyone,

I have a problem with my freud script. I want to compute the msd, the problem is i don´t really know to write the msd.compute in order to take into account the images i wrote in my gsd file. 

I wrote my gsd file with the dynamic[momentum] properties in order to have the image file.

I  am new to this software and i would like to learn how the gsd file works,


MSD.py
MSD_withImages.py

Tommy Waltmann

unread,
Sep 5, 2023, 1:15:29 PM9/5/23
to freud-users
Hi,

To compute the msd with images, provide the images directly from the gsd trajectory. The script provided was very close, something like the following will provide the right input for the images argument:

```
for i, frame in enumerate(traj):
    positions[i] = frame.particles.position
    images[i] = frame.particles.image

msd = freud.msd.MSD(box, mode='window')
msd.compute(positions=positions, images=images)
```

Best,
Tommy

Alvaro Alexis Coreno Cortes

unread,
Sep 13, 2023, 1:20:47 PM9/13/23
to freud-users
Thanks!

Sorry for answering so late, it worked perfectly!

Best, 

Alexis

Reply all
Reply to author
Forward
0 new messages