ORCA parser & MolecularOrbitals as HDF5Dataset#182
Conversation
Coverage Report for CI Build 27400558775Coverage increased (+1.3%) to 75.474%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR adds an initial ORCA output parser integration to the NOMAD simulation parser plugin, including schema-package mappings, a text parser for ORCA .out files, and tests + test data to validate parsed model systems, methods (DFT/MP2/CC/CAS), and molecular orbitals (including HDF5-backed coefficients).
Changes:
- Introduces a new ORCA parser (
OrcaParser+OutReader/OutParser) capable of extracting key simulation, method, and molecular-orbital data. - Adds an ORCA schema package with mapping annotations and registers both parser + schema package as plugin entry points.
- Adds ORCA test fixtures/data and new tests covering model systems, DFT settings, orbital energies/occupations, and MO coefficient handling.
Reviewed changes
Copilot reviewed 8 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/parsers/test_orca_parser.py | Adds unit tests for ORCA parsing, including HDF5-backed MO coefficients. |
| tests/data/orca/RI_MP2_water.out | Adds ORCA MP2 output fixture used by parsing tests. |
| src/nomad_simulation_parsers/schema_packages/orca.py | Introduces ORCA schema package mapping annotations (simulation, methods, outputs, molecular orbitals). |
| src/nomad_simulation_parsers/schema_packages/init.py | Registers the ORCA schema package entry point. |
| src/nomad_simulation_parsers/parsers/orca/text_parser.py | Adds the ORCA text extraction layer (quantities/regex blocks). |
| src/nomad_simulation_parsers/parsers/orca/parser.py | Adds ORCA mapping parser + post-processing/enrichment for methods, basis sets, and molecular orbitals. |
| src/nomad_simulation_parsers/parsers/init.py | Registers the ORCA parser entry point. |
| pyproject.toml | Exposes the ORCA parser and schema package via plugin entry points. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MolecularOrbitals as HDF5DatasetMolecularOrbitals as HDF5Dataset
| def _token_list_to_mo_coefficients(tokens: list[str]) -> np.ndarray | None: | ||
| coefficients_by_mo: dict[int, list[float]] = {} | ||
| index = 0 | ||
| while index < len(tokens): |
There was a problem hiding this comment.
because the MO coefficient blocks have variable column and row counts. The next block start can only be determined after consuming the current block, so the loop needs to update the token index dynamically. I added a comment to make this explicit
|
As promised, I put up some simplifications in #185 |
* Avoid direct section creation * Add nomad file parser * Linting fix * Linting * Remove unintended commit * Linting fix
Summary
Initialize the ORCA output parser and map representative ORCA electronic-structure calculations to the schema
Implemented
Parse program metadata
Parse
ModelSystemParse electronic-structure methods
Parse basis sets
Parse
MolecularOrbitalsBuild representative outputs and workflows
Testing
Added representative ORCA outputs covering:
Added integration tests for: