feat: add SOAP-based symmetry-equivalent site detection#10
Merged
Conversation
added 3 commits
February 25, 2026 00:45
Add a second method for identifying symmetry non-equivalent adsorption sites using SOAP (Smooth Overlap of Atomic Positions) descriptors from the dscribe package with hierarchical clustering, as an alternative to ASE's SymmetryEquivalenceCheck. Core implementation (autoadsorbate/utils.py): - _compute_soap_site_vectors(): compute SOAP descriptors for candidate sites - _soap_similarity_matrix(): pairwise cosine similarity matrix - _filter_unique_sites_by_soap(): cluster sites via hierarchical clustering or greedy merging, with configurable similarity_threshold (default 0.99) Unified API (autoadsorbate/autoadsorbate.py): - Surface.get_nonequivalent_sites() accepts method="ase"|"soap" - Surface.sym_reduce() accepts method="ase"|"soap" - New methods: get_soap_similarity_matrix(), get_nonequivalent_sites_soap(), soap_reduce() Tests (tests/test_all.py): - 13 tests covering SOAP similarity matrix, hcluster/greedy modes, soap_reduce, method switching, ASE vs SOAP comparison on Ni/Ru slab, timing benchmarks Documentation (README.md): - SOAP method usage section with API examples - Threshold tuning guide - Dedicated ASE vs SOAP benchmark section with: - Method comparison table (ASE: 16 sites/8.4s vs SOAP: 8 sites/0.016s) - Detailed breakdown by site type (8 SOAP clusters) - Site comparison plot (site_comparison.png) - SOAP distance histogram (soap_histogram.png) - Discussion of why SOAP outperforms ASE on broken-symmetry surfaces Scripts: - scripts/compare_sites.py: detailed ASE vs SOAP comparison - scripts/plot_sites.py: site visualization with color-coded SOAP clusters - scripts/site_comparison.png: generated comparison image - scripts/soap_histogram.png: SOAP distance distribution plot On Ni(111) 3x3 slab with one Ru dopant: - ASE finds 16 unique sites in ~8.4 s - SOAP finds 8 unique sites in ~0.016 s (~525x speedup)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a second method for identifying symmetry non-equivalent adsorption sites using SOAP (Smooth Overlap of Atomic Positions) descriptors from the dscribe package with hierarchical clustering, as an alternative to ASE's SymmetryEquivalenceCheck.
Core implementation (autoadsorbate/utils.py):
Unified API (autoadsorbate/autoadsorbate.py):
Tests (tests/test_all.py):
Documentation (README.md):
Scripts:
On Ni(111) 3x3 slab with one Ru dopant: