Skip to content

Commit

Permalink
Merge pull request #342 from naik-aakash/update_pymatgen
Browse files Browse the repository at this point in the history
pin min pymatgen version > lobster 5.0/5.1 support
  • Loading branch information
naik-aakash authored Oct 25, 2024
2 parents da43635 + 39c17aa commit bcd9b99
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers = [
]
requires-python = ">=3.10,<3.13"
dependencies = [
"pymatgen>=2024.9.10",
"pymatgen>=2024.10.22",
"numpy<3.0.0",
"typing",
]
Expand Down
5 changes: 5 additions & 0 deletions tests/cohp/test_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,11 @@ def test_icohp_sum_cdf(self, analyse_cdf_comp_range):
abs=0.10,
)

def test_analyse_aln_v51(self, analyse_aln_v51):
# Test if analyse module works with version 5.1 of lobster
assert analyse_aln_v51.condensed_bonding_analysis["formula"] == "AlN"
assert analyse_aln_v51.condensed_bonding_analysis["type_charges"] == "Mulliken"

def test_exception(self):
with pytest.raises(ValueError): # noqa: PT011
self.analyse_batao2n1 = Analysis(
Expand Down
17 changes: 17 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,11 @@ def icohplist_nacl():
return Icohplist(filename=TestDir / "test_data/NaCl_comp_range/ICOHPLIST.lobster.gz")


@pytest.fixture
def icohplist_aln_v51():
return Icohplist(filename=TestDir / "test_data/AlN_v51/ICOHPLIST.lobster.gz")


@pytest.fixture
def icooplist_nacl():
return Icohplist(filename=TestDir / "test_data/NaCl_comp_range/ICOOPLIST.lobster.gz")
Expand All @@ -724,3 +729,15 @@ def k3sb_dos():
doscar=TestDir / "test_data/K3Sb/DOSCAR.LSO.lobster.gz",
structure_file=TestDir / "test_data/K3Sb/POSCAR.gz",
)


@pytest.fixture
def analyse_aln_v51():
return Analysis(
path_to_poscar=TestDir / "test_data/AlN_v51/POSCAR.lobster.vasp.gz",
path_to_cohpcar=TestDir / "test_data/AlN_v51/COHPCAR.lobster.gz",
path_to_icohplist=TestDir / "test_data/AlN_v51/ICOHPLIST.lobster.gz",
path_to_charge=TestDir / "test_data/AlN_v51/CHARGE.lobster.gz",
which_bonds="cation-anion",
cutoff_icohp=0.1,
)
Binary file added tests/test_data/AlN_v51/CHARGE.lobster.gz
Binary file not shown.
Binary file added tests/test_data/AlN_v51/COHPCAR.lobster.gz
Binary file not shown.
Binary file added tests/test_data/AlN_v51/ICOHPLIST.lobster.gz
Binary file not shown.
Binary file added tests/test_data/AlN_v51/MadelungEnergies.lobster.gz
Binary file not shown.
Binary file added tests/test_data/AlN_v51/POSCAR.lobster.vasp.gz
Binary file not shown.

0 comments on commit bcd9b99

Please sign in to comment.