-
Notifications
You must be signed in to change notification settings - Fork 15
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
Tessellation neighbors #413
Conversation
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.
Yeah, super. A couple of nits and a refactor (I'll make a PR into this branch) but otherwise lgtm.
@@ -174,6 +174,17 @@ def test_strain(self): | |||
self.assertLess(np.absolute(eps_yz-strain[:, 1, 2]).max(), 0.01) | |||
self.assertLess(np.absolute(eps_xz-strain[:, 0, 2]).max(), 0.01) | |||
|
|||
def test_tessellations(self): |
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.
Please add msg
kwarg to the tests to clarify the intent for skimmers.
voro = Voronoi(positions) | ||
x = positions[voro.ridge_points] | ||
return indices[voro.ridge_points[ | ||
np.isclose(self._structure.get_wrapped_coordinates(x), x).all(axis=-1).any(axis=-1) |
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.
This is beautful but kind of opaque...could we extract it to a little named method?
Pull Request Test Coverage Report for Build 1563680009
💛 - Coveralls |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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.
A couple nits, but looks good.
Today is my first day of parental leave and then I'll be moving in January. I hope to be a but more involved again come March/April, but until then I'll probably only poke my nose into architecture stuff on base. Just a heads-up that future reviews from me might be tardy on the scale of months 😉
I added two algorithms to find neighbouring atoms:
To be honest, I don't really know whether the Delaunay tessellation finds its utility, but since the functionality was nearly the same I implemented it anyway.