How to set velocity manually #5110
secretqsan
started this conversation in
General
Replies: 1 comment
-
|
Hi @secretqsan, velocities would typically be read automatically when you call If you would like to set your velocities manually, you will need to load your trajectory into memory. However, you will still need to use a trajectory format that supports velocities, otherwise you will run into the issue you are seeing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can I set the velocities in a universe manually? I tried by the following code:
for ts in u.trajectory:
v = np.array(np.loadtxt(f'velocity_{ts.frame}.dat'))
ts.velocities = v
but the velocities of all the frames are equal to the last frame. How can I do this properly?
Beta Was this translation helpful? Give feedback.
All reactions