# distribution_brute

Functions for creating distributions of atomic indices using brute-force approaches.

## Index

 brute_uniform_idx(mol, idx[, n, operation, ...]) Brute force approach to creating uniform or clustered distributions.

## API

CAT.attachment.distribution_brute.brute_uniform_idx(mol, idx, n=2, operation='min', weight=<function <lambda>>)[source]

Brute force approach to creating uniform or clustered distributions.

Explores, and evaluates, all valid combinations of size $$n$$ constructed from the $$k$$ atoms in neighbor closest to each atom in center.

The combination where the $$n$$ atoms are closest (operation = 'max') or furthest removed from each other (operation = 'min') is returned.

Parameters:
• mol (array-like [float], shape $$(m,3)$$) – An array-like object with Cartesian coordinate representing a collection of central atoms.

• idx (array-like [int], shape $$(l,p)$$) – An array-like object with indices in mol. Combinations will be explored and evaluated along axis -1 of the passed array.

• n (int) – The number of to-be returned opposing atoms. Should be larger than or equal to 1.

• operation (str) – Whether to evaluate the weighted distance using argmin() or argmax(). Accepted values are "min" and "max".

• weight (Callable) – A callable for applying weights to the distance; default: $$e^{-x}$$. The callable should take an array as argument and return a new array, e.g. numpy.exp().

Returns:

An array with indices of opposing atoms.

Return type:

numpy.ndarray [int], shape $$(m, n)$$

uniform_idx()