The Cluster class

Objects of this class define clusters.

Initialization and methods

class clusterx.clusters.cluster.Cluster(atom_indexes, atom_numbers, super_cell=None, distances=None)

Cluster class

Objects of this class represent clusters. The intialization of these objects relies on the definition of a supercell. Once initialized, some of the attributes still refer to the supercell (e.g. atom indexes), while other (e.g. atomic positions) are independent of the supercell definition.


atom_indexes: array of integer

The atomic indices of the base super cell used for the initialization of the cluster.

atom_numbers: array of integer

In order to represent the selection of single-point basis functions for the cluster, atomic numbers are used in the initialization. The possible values to select from, correspond to the possible substitutional species that can occupy the site in the corresponding atom index in the array atom_indexes.

super_cell: SuperCell object (default: None)

If not given on initialization, only basic attributes (e.g. atom indices and numbers) are set. Otherwise, a complete definition is set up, containing atom coordinates, basis function indices, site types (which indicate which sublattices a cluster point belongs to), etc.

distances: matrix of float (default: None)

to speed up the calculation of the cluster radius on initialization, the distances between all pairs of atoms in the supercell may be passed in this argument.



Return labels of point basis-functions of cluster


Return array of atom indices referred to the defining supercell.

get_multiplicity(rr, tt, cell, pbc)

Calculate cluster multiplicity (Experimental. To get the cluster multiplicities, see documentation for ClustersPool class)

Uses symmetry operations as returned by spglib to find cluster multiplicity.


rr: array of 3x3 matrices

rotations of the symmetry operations

tt: array of 3x1 vectors

translations of the symmetry operations. From spglib doc: The orders of the rotation matrices and the translation vectors correspond with each other, e.g. , the second symmetry operation is organized by the set of the second rotation matrix and second translation vector in the respective arrays.

cell: 3x3 matrix

The symmetry operations rr and tt refer to scaled coordinates. The parameter cell contains row-wise the corresponding cartesian coordinates of the cell vectors.


Return array of atom numbers.

In the context of the clusters as mathematical objects, the atomic numbers here must be understood as an alias (i.e. an index), for the single-site basis function on each point of the cluster.


Return cartesian coordinates of the cluster points.


Return cluster radius The radius of a cluster is the maximum distance between any pair of its points.