# Calculators¶

## ClusterExpansionCalculator¶

class mchammer.calculators.ClusterExpansionCalculator(atoms, cluster_expansion, name='Cluster Expansion Calculator')

Cluster expansion calculator.

Class for efficiently calculating the cluster expansion property for a specific structure

Parameters: atoms (ASE Atoms object) – the structure that the calculator can use to optimize the calculate functions. cluster_expansion (icet ClusterExpansion object) – name (str) – human readable identifier for this calculator
atoms

ASE Atoms object.

calculate_local_contribution(indices)

Return the sum of the contributions from the indices in the input list.

Parameters: indices (list of ints) – float sum of contributions
calculate_total()

Calculator the total property of the current configuration.

Returns: total_property float
cluster_expansion

icet ClusterExpansion object.

set_elements(indices, elements)

Set elements on the atoms object.

Parameters: indices (list of int) – The list refer to indice on the lattice. elements (list of int) – The elements to put on the corresponding lattice site.