Logging velocity for all particles over all time steps
112 views
Skip to first unread message
molecular dynamics
unread,
Apr 5, 2022, 10:15:24 AM4/5/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hoomd-users
Hello all,
I am a CPARC student working with HOOMD with the goal of obtaining the viscosity of a molecular system using Green-Kubo relations. To accomplish this, I'll be using the integration of the velocity auto-correlation function, which requires the velocity of all particles over all time steps. I've been able to get the (x,y,z) velocity for all the particles in a single frame by initializing the simulation at a certain frame and using "system.particles.velocity". However, when I try to loop over the frames in the simulation or even manually change the frame without restarting the system, I get the error:
"**ERROR**: Cannot initialize more than once"
Does anybody have a script for obtaining these velocities, or if there is another method I should be using? I am self-taught in Python, so any help would be appreciated.
Thank you,
Drake Ghaderi
Joshua Anderson
unread,
Apr 6, 2022, 1:41:41 PM4/6/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
If you need the velocity less often, you can save it to a GSD file for offline analysis.
------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan