The Cluster class¶
Objects of this class define clusters.
Initialization and methods¶
- class clusterx.clusters.cluster.Cluster(atom_indexes, atom_numbers, super_cell=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.
- Parameters:
- atom_indexesndarray of int
The atomic indices of the base super cell used for the initialization of the cluster.
- atom_numbersndarray of int
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_cellSuperCell, 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.
- get_alphas()¶
Return labels of point basis-functions of cluster
- get_idxs()¶
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.
- Parameters:
- rrarray of 3x3 matrices
rotations of the symmetry operations
- ttarray 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.
- cell3x3 matrix
The symmetry operations
rrandttrefer to scaled coordinates. The parametercellcontains row-wise the corresponding cartesian coordinates of the cell vectors.
- get_nrs()¶
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.
- get_positions()¶
Return cartesian coordinates of the cluster points.
- get_radius(distances=None)¶
Return cluster radius The radius of a cluster is the maximum distance between any pair of its points. Distances (optional) contains all distances of the plat/scell.
- set_radius(radius)¶
Set cluster radius manually