Calculators¶
ClusterExpansionCalculator¶

class
mchammer.calculators.
ClusterExpansionCalculator
(atoms, cluster_expansion, name='Cluster Expansion Calculator', scaling=None, use_local_energy_calculator=True)[source]¶ A ClusterExpansionCalculator object enables the efficient calculation of properties described by a cluster expansion. It is specific for a particular (supercell) structure and commonly employed when setting up a Monte Carlo simulation, see Ensembles.
Cluster expansions, e.g., of the energy, typically yield property values per site. When running a Monte Carlo simulation one, however, considers changes in the total energy of the system. The default behavior is therefore to multiply the output of the cluster expansion by the number of sites. This behavior can be changed via the
scaling
keyword parameter.Parameters:  atoms (
Atoms
) – structure for which to set up the calculator  cluster_expansion (ClusterExpansion) – cluster expansion from which to build calculator
 name (
str
) – humanreadable identifier for this calculator  scaling (
Union
[float
,int
,None
]) – scaling factor applied to the property value predicted by the cluster expansion  use_local_energy_calculator (
bool
) – evaluate energy changes using only the local environment; this method is generally much faster; unless you know what you are doing do not set this option to False

atoms
¶ atomic structure associated with calculator
Return type: Atoms

calculate_local_contribution
(*, local_indices, occupations)[source]¶ Calculates and returns the sum of the contributions to the property due to the sites specified in local_indices
Parameters: Return type:

calculate_total
(*, occupations)[source]¶ Calculates and returns the total property value of the current configuration.
Parameters: occupations ( List
[int
]) – the entire occupation vector (i.e. list of atomic species)Return type: float

cluster_expansion
¶ cluster expansion from which calculator was constructed
Return type: ClusterExpansion
 atoms (