-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Description
The current LevelManager class has grown too large and handles multiple responsibilities, including managing levels, beads, coordinates, dihedrals, matrices, forces, and torques. This makes the code difficult to maintain, test, and extend.
This task aims to modularize the class into focused components and introduce a graph/DAG-based representation of hierarchical dependencies. This will simplify computations, reduce repeated loops, and make it easier to add new entropy estimates in the future.
Scope
- Split
LevelManagerinto multiple classes:LevelHierarchy: manages levels and beads.CoordinateSystem: computes axes, average positions, and coordinate transformations.StructuralAnalysis: handles dihedrals and structural metrics.MatrixOperations: handles submatrices and matrix utilities.ForceTorqueManager: calculates weighted forces and torques.
- Implement a DAG-based computation order for hierarchical entropy calculations.
- Refactor existing methods into these classes without changing external behavior.
- Ensure
LevelManageracts only as a coordinator. - Update internal documentation and APIs.
Tasks
- Map current
LevelManagermethods to the proposed modular classes. - Implement
LevelHierarchyto manage levels and beads. - Implement
CoordinateSystemfor axes and position calculations. - Implement
StructuralAnalysisfor dihedral and structural calculations. - Implement
MatrixOperationsfor submatrix and matrix handling. - Implement
ForceTorqueManagerfor weighted force and torque calculations. - Introduce DAG-based representation of levels and beads to pre-map dependencies.
- Update
LevelManagerto coordinate modular components and DAG-based computation. - Unit test each new class independently.
- Document new architecture and DAG-based workflow.
Benefits
- Single Responsibility Principle: Each class has one clear responsibility.
- Testability: Easier to write unit tests and verify calculations.
- Maintainability: Refactoring or adding new features is safer and easier.
- Scalability: DAG ensures correct computation order and reduces redundant calculations.
- Future-Proofing: Adding new entropy estimates is straightforward using existing modular classes and DAG traversal.
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or request