Skip to content
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

Merged
merged 10 commits into from
Dec 10, 2021
Merged

Tessellation neighbors #413

merged 10 commits into from
Dec 10, 2021

Conversation

samwaseda
Copy link
Member

I added two algorithms to find neighbouring atoms:

  • Voronoi tessellation: Indices of atoms which share the same Voronoi vertices
  • Delaunay tessellation: Indices of atoms which form tetrahedrons in which no atom exists

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.

@samwaseda samwaseda requested review from pmrv and liamhuber and removed request for pmrv and liamhuber November 9, 2021 06:49
@samwaseda samwaseda marked this pull request as draft November 9, 2021 07:03
@samwaseda samwaseda requested review from liamhuber and pmrv and removed request for liamhuber November 9, 2021 07:13
@samwaseda samwaseda marked this pull request as ready for review November 9, 2021 07:13
Copy link
Member

@liamhuber liamhuber left a 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):
Copy link
Member

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)
Copy link
Member

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?

@coveralls
Copy link

coveralls commented Nov 11, 2021

Pull Request Test Coverage Report for Build 1563680009

  • 14 of 14 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 69.974%

Totals Coverage Status
Change from base Build 1562205427: 0.02%
Covered Lines: 11531
Relevant Lines: 16479

💛 - Coveralls

@stale
Copy link

stale bot commented Nov 25, 2021

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.

@stale stale bot added the stale label Nov 25, 2021
@liamhuber liamhuber removed the stale label Nov 30, 2021
Copy link
Member

@liamhuber liamhuber left a 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 😉

pyiron_atomistics/atomistics/structure/analyse.py Outdated Show resolved Hide resolved
tests/atomistics/structure/test_analyse.py Show resolved Hide resolved
pyiron_atomistics/atomistics/structure/analyse.py Outdated Show resolved Hide resolved
pyiron_atomistics/atomistics/structure/analyse.py Outdated Show resolved Hide resolved
@samwaseda samwaseda merged commit f8ca73a into master Dec 10, 2021
@delete-merged-branch delete-merged-branch bot deleted the tessellation branch December 10, 2021 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants