nuclearity
nuclearity#
Functions to assess nuclearity on catlas entries. Original code taken from https://github.com/ulissigroup/NuclearityCalculation Original author: Unnatti Sharma
- catlas.nuclearity.evaluate_infiniteness(hist, hist_rep)#
Function that compares the connected counts between the minimal slab and a repeated slab to classify the type of infiniteness.
- Parameters
hist (list[int]) – list of nuclearities observed in minimal slab
hist_rep (list[int]) – list of nuclearities observed in replicated slab
- Returns
the max nuclearity and all nuclearities for the element on that surface
- Return type
nuclearity dict (dict)
- catlas.nuclearity.get_connectivity_matrix(slab_atoms)#
Get connectivity matrix by looking at nearest neighbors.
- Parameters
slab_atoms (ase.Atoms) – a slab object
- Returns
an array describing what atoms are connected
- Return type
numpy.ndarray[int8]
- catlas.nuclearity.get_nuclearity(entry)#
Function to get the nuclearity for each element in a surface.
- Parameters
entry (dict) – a catlas-like entry object
- Returns
a catlas-like entry object with nuclearity info added
- Return type
dict
- catlas.nuclearity.get_nuclearity_neighbor_counts(surface_atoms_of_element, connectivity_matrix)#
Function that counts the like surface neighbors for surface atoms.
- Parameters
surface_atoms_of_element (list[bool]) – list of all surface atoms which are of a specific element
connectivity_matrix (numpy.ndarray[int8]) – which atoms in the slab are connected
- Returns
counts of neighbor groups
- Return type
numpy.ndarray[int]