ml-evs / matador

⚗️ matador is an aggregator, manipulator and runner of first-principles calculations, written with a bent towards battery 🔋 electrode materials.
https://matador-db.readthedocs.io
MIT License
29 stars 19 forks source link

Scrape magres EFG into `Site` objects #308

Closed harpaf13 closed 1 year ago

harpaf13 commented 1 year ago

Make the EFG tensor readable by crystal_site objects such that one can do:

magres, failures = magres2dict('filename.magres',as_model=True)
for atom in magres:
    print(atom['electric_field_gradient'])

In addition added a unittest to test_file_io.py to compare the electric_field_gradients.

codecov[bot] commented 1 year ago

Codecov Report

Base: 73.03% // Head: 73.03% // No change to project coverage :thumbsup:

Coverage data is based on head (93407ff) compared to base (aeb2eb9). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #308 +/- ## ======================================= Coverage 73.03% 73.03% ======================================= Files 97 97 Lines 13263 13263 ======================================= Hits 9686 9686 Misses 3577 3577 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `73.03% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Evans#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/ml-evs/matador/pull/308?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Evans) | Coverage Δ | | |---|---|---| | [matador/crystal/crystal\_site.py](https://codecov.io/gh/ml-evs/matador/pull/308/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Evans#diff-bWF0YWRvci9jcnlzdGFsL2NyeXN0YWxfc2l0ZS5weQ==) | `81.25% <ø> (ø)` | | | [matador/scrapers/magres\_scrapers.py](https://codecov.io/gh/ml-evs/matador/pull/308/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Evans#diff-bWF0YWRvci9zY3JhcGVycy9tYWdyZXNfc2NyYXBlcnMucHk=) | `95.19% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Evans). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Evans)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.