Expand description
Coordinate transformation utilities.
Provides functions for extracting, filtering, and aligning coordinates:
- Backbone/CA extraction
- Atom filtering
- Kabsch alignment
Structs§
- Named
Residue Atom Search - Spatial data for per-residue atom proximity lookups that also carry atom names.
- Residue
Atom Search - Spatial data needed for per-residue atom proximity lookups.
Constants§
- PROTEIN_
RESIDUES - Standard amino acid residue names
Functions§
- align_
coords_ bytes - Align coordinate bytes to match reference CA positions.
- align_
to_ reference - Align COORDS to match reference CA positions using Kabsch algorithm.
- backbone_
only - Filter COORDS to only backbone atoms (N, CA, C, O).
- build_
ca_ position_ map - Build a map of (chain_id, res_num) -> CA position for efficient lookup.
- centroid
- Compute centroid of a point set.
- extract_
backbone_ chains - Extract backbone chains from COORDS data.
- extract_
ca_ from_ chains - Extract CA positions from backbone chains (every 2nd element in N-CA-C pattern).
- extract_
ca_ positions - Extract CA positions from COORDS data.
- filter_
atoms - Filter atoms by predicate on atom name.
- filter_
residues - Filter atoms by predicate on residue name.
- get_
atom_ by_ name - Get position of a specific atom by residue number, chain ID, and atom name.
- get_
atom_ position - Get atom position by index.
- get_
backbone_ atoms_ from_ chains - Get all backbone atom positions (N, CA, C) for a residue by index. Returns None if residue_idx is out of bounds.
- get_
ca_ for_ residue - Get CA position for a specific residue by residue number and chain ID.
- get_
ca_ position_ from_ chains - Get a single CA position by residue index from backbone chains. Returns None if residue_idx is out of bounds.
- get_
closest_ atom_ for_ residue - Get the closest atom (backbone or sidechain) to a reference point for a residue.
- get_
closest_ atom_ with_ name - Find the closest atom to a reference point within a residue, returning both position and atom name.
- get_
closest_ backbone_ atom - Get the closest backbone atom position to a reference point for a residue.
- heavy_
atoms_ only - Filter COORDS to only heavy atoms (exclude hydrogens).
- interpolate_
coords - Linear interpolation between two Coords instances.
- interpolate_
coords_ collapse - Interpolate Coords with a collapse/expand effect through a collapse point.
- kabsch_
alignment - Kabsch algorithm: find optimal rotation and translation to align target to reference.
- kabsch_
alignment_ with_ scale - Kabsch-Umeyama algorithm: find optimal rotation, translation, AND scale.
- protein_
only - Filter COORDS to only protein residues (remove water, ligands, etc.).
- set_
atom_ position - Set atom position by index.
- transform_
coords - Apply transformation to all atoms in COORDS.
- transform_
coords_ with_ scale - Apply transformation with scale to all atoms in COORDS.