-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] cursor.rotate should rotate all vector properties #103
Comments
Actually, the above approach doesn't work because, unless the |
This is relevant to this feature branch that I'm working on, which naively uses the workaround in the original post. For now I can just compute the center of mass before calling the function and pass it in. |
Which also makes me realise that I'll need to be careful to choose the correct center when applying the rotation, since this won't be (necessarily) the same as what is used for the box vectors themselves which would be rotated about (0, 0, 0). |
I think I've now got this working (using a workaround) on my feature_reduce branch. I've also added a unit test to check that the rotation is performed correctly and that the coordinates property is updated. The two things that I'm not sure of are:
|
I've been thinking about this - am I right that the centre of rotation for each velocity vector would be the origin So, if an atom's velocity is |
I'm also not sure how the above fix worked, because For example;
|
Yes, I think |
This commit is the beginning of adding in the option of rotating velocities. |
Currently the cursor.rotate function only rotates the
coordinates
property, when it should really rotate all vector properties, i.e.velocity
too. At present this can be achieved by calling the function multiple times, using themap
option to remap coordinates to velocities, e.g.:The text was updated successfully, but these errors were encountered: