Occupant#

class libcasm.xtal.Occupant(
self: Occupant,
name: str,
atoms: collections.abc.Sequence[AtomComponent] = [],
is_divisible: bool = False,
properties: collections.abc.Mapping[str, Annotated[numpy.typing.ArrayLike, numpy.float64, '[m, n]']] = {},
)#

Bases: pybind11_object

A site occupant, which may be a vacancy, atom, or molecule

The Occupant class is used to represent all chemical species, including single atoms, vacancies, and molecules.

Special Methods

  • Occupant may be copied with Occupant.copy, copy.copy, or copy.deepcopy.

Constructor

Parameters:
  • name (str) – A "chemical name", which must be identical for occupants to be found symmetrically equivalent. The names are case sensitive, and “Va” is reserved for vacancies.

  • atoms (list[AtomComponent], optional) – The atomic components of a molecular occupant. Atoms and vacancies are represented with a single AtomComponent with the same name for the Occupant and the AtomComponent. If atoms is an empty list (the default value), then an atom or vacancy is created, based on the name parameter.

  • is_divisible (bool, default=False) – If True, indicates an Occupant that may split into components during kinetic Monte Carlo calculations.

  • properties (dict[str, array_like], default={}) –

    Fixed properties of the occupant, such as magnetic spin or selective dynamics flags. Keys must be the name of a CASM-supported property type. Values are arrays with dimensions matching the standard dimension of the property type.

    See the CASM Degrees of Freedom (DoF) and Properties documentation for the full list of supported properties and their definitions.

Methods

atoms(…)

Returns the atomic components of the occupant

copy(…)

Returns a copy of the Lattice.

from_dict(…)

Construct an Occupant from a Python dict

is_atomic(…)

True if occupant is a single isotropic atom or vacancy

is_divisible(…)

True if occupant is divisible in kinetic Monte Carlo calculations

is_vacancy(…)

True if occupant is a vacancy.

name(…)

The "chemical name" of the occupant

properties(…)

Returns the fixed properties of the occupant

to_dict(…)

Represent the Occupant as a Python dict