# Python interface¶

This is the Python interface generated via pybind11 from the C++ core classes and methods.

## Cluster¶

class _icet.Cluster
distances

list of floats – list of distances between sites

order

int – order of the cluster (= number of sites)

print()
radius

float – the radius of the cluster

sites

list of ints – site indices

sorted

boolean – True/False if the cluster is sorted/unsorted

tag

int – cluster tag (defined for sorted cluster)

## ClusterCounts¶

class _icet.ClusterCounts
count()
count_lattice_neighbors()
count_orbit_list()
get_cluster_counts()
get_cluster_counts_info()
print()
reset()
setup_cluster_counts_info()

## ClusterSpace¶

class _icet.ClusterSpace
element_map
get_allowed_occupations()
get_atomic_numbers()
get_cluster_product()
get_cluster_space_info()
get_cluster_space_size()
get_cluster_vector()
get_cutoffs()
get_mc_vector_permutations()
get_orbit()
get_orbit_list()

## LatticeSite¶

class _icet.LatticeSite
index

int – site index

print()
unitcell_offset

list of three ints – unit cell offset (in units of the cell vectors)

## LocalOrbitListGenerator¶

class _icet.LocalOrbitListGenerator
clear()
generate_full_orbit_list()
generate_local_orbit_list()
get_prim_to_supercell_map()
get_unique_offsets_count()
get_unique_primcell_offsets()

## ManyBodyNeighborList¶

class _icet.ManyBodyNeighborList
build()
calculate_intersection()

## NeighborList¶

class _icet.NeighborList
build()

Build a neighbor list for the given atomic configuration.

Parameters: structure (icet Structure instance) – atomic configuration
get_neighbors()

Returns a vector of lattice sites that identify the neighbors of site in question.

Parameters: index (int) – index of site in structure for which neighbor list was build list of LatticeSite instances
is_neighbor()

Check if two sites are neighbors.

Parameters: index1 (int) – index of the first site index2 (int) – index of the second site offset (NumPy array) – offset between the two sites in units of lattice vectors boolean

## Orbit¶

class _icet.Orbit
add_equivalent_sites()
allowed_permutations

Get the list of equivalent permutations for this orbit.

If this orbit is a triplet and the permutation [0,2,1] exists this means that The lattice sites [s1, s2, s3] are equivalent to [s1, s3, s2] This will have the effect that for a ternary CE the cluster functions (0,1,0) will not be considered since it is equivalent to (0,0,1).

equivalent_sites

List of equivalent Lattice Sites

get_all_possible_mc_vector_permutations()

Similar to get all permutations but needs to be filtered through the number of allowed elements.

Parameters: allowed_components (list of int) – The allowed components for the lattice sites, allowed_components[i] correspond to the lattice site self.representative_sites[i]. all_mc_vectors (returns) –
get_allowed_sites_permutations()
get_equivalent_sites()
get_equivalent_sites_permutations()
get_mc_vectors()

Return the mc vectors for this orbit given the allowed components. The mc vectors are returned as a list of tuples

Parameters: allowed_components (list of int) – The allowed components for the lattice sites, allowed_components[i] correspond to the number of allowed compoments at lattice site orbit.representative_sites[i].
get_representative_cluster()

The representative cluster represents the geometrical version of what this orbit is.

get_representative_sites()
get_sites_with_permutation()

Return the permuted to representative sites of equivalent_sites[index].

order

Returns the order of the orbit. The order is the same as the number of bodies in the representative cluster or the number of lattice sites per element in equivalent_sites.

permutations_to_representative

Get the list of permutations. Where permutations_to_representative[i] takes self.equivalent_sites[i] to the same order as self.representative_sites.

This can be used if you for example want to count elements and are interested in difference between ABB, BAB, BBA and so on. If you count the lattice sites that are permuted according to these permutations then you will get the correct counts.

permuted_sites

Get the equivalent sites but permuted to representative site.

radius

Returns the radius of the representative cluster.

representative_cluster

