Skip to content

Commit bcd9b99

Browse files
authored
Merge pull request #342 from naik-aakash/update_pymatgen
pin min pymatgen version > lobster 5.0/5.1 support
2 parents da43635 + 39c17aa commit bcd9b99

File tree

8 files changed

+23
-1
lines changed

8 files changed

+23
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ classifiers = [
2929
]
3030
requires-python = ">=3.10,<3.13"
3131
dependencies = [
32-
"pymatgen>=2024.9.10",
32+
"pymatgen>=2024.10.22",
3333
"numpy<3.0.0",
3434
"typing",
3535
]

tests/cohp/test_analyze.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,11 @@ def test_icohp_sum_cdf(self, analyse_cdf_comp_range):
888888
abs=0.10,
889889
)
890890

891+
def test_analyse_aln_v51(self, analyse_aln_v51):
892+
# Test if analyse module works with version 5.1 of lobster
893+
assert analyse_aln_v51.condensed_bonding_analysis["formula"] == "AlN"
894+
assert analyse_aln_v51.condensed_bonding_analysis["type_charges"] == "Mulliken"
895+
891896
def test_exception(self):
892897
with pytest.raises(ValueError): # noqa: PT011
893898
self.analyse_batao2n1 = Analysis(

tests/conftest.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,11 @@ def icohplist_nacl():
700700
return Icohplist(filename=TestDir / "test_data/NaCl_comp_range/ICOHPLIST.lobster.gz")
701701

702702

703+
@pytest.fixture
704+
def icohplist_aln_v51():
705+
return Icohplist(filename=TestDir / "test_data/AlN_v51/ICOHPLIST.lobster.gz")
706+
707+
703708
@pytest.fixture
704709
def icooplist_nacl():
705710
return Icohplist(filename=TestDir / "test_data/NaCl_comp_range/ICOOPLIST.lobster.gz")
@@ -724,3 +729,15 @@ def k3sb_dos():
724729
doscar=TestDir / "test_data/K3Sb/DOSCAR.LSO.lobster.gz",
725730
structure_file=TestDir / "test_data/K3Sb/POSCAR.gz",
726731
)
732+
733+
734+
@pytest.fixture
735+
def analyse_aln_v51():
736+
return Analysis(
737+
path_to_poscar=TestDir / "test_data/AlN_v51/POSCAR.lobster.vasp.gz",
738+
path_to_cohpcar=TestDir / "test_data/AlN_v51/COHPCAR.lobster.gz",
739+
path_to_icohplist=TestDir / "test_data/AlN_v51/ICOHPLIST.lobster.gz",
740+
path_to_charge=TestDir / "test_data/AlN_v51/CHARGE.lobster.gz",
741+
which_bonds="cation-anion",
742+
cutoff_icohp=0.1,
743+
)
178 Bytes
Binary file not shown.
149 KB
Binary file not shown.
31.6 KB
Binary file not shown.
211 Bytes
Binary file not shown.
157 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)