A tool to check whether a symmetry-compensated collinear magnetic material is antiferro-or altermagnetic

Altermagnets (AM) is a recently discovered class of collinear magnets that share some properties (anomalous transport, etc) with ferromagnets, some (zero net magnetization) with antiferromagnets, while also exhibiting unique properties (spin-splitting of electronic bands and resulting spin-splitter current). Since the moment compensation in AM is driven by symmetry, it must be possible to identify them by analyzing the crystal structure directly, without computing the electronic structure. Given the significant potential of AM for spintronics, it is very useful to have a tool for such an analysis. This work presents an open-access code implementing such a direct check


Introduction
Magnets have recently been classified according to symmetry transformations into three types: ferromagnets (FM), antiferromagnets (AFM), and altermagnets (AM) [1][2][3].Ferromagnets or ferrimagnets (including Luttinger-compensated ferrimagnets, see Ref. [2]) exhibit net magnetization, which breaks the time-reversal symmetry in the electronic structure.On the other hand, antiferromagnets exhibit opposite spin sublattices coupled by translation and/or inversion, symmetry transformations that lead to time-reversal symmetric energy bands and zero magnetization.On the contrary, in altermagnets the opposite spin sublattices are coupled by symmetry operations (as in AFM, but not in FM) that are not inversions or translations, leading to an unusual combination of time-reversal symmetry broken electronic structure with alternating in both coordinate and momentum spaces spin polarization and zero net magnetization [1,4,5], and spin-split electrons bands (as in FM, but not in AFM).The spin split bands break time-reversal symmetry as in FM, but not in AFM.Additionally, the alternating spin splitting follows a d-, g-, or i-wave symmetry which is distinct from the symmetry of spin splitting in FM.
This alternating in the momentum space spin polarization can be expanded in spherical harmonics (pretty much as it is being done in the theory of unconventional superconductivity), and, depending on the underlying symmetry, can exhibit d-, g-, or i-wave magnetization density with 2, 4 or 6 spin-degenerate nodal surfaces [1].
Remarkably, many unusual effects related to altermagnetism were predicted.They include anomalous Hall effect [4,6], crystal magnetooptical Kerr effect [5,7,8], large nonrelativistic spin splitting [4,9,10], spin-polarised longitudinal and transverse currents [11][12][13], giant and tunneling magnetoresistance [13,14], nonlinear Hall effect [15], topological phase transitions [16], finite momentum Cooper pairing [17], anisotropic Andreev reflection [18], unconventional Josephson effect [19], magnon spin splitting [20], ferroically ordered multipoles [16,21], nonunitary triplet superconductivity with the order parameter that averages to unitary and suppressed Andreev reflection at an interface with a conventional superconductor [22].Altermagnetism can be found in diverse material families important for studying its application in spintronics, correlated states of matter, superconductivity, or semiconductor electronics (see also comprehensive list of references in perspective article [3]).Quadratic momentum-dependent spin splitting was also experimentally confirmed in photoemission spectra in MnTe altermagnet [23].As of now, several candidate materials have been identified, but in each case, it was effected by manually checking the symmetry operations and/or calculating the band structure and verifying that it is spin-split.Furthermore, since the latter test cannot distinguish between AM and compensated FM, there is considerable confusion in this regard [24].
This work aims to create a program (and a library) which takes a crystal structure and a magnetic pattern of the material and decides whether it is antiferromagnetic or altermagnetic (it is trivial to rule out ferromagnetic materials).The input requested from the user is information about a crystal structure (various crystal structure formats are supported) and the magnetic pattern.Note that a further classification of a given altermagnet into one of ten classes, as suggested in Ref. 1, is out of the scope of this work.

