lmodea_k.InternalCoordinateSystem

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

lmodea_k.InternalCoordinateSystem#

class InternalCoordinateSystem(cluster, custom_coords=None, coordinate_types='badto', allowed_formulae=None, angle_tol=0.001, colinear_dihedral_tol=0.001, rot_axis=None)#

Build and manage the set of internal coordinates for a periodic system.

Parameters:
  • cluster (Cluster) – Cluster object with primitive-cell geometry, symmetry maps, and bond tables precomputed.

  • custom_coords (CustomCoordinateSet or None, optional) – CustomCoordinateSet object defining internal coordinates to include in the analysis.

  • coordinate_types (str, default "badto") – Letters selecting coordinate families: b=bonds, h=hydrogen bonds, a=angles, d=dihedrals, p=rings, t=cell translations, r=cell rotation (uses rot_axis), m=rigid molecular translations, q=rigid molecular rotations. This parameter is ignored if custom_coords are provided.

  • allowed_formulae (list[str] or None, optional) – Limit rigid-body molecular coordinates to the specified chemical formulas.

  • angle_tol (float, default 1e-3) – Tolerance (radians) for angle/dihedral construction.

  • colinear_dihedral_tol (float, default 1e-3) – Additional tolerance (radians) for detecting colinear dihedrals.

  • rot_axis ({"x","y","z",None}, optional) – Axis for the special rotation coordinate when "r" is in coordinate_types. If None and "r" is requested, defaults to “z” with a warning.

Notes

  • The object is iterable and indexable: for ic in ics or ics[i] yields InternalCoordinate instances; len(ics) returns the number of coordinates.

__init__(cluster, custom_coords=None, coordinate_types='badto', allowed_formulae=None, angle_tol=0.001, colinear_dihedral_tol=0.001, rot_axis=None)#

Methods

__init__(cluster[, custom_coords, ...])

build_B_matrix([wavevector, method])

Construct the Wilson B matrix for the selected internal coordinates.

complement_space([tol])

Augment the internal coordinate set with orthonormal complement vectors so that the Wilson B matrix spans the full 3N Cartesian space under the mass-weighted (physically relevant) metric.

copy()

from_crystal(crystal, **kwargs)

Build an InternalCoordinateSystem directly from a Crystal.

local_mode_analysis(K, L[, wavevector, ...])

Perform local mode analysis at a given wavevector.

reduce([tol, wavevector, normalise, report])

Reduce the internal coordinate set to a linearly independent subset using a QR decomposition of the primitive-cell B matrix.

save_cluster_xyz([all_path, molecules_path])

Write XYZ snapshots of the working cluster for visualization.

sort()

Sort and renumber internal coordinates for consistent output ordering.

Attributes

cluster

The Cluster object used to build this internal coordinate set.

counts

Return counts of internal coordinates by type, including 'TOTAL'.

masses

Atomic masses (primitive-cell ordering), copied from the Cluster.

overlap_matrix

Return the overlap matrix between internal coordinates and normal modes.

spans_vib_space

Checks whether the stored set of internal coordinates spans the vibrational space.