ccu.adsorption.orientation

Interfaces for orienting adsorbates on adsorption sites.

class ccu.adsorption.orientation.AdsorptionCenter(position: NDArray[np.floating], description: str)[source]

Bases: NamedTuple

A tuple representing a point in space used to center an adsorbate.

Variables:
  • position (NDArray[np.floating]) – A length 3, 1D numpy.ndarray of floats representing the position of the adsorption center in space.

  • description (str) – A description of the adsorption center (e.g., "on C1").

Create new instance of AdsorptionCenter(position, description)

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('position', 'description')
classmethod _make(iterable)

Make a new AdsorptionCenter object from a sequence or iterable

_replace(**kwds)

Return a new AdsorptionCenter object replacing specified fields with new values

description: str

Alias for field number 1

position: NDArray[np.floating]

Alias for field number 0

class ccu.adsorption.orientation.CenterFactory(*args, **kwargs)[source]

Bases: Protocol

A Callable that generates AdsorptionCenters.

The numpy.ndarrays returned when calling implementers of this protocol should identify different points used to center an adsorbate.

_abc_impl = <_abc._abc_data object>
_is_protocol = True
class ccu.adsorption.orientation.OctahedralFactory(transformations: Iterable[Transformation] | None = None, check_symmetry: bool = False)[source]

Bases: Transformer

A Transformer composed of the O:sub:h symmetry group.

Instantiate a OctahedralFactory.

Parameters:
  • transformations – A list of Transformation instances. This argument will be ignored.

  • check_symmetry – Whether or not to exlude symmetric images.

_abc_impl = <_abc._abc_data object>
_is_protocol = False
class ccu.adsorption.orientation.OrientationFactory(*args, **kwargs)[source]

Bases: Protocol

A Callable that generates MolecularOrientations.

_abc_impl = <_abc._abc_data object>
_is_protocol = True
class ccu.adsorption.orientation.Transformer(transformations: Iterable[Transformation] | None = None, check_symmetry: bool = False)[source]

Bases: OrientationFactory

A Transformation-based OrientationFactory.

Instances of this class generate MolecularOrientations by transforming each SiteAlignment Transformation.

Variables:
  • transformations – A list of Transformation instances.

  • check_symmetry – Whether or not to exlude symmetric images.

Note

In order for MolecularOrientations representing the original SiteAlignment.directions to be returned by the Transformer, at least one Transformation in Transformer.transformations should be equivalent to the identity transformation.

Instantiate a Transformer.

Parameters:
  • transformations – A list of Transformation instances. Defaults to a list containing a single Transformation that returns a copy of the input :class:~ase.Atoms` object.

  • check_symmetry – Whether or not to exlude symmetric images.

_abc_impl = <_abc._abc_data object>
_is_protocol = False
ccu.adsorption.orientation.atomic_centerer(adsorbate: Atoms) list[AdsorptionCenter][source]

A CenterFactory that returns atomic centers.

Parameters:

adsorbate – An Atoms object.

Returns:

A list of AdsorptionCenters representing the atomic positions of adsorbate with descriptions in the form SYMBOL_INDEX, where SYMBOL and INDEX are the atom’s chemical symbol and index, respectively.

ccu.adsorption.orientation.com_centerer(adsorbate: Atoms) list[AdsorptionCenter][source]

A CenterFactory for centering adsorbates with their COM.

Parameters:

adsorbate – An Atoms object.

Returns:

A list containing a single

AdsorptionCenters corresponding to the centre-of-mass of adsorbate.

ccu.adsorption.orientation.special_centerer(adsorbate: Atoms) list[AdsorptionCenter][source]

A CenterFactory that returns special centers.

Special centers must be identified by the key "special_centers" in adsorbate.info.

Parameters:

adsorbate – An Atoms object.

Returns:

A list of special centers–relative to the adsorbate center of mass.