# Core components¶

The low-level functions and classes described here are part of the hiPhive core components and not intended to be used directly during normal operation.

## Clusters and orbits¶

The following functions and classes provide functionality for handling clusters and the symmetry relations among them.

class cluster_list.ClusterList(bi_dir=True)[source]

A collection for handling a set of clusters.

See the AtomList for details since the functionality is the basically the same

append(cluster)[source]

Append a cluster.

Parameters: cluster (list of ints) – cluster to be added
copy()[source]
index(cluster)[source]

Return index of given cluster.

Parameters: cluster (list of ints) – cluster of interest index of given cluster int

The orientation_family module contains the OrientationFamily class, which acts like a struct that contains information about a set of equal clusters of equal orientation in space.

class orientation_family.OrientationFamily(symmetry_index=None)[source]

A container for storing information for a “family of orientations”.

An orbit contains many clusters. Some of the clusters can be tranlsated onto each other and other must first be rotated. A set of clusters in the orbit which can all be translated onto each other are oriented in the same way and belongs to the same orientation family. The family is haracterized by the symmetry (rotation) which relates it to the prototype structure of the orbit.

Since the clusters are generally stored sorted the permutation information must also be stored.

Parameters: symmetry_index (int) – The index of the symmetry corresponding to spglibs symmetry
symmetry_index

int – The index of the symmetry corresponding to spglibs symmetry

cluster_indices

list of ints – The indices of the clusters belonging to this family

permutation_indices

list of ints – The indices of the permutation vector

static read(f)[source]

Load a OrientationFamily object from a pickle file.

Parameters: f (str or file object) – name of input file (str) or stream to load from (file object) OrientationFamily object
write(f)[source]

Write the object to file.

Parameters: f (str or file object) – name of input file (str) or stream to write to (file object)