Skip to content

Volume scans going to very high densities#421

Open
JPDarby wants to merge 20 commits intoddmms:mainfrom
JPDarby:compression_simple_plotting
Open

Volume scans going to very high densities#421
JPDarby wants to merge 20 commits intoddmms:mainfrom
JPDarby:compression_simple_plotting

Conversation

@JPDarby
Copy link
Copy Markdown

@JPDarby JPDarby commented Mar 10, 2026

Pre-review checklist for PR author

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

Summary

This is similar to the diatomic test for the two-body but uses 3D crystals to probe higher body terms. For single element structures, 5 prototypes are formed (fcc, sc, bcc, hcp and diamond). A further 5 structures are randomly generated, subject to sensible constraints, using the pyxtal package. Multi-element terms are probed by picking 10 random binary and 10 random ternary compositions, then forming 10 random structures for each composition. The structures are then isotropically scaled across a wide range, covering extremely high and low densities. The energy and pressure are computed for each structure and these are used to form similar metrics to the diatomic test e.g. Pressure sign flips etc.

Linked issue

Resolves #308

Progress

  • Calculations
  • Analysis
  • Application
  • Documentation

Testing

Tested all models below using a subset of the elements. The

  • 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

Discussion Points

  • I've included the code to generate all structures in calc_compression.py. They are then generated by running this file directly. This could be removed but including the code here allows the benchmark to be tweaked more easily in the future.
  • Currently showing one plot at a time (due to multiple curves on each plot) rather than the periodic table style used to show all dimer curves. This could be adjusted.
  • Some materials should have more than one minimum in the (isotropic scaling) energy vs volume curve. See this preprint on Ce. Given this, some of the metrics, e.g. number of pressure flips, are "usually" useful but break down in some rare cases. The "Holes" metric does not suffer from this issue and identifies many-body holes at close approach in multiple models.

@joehart2001 joehart2001 added the new benchmark Proposals and suggestions for new benchmarks label Mar 11, 2026
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, @JPDarby!

I need to go through everything much more carefully, but generally it's looking great!

I've left some (largely trivial) suggestions for now

Comment thread docs/source/user_guide/benchmarks/physicality.rst Outdated
Comment thread ml_peg/analysis/physicality/compression/metrics.yml Outdated
Comment thread ml_peg/calcs/physicality/compression/calc_compression.py Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If this is very slow even on a GPU, you could consider some sort of parameterisation, similar to #388, to make it easier to parallelise.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

So this allows different models to be run in parallel? The structure generation (now moved to run_compression) uses pyxtal and I can't guarantee that will be deterministic and produce the same random structures each time. Given this, I think it's best to avoid this for now. If the test really is too slow we could move back to generating the structures once and for all and then parametrize.

Comment thread ml_peg/calcs/physicality/compression/calc_compression.py
Comment thread ml_peg/calcs/physicality/compression/calc_compression.py Outdated
Comment thread ml_peg/calcs/physicality/compression/calc_compression.py
JPDarby and others added 5 commits April 30, 2026 12:22
for sphinx

Co-authored-by: Elliott Kasoar <45317199+ElliottKasoar@users.noreply.github.com>
remove unused energy inflection from metrics.yml

Co-authored-by: Elliott Kasoar <45317199+ElliottKasoar@users.noreply.github.com>
marked as very_slow

Co-authored-by: Elliott Kasoar <45317199+ElliottKasoar@users.noreply.github.com>
@ElliottKasoar
Copy link
Copy Markdown
Collaborator

Also note there are a couple of conflicting files to resolve, both hopefully pretty straightforward since it doesn't involve the code.

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.

Volume scans going to very high densities

3 participants