lmodea_k.Cluster

\(\newcommand{\AA}{\text{Å}}\)

lmodea_k.Cluster#

class Cluster(crystal=None, cluster_dim=None, custom_cutoffs=None, allowed_formulae=None)#

Describes a cluster (non-periodic supercell) built from a unit cell.

Parameters:
  • crystal (Crystal) – A Crystal object representing the unit cell.

  • dim (list of int, optional) – Number of unit cells along each lattice vector, default is [3, 3, 3].

  • custom_cutoffs (list of tuples, optional) – List of ((element1, element2), (min_cutoff, max_cutoff)) tuples that override the default bonding cutoffs.

Raises:

ValueError – If a Crystal object is not provided.

Notes

The cluster geometry is fixed after construction; derived data such as distance matrices and bond graphs are cached and assume immutable coordinates.

__init__(crystal=None, cluster_dim=None, custom_cutoffs=None, allowed_formulae=None)#

Methods

__init__([crystal, cluster_dim, ...])

expand_eigenvectors_and_masses(L, wavevector)

Expand primitive-cell eigenvectors and masses to the 3×3×3 cluster.

find_cluster_indices(pc_indices, Rl)

Return indices i such that:

Attributes

Rl

Lattice index (integer offsets) for each cluster atom.

all_angles

List of angles (A, B, C) with B in center cell, cluster indices.

all_bonds

List of covalent bonds as (a, b) cluster-index tuples (a < b).

all_dihedrals

List of dihedrals (A, B, C, D) with B in center cell, cluster indices.

all_molecules

Return all unique molecules in the cluster as lists of cluster atom indices.

all_rings

List of chordless rings as lists of cluster atom indices (all in center cell).

asymm_unit_map

Map from primitive-cell atom index to asymmetric unit index.

bond_graph

Adjacency list of covalent bonds (cluster indices).

cell_real

Real-space lattice vectors (3x3, Å).

coords

Cartesian coordinates of cluster atoms (Å).

cutoffs

Bond cutoff dictionary (including any user overrides).

distance_matrix

Full pairwise distance matrix for cluster atoms in Å (natoms x natoms).

hbond_graph

Adjacency list of hydrogen bonds (cluster indices).

hydrogen_bonds

List of hydrogen bonds as (a, b) cluster-index tuples (a < b).

pc_coords_cart

Cartesian coordinates of primitive-cell atoms.

pc_coords_frac

Fractional coordinates of primitive-cell atoms.

pc_index_map

Map from cluster atom index to primitive-cell atom index.

pc_masses

Atomic masses of primitive-cell atoms.

pc_natoms

Number of atoms in the primitive cell.

pc_symbols

Element symbols in the primitive cell.