Skip to content

OBE printing, post-process h5 I/O, and the partial-projector rename - #15

Open
harrisonlabollita wants to merge 4 commits into
TRIQS:unstablefrom
harrisonlabollita:pr/obe-printing-h5
Open

OBE printing, post-process h5 I/O, and the partial-projector rename#15
harrisonlabollita wants to merge 4 commits into
TRIQS:unstablefrom
harrisonlabollita:pr/obe-printing-h5

Conversation

@harrisonlabollita

Copy link
Copy Markdown
Collaborator

Summary

Three small independent improvements to the obe / post-processing interface: a
terminology rename that brings the code in line with the documentation, operator<< and
HDF5 I/O for structs that were missing them, and one more c++ function exposed to
Python.

This provides an incremental diff:
pr/checkpoint-summarize...pr/obe-printing-h5

Changes

1. theta projector → partial projector (da5248b)

The documentation call it a partial projector, while the code called it theta. To be consistent between the two, I've renamed throughout loaders.{hpp,cpp} and postprocess.{hpp,cpp}. This should improve readability and clarity.

Public Python API change:
one_body_elements_with_theta_projectorsone_body_elements_with_partial_projectors
(python/triqs_modest/obe.toml). Needs a ChangeLog.md entry.

Additional changes in this PR:

  • h5_read / h5_write for spectral_function_kw and spectral_function_w
    (h5.cpp) — these results were previously not serializable.
  • operator<< for the post-process structs (printing.cpp).
  • Rename propagated through load_data_test.cpp and mpi_test.cpp.

2. operator<< for the remaining OBE structs (f318fba)

Adds printing for one_body_elements_tb and one_body_elements_gw, so every OBE
variant is now printable. printing.cpp picks up an obe_tb.hpp include.

3. Expose rotate_local_basis (05af10e)

Added to the obe c2py spec so the local-basis rotation that the post-processing
routines apply internally is reachable from Python. Documented in
doc/reference/python/one_body_elements.rst.

Testing

Existing tests only; load_data_test, mpi_test and obe_tb_test are updated
for the rename and pass.

Rename the theta projector to "partial projector" throughout the loaders and
post-processing entry points, matching the terminology used in the docs.

- add h5_read / h5_write for spectral_function_kw and spectral_function_w
- add printing for the post-process structs
Add rotate_local_basis to the obe c2py spec so the local-basis rotation used by
the post-processing routines is reachable from Python.
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.

1 participant