Repository navigation
Add cal_bandgap task and update related documentation and tests - #57
Merged
Merged
Conversation
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.
This pull request introduces support for a new standalone electronic band-gap calculation task (
cal_bandgap) to the codebase. It adds thecal_bandgapoption throughout the documentation, input schema, and main entrypoint, and implements comprehensive validation for its input parameters. The changes also ensure that only supported tasks are accepted, and improve documentation for clarity.New Band-Gap Task Support
cal_bandgaptask option to the documentation (docs/index.rst,docs/input_params/run_options.rst) and to the input schema (dpnegf/utils/argcheck.py), including detailed descriptions and option schema. [1] [2] [3] [4] [5]cal_bandgaptask in the mainrunentrypoint (dpnegf/entrypoints/run.py), including dynamic import and execution of the band-gap calculator, and proper handling of its options and results. [1] [2] [3]Validation and Schema Improvements
validate_cal_bandgap_optionsfunction to check cross-field constraints and apply defaults for allcal_bandgapoptions, ensuring robust error handling and user feedback.normalize_runfunction to invoke band-gap validation when the task iscal_bandgap.Supported systems
cal_bandgapis limited to finite structures (HOMO–LUMO gap) and one-dimensional periodic structures (a single periodic axis, as in this example). Two- or three-dimensional periodic boundary conditions are rejected with an explicit error; arbitrary 2D/3D k-space search is out of scope for this first version. Magnetic/SOC models, odd-electron counts and GPU solving are not supported yet.Documentation and Usability Enhancements
structureandtaskoptions. [1] [2]Task Handling and Code Cleanliness
These changes collectively enable users to compute finite HOMO-LUMO gaps or one-dimensional band gaps, with robust input validation and clear documentation.