update: read homo/lumo from converged values - #163
Merged
Conversation
| float | None | ||
| """ | ||
| return self._general_output_parser(text, **settings.REGEX["homo_energy"]) | ||
| return self._frontier_orbital_energy(text, **settings.FRONTIER_ORBITAL_ENERGY["homo_energy"]) |
Member
There was a problem hiding this comment.
This is overly complex for what it is
| def __init__(self, work_dir): | ||
| super(NwchemTXTParser, self).__init__(work_dir) | ||
|
|
||
| def _converged_orbital_block(self, text): |
Member
There was a problem hiding this comment.
We should have an intermediate quantity - eigenvalues at vectors similar to eigenvalues at k-points
Introduce eigenvalues_at_vectors as an intermediate quantity, the molecular analogue of eigenvalues_at_kpoints: declared in ElectronicDataMixin, parsed from the converged orbital analysis section, and converted to eV once in NwchemParser. HOMO and LUMO become plain max/min derivations over it. Drops the FRONTIER_ORBITAL_ENERGY settings dict, which held max/min callables and splatted them as kwargs into a private helper. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Spin-polarized (ODFT) runs print "DFT Final Alpha/Beta Molecular Orbital Analysis" instead of the unlabeled closed-shell section, so the previous literal match found nothing and HOMO/LUMO came back empty. Match the section header with the spin label optional and keep the last block of each channel, which requires bounding a block at the next header rather than at EOF. HOMO/LUMO need no change: ODFT occupations are 1.0 per channel, so max/min over the combined list stays correct. Covered by unit tests, as both integration fixtures are closed shell. The Alpha/Beta header spellings still want confirming against a real open-shell run; if they are wrong the result is empty eigenvalues, as before. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| from express.parsers.formats.txt import BaseTXTParser | ||
|
|
||
|
|
||
| def _fortran_float(value): |
Member
There was a problem hiding this comment.
This should be in utils at the top level or even "parsers" package/regex
timurbazhirov
approved these changes
Aug 6, 2026
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.
No description provided.