symmetry package

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(int_symbol)[source]

Bases: symmetry.groups.SymmetryGroup

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

symbol

Full International or Hermann-Mauguin Symbol.

generators

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

symmetry_ops

Full set of symmetry operations as matrices.

Initializes a Point Group from its international symbol.

Parameters:int_symbol (str) – International or Hermann-Mauguin Symbol.
class SpaceGroup(int_symbol)[source]

Bases: symmetry.groups.SymmetryGroup

Class representing a SpaceGroup.

symbol

Full International or Hermann-Mauguin Symbol.

int_number

International number

generators

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

Initializes a Space Group from its full international symbol.

Parameters:int_symbol (str) – Full International or Hermann-Mauguin Symbol. The notation is a LaTeX-like string, with screw axes being represented by an underscore. For example, “P6_3/mmc”.
crystal_system[source]
classmethod from_int_number(int_number, hexagonal=True)[source]

Obtains a SpaceGroup 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:

(SpaceGroup)

get_orbit(p)[source]

Returns the orbit for a point.

Parameters:p – Point as a 3x1 array.
Returns:([array]) Orbit for point.
symmetry_ops[source]

Full set of symmetry operations as matrices. Lazily initialized as generation sometimes takes a bit of time.

class SymmetryGroup[source]

Bases: object

get_orbit(p, tol=1e-05)[source]

Returns the orbit for a point.

Parameters:
  • p – Point as a 3x1 array.
  • tol – Tolerance for determining if sites are the same. 1e-5 should be sufficient for most purposes. Set to 0 for exact matching (and also needed for symbolic orbits).
Returns:

([array]) Orbit for point.

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.

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

Table Of Contents

Previous topic

Introduction

This Page