SiteOccupation

class ase2sprkkr.sprkkr.occupations.SiteOccupation(site)[source]

Proxy for the Occupation of a Site that raises a RuntimeError before any mutating operation when the site still has symmetry (i.e. shares its SiteType with other sites). Call site.break_symmetry() first and then mutate freely.

Inherits read delegation and the transparent __class__ / isinstance() behaviour from SitePropertyProxy; only mutating operations are overridden here.

Class hierarchy

Inheritance diagram of ase2sprkkr.sprkkr.occupations.SiteOccupation

Constructor

__init__(site)[source]
set(dct, update_atoms=True, for_mesh=None)[source]
Parameters:

dct (Dict[AtomicType | str, float] | List[Tuple[AtomicType | str, float]])

Return type:

None

add(name, value=None)[source]
replace_type(name, to)[source]
clean()[source]
property as_dict