-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSBML2AMICI.m
More file actions
30 lines (29 loc) · 981 Bytes
/
SBML2AMICI.m
File metadata and controls
30 lines (29 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function SBML2AMICI( filename, modelname )
% SBML2AMICI generates AMICI model definition files from SBML.
%
% Parameters:
% filename: name of the SBML file (withouth extension)
% modelname: name of the model, this will define the name of the
% output file (default: input filename)
%
% Return values:
% void
if(nargin<2)
modelname = filename;
end
wrap_path=fileparts(mfilename('fullpath'));
if(~exist(fullfile(wrap_path,'SBMLimporter'),'dir'))
error('SBMLimporter is not available, try running `git submodule update --init`')
end
addpath(fullfile(wrap_path,'SBMLimporter'));
ODE = SBMLode(filename);
ODE.writeAMICI(modelname);
pnom = ODE.pnom;
knom = ODE.knom;
vnom = ODE.volume;
kvnom = ODE.kvolume;
save([modelname '_pnom.mat'],'pnom');
save([modelname '_knom.mat'],'knom');
save([modelname '_vnom.mat'],'vnom');
save([modelname '_kvnom.mat'],'kvnom');
end