CodeEntropy.levels.nodes.conformations module

Compute conformational states for configurational entropy calculations.

This module defines a static DAG node that scans the selected trajectory frames and builds conformational state descriptors (united-atom and residue level). The resulting states are stored in shared_data for later use by configurational entropy calculations.

class CodeEntropy.levels.nodes.conformations.ComputeConformationalStatesNode(universe_operations: Any)[source]

Bases: object

Static node that computes conformational states from trajectory dihedrals.

Produces:

shared_data[“conformational_states”] = {“ua”: states_ua, “res”: states_res} shared_data[“flexible_dihedrals”] = {“ua”: flexible_ua, “res”: flexible_res}

Where:
  • states_ua is a dict keyed by (group_id, local_residue_id).

  • states_res is a list-like structure indexed by group id.

  • flexible_ua is a dict keyed by (group_id, local_residue_id).

  • flexible_res is a list-like structure indexed by group id.

Notes

Frame selection is provided through shared_data["frame_selection"]. During the current migration stage, that selection uses local analysis-universe frame indices because the workflow still physically frame-slices the universe.

run(shared_data: dict[str, Any], *, progress: object | None = None) dict[str, dict[str, Any]][source]

Compute conformational states and store them in shared_data.

Parameters:
  • shared_data – Shared data dictionary. Requires: - "reduced_universe" - "levels" - "groups" - "frame_selection" - "args" with attribute bin_width

  • progress – Optional progress sink provided by ResultsReporter.progress().

Returns:

Dict containing "conformational_states".

class CodeEntropy.levels.nodes.conformations.ConformationalStateConfig(n_frames: int, bin_width: int)[source]

Bases: object

Configuration for conformational state construction.

Variables:
  • n_frames (int) – Number of frames to be analysed.

  • bin_width (int) – Histogram bin width in degrees.

bin_width: int
n_frames: int