diff --git a/src/acom_music_box/main.py b/src/acom_music_box/main.py index 83c101ed..db9b6a35 100644 --- a/src/acom_music_box/main.py +++ b/src/acom_music_box/main.py @@ -1,6 +1,6 @@ import os import argparse -from acom_music_box import MusicBox, Examples +from acom_music_box import MusicBox, Examples, __version__ import datetime import sys import logging @@ -40,6 +40,11 @@ def parse_arguments(): default=0, help='Increase logging verbosity. Use -v for info, -vv for debug.' ) + parser.add_argument( + '--version', + action='version', + version=f'MusicBox {__version__}', + ) parser.add_argument( '--color-output', action='store_true', diff --git a/src/acom_music_box/music_box.py b/src/acom_music_box/music_box.py index e9d9aab3..65fe7363 100644 --- a/src/acom_music_box/music_box.py +++ b/src/acom_music_box/music_box.py @@ -427,7 +427,7 @@ def create_solver( # Create a solver object using the configuration file self.solver = musica.create_solver( path_to_config, - musica.micmsolver.rosenbrock, + solver_type, number_of_grid_cells) def solve(self, output_path=None): @@ -697,16 +697,6 @@ def speciesOrdering(self): """ return musica.species_ordering(self.solver) - def userDefinedReactionRates(self): - """ - Retrieves the user-defined reaction rates from the solver. - - This function calls the `user_defined_reaction_rates` function from the `musica` module, - passing the solver instance from the current object. - - Returns: - dict: The dictionary of user-defined reaction rates used in the solver. - """ @classmethod def order_reaction_rates(self, curr_conditions, rate_constant_ordering): """