# pymatgen.symmetry.kpath module¶

Provides classes for generating high-symmetry k-paths using different conventions.

class KPathBase(structure, symprec=0.01, angle_tolerance=5, atol=1e-05, *args, **kwargs)[source]

Bases: object

This is the base class for classes used to generate high-symmetry paths in reciprocal space (k-paths) for band structure calculations.

Args: structure (Structure): Structure object symprec (float): Tolerance for symmetry finding angle_tolerance (float): Angle tolerance for symmetry finding. atol (float): Absolute tolerance used to compare structures

and determine symmetric equivalence of points and lines in the BZ.

get_kpoints(line_density=20, coords_are_cartesian=True)[source]

Returns: the kpoints along the paths in cartesian coordinates together with the labels for symmetry points -Wei.

property kpath[source]

Returns: The symmetry line path in reciprocal space

property lattice[source]

Returns: The real space lattice

property rec_lattice[source]

Returns: The reciprocal space lattice

property structure[source]

Returns: The input structure

class KPathLatimerMunro(structure, has_magmoms=False, magmom_axis=None, symprec=0.01, angle_tolerance=5, atol=1e-05)[source]

This class looks for a path along high symmetry lines in the Brillouin zone. It is based on the derived symmetry of the energy spectrum for a crystalline solid given by A P Cracknell in J. Phys. C: Solid State Phys. Vol. 6 (1973), pp. 826-840 (‘Van Hove singularities and zero-slope points in crystals’) and pp. 841- 854 (‘Van Hove singularities and zero-slope points in magnetic crystals’). The user should ensure that the lattice of the input structure is as reduced as possible, i.e. that there is no linear combination of lattice vectors which can produce a vector of lesser magnitude than the given set (this is required to obtain the correct Brillouin zone within the current implementaiton). This is checked during initialization and a warning is issued if the condition is not fulfilled. In the case of magnetic structures, care must also be taken to provide the magnetic primitive cell (i.e. that which reproduces the entire crystal, including the correct magnetic ordering, upon application of lattice translations). There is no way to programatically check for this, so if the input structure is incorrect, the class will output the incorrect kpath without any warning being issued.

Parameters
• structure (Structure) – Structure object

• has_magmoms (boolean) – Whether the input structure contains magnetic moments as site properties with the key ‘magmom.’ Values may be in the form of 3-component vectors given in the basis of the input lattice vectors, or as scalars, in which case the spin axis will default to a_3, the third real-space lattice vector (this triggers a warning).

• magmom_axis (list or numpy array) – 3-component vector specifying direction along which magnetic moments given as scalars should point. If all magnetic moments are provided as vectors then this argument is not used.

• symprec (float) – Tolerance for symmetry finding

• angle_tolerance (float) – Angle tolerance for symmetry finding.

• atol (float) – Absolute tolerance used to determine symmetric equivalence of points and lines on the BZ.

static LabelPoints(index)[source]

Axes used in generating labels for Latimer-Munro convention

static LabelSymbol(index)[source]

Letters used in generating labels for Latimer-Munro convention

property mag_type[source]

Returns: The type of magnetic space group as a string. Current implementation does not distinguish between types 3 and 4, so return value is ‘3/4’. If has_magmoms is False, returns ‘0’.

class KPathSeek(**kwargs)[source]

This class looks for path along high symmetry lines in the Brillouin Zone. It is based on Hinuma, Y., Pizzi, G., Kumagai, Y., Oba, F., & Tanaka, I. (2017). Band structure diagram paths based on crystallography. Computational Materials Science, 128, 140–184. https://doi.org/10.1016/j.commatsci.2016.10.015 It should be used with primitive structures that comply with the definition from the paper. The symmetry is determined by spglib through the SpacegroupAnalyzer class. KPoints from get_kpoints() method are returned in the reciprocal cell basis defined in the paper.

Parameters
• structure (Structure) – Structure object

• symprec (float) – Tolerance for symmetry finding

• angle_tolerance (float) – Angle tolerance for symmetry finding.

• atol (float) – Absolute tolerance used to determine edge cases for settings of structures.

• system_is_tri (boolean) – Indicates if the system is time-reversal invariant.

class KPathSetyawanCurtarolo(structure, symprec=0.01, angle_tolerance=5, atol=1e-05)[source]

This class looks for path along high symmetry lines in the Brillouin Zone. It is based on Setyawan, W., & Curtarolo, S. (2010). High-throughput electronic band structure calculations: Challenges and tools. Computational Materials Science, 49(2), 299-312. doi:10.1016/j.commatsci.2010.05.010 It should be used with primitive structures that comply with the definition from the paper. The symmetry is determined by spglib through the SpacegroupAnalyzer class. The analyzer can be used to produce the correct primitive structure (method get_primitive_standard_structure(international_monoclinic=False)). A warning will signal possible compatibility problems with the given structure. KPoints from get_kpoints() method are returned in the reciprocal cell basis defined in the paper.

Args: structure (Structure): Structure object symprec (float): Tolerance for symmetry finding angle_tolerance (float): Angle tolerance for symmetry finding. atol (float): Absolute tolerance used to compare the input

structure with the one expected as primitive standard. A warning will be issued if the lattices don’t match.

bcc()[source]

BCC Path

bctet1(c, a)[source]

BCT1 Path

bctet2(c, a)[source]

BCT2 Path

property conventional[source]

Returns: The conventional cell structure

cubic()[source]

CUB Path

fcc()[source]

FCC Path

hex()[source]

HEX Path

mcl(b, c, beta)[source]

MCL Path

mclc1(a, b, c, alpha)[source]

MCLC1 Path

mclc2(a, b, c, alpha)[source]

MCLC2 Path

mclc3(a, b, c, alpha)[source]

MCLC3 Path

mclc4(a, b, c, alpha)[source]

MCLC4 Path

mclc5(a, b, c, alpha)[source]

MCLC5 Path

orc()[source]

ORC Path

orcc(a, b, c)[source]

ORCC Path

orcf1(a, b, c)[source]

ORFC1 Path

orcf2(a, b, c)[source]

ORFC2 Path

orcf3(a, b, c)[source]

ORFC3 Path

orci(a, b, c)[source]

ORCI Path

property prim[source]

Returns: The primitive cell structure

property prim_rec[source]

Returns: The primitive reciprocal cell structure

rhl1(alpha)[source]

RHL1 Path

rhl2(alpha)[source]

RHL2 Path

tet()[source]

TET Path

tria()[source]

TRI1a Path

trib()[source]

TRI1b Path