Skip to content

Commit

Permalink
compress tests/files/magnetic.example.CuO.mcif
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Jan 23, 2024
1 parent e22507c commit a354614
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 149 deletions.
32 changes: 16 additions & 16 deletions tests/analysis/magnetism/test_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def setUp(self):

self.NiO_expt = Structure.from_file(f"{TEST_FILES_DIR}/magnetic.example.NiO.mcif", primitive=True)

self.CuO_expt = Structure.from_file(f"{TEST_FILES_DIR}/magnetic.example.CuO.mcif", primitive=True)
self.CuO_expt = Structure.from_file(f"{TEST_FILES_DIR}/magnetic.example.CuO.mcif.gz", primitive=True)

lattice = Lattice.cubic(4.17)
species = ["Ni", "O"]
Expand Down Expand Up @@ -163,31 +163,31 @@ def test_get_ferromagnetic_structure(self):
assert CollinearMagneticStructureAnalyzer(s1).matches_ordering(s2_prim)

def test_magnetic_properties(self):
msa = CollinearMagneticStructureAnalyzer(self.GdB4)
assert not msa.is_collinear
mag_struct_analyzer = CollinearMagneticStructureAnalyzer(self.GdB4)
assert not mag_struct_analyzer.is_collinear

msa = CollinearMagneticStructureAnalyzer(self.Fe)
assert not msa.is_magnetic
mag_struct_analyzer = CollinearMagneticStructureAnalyzer(self.Fe)
assert not mag_struct_analyzer.is_magnetic

self.Fe.add_site_property("magmom", [5])

msa = CollinearMagneticStructureAnalyzer(self.Fe)
assert msa.is_magnetic
assert msa.is_collinear
assert msa.ordering == Ordering.FM
mag_struct_analyzer = CollinearMagneticStructureAnalyzer(self.Fe)
assert mag_struct_analyzer.is_magnetic
assert mag_struct_analyzer.is_collinear
assert mag_struct_analyzer.ordering == Ordering.FM

msa = CollinearMagneticStructureAnalyzer(
mag_struct_analyzer = CollinearMagneticStructureAnalyzer(
self.NiO,
make_primitive=False,
overwrite_magmom_mode="replace_all_if_undefined",
)
assert msa.number_of_magnetic_sites == 4
assert msa.number_of_unique_magnetic_sites() == 1
assert msa.types_of_magnetic_species == (Element.Ni,)
assert msa.get_exchange_group_info() == ("Fm-3m", 225)
assert mag_struct_analyzer.number_of_magnetic_sites == 4
assert mag_struct_analyzer.number_of_unique_magnetic_sites() == 1
assert mag_struct_analyzer.types_of_magnetic_species == (Element.Ni,)
assert mag_struct_analyzer.get_exchange_group_info() == ("Fm-3m", 225)

msa = CollinearMagneticStructureAnalyzer(self.CuO_expt)
assert msa.ordering == Ordering.AFM
mag_struct_analyzer = CollinearMagneticStructureAnalyzer(self.CuO_expt)
assert mag_struct_analyzer.ordering == Ordering.AFM

def test_str(self):
msa = CollinearMagneticStructureAnalyzer(self.NiO_AFM_001)
Expand Down
133 changes: 0 additions & 133 deletions tests/files/magnetic.example.CuO.mcif

This file was deleted.

Binary file added tests/files/magnetic.example.CuO.mcif.gz
Binary file not shown.

0 comments on commit a354614

Please sign in to comment.