Repository navigation
Conversation
Add `eos_flow` and `eos_subflow` to `quacc.recipes.common.eos`. They work with any calculator's relax and static jobs and fit the energy-volume data with emmet's `EOSDoc`. - `eos_flow` optionally relaxes the bulk cell (`pre_relax`), then runs `eos_subflow`. With `run_static`, statics follow the relaxations on the undeformed and volume-strained structures. - `eos_subflow` takes the result of a prior calculation, generates isotropically volume-strained copies of its structure, and runs a fixed-cell relaxation (`relax_cell=False`) and/or a static on each. The fit uses the static energies when available. - Add `quacc.atoms.deformation.make_volume_strains_from_bulk`, which scales the cell by (1 + volume_strain)^(1/3) with fractional coordinates fixed - Add a generic `EOSSchema` type hint - Raise a ValueError before launching any jobs if fewer than 4 energy-volume points would be fit
Collaborator
|
Can one of the admins verify this patch? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3552 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 103 104 +1
Lines 4548 4596 +48
=========================================
+ Hits 4548 4596 +48 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Thanks, @dgaines2! I will try to review this weekend. |
This branch has not been deployed
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
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.
Summary of Changes
This adds a calculator-agnostic equation of state workflow in
quacc.recipes.common.eos, modeled on atomate2'sCommonEosMaker. The structure is volume-strained isotropically, each strained cell gets a fixed-cell relaxation and optionally a static, and the energy-volume data are fit with emmet'sEOSDoc. That gives V0, E0, B0 and B1 for the Murnaghan, Birch, Birch-Murnaghan and Vinet models.eos_flow(atoms, relax_job, static_job, pre_relax=True, run_static=False, ...)optionally relaxes the bulk cell, then runseos_subflow. It has the same shape aselastic_tensor_flow.eos_subflow(undeformed_result, relax_job=None, static_job=None, ...)starts from an existing result. Each strained structure is relaxed at fixed cell (relax_cell=False) ifrelax_jobis given, then run withstatic_jobif given. The fit uses the static energies when available.make_volume_strains_from_bulkinquacc.atoms.deformationscales the cell by (1 + s)^(1/3) with fractional coordinates fixed. The defaults are ±1.5% to ±7.5% volume in 10 steps.EOSSchemais a generic return type, so the deformed results keep the schema of the jobs passed in (e.g.VaspSchema).ValueErroris raised before any jobs launch if fewer than 4 points would be fit.Questions for maintainers
-0.06), the same as ASE'scalculate_eoseps, not scale factors (0.94). Our range (±7.5% volume) is narrower than atomate2's (±5% linear, about ±15% volume). Any preference?run_staticdefault: it'sFalse, matching elastic. For VASP,Trueis better because the relax's final energy is less accurate; for EMT and MLIPs the static repeats the last relax step.EOSSchema: this is the first generic TypedDict intypes.py. It follows Fix type annotations across recipes, runners, and schemas #3535's approach for common helpers likecommon/slabs.py.tests/typecheck/api.pycovers it.