  A crystal symmetry search is crucial for computational crystallography and
materials science. Although algorithms and implementations for the crystal
symmetry search have been developed, their extension to magnetic space groups
(MSGs) remains limited. In this paper, algorithms for determining magnetic
symmetry operations of magnetic crystal structures, identifying magnetic
space-group types of given MSGs, searching for transformations to a BNS
setting, and symmetrizing the magnetic crystal structures using the MSGs are
presented. The determination of magnetic symmetry operations is numerically
stable and is implemented with minimal modifications from the existing crystal
symmetry search. Magnetic space-group types and transformations to the BNS
setting are identified by a two-step approach combining space-group type
identification and the use of affine normalizers. Point coordinates and
magnetic moments of the magnetic crystal structures are symmetrized by
projection operators for the MSGs. An implementation is distributed with a
permissive free software license in spglib v2.0.2:
https://github.com/spglib/spglib.
