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

(Pen)ultimate edge logic fix #335

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

laserkelvin
Copy link
Collaborator

@laserkelvin laserkelvin commented Dec 20, 2024

This PR fixes the edge counts in the directed case (i.e. with symmetric edges) being overly aggressively filtered out.

I've refactored where the set based filtering of edges is done: instead of in the Edge class itself, we simply skip over all of the set loops if is_undirected=False. In other words, if is_undirected=False, we simply return the edges out of ase or pymatgen neighbor lists.

@laserkelvin laserkelvin added the bug Something isn't working label Dec 20, 2024
@laserkelvin laserkelvin merged commit a28a5f5 into IntelLabs:main Dec 20, 2024
2 of 3 checks passed
@laserkelvin laserkelvin deleted the final-final-edge-fix branch December 20, 2024 18:33
@laserkelvin
Copy link
Collaborator Author

laserkelvin commented Dec 20, 2024

With this patch, when is_undirected is set to False, we bypass the max_neighbors logic entirely, which causes some of the tests to fail (specifically test_periodic_generation). I've opened #336 to track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants