Surface site classification (2nd attempt) - #491
Merged
Conversation
Add HighSymmetrySites.jl providing utilities to map 2D adsorbate
positions on slab surfaces to high-symmetry site categories.
- Introduce SlabStructure type to hold adsorbate indices, site
definitions and supercell size.
- Define default FCC site dictionaries for common facets (100, 110,
111, 211) with named categories (top, bridge, fcc, hcp, step_edge,
etc.).
- Implement positions_to_category(position, categories, cell;
fractional=false, snap_to_site=0.03) to classify an XY position by
nearest site (returns :other if outside cell or no close site).
- Supports both cartesian and fractional comparisons.
- Truncates positions to 2D and validates they lie inside the
periodic cell before classification.
- Export types and functions (SlabStructure, FCC*Sites,
positions_to_category, classify_every_frame placeholder).
- Add module-level docs describing usage and limitations (2D XY plane
assumption).
(cherry picked from commit 52be44edba3db3d57668393f76bd137b74a74d56)
(cherry picked from commit 9a66266d66178c4c959ef33a01fbb9c350732678)
Add OutputSurfaceSiteClassification type to record slab structure, fractional flag and snap threshold for aligning. Classify each frame using HighSymmetrySites. (cherry picked from commit 34c4d442150f49ba06911af3535a5d5ed01cb2aa)
(cherry picked from commit 83084cd88368ef6cd86c7b71c18777a22fe8cc89)
(cherry picked from commit ef11dd24edd126c33fd6c58997f03f69a0bcc54b)
(cherry picked from commit f1861c4aceeb38be00be16a3e509a914038c73ba)
(cherry picked from commit 5e23839971c4a2afe3c24549c324d156123d6f64)
(cherry picked from commit b9fbf748c93883d47459e9e26674e957d0d2a471)
Alexsp32
requested review from
Ash-Baldwin,
Louhokseson,
Nhertl,
framere,
hbarquanta,
htsnowden,
reinimaurer1 and
yliucn
June 1, 2026 11:12
Member
Author
|
@claude[agent] Please update the documentation with an example for this new functionality. |
Agent-Logs-Url: https://github.com/NQCD/NQCDynamics.jl/sessions/d09ac039-ef64-4025-802d-77d24493f122 Co-authored-by: Alexsp32 <39826690+Alexsp32@users.noreply.github.com>
Done! I've added comprehensive documentation for HighSymmetrySites including:
The documentation covers all predefined surface facets (FCC100, FCC110, FCC111, FCC211) and shows how to use both single-position classification and full trajectory analysis. Commit: 4e8c935 |
Copilot stopped work on behalf of
Alexsp32 due to an error
June 1, 2026 11:21
htsnowden
approved these changes
Jul 8, 2026
htsnowden
left a comment
Collaborator
There was a problem hiding this comment.
Looks good. Nice docs and tests
Alexsp32
added a commit
that referenced
this pull request
Jul 21, 2026
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.
#437 is horribly out of sync, so here's a new PR instead.
This PR adds an Analysis submodule HighSymmetrySites, which can be used to relate positions of adsorbates within a Periodic Cell to high-symmetry sites on the cell.
ToDo: