pymatgen.symmetry.settings module

This module provides classes for non-standard space-group settings.

class JonesFaithfulTransformation(P, p)[source]

Bases: object

Transformation for space-groups defined in a non-standard setting.

Transform between settings using matrix P and origin shift vector p, using same notation as reference.

Should initialize using from_transformation_string in Jones faithful notation, given by a string specifying both a transformation matrix and an origin shift, with parts delimited by a semi-colon. Best shown by example:

  • a,b,c;0,0,0 is the identity (no change)

  • -b+c,a+c,-a+b+c;0,0,0 is R3:r to R3:h (rhombohedral to hexagonal setting)

  • a,b,c;-1/4,-1/4,-1/4 is Pnnn:1 to Pnnn:2 (change in origin choice)

  • b,c,a;-1/2,-1/2,-1/2 is Bbab:1 to Ccca:2 (change settin and origin)

Can transform points (coords), lattices and symmetry operations.

Used for transforming magnetic space groups since these are commonly used in multiple settings, due to needing to transform between magnetic and non-magnetic settings.

See: International Tables for Crystallography (2016). Vol. A, Chapter 1.5, pp. 75-106.

property P: list[list[float]][source]

transformation matrix

Type:

return

classmethod from_origin_shift(origin_shift='0,0,0')[source]

Construct SpaceGroupTransformation from its origin shift string.

Parameters:

origin_shift (str, optional) – Defaults to “0,0,0”.

Returns:

JonesFaithfulTransformation

classmethod from_transformation_string(transformation_string='a,b,c;0,0,0')[source]

Construct SpaceGroupTransformation from its transformation string.

Parameters:

transformation_string (str, optional) – Defaults to “a,b,c;0,0,0”.

Returns:

JonesFaithfulTransformation

property inverse: JonesFaithfulTransformation[source]

JonesFaithfulTransformation

Type:

return

property p: list[float][source]

translation vector

Type:

return

static parse_transformation_string(transformation_string: str = 'a,b,c;0,0,0') tuple[list[list[float]] | ndarray, list[float]][source]
Parameters:

transformation_string (str, optional) – Defaults to “a,b,c;0,0,0”.

Raises:

ValueError – When transformation string fails to parse.

Returns:

transformation matrix & vector

Return type:

tuple[list[list[float]] | np.ndarray, list[float]]

transform_coords(coords: list[list[float]] | ndarray) list[list[float]][source]

Takes a list of coordinates and transforms them.

transform_lattice(lattice: Lattice) Lattice[source]

Transforms a lattice.

transform_symmop(symmop: SymmOp | MagSymmOp) SymmOp | MagSymmOp[source]

Takes a symmetry operation and transforms it.

property transformation_string: str[source]

transformation string

Type:

return