Symmetry and magnetism: bipartite lattice
General symmetry conditions have been deduced that distinguish AM from AFM [3,4].Here we provide a simple tool that would allow, by just looking at crystal structure and magnetic pattern, to say with certainty whether a material (existing or hypothetical) is AM.In the following, we will describe the ingredients for such a tool.
Let us assume that in the nonmagnetic parent compound the two sublattices that will be assigned the "up" and "down" spins (we will call them, in short, the up and down sublattices) are related by a spatial symmetry operation Ô, ignoring for a moment a possibility to have multiple species of atoms and focus only on magnetic atoms.Note that unless such an operation exists, the net magnetization is not required to be zero by symmetry (albeit it may be strictly zero by virtue of the Luttinger theorem [2]), and thus the material in question is, by symmetry, a ferrimagnet, and not subject to this study.Thus, we further assume spin compensation in the system, since ruling out that the system is ferromagnetic is trivial: the issue is to distinguish between AM and AFM states.At first, it is instructive to examine what symmetries are responsible for up and down bands to be degenerate, i.e., when we are dealing with AFM material.By definition, Ô F E k↑ = E Ôk↓ .Here, Ô is a spatial symmetry operation, and F flips the spins.We assume that space and spin coordinates are decoupled and that spin is a pseudoscalar quantity, i.e., merely "up" or "down" and not a pseudovector (which is commonly used when the structure is described by magnetic space group formalism [25]).
If Ô is an integer lattice translation, Ô = t, then ÔE k↑ = E k↑ , and therefore E k↑ = E k↓ , due to a spin flip operation mapping up and down sublattices to each other.
If this operation is a pure inversion, then the material is centrosymmetric, and by the action of inversion E k↑ = E −k↑ and E k↓ = E −k↓ .Since the inversion mapping the up-sublattice onto the down-sublattice is followed by a spin flip, E k↑ = E −k↓ .Combining these expressions proves that E k↑ = E k↓ .Thus, in these two cases, spin-up and spin-down bands are degenerate and the material is AFM.Note that in this case an inversion center is located at the midpoint between spin-up and spin-down sites.
As we see, if the net magnetization is strictly zero, it may be not dictated by symmetry, which is the case of a Luttinger-compensated ferrimagnet, or result from one or more crystal symmetry operation mapping one spin sublattice upon the other.This symmetry operation may be (a) a lattice translation, (b) spatial inversion, or (c) another operation that is neither translation nor inversion.If all symmetry operations performing such matting belong to group (c), the material is altermagnetic and its bands are spin-split at general k-points.Thus, to check if the material is AM, one needs to confirm that there are no translations and no inversions that map one spin sublattice onto the other while confirming that there is some other symmetry responsible for such mapping.

AFM vs AM: examples
The idea can be illustrated using NiAs structure prototype as an example (see Fig. 1a).This structure contains an inversion symmetry which has different action depending on the atom under consideration: two As atoms are mapped onto each other, but Ni is left untouched by the inversion, since Ni atom is mapped to the equivalent (by translation) one in the next unit cell (the action of inversion is illustrated by various dashed lines coming from the center in Fig. 1a).If As is substituted by Fe and Ni by O, as in high-pressure FeO compound [27], the material is AFM and inversion followed by spin-flip maps Fe-up onto Fe-down, as illustrated in Fig. 1b.However, if As is substituted by Te and Ni by Mn as in MnTe [28] (see Fig. 1c), inversion followed by a spin-flip no longer maps up sublattice onto down one, and the material is AM.Note that only one unique magnetic pattern is possible in both cases when the primitive unit cell is considered.
In the previous example, the position of magnetic atoms favoring AFM-interaction was responsible for the transition between AFM or AM state.Another mechanism of AFM-AM transition can be illustrated using LiMnPO 4 structure (see Fig. 2, where Mn atoms are colored red and blue; other atoms, nonmagnetic, are gray).For this material AFM order is reported [29,30] (Fig. 2a): in this case, inversion followed by spin-flip will map up and down sublattices onto each other.If it would be possible to swap spins of atoms on one of the body diagonals (as    illustrated in Fig. 2b), up and down sublattices can no longer be related by such an operation, and the material would be AM.

