MHCXGraph.utils.tools.generate_frames¶
- MHCXGraph.utils.tools.generate_frames(component_graph, matrices, maps, len_component, chunk_id, step, config, debug=False, debug_every=5000, nodes=None, steps_end=False, residue_tracker: ResidueTracker | None = None)[source]¶
Generate coherent structural frames from a component graph.
Frames correspond to coherent subgraphs satisfying distance and adjacency constraints.
- Parameters:
component_graph (networkx.Graph) – Graph component under analysis.
matrices (dict) – Coherence matrices and adjacency matrices.
maps (dict) – Residue mapping dictionary.
len_component (int) – Number of nodes in the component.
chunk_id (int) – Chunk identifier.
step (int) – Association step index.
config (dict) – Association configuration.
debug (bool, default=False) – Enable debug logging.
debug_every (int, default=5000) – Interval for progress logging during search.
nodes (list, optional) – Node ordering corresponding to matrix indices.
steps_end (bool, default=False) – If True, perform final frame filtering.
residue_tracker (ResidueTracker, optional) – Tracking object used for recording accepted frames.
- Returns:
frames (dict) – Dictionary describing generated frames.
union_graph (dict) – Graph representation combining all accepted frames.