pymatgen.symmetry.kpath module

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

class KPathBase(structure: Structure, symprec: float = 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.

*args: Other arguments supported by subclasses. **kwargs: Other keyword arguments supported by subclasses.

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

Returns: kpoints along the path in Cartesian coordinates together with the critical-point labels.

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]

Bases: KPathBase

This class looks for a path along high-symmetry lines in the Brillouin zone. It is based on the method outlined in: npj Comput Mater 6, 112 (2020). 10.1038/s41524-020-00383-7 The user should ensure that the unit cell 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 implementation). 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 algorithm to

check for this, so if the input structure is

incorrect, the class will output the incorrect k-path without any warning being issued.

Parameters:
  • structure (Structure) – Structure object

  • has_magmoms (bool) – 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 in 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 the 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(structure: Structure, symprec: float = 0.01, angle_tolerance=5, atol=1e-05, system_is_tri=True)[source]

Bases: KPathBase

This class looks for a 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 given in the paper. The symmetry is determined by spglib using the SpacegroupAnalyzer class. k-points are generated using the get_kpoints() method for 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 (bool) – Indicates if the system is time-reversal invariant.

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

Bases: KPathBase

This class looks for a 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 given in the paper. The symmetry is determined by spglib using the SpacegroupAnalyzer class. The analyzer can be used to produce the correct primitive structure with the method get_primitive_standard_structure(international_monoclinic=False). A warning will signal possible compatibility problems with the given structure. k-points generated using the get_kpoints() method are returned for 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 cells 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.