Structures with multiple magnetic atoms
When multiple magnetic ions are present in the crystal structure, some extra considerations are necessary.Depending on how they behave under the action of symmetry operations, different points in a crystal can be assigned different labels called Wyckoff labels or Wyckoff positions [31], forming a disjoint set.For example, if only a mirror plane symmetry is present, points on this plane will behave differently under this symmetry than other points, thus obtaining a different label.
Each Wyckoff position has a multiplicity: the number of points that are equivalent by symmetry.A set of such points is called a Wyckoff orbit.If a given material consists of multiple atomic species, the up and down sublattices will be partitioned into disjoint sets by species.For each species, atoms will be further partitioned into symmetry-related groups (orbits).Given that different Wyckoff orbits are not symmetry-related, our task is to check each orbit separately for the possibility of generating spin splitting.Thus, for a material to be AM, we need to find at least one Wyckoff orbit, for which up and down sublattices are not related by a spin-flip followed by inversion or/and translation.
Again, we assume that each Wyckoff orbit that contains magnetic atoms has zero net magnetic moment.If that is not the case, we are dealing either with ferro-or ferrimagnet.
To determine if the state is AM or AFM, Wyckoff orbits with non-magnetic atoms can be neglected since they preserve spin flip symmetry operation.However, information about them is still needed to determine the symmetry of the parent non-magnetic structure.

