Repository navigation
Conversation
|
Thank you for working on this @sblisesivdin! Some initial comments on this PR:
and
if calc.calculation_required(calc.atoms, ["energy"]): get_calculation_outputs has the same pre-existing behaviour, so a shared helper would fix both. [get_monkhorst_pack_size_and_offset(calc.get_bz_k_points())[0].tolist()]
|
442df07 to
c85a5bd
Compare
|
Note that I rebased to the latest |
|
You're right, and sorry for overlooking your earlier guidance on mocked tests in #149. I've replaced the fake calculators with real GPAW calculations and the shipped restart files. The tests now cover the documented example layout and the failures you identified. Thanks for catching this again. |
…ses` and note (don't need to worry about charged competing phase calculations)
…han full GPAW init and loading
…e GPAW competing-phase branch Both sides branched from c85a5bd. Kept from this branch: the light `read_gpw`/ULM reader, `_open_gpaw_restart` (stored-results check for all four `.gpw` readers), the charge check removal, and the example's primitive-cell host, Niggli-reduced phases and 400 eV / k-density 4 settings. Taken from d3bc935: GPAW `check_entry_compatibility` (k-point/grid meshes excluded), the `find_calc_output` backend hook for analyzer file selection, competing-phase wording in the multiple-files warning, k-point meshes from `get_bz_k_points()`, `converged_electronic`, no duplicated `entry.parameters`, no unused `subfolder` argument, the example docstrings and the real-calculation tests (phase fixture, analyzer, file priority, settings mismatch, k-point mesh and example inputs). Changed relative to d3bc935: - `find_calc_output` errors (`ValueError` for ambiguous filenames, as well as `FileNotFoundError`) fall back to the generic file pick with a warning, rather than failing the whole analysis. - The list-mode docstring uses the wording already on IO_refactor (57faf9b), to merge cleanly there. - Dropped `_read_gpaw_calculation` (superseded by `_open_gpaw_restart`), the charge check test, and `test_gpaw_restart_without_energy` (covered by `test_restart_without_results_raises`). - `pytest.warns` -> `_run_func_and_capture_stdout_warnings`; lazy `ase` k-point import; doped-style docstrings; `find_calc_output` documented in Adding_Calculators.rst. - Remaining review nits: doped-style Args layouts and the singular/plural protocol-name comment.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This PR adds GPAW competing-phase output parsing for chemical-potential analysis directly from restart files:
phase_analyzer = CompetingPhasesAnalyzer(
"MgO",
entries="CompetingPhases_GPAW",
calculator="gpaw",
)
The MgO example includes the host and elemental references in this directory and uses the analyzer in its analysis script.
The parser reads structures, stored energies and metadata without loading defect electrostatic potentials or orbital data. Charged calculations and restarts without stored energy are rejected, preventing unintended SCF calculations. The stored-energy guard also applies to the general GPAW output reader.
File discovery follows GPAW filename priorities and excludes backups. Entries record actual k-point meshes, including density-based sampling. Compatibility checks warn about inconsistent energy-affecting settings while allowing different k-point and real-space meshes.
Validation with GPAW 26.7:
Ionic convergence cannot be established from a restart alone. Band gaps and general GPAW competing-phase input generation remain outside this PR. The full test suite was not run.
Related to #156; this does not close the full tracking issue.