Skip to content

Commit 8ede470

Browse files
Symmetry correction for antiferromagnetic ordering (#1144)
1 parent 4da1237 commit 8ede470

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/symmetry.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,16 @@ on each of the atoms. The symmetries are determined using spglib.
9090
if spin_polarization == :none
9191
Spglib.get_symmetry(cell, tol_symmetry)
9292
elseif spin_polarization == :collinear
93-
Spglib.get_symmetry_with_collinear_spin(cell, tol_symmetry)
93+
rotations, translations, spin_flips = Spglib.get_symmetry_with_site_tensors(
94+
cell, tol_symmetry)
95+
# Keep only the symmetries that don't flip the spins
96+
rotations[spin_flips.==1], translations[spin_flips.==1]
97+
# Taking into account the symmetries that flip spins here would mean detecting
98+
# antiferromagnetic order (where the down orbitals are the up orbitals
99+
# translated by half a cell) and optimizing by computing only the up channel of
100+
# the orbitals and building the density by symmetry. So, the density has two
101+
# components, but the orbitals have only one spin channel.
102+
# This would cut runtime by a factor 2.
94103
end
95104
catch e
96105
if e isa Spglib.SpglibError

0 commit comments

Comments
 (0)