-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Refactor CondensedPhaseArrhenius in musica.mechanism_configuration to use composition instead of inheritance from _CondensedPhaseArrhenius.
Acceptance Criteria
- The class no longer inherits from
_CondensedPhaseArrhenius. - The internal C++ instance is held in
self._instance. - All properties (e.g.,
A,B,C, etc.) delegate to or update the internal C++ object. - Reactants and products use Python
SpeciesandPhaseobjects. serialize()works as an instance method and operates entirely on Python-visible data.- Public interface reflects only Python-native types.
Ideas
- Use the wrapper pattern from
tuvx.pyas a guide. - Consider creating helper functions for conversion between
Species/Phaseand_ReactionComponent. - Use
@propertydecorators for clean delegation.
Tasks
- Replace
class CondensedPhaseArrhenius(_CondensedPhaseArrhenius)withclass CondensedPhaseArrhenius. - Construct the C++
_CondensedPhaseArrheniusinstance inside__init__and assign toself._instance. - Forward all attributes and logic to
self._instanceusing property methods where needed. - Ensure
reactants,products,aerosol_phase, andaerosol_phase_wateruse PythonSpeciesandPhaseobjects. - Update the
serialize()method to access only Python-visible data. - Remove the
@staticmethodpattern fromserialize; support instance method serialization.
Reactions are currently unavailable