Add superacid HF/SbF5 density benchmark Ref #379#410
Add superacid HF/SbF5 density benchmark Ref #379#410mattiaperr wants to merge 1 commit intoddmms:mainfrom
Conversation
ElliottKasoar
left a comment
There was a problem hiding this comment.
Thanks for this, @mattiaperr, this looks great so far! I've left a few minor comments.
If you can share the input data, it would be great to start testing this!
| @@ -0,0 +1,2 @@ | |||
| title: Superacids | |||
| description: Properties of HF/SbF5 superacid systems | |||
There was a problem hiding this comment.
This is probably too specific as an entire category description. Do you think superacids makes sense as an entire category, and if so, could this be made slightly more general?
| bad: 10.0 | ||
| unit: "%" | ||
| tooltip: "Mean Absolute Percentage Error in liquid density vs experiment" | ||
| level_of_theory: Experiment |
There was a problem hiding this comment.
| level_of_theory: Experiment | |
| level_of_theory: Experimental |
This is not documented yet, sorry. We need specific key words for this to be interpreted correctly
| outputs/ | ||
| *.xyz | ||
| *.dat | ||
| *.log | ||
| __pycache__/ |
There was a problem hiding this comment.
Are these not already ignored by the top-level .gitignore? I haven't seen any of these sorts of files in my git status.
If any of these are necessary, I think they're general enough that we can add them to general one anyway.
|
|
||
| MODELS = load_models(current_models) | ||
|
|
||
| DATA_PATH = Path(__file__).parent / "data" |
There was a problem hiding this comment.
| DATA_PATH = Path(__file__).parent / "data" |
Unused (and probably not wanted, as we tend to download data now)?
| # Unit conversion | ||
| EV_TO_KJ_PER_MOL = units.mol / units.kJ | ||
|
|
||
|
|
There was a problem hiding this comment.
| # Unit conversion | |
| EV_TO_KJ_PER_MOL = units.mol / units.kJ |
Unused?
| hf_sbf5_density_dir = ( | ||
| download_s3_data( | ||
| key="inputs/superacids/HF_SbF5_density/HF_SbF5_density.zip", | ||
| filename="HF_SbF5_density.zip", |
There was a problem hiding this comment.
Can you share this file e.g. on Slack/email so I can upload this please?
| opt = FIRE(atoms, logfile=str(write_dir / "opt.log")) | ||
| opt.run(fmax=0.05, steps=N_MIN_STEPS) | ||
| write(write_dir / "minimised.xyz", atoms) | ||
|
|
||
| MaxwellBoltzmannDistribution(atoms, temperature_K=TEMPERATURE_K) | ||
| Stationary(atoms) | ||
| ZeroRotation(atoms) | ||
|
|
||
| dyn = IsotropicMTKNPT( | ||
| atoms=atoms, | ||
| timestep=DT, | ||
| temperature_K=TEMPERATURE_K, | ||
| pressure_au=PRESSURE_AU, | ||
| tdamp=TDAMP, | ||
| pdamp=PDAMP, | ||
| ) |
There was a problem hiding this comment.
You don't have to change this, but are you aware than janus-core will do a lot of this for you automatically, e.g. the minimisation, setting the initial velocity distribution, saving various stats e.g. the volume etc?
| from ml_peg.analysis.utils.utils import build_d3_name_map, load_metrics_config | ||
| from ml_peg.app import APP_ROOT | ||
| from ml_peg.calcs import CALCS_ROOT | ||
| from ml_peg.models.get_models import get_model_names | ||
| from ml_peg.models.models import current_models | ||
|
|
||
| MODELS = get_model_names(current_models) | ||
| D3_MODEL_NAMES = build_d3_name_map(MODELS) |
There was a problem hiding this comment.
| from ml_peg.analysis.utils.utils import build_d3_name_map, load_metrics_config | |
| from ml_peg.app import APP_ROOT | |
| from ml_peg.calcs import CALCS_ROOT | |
| from ml_peg.models.get_models import get_model_names | |
| from ml_peg.models.models import current_models | |
| MODELS = get_model_names(current_models) | |
| D3_MODEL_NAMES = build_d3_name_map(MODELS) | |
| from ml_peg.analysis.utils.utils import build_dispersion_name_map, load_metrics_config | |
| from ml_peg.app import APP_ROOT | |
| from ml_peg.calcs import CALCS_ROOT | |
| from ml_peg.models.get_models import get_model_names | |
| from ml_peg.models.models import current_models | |
| MODELS = get_model_names(current_models) | |
| DISPERSION_NAME_MAP = build_dispersion_name_map(MODELS) |
We recently renamed this sightly. You may need to rebase for this to work pre-merging.
| filename=OUT_PATH / "hf_sbf5_density_metrics_table.json", | ||
| metric_tooltips=DEFAULT_TOOLTIPS, | ||
| thresholds=DEFAULT_THRESHOLDS, | ||
| mlip_name_map=D3_MODEL_NAMES, |
There was a problem hiding this comment.
| mlip_name_map=D3_MODEL_NAMES, | |
| mlip_name_map=DISPERSION_NAME_MAP, |
Following above
|
|
||
|
|
||
| # amu to g conversion factor | ||
| AMU_TO_G = 1.66053906660e-24 # g per amu |
There was a problem hiding this comment.
I think you can get this from ase.units e.g. 1000 / units.kg to reduce hard-coding
Pre-review checklist for PR author
PR author must check the checkboxes below when creating the PR.
Summary
New benchmark category "Superacids" with an HF/SbF5 liquid density test. NPT simulations at 288.6 K / 1 atm for three compositions (pure HF, 10% SbF5, pure SbF5). Metric is MAPE of predicted density vs experimental values.
Linked issue
Resolves #379
Progress
todo:
Testing
Tested on: mace-mp-0a, mace-mp-0b3, mace-mpa-0, mace-omat-0, mace-matpes-r2scan
New decorators/callbacks
No new decorators or callbacks required. Uses existing
plot_parity,build_table, andplot_from_table_column.