ccu.structure.fingerprint

This module defines the Fingerprint class.

class ccu.structure.fingerprint.Fingerprint(structure: ase.Atoms, reference: int, indices: Iterable[int] | None = None)[source]

Bases: MutableMapping

A set of displacement vectors relative to a particular atom.

The displacement vectors for atoms of a given chemical symbol can be accessed through the MutableMapping interface. For example:

structure = ase.Atoms("CO", positions=[[0, 0, 0], [1, 0, 0]])
fp = Fingerprint(structure, 0, [0, 1])
fp["C"]
Variables:
  • structure – The ase.Atoms instance to which the Fingerprint instance is related.

  • reference – An int indicating the index of the reference atom used to construct the Fingerprint instance.

  • indices – A tuple indicating the indices of the atoms within the structure used to construct the Fingerprint instance.

Generate a fingerprint from a structure.

Parameters:
  • structure – The structure for which the Fingerprint will be generated.

  • reference – The index of the reference atom within structure to Fingerprint.

  • indices – The indices of the atoms corresponding to the points for which the displacements will be calculated to generate the fingerprint. Defaults to None.

_abc_impl = <_abc._abc_data object>
classmethod from_structure(structure: ase.Atoms) list[Fingerprint][source]

Creates a list of Fingerprint objects from an ase.Atoms object.

Parameters:

structure – An ase.Atoms instance representing the structure from which to create the list of Fingerprints.

Returns:

A list of the Fingerprints for each atom.