Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LobsterMatrices parser to lobster.io.outputs #3361

Merged

Conversation

naik-aakash
Copy link
Contributor

@naik-aakash naik-aakash commented Sep 29, 2023

New

  1. Add a parser to read matrices written by Lobster like hamiltonMatrices.lobster, coefficientMatrices.lobster to outputs module

Todo

  • Add tests and associated test files

@naik-aakash naik-aakash changed the title [WIP] hamiltonMatrices.lobster parser to lobster.io.outputs [WIP] Add LobsterMatrices parser to lobster.io.outputs Oct 13, 2023
@naik-aakash naik-aakash changed the title [WIP] Add LobsterMatrices parser to lobster.io.outputs Add LobsterMatrices parser to lobster.io.outputs Oct 14, 2023
@naik-aakash
Copy link
Contributor Author

Hi @janosh, this PR is ready to be merged. I would be happy to address if any specific changes are desired before merging.

Comment on lines 2474 to 2478
assert self.hamilton_matrices.average_onsite_energies == {
"Na1_3s": 0.5885535399999997,
"Na1_2p_y": -25.727196460000002,
"Na1_2p_z": -25.727196460000002,
"Na1_2p_x": -25.727196460000002,
Copy link
Member

Choose a reason for hiding this comment

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

Use pytest.approx when testing dicts containing floats. Otherwise the tests can be brittle and fail unexpectedly on different OS/Python versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks will keep this in mind 😃

@janosh janosh enabled auto-merge (squash) October 14, 2023 14:07
@janosh janosh added enhancement A new feature or improvement to an existing one io Input/output functionality lobster Lobster package (Local Orbital Basis Suite Towards Electronic-Structure Reconstruction) labels Oct 14, 2023
@janosh janosh changed the title Add LobsterMatrices parser to lobster.io.outputs Add LobsterMatrices parser to lobster.io.outputs Oct 14, 2023
@janosh janosh merged commit 6340c4b into materialsproject:master Oct 14, 2023
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or improvement to an existing one io Input/output functionality lobster Lobster package (Local Orbital Basis Suite Towards Electronic-Structure Reconstruction)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants