Skip to content

Commit b1b9510

Browse files
fix(Hamiltonian): 修正空间部分k向量的变换逻辑
处理spin_neg_I情况时,k向量需要取反
1 parent a185032 commit b1b9510

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

SPG/Physics/Hamiltonian.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ deriving Repr, DecidableEq, Inhabited
4747

4848
-- Action on k-vector (spatial part)
4949
def act_on_k (g : SPGElement) (k : Vec3) : Vec3 :=
50-
Matrix.mulVec g.spatial k
50+
let k_rot := Matrix.mulVec g.spatial k
51+
if g.spin == spin_neg_I then
52+
-k_rot
53+
else
54+
k_rot
5155

5256
-- Action on spin component (spin part)
5357
def act_on_spin (g : SPGElement) (s : SpinComp) : Vec3 :=

0 commit comments

Comments
 (0)