\(\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
RlLattice index (integer offsets) for each cluster atom.
all_anglesList of angles (A, B, C) with B in center cell, cluster indices.
all_bondsList of covalent bonds as (a, b) cluster-index tuples (a < b).
all_dihedralsList of dihedrals (A, B, C, D) with B in center cell, cluster indices.
all_moleculesReturn all unique molecules in the cluster as lists of cluster atom indices.
all_ringsList of chordless rings as lists of cluster atom indices (all in center cell).
asymm_unit_mapMap from primitive-cell atom index to asymmetric unit index.
bond_graphAdjacency list of covalent bonds (cluster indices).
cell_realReal-space lattice vectors (3x3, Å).
coordsCartesian coordinates of cluster atoms (Å).
cutoffsBond cutoff dictionary (including any user overrides).
distance_matrixFull pairwise distance matrix for cluster atoms in Å (natoms x natoms).
hbond_graphAdjacency list of hydrogen bonds (cluster indices).
hydrogen_bondsList of hydrogen bonds as (a, b) cluster-index tuples (a < b).
pc_coords_cartCartesian coordinates of primitive-cell atoms.
pc_coords_fracFractional coordinates of primitive-cell atoms.
pc_index_mapMap from cluster atom index to primitive-cell atom index.
pc_massesAtomic masses of primitive-cell atoms.
pc_natomsNumber of atoms in the primitive cell.
pc_symbolsElement symbols in the primitive cell.