-
Notifications
You must be signed in to change notification settings - Fork 882
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bccf141
commit 50b5df3
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from __future__ import annotations | ||
|
||
from pymatgen.analysis.structure_analyzer import SpacegroupAnalyzer | ||
from pymatgen.core import Lattice, Structure | ||
from pymatgen.util.testing import PymatgenTest | ||
|
||
|
||
class TestSymmetrizedStructure(PymatgenTest): | ||
def setUp(self): | ||
self.structure = Structure( | ||
lattice=Lattice.cubic(3), | ||
species=("Fe", "Fe"), | ||
coords=((0, 0, 0), (0.5, 0.5, 0.5)), | ||
) | ||
|
||
self.symm_structure = SpacegroupAnalyzer(self.structure).get_symmetrized_structure() | ||
|
||
def test_as_dict(self): | ||
self.assert_msonable(self.symm_structure) | ||
|
||
def test_serialize(self): | ||
self.symm_structure.to(fmt="json") |