File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments