Orbits#
Implementation of an Orbit.
A set of symmetrically equivalent (with respect to the given random structure symmetry) clusters.
- class Orbit(cluster_coords, lattice, bits, site_bases, structure_symops)[source]#
Bases:
MSONable
Orbit set of symmetrically equivalent clusters.
An Orbit represents a set of clusters that are symmetrically equivalent in the random structure. The class also includes the possible orderings on the clusters in the orbit. The different orderings represent the single site function indices to generate all possible orbit functions (correlation functions) for the given orbit.
An orbit usually includes translational and structure symmetry of the underlying lattice. But this is not a hard requirement, and any set of symmetry operations can be passed to the constructor. Regardless, an orbit should at a minimum have translational symmetry.
You probably never need to instantiate this class directly. Look at ClusterSubspace to create orbits and clusters necessary for a CE.
- bits#
List of lists describing the possible non-constant site function indices at each site of a cluster in the orbit.
- Type:
list of list
- site_bases#
List of the SiteBasis for each site.
- Type:
list of DiscreteBasis
- structure_symops#
List of underlying structure symmetry operations.
- Type:
list of Symmops
- lattice#
Underlying Structure’s lattice.
- Type:
Lattice
Initialize an Orbit.
- Parameters:
cluster_coords (list or ndarray) – list of frac coords for the sites in base cluster.
lattice (pymatgen.Lattice) – a Lattice object for the given sites
bits (list of list) – list describing the possible site function indices for each site in cluster. Should be the number of possible occupancies minus one. For a 3 site cluster, each of which can have one of Li, TM, or Vac, bits are [[0, 1], [0, 1], [0, 1]] This is ensures the expansion is not “over-complete” by implicitly enforcing that all sites have a site basis function phi_0 = 1.
site_bases (list of DiscreteBasis) – list of SiteBasis objects for each site in the given sites.
structure_symops (list of SymmOp) – list of symmetry operations for the base structure
- assign_ids(orbit_id, orbit_bit_id, start_cluster_id)[source]#
Assign unique orbit and cluster ID’s.
This should be called iteratively for a list of orbits to get a proper set of unique ID’s for the orbits.
- Parameters:
orbit_id (int) – orbit id
orbit_bit_id (int) – starting bit ordering id
start_cluster_id (int) – starting cluster id
- Returns:
next orbit id, next bit ordering id, next cluster id
- Return type:
(int, int, int)
- property basis_arrays#
Get a tuple of all site function arrays for each site in orbit.
- property basis_orthogonal#
Test if the Orbit bases are orthogonal.
- property basis_orthonormal#
Test if the orbit bases are orthonormal.
- property basis_type#
Return the name of basis set used.
- property bit_combo_multiplicities#
Get the multiplicities of the symmetrically distinct bit ordering.
- property bit_combos#
Get tuple of contracted multi-indeces for site function ordering.
tuple of ndarrays, each array is a set of symmetrically equivalent bit orderings represented by each row. Bit combos represent non-constant site function orderings.
- property cluster_permutations#
Get the symmetrical site permutations that map a cluster to itself.
A permutation is a mapping such that for a give symop in cluster_symops Symop.operate(sites) = sites[mapping] (after translation back to unit cell)
- property cluster_symops#
Get symmetry operations that map a cluster to its periodic image.
Each element is a pymatgen.core.operations.Symop.
- property clusters#
Get symmetrically equivalent clusters.
- property correlation_tensors#
Get the array of correlation functions for all possible configs.
Array of stacked correlation arrays for each symmetrically distinct set of bit combos, i.e a correlation function.
The correlations array is a multidimensional array with each dimension corresponding to each site space.
First dimension is for bit_combos, and the remaining dimensions correspond to site spaces.
i.e. correlation_tensors[0, 1, 0, 2] gives the value of the correlation function for bit_combo 0 evaluated for a cluster with occupancy [1, 0, 2]
- property flat_correlation_tensors#
Get correlation_tensors flattened to 2D for fast cython.
- property flat_tensor_indices#
Index multipliers to read data easier from flat corr tensors.
- is_sub_orbit(orbit)[source]#
Check if given orbits clusters are subclusters.
Note this does not consider bit_combos
- Parameters:
orbit (Orbit) – Orbit object to check if its clusters are subclusters
- Returns:
True if the clusters of given orbit are subclusters.
- Return type:
bool
- property multiplicity#
Get number of clusters in orbit per normilizing unit cell.
- remove_bit_combo(bits)[source]#
Remove bit_combos from orbit.
Only a single set of bits in the bit combo (symmetrically equivalent bit orderings) needs to be passed.
- property rotation_array#
Get the rotation array.
The rotation array is of size len(bit combos) x len(bit combos)
- property site_spaces#
Get the site spaces for the site basis associated with each site.
- sub_orbit_mappings(orbit)[source]#
Return a mapping of cluster sites in the orbit to cluster sites in sub orbit.
If the given orbit is not a sub-orbit will return an empty list. Note this works for mapping between sites, sites spaces, and basis functions associated with each site.
- Parameters:
orbit (Orbit) – A sub orbit to return mapping of sites
- Returns:
a list of indices such that self.base_cluster.sites[indices] = orbit.base_cluster.sites
- Return type:
list