Calculators¶
ClusterExpansionCalculator¶

class
mchammer.calculators.
ClusterExpansionCalculator
(atoms, cluster_expansion, name='Cluster Expansion Calculator', scaling=None)¶ 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 (float) – scaling factor applied to the property value predicted by the cluster expansion
Todo
 add OccupationConstraints once available

atoms
¶ atomic structure associated with calculator
Return type: Atoms

calculate_local_contribution
(local_indices=None, occupations=None)¶ 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)¶ 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 (