Treatment of non-primitive unit cells
For the symmetry analysis of the given structure, we are using spglib library [32,33].However, for non-primitive cells spglib restricts the search of symmetry operators by the point group of the lattice formed by the basis vectors of the non-primitive unit cell [34].This is inconsistent with a usual approach in crystallography, where the search for symmetry operators is restricted by the point group of the primitive lattice and the approach we employ.Thus, if the non-primitive cell is analyzed, spglib will provide fewer symmetry operators than expected.
In this case, we will obtain the symmetry operators for the primitive cell instead and augment them with appropriate fractional translations that should appear when the corresponding non-primitive cell is considered and select the ones that are consistent with a given magnetic pattern.For example, if P is a point group of a primitive cell and the non-primitive cell of interest is the 2x1x1 supercell, the resulting group is P + {E, ( 1 2 , 0, 0)}P, where E is an identity and { Ô, ⃗ t} denotes Seitz symbol, i.e., the amount of symmetry operations is doubled.
The procedure to obtain fractional translations is the following.The non-primitive cell (supercell) S can be constructed from a given primitive cell P with the help of an integervalued transformation matrix T : S = T P. ( The ratio of volumes of the supercell and primitive cell is an integer given by the determinant of T , n = det(T ).All possible supercells can be grouped based on the value of n.Although, in general, the amount of possible unit cells for a supercell with a fixed n is infinite, they can be separated into a finite amount of classes based on the structure of Hermite Normal Form (HNF) H representation of the matrix T [35].For example, for a parent square lattice, there are three classes of supercells with n = 2: as illustrated in Fig. 3. Typically, one would be interested in labeling/coloring the atoms in each obtained supercell to enumerate all possible alloys/magnetic patterns that can be derived from the parent primitive cell.However, if such labeling is not performed, all supercells within the same n will be equivalent since no symmetry breaking is introduced, the fact that we will exploit later.
We want to obtain the translation operations introduced by the transformation T that transforms a primitive cell P to a non-primitive cell S. Now, the cell S, the corresponding HNF H, and the supercell formed by the diagonal of H are equivalent (since no symmetry breaking was introduced and non-magnetic structure is considered at this point).The latter tells us how many times in what direction the cell P was multiplied.If we assume that the diagonal of H is (m, n, l), the fractional translations of interest in the basis of H are ( i m , . After enumerating all translations, what is left to do is to transform them into the basis of S. The magnetic pattern is introduced after the cell S and corresponding fractional translations are defined.For example, in Fig. 4 the algorithm is illustrated for the 2 × 2 supercell of the square lattice. There are some rare cases of magnetic materials where the magnetic unit cell is larger than the chemical one, but the number of symmetry operations is smaller than the amount obtained in the previously described procedure [36].In such a case, the obtained augmented list of symmetry operations should be reduced to be consistent with a given magnetic pattern.An example of such a material, which is altermagnetic, is MnSe 2 and given in Fig. 5 (with a magnetic pattern as reported in [37], denoted as MnSe 2 -I; for more examples see Ref. [36]).Non-magnetic MnSe 2 has 24 symmetry operations, while the magnetic compound has the magnetic unit cell with three times the volume of the chemical unit cell but contains only 8 symmetry operations (as illustrated in Fig. 5b).

Action of symmetry operations
A practical way to check the action of symmetry operation on atomic position ⃗ r is to represent proper and improper rotations as a 3 × 3 matrix R and a fractional translation as a 3-elements vector ⃗ τ.Then the position ⃗ r is left invariant by a symmetry operation if where ⃗ A = m⃗ a 1 + n⃗ a 2 + k⃗ a 3 with ⃗ a i being lattice vectors and m, n, k integers, meaning that all points related by lattice translations are considered to be equivalent.If all operations are (a)   expressed in the fractional coordinate system, the right hand side of Eq. ( 2) can be substituted by a vectorized module 1 operation: which conveniently accounts for translational equivalence.
Let us illustrate the use of Eq. (2).By definition of inversion, Î ⃗ r = −⃗ r.Here, inversion can be represented by an inversion center at the origin, i.e., taking the negative of 3 × 3 unity matrix for Î with no fractional translation (i.e., ⃗ τ = ⃗ 0).Thus, from Eq. ( 2): Î ⃗ r = ⃗ r + ⃗ A. Combining these two expressions one arrives at ⃗ r = 1 2 ⃗ A, which gives 8 points invariant by inversion: with a i being equal to either 0 or 1 2 .

Program usage
In this manuscript, we describe a program that allows to determine if the material of interest is AM or AFM by providing the corresponding structure file and magnetic pattern.To handle multiple structure file formats ase library [38,39] is employed; thus, such formats as CIF [40] and POSCAR [41] are supported among the others.
Following the ideas from the section above, the algorithm is the following: if every magnetic atom with spin-up can be mapped on a spin-down atom using either inversion or translation followed by a spin flip, then the system is antiferromagnetic; thus, for the system to be AM, there should be at least one spin-up-down pair, atoms of which cannot be mapped by those symmetry operations.
Given that the set of all atoms in the structure naturally splits into symmetry-related groups (Wyckoff orbits), one needs to perform the analysis mentioned above for each Wyckoff orbit separately.If magnetic atoms in all Wyckoff orbits can be mapped by inversion or translation followed by a spin flip, then the material is antiferromagnetic.Otherwise, it is an altermagnet.The analysis of the symmetry of the given structure and the determination of Wyckoff orbits is done using spglib library [32,33].
The program can be installed from PyPi:

$ pip install amcheck
The source code is located in github repository and is accessible at the link: https://github.com/amchecker/amcheck.
Given the structure information stored in one of the supported formats, the program can be executed via the following command: $ amcheck structure_file and the information on how to run it can be requested using: $ amcheck --help giving the output specified in Listing 1.
amcheck will loop over all Wyckoff orbits, and the user will be asked to type spin designation for each atom in orbit using "u"/"U" symbol for spin-up, "d"/"D" for spin-down or "n"/"N" to mark the atom as non-magnetic (the entire orbit can be marked as non-magnetic using a single "nn"/"NN" designation).To help with this process, an auxiliary structure file in POSCAR format [41] will be created, and the user can open it with crystal structure visualization software.After all input data is provided, the analysis result will be printed in the last line.
An example of running an interactive session with the program is provided in the Listing 2. Note that it is possible to specify multiple structure files: the program will internally loop over them.If a non-primitive cell is given, the user will be asked to use it as is or to analyze the corresponding primitive cell instead.
If the automatized search is of interest, one can use amcheck package as a library, and the code snippet of the typical usage is given in Listing 3.
Once the material is determined as altermagnetic, one could be interested in its transport properties and determine the allowed by symmetry form of the conductivity tensor, which in static limit describes the Anomalous Hall Effect (AHE) and in dynamic limit (X-ray) magnetic circular dichroism (X)MCD.This type of analysis can be performed using the following command (see an example in Listing 4):

$ amcheck --ahc structure_file
The user will be asked to enter the local magnetization vector for each atom, and the determination of the corresponding magnetic space group will be performed by spglib.Thus, the effect of spin-lattice coupling due to spin-orbit interaction is taken into account.Once the symmetry and antisymmetry operations are determined, the form of the conductivity tensor is obtained by symmetrizing a "seed" matrix S following the tensor transformation rules described in Ref. 42: where R i are symmetry elements and R ′ i are antisymmetry elements.Note that the obtained conductivity tensor is defined w.r.t cartesian coordinates as defined by a corresponding input structure file, which might not necessarily be aligned with crystallographic axes.So, a comparison with the experiment or reported tables should be made carefully.This convention is employed to aid the comparison with computational results since not all codes enforce the convention employed by crystallographers.

Conclusion
There is a significant interest of the scientific community in a novel magnetic phase called altermagnetism.However, the amount of suggested altermagnets is scarce, and a tool that would boost the discovery of new candidates would be of great use.
In this paper, we present an open-access code that checks if the material is altermagnetic or antiferromagnetic based on the symmetries obeyed by its crystal and magnetic structure.
To keep the code snippet compact and since the aim is only to illustrate the interface, only one symmetry operation is listed in this example.In order to be executed correctly, the remaining symmetry operations must be provided by the user.

Figure 1 :
Figure 1: Depending on what position a magnetic atom in (a) NiAs structure prototype occupies, it is possible to obtain (b) AFM , as in FeO, or (c) AM material, as in MnTe compound.Dashed lines connect atoms related by spatial inversion.Teal and orange spheres are Ni and As atoms; red and blue spheres represent spin up and down sublattices occupied by either Fe or Mn; non-magnetic atoms are gray.For the sake of illustration, the information about the spin is also denoted by arrows.Here and in other plots, VESTA software [26] was used to visualize crystal structure.

Figure 2 :
Figure 2: An illustration of AFM-AM transition driven by the type of magnetic pattern, for which LiMnPO 4 -structure is used.Mn atoms are red and blue for spin up and down sublattices; non-magnetic atoms are gray.

Figure 3 :
Figure 3: Three distinct classes of n = 2 supercells for a parent square lattice and respective HNFs: (a) horizontal stripes, (b) checkerboard pattern, and (c) vertical stripes.Equivalence by symmetry is not taken into account: if accounted for 90 • rotation, supercells in (a) and (c) are the same.

Figure 4 :
Figure 4: An illustration of how to obtain the fractional translations for a 2 × 2 supercell of the square lattice: (a) a 2 × 2 unit cell (blue dotted lines) and the corresponding basis vectors (blue arrows), (b) the HNF of the 2 × 2 unit cell, which gives the unit cell class representative: if bipartite lattice is formed, checkboard pattern would be realized; (c) the diagonal matrix obtained from the HNF gives a new unit cell that highlights the necessary fractional translations (gray vector ⃗ τ = (0, 1)).

Figure 5 :
Figure 5: (a) Crystal structure and magnetic pattern of MnSe 2 -I altermagnet: Mn atoms are red and blue for spin up and spin down sublattices; non-magnetic Se atoms are gray.The size of the magnetic unit cell is three times the volume of the chemical unit cell; the chemical unit cell is highlighted as well.(b) Symmetry elements that are present in this system; the spatial symmetries followed by a spin flip are red.For the meaning of symbols see Chapter 1.4 of Ref. 31.