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

WIP: Fix consideration of translation symmetry for some (extremely rare) edge cases in LobsterEnv #4148

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7e5b838
partially test translations in lobsterenv
JaGeo Oct 30, 2024
0778527
pre-commit auto-fixes
pre-commit-ci[bot] Oct 30, 2024
44047b4
Merge branch 'materialsproject:master' into fix_icohp
naik-aakash Dec 3, 2024
8cc5c8f
Merge branch 'master' into fix_icohp
JaGeo Jan 14, 2025
0d5ff55
Merge branch 'master' of github.com:JaGeo/pymatgen into fix_icohp
JaGeo Jan 24, 2025
e7b558a
merge current mastr
JaGeo Jan 24, 2025
8a8003e
pre-commit auto-fixes
pre-commit-ci[bot] Jan 24, 2025
a922572
Merge branch 'materialsproject:master' into fix_icohp
naik-aakash Feb 6, 2025
aa1fda5
add new test data
JaGeo Feb 6, 2025
bc1aa7b
merge conflict
JaGeo Feb 6, 2025
9ac8003
pre-commit auto-fixes
pre-commit-ci[bot] Feb 6, 2025
527e675
fix some more
JaGeo Feb 6, 2025
8af3352
Merge branch 'fix_icohp' of github.com:JaGeo/pymatgen into fix_icohp
JaGeo Feb 6, 2025
df3589a
pre-commit auto-fixes
pre-commit-ci[bot] Feb 6, 2025
5520121
fix nearly everything except for two inter neighbor things
JaGeo Feb 6, 2025
5921ed8
Merge branch 'fix_icohp' of github.com:JaGeo/pymatgen into fix_icohp
JaGeo Feb 6, 2025
8c27943
pre-commit auto-fixes
pre-commit-ci[bot] Feb 6, 2025
e908e47
add more fixes
JaGeo Feb 7, 2025
17037c2
add more fixes
JaGeo Feb 7, 2025
5436d40
pre-commit auto-fixes
pre-commit-ci[bot] Feb 7, 2025
cfdd0ea
fix the just introduced bug and add a warning for very rare cases tha…
JaGeo Feb 7, 2025
bf1b7fd
fix the just introduced bug and add a warning for very rare cases tha…
JaGeo Feb 7, 2025
47aca41
pre-commit auto-fixes
pre-commit-ci[bot] Feb 7, 2025
53a2a67
fix next test by adapting cutoff
JaGeo Feb 7, 2025
9154b3c
Merge branch 'fix_icohp' of github.com:JaGeo/pymatgen into fix_icohp
JaGeo Feb 7, 2025
413ed2f
pre-commit auto-fixes
pre-commit-ci[bot] Feb 7, 2025
c474ff8
fix some bugs
JaGeo Feb 7, 2025
43ea1fc
Merge branch 'fix_icohp' of github.com:JaGeo/pymatgen into fix_icohp
JaGeo Feb 7, 2025
ebe4bc1
pre-commit auto-fixes
pre-commit-ci[bot] Feb 7, 2025
0acbb0c
fix some bugs
JaGeo Feb 7, 2025
5646066
remove translation correction
JaGeo Feb 7, 2025
d195474
Merge branch 'materialsproject:master' into fix_icohp
naik-aakash Feb 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/pymatgen/electronic_structure/cohp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,17 @@ def is_spin_polarized(self) -> bool:
"""
return self._is_spin_polarized

@property
def translation(self) -> list[int, int, int]:
"""
Returns the translation vector with respect to the origin cell
as defined in LOBSTER.

Returns:
list[int, int, int]
"""
return self._translation

def icohpvalue(self, spin: Spin = Spin.up) -> float:
"""
Args:
Expand Down
127 changes: 100 additions & 27 deletions src/pymatgen/io/lobster/lobsterenv.py

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tests/electronic_structure/test_cohp.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,8 @@ def setUp(self):
self.cohp_lobster_forb = CompleteCohp.from_file("lobster", filename=filepath, structure_file=structure)

# spinpolarized case:
filepath = f"{TEST_DIR}/environments/COHPCAR.lobster.mp-190.gz"
structure = f"{TEST_DIR}/environments/POSCAR.mp_190.gz"
filepath = f"{TEST_DIR}/environments/COHPCAR.lobster.mp-190_2.gz"
structure = f"{TEST_DIR}/environments/POSCAR.mp-190_2.gz"
self.cohp_lobster_spin_polarized = CompleteCohp.from_file(
"lobster", filename=filepath, structure_file=structure
)
Expand Down Expand Up @@ -1273,8 +1273,8 @@ def setUp(self):
structure = f"{TEST_DIR}/POSCAR.orbitalwise"
self.cohp_orb = CompleteCohp.from_file("lobster", filename=filepath, structure_file=structure)

filepath = f"{TEST_DIR}/environments/COHPCAR.lobster.mp-190.gz"
structure = f"{TEST_DIR}/environments/POSCAR.mp_190.gz"
filepath = f"{TEST_DIR}/environments/COHPCAR.lobster.mp-190_2.gz"
structure = f"{TEST_DIR}/environments/POSCAR.mp-190_2.gz"
self.cohp_lobster_spin_polarized = CompleteCohp.from_file(
"lobster", filename=filepath, structure_file=structure
)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
275 changes: 143 additions & 132 deletions tests/io/lobster/test_lobsterenv.py

Large diffs are not rendered by default.

Loading