Skip to content
New issue

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

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

Already on GitHub? # to your account

pin min pymatgen version > lobster 5.0/5.1 support #342

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.
Loading