-
Notifications
You must be signed in to change notification settings - Fork 7
Add post-processing option for surface site classification #437
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
Draft
Alexsp32
wants to merge
33
commits into
main
Choose a base branch
from
surface-site-classification
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
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).
Add OutputSurfaceSiteClassification type to record slab structure, fractional flag and snap threshold for aligning. Classify each frame using HighSymmetrySites.
* 🧪 Test benchmarking capability in dynamics tests * 🧪 Add json output * ✅ Update tests to output benchmark info * 🚑️ Fix mistake in test list * ➖ Add benchmarking and remove Plots.jl from deps * 👷 Add artifact saving for timings * 👷remove job stub * 👷 Fix another mistake in CI * 👷 Still trying to get benchmarks to save somewhere * 👷 CI is hard * 👷 Explicit benchmark file path * 👷 Add benchmark saving and evaluation * 💚 Try to get CI working * 💚 Fix CI again * 💚 Not naming outputs properly * 💚 Workspace path was not where I expected it * 💚 Downloads benchmark repo for comparison now * 💚 Force NQCDynamics location to be in known path * 💚 Workspace location seems to be non-deterministic * 💚 Path is off for some reason * 💚 Julia actions require a specific path * 💚 It would be so nice to understand how this works * 👷 maybe finally understood directory structure * 👷 Still attempting to wrangle out tag info * 👷 Tried to fix unresolved paths * 👷Missed one * 💚 Another attempt at fixing path refs in CI * 💩 Try with absolute paths * 💚 Wrong variable names * 💚 More stuff pointing to wrong paths * 💚 Seem to be in the wrong path for compare * 💚 Missing another path reference * 👷 Move performance tracking to within repo * 👷 Pass variables through GITHUB_ENV * 👷 Moving files before analysing * 💚 Another wrong path * 🍻 This will surely fix everything * 👷 I still can’t find my own files * 👷 Clearly not enough ‘work’ went into this * 👷 This is absolutely no fun * 👷 corrected merge_multiple * 🔖 Perform benchmarks for dynamics precompile
* 📝 Add Friction rework info * 📝 Document evicted Python functionality * 📌 Use remove-python branches for testing * 📝 Update for friction-rework * 📝 Update docs for friction-rework * 🚨 TEMPORARY sources for docs * ⬆️ Version bump NQCBase v0.4.0 for PR * 🚨 Update Docs dependencies * ⬆️ More compat * 🚨 Deps back to normal for merge
* Removed SurfaceHoppingVariables as a type to remove DEDataArrays * Updated RecursiveArrayTools and removed DEDataArrays * Continued to fix combatability issues with new SciMLOperators * added RecursiveArrayTools to iesh.jl * Added RecursiveArrayTools everywhere it is needed * updated named tuple to remove component vector and homogenise eltypes * Chnaged the surface hopping motion! calls to use a NamedArrayPartition instead of component vector * Readded NQCModels importing of functions * BIG FIX * Updated variables container to an arraypartition * changed obtaining state from array partition as .x[2] instead of .state * Changed container access field as state instead of attemping to index the state object in array partition "u" * create custom get_fsalfirstlast * Created SurfaceHoppingVariables struct from an arraypartition Co-authored-by: H Snowden <Snowd1n@users.noreply.github.com> * Added convert to Int for all instances of state that I could find Co-authored-by: H Snowden <Snowd1n@users.noreply.github.com> * included "SurfaceHoppingVariables.jl" as an include so that struct was available to "iesh.jl" * Reordered file to avoid undefined variable error * Changed initial conditions to pass state object to SurfaceHoppingVariables as a vector of Floats * Got intial conditions all working now Co-authored-by: H Snowden <Snowd1n@users.noreply.github.com> * Adding get_fsalfirstlast() for all integrator methods Co-authored-by: H Snowden <Snowd1n@users.noreply.github.com> * Adding `get_fsalfirstlast()` for other custom integrators * 🐛 Fix state typing for surface_hopping * BCB fix * 🐛 Fix dynamics_surface_hopping again * Update new_methods.md to remove mention of DEDataArrays.jl * 💩 Attempt to fix CME unit tests * 🧪 More unit test fixes * ✅ Fix CME unit tests * ✅ Fix fixed dynamics_surface_hopping * fixed incorrectly defined normal vector in quantised_diatomic test * Fixed missing dependency for a sympletic function * Ensured that initial conditions are always Float64 * ✅ Pass dynamics_surface_hopping and dynamics_cme * 🔀 Pull in Henry's fixes * ✅ Fix minor mistake in surface_hopping tests * updated benchmarking directory for DynamicsTests * fix silly typo ... * Results from benchmarking - can remove later and set to be git ignored * Removed redundant comment, fixed rpcme error and stored benchmark .json files * 🔥 Removed benchmark leftovers --------- Co-authored-by: HenrySnowden <snowden.ht@gmail.com> Co-authored-by: H Snowden <Snowd1n@users.noreply.github.com> Co-authored-by: H Snowden <136097272+Snowd1n@users.noreply.github.com> Co-authored-by: Alexander Spears <alexander.spears@warwick.ac.uk>
* changed location of get_hopping_eigenvalues() Changed the location of the definition of get_hopping_eigenvalues() from fssh.jl and rpsh.jl to SurfaceHoppingMethods.jl so that it is defined in a more appropriate place for a general surface hopping function * Added missing dependency Added a missing dependency for get_hopping_eigenvalues(sim::RingPolymerSimulation) * First attempt at porting NQCDynamics to look at NQCCalculators not /Calculators.jl * Fixed precompilation issues and added NQCCalculators to Project.toml * Fixed Precompile issues to do with NQCModels update * made the calculators.jl imports neater * updated cache names to reflect latest change to NQCCalculators * fixing some tests such that they work - see comments on changed lines * replaced all instances of AdiabaticASEModel() to ClassicalASEModel() * Removed Calculators.jl from NQCDynamics, began updating MetropolisHastings and ThermalMonteCarlo to using Update_Cache rather than relying on get functions. * fixing classical dynamics tests * Fixed typo Co-authored-by: H Snowden <Snowd1n@users.noreply.github.com> * ✅ Pass classical MDEF tests * 🐛 Update caches in classical acceleration! * 🐛 update_electronics → update_cache replacement * 🎨✅ Format and fix eigenvalue dependent tests * Tests pass up to RPMDEF * 🧪 Attempt IESH test fixes * 🐛 Ensure cache updates in motion! function * ✅ Update CME test model for cache functionality * 🐛 Ensure cache updates happen * 💩 broken end of day 2025-06-03 * changes to rescale_velocity!( ) in surface_hopping * reverted changes to unpack_states in fssh and iesh. Changed iesh tests to use the more sophisticated ErpenbeckThoss impurity * fixed error in iesh test * 🚚 UpdateMACEModelsExt for Cache changes Co-authored-by: Matt Larkin <mlarkin863@users.noreply.github.com> * ⬆️ NQCModels v0.10 for breaking changes * 🐛 Update unit tests for constraints and VelocityBoltzmann * ✅ Update to NQCDInterfASE usage in unit tests. * fix to evaluate transformation to include an additional call of update_cache! * updated Project.toml to take NQCModels version from GitHub * removed unnessecary derivative call * fix to classical tests * improvements to RingPolymerClassical tests * 🔥 Remove leftover benchmark result * ✅ Force AdiabaticStateSelector usage for tests * 🧪 AdvancedMH.jl tests need fixing separately * Avoid storing benchmark results * moved diabatic friction calculations to NQCCalculators and reimplemented DiabaticMDEF * 🧪 Attempt to fix Fermion model classical dynamics * ✅ Fix CME tests * fixed simulation never passing friction_method to cache * added new kwarg to run_dynamics and updated the docstring * moved run_dynamics to its own file * fix to RingPolymerSimulation for diabaticMDEF and minor changes to comments in other files * fixing IESH tests * How did this get here? * fixes to diabatic rpmdef * 🔥 remove unnecessary SciMLOperators dependency * ⬆ Update to NQCCalculators v1.0.4 * Don’t comment out tests * 🚑 Fix mistake in version constraint * ➕ Accidentally deleted SciMLOperators dep * 🔖 Remove dev dependencies --------- Co-authored-by: Ash Baldwin <ash.baldwin19@gmail.com> Co-authored-by: Ash Baldwin <Ash.Baldwin@warwick.ac.uk> Co-authored-by: Matt Larkin <61248744+mlarkin863@users.noreply.github.com> Co-authored-by: H Snowden <Snowd1n@users.noreply.github.com> Co-authored-by: Joe Gilkes <joegilkes@users.noreply.github.com> Co-authored-by: Matt Larkin <mlarkin863@users.noreply.github.com>
…keep existing compat) (#408) Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org>
…compat) (#391) Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org>
…pat) (#393) Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org> Co-authored-by: H Snowden <136097272+Snowd1n@users.noreply.github.com>
#412) Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org>
…413) * CompatHelper: bump compat for NQCModels to 1, (keep existing compat) * Update Project.toml --------- Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org> Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com>
* Updated the introduction to mention a couple more dynamics methods * Update getting_started.md Added example with in-place potential!() and derivative!() functions and a note discussing potential!() in a little more detail * Update overview.md Included a more detailed explanation of how the derivative matrix wrapper scales with different numbers of atoms and degrees of freedom * Update combining_models.md made the number of atoms in the friction example a little smaller so it doesn't completely overwhelm the repl when someone prints the friction matrix * Update frictionmodels.md updated terminology and made the the equations neater by using a proper latex package for braket notation * Update overview.md updated terminology and links to the new versions * Update overview.md made minor tweaks to how the examples work to avoid namespace errors due to the Distributions.jl package * Update mdef.md Added an executable script for composite model friction that uses a free potential and a random friction on the adsorbates * Create overview.md for NQCCalculators docs * Added ErpenbeckThoss to the analytic models library (#404) Co-authored-by: Ash Baldwin <ash.baldwin@warwick.ac.uk> * Update overview.md added more detailed description and basic usage of NQCCalculators * change to NQCDistributions docs * Finished docs changes to NQCDistributions * Update overview.md added more examples * Update frictionmodels.md, fixing typo * Update overview.md - fixing typo * Update overview.md - couple of fixes * 👷 Update docs building workflow * 👷 Add missing import into docs generation, warnonly on example failure * 📜 Update docs for NQCModels changes --------- Co-authored-by: Matt Larkin <61248744+mlarkin863@users.noreply.github.com> Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com>
* changed location of get_hopping_eigenvalues() Changed the location of the definition of get_hopping_eigenvalues() from fssh.jl and rpsh.jl to SurfaceHoppingMethods.jl so that it is defined in a more appropriate place for a general surface hopping function * Added missing dependency Added a missing dependency for get_hopping_eigenvalues(sim::RingPolymerSimulation) * First attempt at porting NQCDynamics to look at NQCCalculators not /Calculators.jl * Fixed precompilation issues and added NQCCalculators to Project.toml * Fixed Precompile issues to do with NQCModels update * made the calculators.jl imports neater * updated cache names to reflect latest change to NQCCalculators * fixing some tests such that they work - see comments on changed lines * replaced all instances of AdiabaticASEModel() to ClassicalASEModel() * Removed Calculators.jl from NQCDynamics, began updating MetropolisHastings and ThermalMonteCarlo to using Update_Cache rather than relying on get functions. * fixing classical dynamics tests * Fixed typo Co-authored-by: H Snowden <Snowd1n@users.noreply.github.com> * ✅ Pass classical MDEF tests * 🐛 Update caches in classical acceleration! * 🐛 update_electronics → update_cache replacement * 🎨✅ Format and fix eigenvalue dependent tests * Tests pass up to RPMDEF * 🧪 Attempt IESH test fixes * 🐛 Ensure cache updates in motion! function * ✅ Update CME test model for cache functionality * 🐛 Ensure cache updates happen * 💩 broken end of day 2025-06-03 * changes to rescale_velocity!( ) in surface_hopping * reverted changes to unpack_states in fssh and iesh. Changed iesh tests to use the more sophisticated ErpenbeckThoss impurity * fixed error in iesh test * 🚚 UpdateMACEModelsExt for Cache changes Co-authored-by: Matt Larkin <mlarkin863@users.noreply.github.com> * ⬆️ NQCModels v0.10 for breaking changes * 🐛 Update unit tests for constraints and VelocityBoltzmann * ✅ Update to NQCDInterfASE usage in unit tests. * fix to evaluate transformation to include an additional call of update_cache! * updated Project.toml to take NQCModels version from GitHub * removed unnessecary derivative call * fix to classical tests * improvements to RingPolymerClassical tests * 🔥 Remove leftover benchmark result * ✅ Force AdiabaticStateSelector usage for tests * 🧪 AdvancedMH.jl tests need fixing separately * Avoid storing benchmark results * moved diabatic friction calculations to NQCCalculators and reimplemented DiabaticMDEF * 🧪 Attempt to fix Fermion model classical dynamics * ✅ Fix CME tests * fixed simulation never passing friction_method to cache * added new kwarg to run_dynamics and updated the docstring * moved run_dynamics to its own file * fix to RingPolymerSimulation for diabaticMDEF and minor changes to comments in other files * fixing IESH tests * first commit * Brief intro to Spectra Density - trying to keep general as Hybridisation function is only relevent for NAH and WideBandBath * How did this get here? * Started writing up Spin-Boson model docs * discretisations written for Ohmic and Debye baths * added AltDebyeSpectralDensity but have commented out as it's not actually exported. * Made some notes about WTR * fixes to diabatic rpmdef * 🔥 remove unnecessary SciMLOperators dependency * ⬆ Update to NQCCalculators v1.0.4 * Don’t comment out tests * NAH writing and gap discretisation * 🚨 Temporarliy ensure dev state of docs build * 🚑 Fix NQCCalculators dep * Should build docs now * 📄 Small mistake in build script * Another small CI change * Should dev NQCDynamics now * urls need to be explicit? * 📄 Update docs for NQCCalculators, NQCModels changes * adding reference to Spin Boson stuff * Trapezoidal Rule Theory * further writing of TR rule * ShenviGaussLegendre write up - may need include some plots of the disretisation and coupling * started writing up WTR discretisaiton * gap discretisation & reference updates * WTR method * 🔥 Remove dev dependencies * → Expel advanced MDEF-TTM tutorial to NQCRecipes * 👷 Add missing import for NQCDInterfASE * change to project.toml to work with updated NQCModels * ⬆️ Docs should only use NQCModels v0.10 or v1 * Included short introduction doc page and link NQCRecipes * 📜 Update docs for NQCModels changes * 📜 Small docs fixes * small fix * ➕ Add missing NQCCalculators dependency * 📝 Minor docs fixes * Update to NQCCalculators docs to include distinction between update and evaluate functions --------- Co-authored-by: Ash Baldwin <ash.baldwin19@gmail.com> Co-authored-by: Ash Baldwin <Ash.Baldwin@warwick.ac.uk> Co-authored-by: Matt Larkin <61248744+mlarkin863@users.noreply.github.com> Co-authored-by: H Snowden <Snowd1n@users.noreply.github.com> Co-authored-by: Joe Gilkes <joegilkes@users.noreply.github.com> Co-authored-by: Matt Larkin <mlarkin863@users.noreply.github.com> Co-authored-by: Louhokseson <88427189+Louhokseson@users.noreply.github.com>
…Anderson Holstein (#419) * Multiple Dispatch of Simulation{DiabaticMDEF} to work correctly with AndersonHolstein * fix to docs so that new pages compile properly
* Multiple Dispatch of Simulation{DiabaticMDEF} to work correctly with AndersonHolstein
* fix to docs so that new pages compile properly
* bug fix to make.jl
* fixes to notes and equations
* formatting fixes to system bath model docs
* Friction models initial * Update EFT docs * Update docs with ml-models and scattering example * Fix docs naming * Fix PyCall-PythonCall issues * Switch examples to PythonCall * Install MACE for docs * Resolved conflicts with main v0.15.1 * 📝 Fix references * 📝 Fix example not running * 📝 Include missing submodule * 💚 Update Docs JL project and ensure builds OK * Additional docs fixes * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Correct reactive scattering example docs --------- Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> Co-authored-by: Alexander Spears <alexander.spears@warwick.ac.uk> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Matt Larkin <61248744+mlarkin863@users.noreply.github.com>
…xtended to diatomics (#397) * del old quant_diatomic * quant atomic * how did QuantUtlities come back?? delete again * hopefully this commit actually works in this insanity * Forgot a conflict * remove Plots, PyCall, Revise and Libdl * QuantisedAtomic --> ConfigureAtomic * Incidence angle for ConfigureAtomic * OutputScatteringAngle * OutputScattered T F * austrip(z) * James: mobile atoms for monte carlo * ensemble of directions * azimuthal angle * Fix azimuthal * Update Project.toml Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * Update Project.toml Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * Update Project.toml Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * Update Project.toml Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * Update Project.toml Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * Update Project.toml Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * Update Project.toml Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * Update src/DynamicsOutputs.jl scattering angle sol Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * Update Project.toml Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * Update Project.toml Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * Update Project.toml Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> * comment out emt interface for now * Update ConfigureAtomic.jl to work with v1 structure * Update DynamicsOutputs.jl - typo in function call * Update initialconditions.md to add docstrings from ConfigureAtomic to autodocs in API --------- Co-authored-by: Connor Box <msrvhs@luther.csc.warwick.ac.uk> Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> Co-authored-by: Matt Larkin <61248744+mlarkin863@users.noreply.github.com>
* Multiple Dispatch of Simulation{DiabaticMDEF} to work correctly with AndersonHolstein
* RingPolymerArray Docs
* Update documentation.yml
* Multiple Dispatch of Simulation{DiabaticMDEF} to work correctly with Anderson Holstein (#419)
* Multiple Dispatch of Simulation{DiabaticMDEF} to work correctly with AndersonHolstein
* fix to docs so that new pages compile properly
* adding relevant doc file names to make.jl (#420)
* Multiple Dispatch of Simulation{DiabaticMDEF} to work correctly with AndersonHolstein
* fix to docs so that new pages compile properly
* bug fix to make.jl
* fixes to notes and equations
* formatting fixes to system bath model docs
* Wrote the theory for the IESH docs, need to write an example
* IESH docs
* included James Gardner reference
* fix to introduction page and API pages
* fixes to image rendering
* tried changing NQCRecipes menu item to a link
* revert NQCRecipes back to previous link and add years to refs
* remove list of tutorials from NQCRecipes
* fix more typos
* added Unitful to example block
* updated new references to have consistent field names
* fix plotting error in example
* updated IESH so that diabatic population output doesn't give InexactErrors when converting state to an integer
* bug fix
* missing elementwise for OutputTotalDiabaticPopulation
* change adiabatic_population for AdiabaticIESH to have the correct integer conversion
* correction to plotting
* fix to example plotting
* added change to installation guide and some plot fixes
* fixed docstring error
---------
Co-authored-by: Alexander Spears <39826690+Alexsp32@users.noreply.github.com>
* Update index.md * Update atoms.md * Update getting_started.md * Update ensemble_simulations.md * Update overview.md * Update fullsizemodels.md * Update machinelearningmodels.md * Update combining_models.md * Update frictionmodels.md * Update references.bib * Update frictionmodels.md * Update systembathmodels.md (#424) * Update references.bib * Update systembathmodels.md * Update systembathmodels.md * Update systembathmodels.md * Update overview.md * Update systembathmodels.md * Update systembathmodels.md to include correct reference link to IESH * Made Storing and sampling distributions have a reference link * id ref for NQCDistributions * Update ensemble_simulations.md to use correct reference link for nqcdistributions * Update rpmd.md * called RingPolymerWrapper from NQCDistributions in example --------- Co-authored-by: Matt Larkin <61248744+mlarkin863@users.noreply.github.com>
Alexsp32
added a commit
that referenced
this pull request
Nov 7, 2025
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.
This PR adds an
AnalysissubmoduleHighSymmetrySites, which can be used to relate positions of adsorbates within a Periodic Cell to high-symmetry sites on the cell.ToDo: