Skip to content

NEB surface reaction#350

Open
jungsdao wants to merge 38 commits into
ddmms:mainfrom
jungsdao:neb_surf_reaction
Open

NEB surface reaction#350
jungsdao wants to merge 38 commits into
ddmms:mainfrom
jungsdao:neb_surf_reaction

Conversation

@jungsdao
Copy link
Copy Markdown

@jungsdao jungsdao commented Feb 6, 2026

Pre-review checklist for PR author

PR author must check the checkboxes below when creating the PR.

Summary

Add NEB benchmark for three surface reactions from OC20NEB dataset comparing barrier height errors.

Linked issue

Resolves #293

Progress

  • Calculations
  • Analysis
  • Application
  • Documentation

Testing

Test on GPU with

  • mace-mp-0a
  • mace-mp-0b3
  • mace-mpa-0
  • mace-omat-0
  • mace-matpes-r2scan
  • orb-v3-consv-inf-omat
  • pet-mad

New decorators/callbacks

None

@ElliottKasoar ElliottKasoar added the new benchmark Proposals and suggestions for new benchmarks label Feb 6, 2026
@jungsdao
Copy link
Copy Markdown
Author

jungsdao commented Feb 6, 2026

PET-MAD seems to fail sometimes. It failed in one run but if I run it again with the same setting it runs without problem.

Copy link
Copy Markdown
Collaborator

@ElliottKasoar ElliottKasoar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, @jungsdao!

Apologies for the slow review.

I'd be inclined to rename the test something slightly more specific e.g. OC20NEB, since this name can't clash with any other test.

I'd also like to explore replacing a lot of the calculation with janus-core's NEB calculation, as it's a lot of duplication, and I think the only thing missing is a way of checking convergence/continuing, both of which should be minor additions.

Comment thread docs/source/user_guide/benchmarks/nebs.rst Outdated
Comment thread ml_peg/calcs/nebs/surface_reaction/data/desorption_ood_87_9841_0_111-1.xyz Outdated
Comment thread ml_peg/calcs/nebs/surface_reaction/calc_surface_reaction.py Outdated
Comment thread ml_peg/calcs/nebs/surface_reaction/calc_surface_reaction.py Outdated
Comment thread ml_peg/calcs/nebs/surface_reaction/calc_surface_reaction.py Outdated
Comment thread ml_peg/calcs/nebs/surface_reaction/calc_surface_reaction.py Outdated
Comment thread ml_peg/analysis/nebs/surface_reaction/metrics.yml Outdated
Comment thread ml_peg/app/nebs/surface_reaction/app_surface_reaction.py Outdated
@jungsdao
Copy link
Copy Markdown
Author

jungsdao commented Mar 8, 2026

Actually from the last drop-in meeting, there was discussion that we can modify this benchmark similar to bulk-crystal Phonon. So I can add more reactions from OC20NEB and make a scatter plot. (I'm not sure yet how many reactions are feasible yet.)

I'll try to incorporate janus interface as well.

@ElliottKasoar
Copy link
Copy Markdown
Collaborator

ElliottKasoar commented Mar 11, 2026

Actually from the last drop-in meeting, there was discussion that we can modify this benchmark similar to bulk-crystal Phonon. So I can add more reactions from OC20NEB and make a scatter plot. (I'm not sure yet how many reactions are feasible yet.)

I'll try to incorporate janus interface as well.

Great! Please let us know if there any issues.

I've recently proposed some changes to janus-core somewhat inspired by your use-case here: stfc/janus-core#685, which I hope could prove useful.

Also just to note you may need to rebase/merge the latest main, as there is a conflict due to us merging a different NEB PR.

Comment thread ml_peg/calcs/nebs/OC20NEB/calc_OC20NEB.py Outdated
Comment thread ml_peg/calcs/nebs/surface_reaction/calc_surface_reaction.py Outdated
Comment thread ml_peg/calcs/nebs/surface_reaction/calc_surface_reaction.py Outdated
Comment thread ml_peg/analysis/nebs/oc20neb/analyse_oc20neb.py Outdated
Comment thread ml_peg/app/nebs/surface_reaction/app_surface_reaction.py Outdated
Copy link
Copy Markdown
Collaborator

@ElliottKasoar ElliottKasoar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jungsdao, thanks again for all the work that's going into this!

I hope you don't mind that I've rebased and pushed a few suggested changes:

  • Separate model directories for the calc outputs - the Li diffusion NEB is a bad example as generally it makes combining data simpler if we keep things in their own directories
  • oc20neb -> OC20NEB for consistency with other tests e.g. OC157, and fixed the calculation file, which was still unchanged
  • Update the janus-core dependency and a couple of fixes around this, as a couple of the things you use from the NEB were only added recently
  • Added spin/charge defaults, as these are required by Orb-omol
  • Updated the analysis to use the new model directories, and (I think) fixed a couple of issues with paths that were wrong
  • Re-saved the DFT reference data, so we don't need to refer to the original source. This is some duplication, but it keeps things isolated

I also "removed" the docs in a commit. This was to be consistent with your code changes, but I'm not sure if you'd removed it unintentionally? It would definitely be good to add an updated form back in!

Please feel free to revert/ask about any of these changes. The only other question is whether you're happy with the current visualisation, or if it might be preferable to have some sort of structure visualisation, closer to the Li diffusion, as well as #325 and #326?

I'm not sure if we currently have any examples where we include the NEB of the model and reference together, but I think we probably could, and that would save us loading quite a large image, and allow us to link those to their actual structures. What do you think?

@jungsdao
Copy link
Copy Markdown
Author

Hi @ElliottKasoar, Thanks a lot for helping with improving the code. I'm not disagreeing on your changes and thanks for pointing out the issues I have missed.
Also I think in current S3bucket it has only three reactions but I shared more reactions via slack chat.

I think it would be nice if we can visualize geometry along the NEB trajectory like other nebs benchmarks, but I'm not sure how it can be done.

I'm not sure if we currently have any examples where we include the NEB of the model and reference together, but I think we probably could, and that would save us loading quite a large image, and allow us to link those to their actual structures. What do you think?

I'm not quite understood what you meant with this comment. Do you mean showing RPBE reference NEB profile with model NEB profile? And showing structure altogether?

@joehart2001
Copy link
Copy Markdown
Collaborator

Hi @ElliottKasoar, Thanks a lot for helping with improving the code. I'm not disagreeing on your changes and thanks for pointing out the issues I have missed. Also I think in current S3bucket it has only three reactions but I shared more reactions via slack chat.

I think it would be nice if we can visualize geometry along the NEB trajectory like other nebs benchmarks, but I'm not sure how it can be done.

I'm not sure if we currently have any examples where we include the NEB of the model and reference together, but I think we probably could, and that would save us loading quite a large image, and allow us to link those to their actual structures. What do you think?

I'm not quite understood what you meant with this comment. Do you mean showing RPBE reference NEB profile with model NEB profile? And showing structure altogether?

Hi @jungsdao, (@ElliottKasoar correct me if im misunderstanding), but i think what he means is we use the plotly decorators to show an interactive NEB plot with both the reference NEB profile and the MLIP NEB profile, instead of plotting these before and loading an image. I think the idea here could be to click on the NEB profile to visualise the structures at each step (as we do in the other NEB benchmark), but also be able to view the reference structures too, so one could compare the evolution of structures of the reference and MLIP. I think this would be pretty cool.

@jungsdao
Copy link
Copy Markdown
Author

jungsdao commented May 4, 2026

Sorry for belated reply. I understand your suggestion and it should be definitely cool to show structures together. But I don't know what would be suitable way to implement it. It would be cascade of interactive calling: 1) scatter 2) NEB profile 3) structure for each point in NEB profile. Do you have any suggestion how to make it work? There seems to be many functions in ml_peg/app/utils/build_callbacks.py but should I define a new one or do you think it can be done by using what's already there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new benchmark Proposals and suggestions for new benchmarks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NEB for surface reactions with OC20NEB Dataset

3 participants