Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
updated constructor for copasi with adding new global params
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Mar 4, 2024
1 parent 615e248 commit a76b4a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions biosimulator_processes/processes/copasi_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@ def __init__(self, config=None, core=None):
for param_type, param_value in param_change.items():
if not param_value:
param_change.pop(param_type)
set_parameters(**param_change, model=self.copasi_model_object)

# handle changes to existing params
set_parameters(name=param_name, **param_change, model=self.copasi_model_object)
# set new params
if param_name not in existing_global_parameters:
assert param_change.get('initial_concentration') is not None, "You must pass an initial_concentration value if adding a new global parameter."
add_parameter(name=param_name, **param_change, model=self.copasi_model_object)

# Get the species (floating only) TODO: add boundary species
self.floating_species_list = get_species(model=self.copasi_model_object).index.tolist()
Expand Down

0 comments on commit a76b4a0

Please sign in to comment.