# pymatgen.symmetry.groups module¶

Defines SymmetryGroup parent class and PointGroup and SpaceGroup classes. Shyue Ping Ong thanks Marc De Graef for his generous sharing of his SpaceGroup data as published in his textbook “Structure of Materials”.

class PointGroup(*args, **kwargs)[source]

Class representing a Point Group, with generators and symmetry operations.

symbol[source]

Full International or Hermann-Mauguin Symbol.

generators[source]

List of generator matrices. Note that 3x3 matrices are used for Point Groups.

symmetry_ops[source]

Full set of symmetry operations as matrices.

class SpaceGroup(*args, **kwargs)[source]

Class representing a SpaceGroup.

symbol[source]

Full International or Hermann-Mauguin Symbol.

int_number[source]

International number

generators[source]

List of generator matrices. Note that 4x4 matrices are used for Space Groups.

order[source]

Order of Space Group

class SymmetryGroup[source]

Bases: collections.abc.Sequence

Abstract class representation a symmetry group.

is_subgroup(supergroup)[source]

True if this group is a subgroup of the supplied group.

Parameters

supergroup (SymmetryGroup) – Supergroup to test.

Returns

True if this group is a subgroup of the supplied group.

is_supergroup(subgroup)[source]

True if this group is a supergroup of the supplied group.

Parameters

subgroup (SymmetryGroup) – Subgroup to test.

Returns

True if this group is a supergroup of the supplied group.

abstract property symmetry_ops[source]

List of symmetry operations

Type

return

in_array_list(array_list, a, tol=1e-05)[source]

Extremely efficient nd-array comparison using numpy’s broadcasting. This function checks if a particular array a, is present in a list of arrays. It works for arrays of any size, e.g., even matrix searches.

Parameters
• array_list ([array]) – A list of arrays to compare to.

• a (array) – The test array for comparison.

• tol (float) – The tolerance. Defaults to 1e-5. If 0, an exact match is done.

Returns

(bool)

sg_symbol_from_int_number(int_number, hexagonal=True)[source]

Obtains a SpaceGroup name from its international number.

Parameters
• int_number (int) – International number.

• hexagonal (bool) – For rhombohedral groups, whether to return the hexagonal setting (default) or rhombohedral setting.

Returns

(str) Spacegroup symbol