Skip to content

Monte Carlo on certain sites of a sublattice

Description

Implemented the possibility to run MC on specific sites on a (sub)lattice via an allowed_sites functionality, similar to allowed_symbols, for the HybridEnsemble:

ce = ClusterExpansion.read(...)
prim = ce.primitive_structure
structure = prim.repeat((3, 3, 1))

# Unit cell: 10 layer slab with 2 adsorbate sites -> 
# 0, 12, 24, ... and 9, 21, 33, ... are surface sites
allowed_sites = [i + j*12 for j in range(9) for i in [0, 9]]

ensemble_specs = [{'ensemble': 'canonical', 'sublattice_index': 0, 
                   'allowed_symbols': ['Au', 'Pd'], 'allowed_sites': allowed_sites}]
mc = HybridEnsemble(structure=structure, ..., ensemble_specs=ensemble_specs)

Closes #603 (closed)

Edited by Paul Erhart

Merge request reports