Skip to content

Commit

Permalink
add v51 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
naik-aakash committed Oct 25, 2024
1 parent affc6f4 commit 39c17aa
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 0 deletions.
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 39c17aa

Please sign in to comment.