Observers

ClusterExpansionObserver

class mchammer.observers.ClusterExpansionObserver(cluster_expansion, interval, tag='ClusterExpansionObserver')[source]

This class represents a cluster expansion (CE) observer.

A CE observer allows to compute a property described by a CE along the trajectory sampled by a Monte Carlo (MC) simulation. In general this CE differs from the CE that is used to generate the trajectory. For example in a canonical MC simulation the latter would usually represent an energy (total or mixing energy) whereas the former CE(s) could map lattice constant or band gap.

Parameters:
  • cluster_expansion (icet.ClusterExpansion cluster expansion model) – to be used for observation
  • tag (str) – human readable observer name (default: ClusterExpansionObserver)
  • interval (int) – observation interval during the Monte Carlo simulation
tag

name of observer

Type:str
interval

observation interval

Type:int
get_observable(atoms)[source]

Returns the value of the property from a cluster expansion model for a given atomic configuration.

Parameters:atoms (Atoms) – input atomic structure.
Return type:float
return_type

Data type of the observed data.

Return type:type

SiteOccupancyObserver

class mchammer.observers.SiteOccupancyObserver(cluster_space, sites, super_cell, interval)[source]

This class represents a site occupation factor (SOF) observer.

A SOF observer allows to compute the site occupation factors along the trajectory sampled by a Monte Carlo (MC) simulation.

Parameters:
  • cluster_space (icet.ClusterSpace) – cluster space from which the allowed species are extracted
  • sites (dict(str, list(int))) – dictionary containing lists of sites that are to be considered, which keys will be taken as the names of the sites
  • super_cell (ase.Atoms) – an atoms object that represents a typical super cell, which is used to determine the allowed species
  • interval (int) – observation interval during the Monte Carlo simulation
tag

name of observer

Type:str
interval

observation interval

Type:int
get_observable(atoms)[source]

Returns the site occupation factors for a given atomic configuration.

Parameters:atoms (Atoms) – input atomic structure.
Return type:Dict[str, List[float]]
return_type

Data type of the observed data.

Return type:type