Goal
Cache static residue axes topology so customised residue covariance avoids repeated MDAnalysis topology selection inside the frame loop.
Background
After caching customised united-atom axes topology, profiling shows the residue axes path is the next similar hotspot. The current path repeatedly selects residue heavy atoms, calculates UA masses, and checks neighbouring-residue bonds, even though these relationships are static across frames.
Scope
- Add cached residue topology to
shared_data["axes_topology"].
- Cache only frame-independent data:
- Add unit tests and confirm regression outputs remain unchanged.
- residue heavy atom indices
- residue UA masses
- neighbouring-residue bond status
- Add a cached residue axes path, e.g.
get_residue_axes_from_topology(...).
- Use the cached path in
FrameCovarianceNode when available.
- Keep
get_residue_axes(...) as the fallback.
- Do not change force, torque, covariance, entropy, Dask, or scheduling logic.
Goal
Cache static residue axes topology so customised residue covariance avoids repeated MDAnalysis topology selection inside the frame loop.
Background
After caching customised united-atom axes topology, profiling shows the residue axes path is the next similar hotspot. The current path repeatedly selects residue heavy atoms, calculates UA masses, and checks neighbouring-residue bonds, even though these relationships are static across frames.
Scope
shared_data["axes_topology"].get_residue_axes_from_topology(...).FrameCovarianceNodewhen available.get_residue_axes(...)as the fallback.