SitePropertyProxy

class ase2sprkkr.sprkkr.sites.SitePropertyProxy(site, getter)[source]

Generic proxy for a SiteType-delegated property (mesh, potential, charge, moments, reference_system) that intercepts in-place attribute mutations and calls site.break_symmetry() first, ensuring the change only affects the individual site rather than all symmetry-equivalent sites.

Only instantiate when the underlying value is not None; return None directly for None-valued properties so that site.potential is None keeps working.

Class hierarchy

Inheritance diagram of ase2sprkkr.sprkkr.sites.SitePropertyProxy

Constructor

__init__(site, getter)[source]
_get_target()[source]
_check_mutation_allowed()[source]

Raise if the proxied site still shares its SiteType with other sites.

Delegates to Site._check_mutation_allowed(), which is the single authoritative place for this logic.