The representative cluster represents the geometrical version of what this orbit is.

representative_sites

The representative sites is a list of lattice sites that are uniquely picked out for this orbit which can be used to represent and distinguish between orbits.

sort()

Sort the equivalent sites list.

## OrbitList¶

class _icet.OrbitList
add_orbit()

Add an Orbit object to the OrbitList

clear()

Clears the OrbitList

find_orbit()

Return the index of the orbit with the given representative cluster

get_number_of_NClusters()

Returns the number of orbits in the OrbitList

get_orbit()

Returns a copy of the orbit at the position i in the OrbitList

get_orbit_list()

Returns a list of Orbit objects from OrbitList

get_primitive_structure()

Returns the primitive atomic structure used to construct the OrbitList instance

get_supercell_orbit_list(atoms)

Returns an orbit list for a supercell structure

Parameters: atoms (ASE Atoms object) – supercell atomic structure
is_row_taken()

Some random description

print()
sort()

Sort the orbits by orbit comparison

## PermutationMap¶

class _icet.PermutationMap
build()
get_indexed_positions()
get_permuted_positions()

## Structure¶

class _icet.Structure

This class stores the cell metric, positions, chemical symbols, and periodic boundary conditions that describe a structure. It also holds information pertaining to the components that are allowed on each site and provides functionality for computing distances between sites.

atomic_numbers

list of ints – atomic numbers of species on each site

cell

3x3 array – cell metric

chemical_symbols

list of strings – chemical symbols of species on each site

find_lattice_site_by_position()

Returns the lattice site that matches the position.

Parameters: position (list/NumPy array) – position in Cartesian coordinates lattice site LatticeSite object
find_lattice_sites_by_positions()

Returns the lattice sites that match the positions.

Parameters: positions (list of lists/NumPy arrays) – list of positions in Cartesian coordinates list of lattice sites list of LatticeSite object
find_site_by_position()

Returns the index of the site that matches the position.

Parameters: position (list/NumPy array) – position in Cartesian coordinates site index int
classmethod from_atoms(conf)

Creates an icet Structure object from an ASE Atoms object.

Parameters: conf (ASE Atoms object) – input configuration output configuration icet Structure object
get_atomic_numbers()

Returns a list of the species occupying each site by atomic number.

get_cell()

Returns the cell metric.

get_chemical_symbols()

Returns a list of the species occupying each site by chemical symbol.

get_distance()

Returns the distance between two sites

Parameters: index1 (int) – index of the first site index2 (int) – index of the second site offset1 (vector) – offset to be applied to the first site offset2 (vector) – offset to be applied to the second site distance in length units float
get_pbc()

Returns the periodic boundary conditions.

get_position()

Returns the position of a specified site

Parameters: site (LatticeSite object) – site of interest position in Cartesian coordinates vector
get_positions()

Returns the positions in Cartesian coordinates.

Returns: list of NumPy arrays
get_unique_site()

Returns the unique site.

Parameters: index (int) – index of site of interest index of unique site int
get_unique_sites()

Returns the unique sites.

Returns: list of ints
pbc

3-dimensional vector – periodic boundary conditions

positions

list of lists – atomic positions in Cartesian coordinates

set_atomic_numbers()

Sets the species occupying each site by atomic number.

Parameters: atomic_numbers (list of ints) – new species by atomic number
set_cell()

Sets the cell metric.

set_chemical_symbols()

Sets the species occupying each site by chemical symbol.

Parameters: chemical_symbols (list of strings) – new species by chemical symbol
set_pbc()

Sets the periodic boundary conditions.

set_positions()

Set the positions in Cartesian coordinates.

Parameters: positions (list of NumPy arrays) – new positions in Cartesian coordinates
set_unique_sites()

Set unique sites.

This method allows one to specify for each site in the structure the unique site it is related to.

Parameters: unique_sites (list of ints) – site of interest
to_atoms()

Returns the structure as an ASE Atoms object.

Returns: atomic configuration ASE Atoms object
unique_sites

list of ints – unique sites