-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rotations #220
Rotations #220
Conversation
adding functions to track orientations issue #167
Hi @tfamprikis thanks for this! This looks like it will be quite a useful starting point. Do you plan on adding something more? Otherwise we will start integrating this into gemdat. |
hey, this was just a test to see how this works. i still have a couple of issues that havent been able to fix. mainly
otherwise some other functions from test4.py can also be moved to gemdat_rotation (autocorr(), autocorr_par(), a function to plot distribution of bond lenghts) I can add the data (.xml) i've been using to test to test_data and some figures of what the symmetrization looks like when it works. all that said, if you think you can still work with what I have please go ahead... |
Okay, no worries! The test at leas worked 😅 There is a bunch of othes stuff I still want to work on as well. I'll let you know when we get back to this. |
adding functions to track orientations issue #167
…MDAT into rotations
@tfamprikis Can you share the data that you used to run |
Hi @SCiarella I've uploaded the .xml + a version of the test code that actually (half)works here: I have not managed to make meaningful progress against the issues i had described yet... |
This pull request should fulfil the following objectives:
The analysis of rotational transitions will be the object of the next pull request |
Add bond length distribution plot Add autocorrelation computation and plot
You can look at this notebook to get an overview of this addition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @SCiarella thanks for fixing up this PR! It looks like all the bits are in place, the plots look great, but I think it could use some polish before merging. I made a first pass through the code, please see my comments.
This seems to be the basic usage:
bd = Orientations(trajectory, central_atoms='S', satellite_atoms='O', n_expected_neigh=8)
direction_cart = bd.get_conventional_form(normalize=False)
direction_spherical = bd.cartesian_to_spherical(direct_cart=direction_cart, degrees=True)
plots.rectilinear_plot(trajectory=direction_spherical, normalize=False)
sg = Oh_point_group()
direction_cart_sym = bd.get_symmetric_traj(sg.sym_ops_Oh)
direction_spherical_sym = bd.cartesian_to_spherical(direct_cart=direction_cart_sym, degrees=True)
plots.rectilinear_plot(trajectory=direction_spherical_sym, normalize=False)
- I'm wondering if we can clean up the api a little bit, so it's a bit more inviting to use
- Have you looked at the pymatgen symmetry module? There seems to be a lot of code that can help with generating symmetry operations for point groups. This could replace Oh_point_group with familiar pymatgen code.
- Can you also add some unit tests for the new code?
- Can you refactor the Orientations class to get rid of some of the superfluous methods(see comments)?
We could use: from pymatgen.symmetry.groups import PointGroup
g = symmetry.groups.PointGroup('m-3m') # Oh
len(g.symmetry_ops)
# 48
g.symmetry_ops[0]
# SymmOp(affine_matrix=array([[ 0., 0., -1., 0.],
# [ 0., -1., 0., 0.],
# [-1., 0., 0., 0.],
# [ 0., 0., 0., 1.]])) |
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Use _pbc_dist from pymatgen
I have cleaned the api, so now the basic usage looks like:
which is now using pymatgen.PointGroup to get the symmetry, so I have removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, using the symmetries from pymatgen makes this a lot cleaner. A few small final comments from my side.
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Rename data -> orientations
Hi guys, I've been playing with this a while. some implementations don't really make sense to me rn. should I comment here or wait for this to be merged and make issues? |
@tfamprikis I think this pull request will be closed relatively soon (since it is also quite long), so it would be nice if you could open new issues to address all the problems that you see. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
@tfamprikis I agree with @SCiarella that it's good to get this merged now and fix remaining issues later.
adding functions to track orientations issue #167