Skip to content

update: read homo/lumo from converged values - #163

Merged
VsevolodX merged 5 commits into
mainfrom
feature/SOF-7959
Aug 7, 2026
Merged

update: read homo/lumo from converged values#163
VsevolodX merged 5 commits into
mainfrom
feature/SOF-7959

Conversation

@VsevolodX

Copy link
Copy Markdown
Member

No description provided.

float | None
"""
return self._general_output_parser(text, **settings.REGEX["homo_energy"])
return self._frontier_orbital_energy(text, **settings.FRONTIER_ORBITAL_ENERGY["homo_energy"])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have an intermediate quantity - eigenvalues at vectors similar to eigenvalues at k-points

VsevolodX and others added 2 commits August 3, 2026 10:51
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):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in utils at the top level or even "parsers" package/regex

@VsevolodX
VsevolodX merged commit 64a1fa7 into main Aug 7, 2026
5 checks passed
@VsevolodX
VsevolodX deleted the feature/SOF-7959 branch August 7, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants