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

class
_icet.
Cluster
¶ 
distances
¶ list of distances between sites
Type: list of floats

from_python
(lattice_sites, sort=False, clusterIndex=1)¶ Construct a cluster from atoms and python lattice sites

order
¶ order of the cluster (= number of sites)
Type: int

print
()¶

radius
¶ the radius of the cluster
Type: float

sites
¶ site indices
Type: list of ints

sorted
¶ True/False if the cluster is sorted/unsorted
Type: boolean

tag
¶ cluster tag (defined for sorted cluster)
Type: int

ClusterCounts¶

class
_icet.
ClusterCounts
¶ 
count
()¶ Counts the vectors in latticeSites assuming these sets of sites are represented by the cluster cluster.
Parameters:  structure (icet Structure) – structure that will have its clusters counted
 latticeSites (list of list of LatticeSite objects) – group of sites, represented by cluster that will be counted
 cluster (icet Cluster) – cluster used as identification on what sites the clusters belong to
 orderIntact (bool) – if true the order of the sites will remain the same otherwise the vector of species being counted will be sorted

count_lattice_neighbors
()¶

count_orbit_list
()¶ Counts sites in the orbit list.
Parameters:  structure (icet Structure) –
 orbit_list (icet OrbitList) –
 order_intact (bool) – if true do not reorder clusters before comparison (i.e., ABC != ACB)
 permuteSites (bool) – if true the sites will be permuted according to the corresponding permutations in the orbit

get_cluster_counts
()¶

reset
()¶

ClusterSpace¶

class
_icet.
ClusterSpace
¶ 
evaluate_cluster_function
()¶ Evaluates value of a cluster function.

get_chemical_symbols
()¶ Returns list of species associated with cluster space as chemical symbols.

get_cluster_space_info
()¶

get_cluster_space_size
()¶

get_cluster_vector
()¶

get_cutoffs
()¶

get_multi_component_vector_permutations
()¶

get_number_of_allowed_species_by_site
()¶

get_orbit
()¶

species_maps
¶

LatticeSite¶
LocalOrbitListGenerator¶

class
_icet.
LocalOrbitListGenerator
¶ 
clear
()¶ Clears the list of offsets and primitivetosupercell map of the LocalOrbitListGenerator object

generate_full_orbit_list
()¶ Generates and returns a local orbit list, which orbits included the equivalent sites of all local orbit list in the supercell.

generate_local_orbit_list
()¶ Generates and returns the local orbit list from an input index corresponding a specific offset of the primitive structure.
Parameters: index (int) – index of the unique offsets list Generates and returns the local orbit list from a specific offset of the primitive structure.
Parameters: unique_offset (NumPy array) – offset of the primitive structure

get_number_of_unique_offsets
()¶ Returns the number of unique offsets

NeighborList¶

class
_icet.
NeighborList
¶ 
build
()¶ Builds 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 Returns: Return type: list of LatticeSite instances

is_neighbor
()¶ Checks 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
Returns: Return type: 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
¶ list of permutations; 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 list of orbits.

get_number_of_nbody_clusters
()¶ 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 the list of orbits

get_primitive_structure
()¶ Returns the primitive atomic structure used to construct the OrbitList instance

orbits
¶ list of orbits
Type: list(_icet.Orbit)

permutation_matrix
¶ permutation_matrix
Type: list of list of icet LatticeSite objects

remove_orbit
()¶ Removes the orbit with the input index.
Parameters: index (int) – index of the orbit to be removed

sort
()¶ Sorts the orbits by orbit comparison

PermutationMatrix¶
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.
Parameters:  positions (list of vectors) – list of positions in Cartesian coordinates
 chemical_symbols (list of strings) – chemical symbol of each case
 cell (3x3 array) – cell metric
 pbc (list of booleans) – periodic boundary conditions
 tolerance (float) – numerical tolerance imposed when testing for equality of positions and distances

atomic_numbers
¶ atomic numbers of species on each site
Type: list of ints

cell
¶ cell metric
Type: list(list(float))

chemical_symbols
¶ chemical symbols of species on each site
Type: list of strings

find_lattice_site_by_position
()¶ Returns the lattice site that matches the position.
Parameters: position (list/NumPy array) – position in Cartesian coordinates Returns: lattice site Return type: 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 Returns: list of lattice sites Return type: 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 Returns: site index Return type: int

classmethod
from_atoms
(conf)¶ Returns the input configuration as an icet Structure object.
Parameters: conf ( Atoms
) – input configurationReturns: Return type: atomic configuration

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
Returns: distance in length units
Return type: float

get_pbc
()¶ Returns the periodic boundary conditions.

get_position
()¶ Returns the position of a specified site
Parameters: site (LatticeSite object) – site of interest Returns: position in Cartesian coordinates Return type: vector

get_positions
()¶ Returns the positions in Cartesian coordinates.
Returns: Return type: list of NumPy arrays

get_unique_site
()¶ Returns the unique site.
Parameters: index (int) – index of site of interest Returns: index of unique site Return type: int

get_unique_sites
()¶ Returns the unique sites.
Returns: Return type: list of ints

pbc
¶ periodic boundary conditions
Type: list(int)

positions
¶ atomic positions in Cartesian coordinates
Type: list of lists

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_number_of_allowed_species
()¶ Sets the number of allowed species on each site.
This method allows one to specify for each site in the structure the number of species allowed on that site.
Parameters: numbersOfAllowedSpecies (list of int) – Sets the number of allowed species on each site.
This method allows one to specify for each site in the structure the number of species allowed on that site.
Parameters: numbersOfAllowedSpecies (int) –

set_pbc
()¶ Sets the periodic boundary conditions.

set_positions
()¶ Sets the positions in Cartesian coordinates.
Parameters: positions (list of NumPy arrays) – new positions in Cartesian coordinates

set_unique_sites
()¶ Sets the 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: Return type: atomic configuration

unique_sites
¶ unique sites
Type: list of ints