CodeEntropy.levels.dihedrals.conformational_state_builder module¶
Public conformational-state builder for dihedral analysis.
This module keeps the stable ConformationStateBuilder entry point used by
ConformationDAG while the implementation is split across domain-specific
helpers for topology discovery, angle observation, peak detection, and state
assignment.
- class CodeEntropy.levels.dihedrals.conformational_state_builder.ConformationStateBuilder(universe_operations: Any)[source]¶
Bases:
ConformationPeakDetector,ConformationStateAssignerBuild conformational state labels from selected-frame dihedral angles.
- build_conformational_states(data_container: Any, levels: dict[Any, list[str]], groups: dict[int, list[Any]], bin_width: float, frame_selection: FrameSelection, progress: _RichProgressSink | None = None, chunk_size: int | None = None) tuple[dict[tuple[int, int], list[str]], list[list[str]], dict[tuple[int, int], int], list[int]][source]¶
Build conformational state labels from selected trajectory frames.
- Parameters:
data_container – MDAnalysis Universe or compatible container used to extract fragments and compute dihedral time series.
levels – Mapping of molecule id to enabled level names.
groups – Mapping of group id to molecule ids.
bin_width – Histogram bin width in degrees used when identifying peak dihedral populations.
frame_selection – FrameSelection controlling which absolute frames are analysed.
progress – Optional progress sink.
chunk_size – Optional internal frame chunk size. When omitted, the full selected-frame range is processed as a single chunk.
- Returns:
Tuple
(states_ua, states_res, flexible_ua, flexible_res).