High pressure crystals structure relaxations#340
High pressure crystals structure relaxations#340JonathanSchmidt1 wants to merge 51 commits intoddmms:mainfrom
Conversation
…l-peg into high-pressure
Analysis:
- Replace parity plots with density scatter via plot_density_scatter decorator
- Add high_pressure_stats fixture pooling all pressures per model
- Use build_density_inputs for volume/energy density plots
- Rename output files to figure_volume_density.json / figure_energy_density.json
Calc:
- Write relaxed structures to relaxed_{pressure_label}.xyz per model/pressure
- Annotate relaxed atoms with mat_id and pressure_gpa in atoms.info
App:
- Update plot filenames to match new density plot filenames
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l-peg into high-pressure
Co-authored-by: Elliott Kasoar <45317199+ElliottKasoar@users.noreply.github.com>
…utils/decorators.py Co-authored-by: Elliott Kasoar <45317199+ElliottKasoar@users.noreply.github.com>
|
Hey @JonathanSchmidt1, thanks for the PR, its looking in great shape! Some points:
Sorry for the delay in getting back to you |
Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com>
Co-authored-by: Elliott Kasoar <45317199+ElliottKasoar@users.noreply.github.com>
Co-authored-by: Domantas Kuryla <dk584@icepc16> Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com> Co-authored-by: Joseph Hart <92541539+joehart2001@users.noreply.github.com>
Co-authored-by: Elliott Kasoar <45317199+ElliottKasoar@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com>
Co-authored-by: Elliott Kasoar <45317199+ElliottKasoar@users.noreply.github.com>
Co-authored-by: Elliott Kasoar <45317199+ElliottKasoar@users.noreply.github.com>
Co-authored-by: joehart2001 <jh2536@cam.ac.uk>
|
|
||
| return relaxed, converged, enthalpy / n_atoms | ||
|
|
||
|
|
There was a problem hiding this comment.
| @pytest.mark.very_slow |
|
|
||
| vol_trajs = collect_traj_assets( | ||
| data_path=DATA_PATH, | ||
| assets_prefix="assets/bulk_crystal/high_pressure_relaxation", |
There was a problem hiding this comment.
| assets_prefix="assets/bulk_crystal/high_pressure_relaxation", | |
| assets_prefix="/assets/bulk_crystal/high_pressure_relaxation", |
| ) | ||
| energy_trajs = collect_traj_assets( | ||
| data_path=DATA_PATH, | ||
| assets_prefix="assets/bulk_crystal/high_pressure_relaxation", |
There was a problem hiding this comment.
| assets_prefix="assets/bulk_crystal/high_pressure_relaxation", | |
| assets_prefix="/assets/bulk_crystal/high_pressure_relaxation", |
| fmax=fmax, | ||
| steps=max_steps, | ||
| filter_kwargs={"scalar_pressure": pressure_gpa}, | ||
| calc_kwargs={"default_dtype": "float64"}, |
There was a problem hiding this comment.
@ElliottKasoar does this work in our case and is it robust? I would reccomend using model.default_dtype = "float64" before calling get calculator, like done here
There was a problem hiding this comment.
Yes, unfortunately, generally this needs to be defined before the calculator is instantiated, and default_dtype is also not guaranteed to be the correct kwarg for a given calculator, so yes that linked implementation is safer.
(model.default_dtype sets our custom attribute that knows how to set it for the models we currently support, whereas janus-core's calc_kwargs would be passed straight to the relevant ASE calculator at the time it's set up)
|
Thanks for addressing the comments, the density plots look great! Just a few small things.
Also, the current density plot shows one density plot for all the pressures. Would you like to keep it this way or have one for each pressure? |
Pre-review checklist for PR author
PR authors must check the boxes below when creating the PR.
Summary
Adds a new high-pressure relaxation benchmark that evaluates MLIP performance in predicting equilibrium structures under hydrostatic pressure.
0, 25, 50, 75, 100, 125, 150 GPa
Metrics evaluated (at each pressure)
H = E + PVMethodology
janus-core'sGeomOptASE FixSymmetryconstraint used to preserve crystallographic symmetry (matching DFT protocol)FrechetCellFilterwith specified scalar pressureLinked issue
Resolves #338
Progress
Testing
Tested on the following models:
mace-mpa-0orb-v3-consv-inf-mpaNew decorators / callbacks
No new decorators or callbacks required.
Note the pull request right now includes a new model
orb-v3-consv-inf-mpabecause I wanted to compare to the original paper but this could be removed.
I am looking for some feedback on the good/bad values for the metrics