-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Lattice to SymInfo. Addresses #23 in part.
- Loading branch information
Showing
3 changed files
with
28 additions
and
8 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 |
---|---|---|
@@ -1,10 +1,26 @@ | ||
import numpy as np | ||
|
||
import libcasm.xtal as xtal | ||
import libcasm.xtal.prims as xtal_prims | ||
|
||
|
||
def test_SymInfo_constructor(): | ||
lattice = xtal.Lattice(np.eye(3)) | ||
op = xtal.SymOp(np.eye(3), np.zeros((3, 1)), False) | ||
syminfo = xtal.SymInfo(op, lattice) | ||
assert syminfo.op_type() == "identity" | ||
|
||
|
||
def test_SymInfo_to_dict(): | ||
xtal_prim = xtal_prims.BCC(r=1.0, occ_dof=["A"]) | ||
factor_group = xtal.make_factor_group(xtal_prim) | ||
symgroup_info = [] | ||
for op in factor_group: | ||
syminfo = xtal.SymInfo(op, xtal_prim.lattice()) | ||
symgroup_info.append( | ||
{ | ||
"info": syminfo.to_dict(), | ||
"op": op.to_dict(), | ||
} | ||
) | ||
assert len(symgroup_info) == 48 |
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