# Modules¶

## catkit.build module¶

catkit.build.bulk(name, crystalstructure=None, primitive=False, **kwargs)[source]

Return the standard conventional cell of a bulk structure created using ASE. Accepts all keyword arguments for the ase bulk generator.

Parameters: name (Atoms object | str) – Chemical symbol or symbols as in ‘MgO’ or ‘NaCl’. crystalstructure (str) – Must be one of sc, fcc, bcc, hcp, diamond, zincblende, rocksalt, cesiumchloride, fluorite or wurtzite. primitive (bool) – Return the primitive unit cell instead of the conventional standard cell. standardized_bulk – The conventional standard or primitive bulk structure. Gratoms object
catkit.build.molecule(species, bond_index=None, vacuum=0)[source]

Return list of enumerated gas-phase molecule structures based on species and topology.

Parameters: species (str) – The chemical symbols to construct a molecule from. bond_index (int) – Construct the molecule as though it were adsorbed to a surface parallel to the z-axis. Will bond by the atom index given. vacuum (float) – Angstroms of vacuum to pad the molecules with. images – 3D structures of the requested chemical species and topologies. list of Gratoms objects
catkit.build.surface(elements, size, miller=(1, 1, 1), termination=0, fixed=0, vacuum=10, orthogonal=False, **kwargs)[source]

A helper function to return the surface associated with a given set of input parameters to the general surface generator.

Parameters: elements (str or object) – The atomic symbol to be passed to the as bulk builder function or an atoms object representing the bulk structure to use. size (list (3,)) – Number of time to expand the x, y, and z primitive cell. miller (list (3,) or (4,)) – The miller index to cleave the surface structure from. If 4 values are used, assume Miller-Bravis convention. termination (int) – The index associated with a specific slab termination. fixed (int) – Number of layers to constrain. vacuum (float) – Angstroms of vacuum to add to the unit cell. orthogonal (bool) – Force the slab generator to produce the most orthogonal slab. slab – Return a slab generated from the specified bulk structure. Gratoms object

## catkit.enumeration module¶

catkit.enumeration.surfaces(bulk, width, miller_indices=(1, 1, 1), terminations=None, sizes=None, vacuum=10, fixed=0, layer_type='angs', **kwargs)[source]

Return a list of enumerated surfaces based on symmetry properties of interest to the user. Any bulk structure provided will be standardized.

This function will take additional keyword arguments for the catkit.gen.surface.SlabGenerator() Class.

Parameters: bulk (str | Atoms) – The atomic symbol to be passed to the as bulk builder function or an atoms object representing the bulk structure to use. width (float) – Minimum width of the slab in angstroms before trimming. Imposing symmetry requirements will reduce the width. miller_indices (int | list (3,) | list of list (n, 3)) – List of the miller indices to enumerate slabs for. If an integer is provided, the value is treated as the maximum miller index to consider for an enumeration of all possible unique miller indices. terminations (int | array_like) – Return the terminations associated with the provided indices. If -1, all possible terminations are enumerated. sizes (None | int | array_like (n,)) – Enumerate all surface sizes in the provided list. Sizes are integers which represent multiples of the smallest possible surface area. If None, return slabs with the smallest possible surface area. If an integer, enumerate all sizes up to that multiple. vacuum (float) – Angstroms of vacuum to add to the unit cell. fixed (int) – Number of layers to constrain. layer_type ('angs' | 'trim' | 'stoich' | 'sym') – Method of slab layering to perform. See also: catkit.gen.surface.SlabGenerator() slabs – Return a list of enumerated slab structures. list of Gratoms objects

## catkit.gratoms module¶

class catkit.gratoms.Gratoms(symbols=None, positions=None, numbers=None, tags=None, momenta=None, masses=None, magmoms=None, charges=None, scaled_positions=None, cell=None, pbc=None, celldisp=None, constraint=None, calculator=None, info=None, edges=None)[source]

Bases: ase.atoms.Atoms

Graph based atoms object.

An Integrated class for an ASE atoms object with a corresponding Networkx Graph.

adj
connectivity
copy()[source]

Return a copy.

degree
edges
get_chemical_tags(rank=2)[source]

Generate a hash descriptive of the chemical formula (rank 0) or include bonding (rank 1).

get_neighbor_symbols(u)[source]

Get chemical symbols for neighboring atoms of u.

get_surface_atoms()[source]

Return surface atoms.

get_unsaturated_nodes(screen=None)[source]
graph
is_isomorph(other)[source]

Check if isomorphic by bond count and atomic number.

nodes
set_surface_atoms(top, bottom=None)[source]

Assign surface atoms.

## catkit.learn module¶

catkit.learn.online_learning(X, y, samples, factors=[1.0, 1.0], nsteps=40, plot=False)[source]

A simple utility for performing online learning. The main components required are a regression method and a scoring technique.

Currently, the scoring methodology and regressor are baked in. These need to be made modular.

Minimum 3 samples are required for 3 fold cross validation.

catkit.learn.optimizer(obj_func, initial_theta, bounds, gradient=True, minimizer='L-BFGS-B', hopping=0, **kwargs)[source]

Substitute optimizer in scikit-learn Gaussian Process function.

Note ‘L-BFGS-B’ is equivalent to the standard optimizer used in scikit-learn. This function allows for more direct control over the arguments. https://docs.scipy.org/doc/scipy/reference/optimize.html

Parameters: obj_func (function) – scikit-learn objective function. initial_theta (array (n,)) – Hyperparameters to be optimized against. bounds (list of tuples (n, 2)) – Lower and upper bounds for each hyper parameter. gradient (bool) – Include the gradient for the optimization function. minimizer (str) – A scipy minimization method. hopping (int) – Perform a number of basin hopping steps. theta_opt (list (n,)) – Optimized hyperparameters. func_min (float) – Value of the minimized objective function.