SBMLToolbox-4.1.0/0000755000000000000000000000000011704572216012323 5ustar rootrootSBMLToolbox-4.1.0/VERSION.txt0000644000000000000000000000000611701315266014202 0ustar rootroot4.1.0 SBMLToolbox-4.1.0/toolbox/0000755000000000000000000000000011704572220014004 5ustar rootrootSBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/0000755000000000000000000000000011704572222021637 5ustar rootrootSBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/0000755000000000000000000000000011704572222022556 5ustar rootrootSBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/test_valid.m0000644000000000000000000004452711703270126025103 0ustar rootrootfunction y = test_valid() % test = 0; Totalfail = 0; test = test + 9; fail = TestIsSBML_AlgebraicRule; if (fail > 0) disp('isSBML_AlgebraicRule failed'); end; Totalfail = Totalfail + fail; test = test + 9; fail = TestIsSBML_AssignmentRule; if (fail > 0) disp('isSBML_AssignmentRule failed'); end; Totalfail = Totalfail + fail; test = test + 13; fail = TestIsSBML_Compartment; if (fail > 0) disp('isSBML_Compartment failed'); end; Totalfail = Totalfail + fail; test = test + 5; fail = TestIsSBML_CompartmentVolumeRule; if (fail > 0) disp('isSBML_CompartmentVolumeRule failed'); end; Totalfail = Totalfail + fail; test = test + 15; fail = TestIsSBML_Event; if (fail > 0) disp('isSBML_Event failed'); end; Totalfail = Totalfail + fail; test = test + 8; fail = TestIsSBML_EventAssignment; if (fail > 0) disp('isSBML_EventAssignment failed'); end; Totalfail = Totalfail + fail; test = test + 8; fail = TestIsSBML_FunctionDefinition; if (fail > 0) disp('isSBML_FunctionDefinition failed'); end; Totalfail = Totalfail + fail; test = test + 12; fail = TestIsSBML_KineticLaw; if (fail > 0) disp('isSBML_KineticLaw failed'); end; Totalfail = Totalfail + fail; test = test + 7; fail = TestIsSBML_LocalParameter; if (fail > 0) disp('isSBML_LocalParameter failed'); end; Totalfail = Totalfail + fail; test = test + 8; fail = TestIsSBML_ModifierSpeciesReference; if (fail > 0) disp('isSBML_ModifierSpeciesReference failed'); end; Totalfail = Totalfail + fail; test = test + 9; fail = TestIsSBML_Parameter; if (fail > 0) disp('isSBML_Parameter failed'); end; Totalfail = Totalfail + fail; test = test + 5; fail = TestIsSBML_ParameterRule; if (fail > 0) disp('isSBML_ParameterRule failed'); end; Totalfail = Totalfail + fail; test = test + 10; fail = TestIsSBML_Priority; if (fail > 0) disp('isSBML_Priority failed'); end; Totalfail = Totalfail + fail; test = test + 9; fail = TestIsSBML_RateRule; if (fail > 0) disp('isSBML_RateRule failed'); end; Totalfail = Totalfail + fail; test = test + 10; fail = TestIsSBML_Reaction; if (fail > 0) disp('isSBML_Reaction failed'); end; Totalfail = Totalfail + fail; test = test + 11; fail = TestIsSBML_Species; if (fail > 0) disp('isSBML_Species failed'); end; Totalfail = Totalfail + fail; test = test + 5; fail = TestIsSBML_SpeciesConcentrationRule; if (fail > 0) disp('isSBML_SpeciesConcentrationRule failed'); end; Totalfail = Totalfail + fail; test = test + 10; fail = TestIsSBML_SpeciesReference; if (fail > 0) disp('isSBML_SpeciesReference failed'); end; Totalfail = Totalfail + fail; test = test + 10; fail = TestIsSBML_UnitDefinition; if (fail > 0) disp('isSBML_UnitDefinition failed'); end; Totalfail = Totalfail + fail; test = test + 10; fail = TestIsSBML_Unit; if (fail > 0) disp('isSBML_Unit failed'); end; Totalfail = Totalfail + fail; test = test + 10; fail = TestIsSBML_CompartmentType; if (fail > 0) disp('isSBML_CompartmentType failed'); end; Totalfail = Totalfail + fail; test = test + 8; fail = TestIsSBML_SpeciesType; if (fail > 0) disp('isSBML_SpeciesType failed'); end; Totalfail = Totalfail + fail; test = test + 7; fail = TestIsSBML_InitialAssignment; if (fail > 0) disp('isSBML_InitialAssignment failed'); end; Totalfail = Totalfail + fail; test = test + 7; fail = TestIsSBML_Constraint; if (fail > 0) disp('isSBML_Constraint failed'); end; Totalfail = Totalfail + fail; test = test + 13; fail = TestIsSBML_Trigger; if (fail > 0) disp('isSBML_Trigger failed'); end; Totalfail = Totalfail + fail; test = test + 8; fail = TestIsSBML_Delay; if (fail > 0) disp('isSBML_Delay failed'); end; Totalfail = Totalfail + fail; test = test + 8; fail = TestIsSBML_StoichiometryMath; if (fail > 0) disp('isSBML_StoichiometryMath failed'); end; Totalfail = Totalfail + fail; if isBindingInstalled() == 1 m = TranslateSBML('../../Test/test-data/l1v1.xml'); ud = m.unitDefinition(1); c = m.compartment(1); s = m.species(1); p = m.parameter(1); r = m.reaction(1); test = test + 6; fail = 0; pass = isValidSBML_Model(m); if (pass == 0) fail = fail + 1; disp('l1v1 Model failed'); end; pass = isSBML_UnitDefinition(ud, 1, 1); if (pass == 0) fail = fail + 1; disp('l1v1 UnitDefinition failed'); end; pass = isSBML_Compartment(c, 1, 1); if (pass == 0) fail = fail + 1; disp('l1v1 Compartment failed'); end; pass = isSBML_Species(s, 1, 1); if (pass == 0) fail = fail + 1; disp('l1v1 Species failed'); end; pass = isSBML_Parameter(p, 1, 1); if (pass == 0) fail = fail + 1; disp('l1v1 Parameter failed'); end; pass = isSBML_Reaction(r, 1, 1); if (pass == 0) fail = fail + 1; disp('l1v1 Reaction failed'); end; Totalfail = Totalfail + fail; m = TranslateSBML('../../Test/test-data/l1v2-all.xml'); ud = m.unitDefinition(1); c = m.compartment(1); s = m.species(1); p = m.parameter(1); ar = m.rule(1); scr = m.rule(2); cvr = m.rule(3); pr = m.rule(4); r = m.reaction(1); test = test + 10; fail = 0; pass = isValidSBML_Model(m); if (pass == 0) fail = fail + 1; disp('l1v2 Model failed'); end; pass = isSBML_UnitDefinition(ud, 1, 2); if (pass == 0) fail = fail + 1; disp('l1v2 UnitDefinition failed'); end; pass = isSBML_Compartment(c, 1, 2); if (pass == 0) fail = fail + 1; disp('l1v2 Compartment failed'); end; pass = isSBML_Species(s, 1, 2); if (pass == 0) fail = fail + 1; disp('l1v2 Species failed'); end; pass = isSBML_Parameter(p, 1, 2); if (pass == 0) fail = fail + 1; disp('l1v2 Parameter failed'); end; pass = isSBML_AlgebraicRule(ar, 1, 2); if (pass == 0) fail = fail + 1; disp('l1v2 Rule 1 failed'); end; pass = isSBML_SpeciesConcentrationRule(scr, 1, 2); if (pass == 0) fail = fail + 1; disp('l1v2 Rule 2 failed'); end; pass = isSBML_CompartmentVolumeRule(cvr, 1, 2); if (pass == 0) fail = fail + 1; disp('l1v2 Rule 3 failed'); end; pass = isSBML_ParameterRule(pr, 1, 2); if (pass == 0) fail = fail + 1; disp('l1v2 Rule 4 failed'); end; pass = isSBML_Reaction(r, 1, 2); if (pass == 0) fail = fail + 1; disp('l1v2 Reaction failed'); end; Totalfail = Totalfail + fail; m = TranslateSBML('../../Test/test-data/l2v1-all.xml'); fd = m.functionDefinition(1); ud = m.unitDefinition(1); c = m.compartment(1); s = m.species(1); p = m.parameter(1); ar = m.rule(1); asr = m.rule(2); rr = m.rule(3); r = m.reaction(1); e = m.event(1); test = test + 11; fail = 0; pass = isValidSBML_Model(m); if (pass == 0) fail = fail + 1; disp('l2v1 Model failed'); end; pass = isSBML_FunctionDefinition(fd, 2, 1); if (pass == 0) fail = fail + 1; disp('l2v1 FunctionDefinition failed'); end; pass = isSBML_UnitDefinition(ud, 2, 1); if (pass == 0) fail = fail + 1; disp('l2v1 UnitDefinition failed'); end; pass = isSBML_Compartment(c, 2, 1); if (pass == 0) fail = fail + 1; disp('l2v1 Compartment failed'); end; pass = isSBML_Species(s, 2, 1); if (pass == 0) fail = fail + 1; disp('l2v1 Species failed'); end; pass = isSBML_Parameter(p, 2, 1); if (pass == 0) fail = fail + 1; disp('l2v1 Parameter failed'); end; pass = isSBML_AlgebraicRule(ar, 2, 1); if (pass == 0) fail = fail + 1; disp('l2v1 Rule 1 failed'); end; pass = isSBML_AssignmentRule(asr, 2, 1); if (pass == 0) fail = fail + 1; disp('l2v1 Rule 2 failed'); end; pass = isSBML_RateRule(rr, 2, 1); if (pass == 0) fail = fail + 1; disp('l2v1 Rule 3 failed'); end; pass = isSBML_Reaction(r, 2, 1); if (pass == 0) fail = fail + 1; disp('l2v1 Reaction failed'); end; pass = isSBML_Event(e, 2, 1); if (pass == 0) fail = fail + 1; disp('l2v1 Event failed'); end; Totalfail = Totalfail + fail; m = TranslateSBML('../../Test/test-data/l2v2-all.xml'); fd = m.functionDefinition(1); ud = m.unitDefinition(1); ct = m.compartmentType(1); st = m.speciesType(1); c = m.compartment(1); s = m.species(1); p = m.parameter(1); ia = m.initialAssignment(1); ar = m.rule(1); asr = m.rule(2); rr = m.rule(3); con = m.constraint(1); r = m.reaction(1); e = m.event(1); test = test + 15; fail = 0; pass = isValidSBML_Model(m); if (pass == 0) fail = fail + 1; disp('l2v2 Model failed'); end; pass = isSBML_FunctionDefinition(fd,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 FunctionDefinition failed'); end; pass = isSBML_UnitDefinition(ud,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 UnitDefinition failed'); end; pass = isSBML_CompartmentType(ct,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 CompartmentType failed'); end; pass = isSBML_SpeciesType(st,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 SpeciesType failed'); end; pass = isSBML_Compartment(c,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 Compartment failed'); end; pass = isSBML_Species(s,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 Species failed'); end; pass = isSBML_Parameter(p,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 Parameter failed'); end; pass = isSBML_InitialAssignment(ia,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 InitialAssignment failed'); end; pass = isSBML_AlgebraicRule(ar,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 Rule 1 failed'); end; pass = isSBML_AssignmentRule(asr,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 Rule 2 failed'); end; pass = isSBML_RateRule(rr,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 Rule 3 failed'); end; pass = isSBML_Constraint(con,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 Constraint failed'); end; pass = isSBML_Reaction(r,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 Reaction failed'); end; pass = isSBML_Event(e,2, 2); if (pass == 0) fail = fail + 1; disp('l2v2 Event failed'); end; Totalfail = Totalfail + fail; m = TranslateSBML('../../Test/test-data/l2v3-all.xml'); fd = m.functionDefinition(1); ud = m.unitDefinition(1); ct = m.compartmentType(1); st = m.speciesType(1); c = m.compartment(1); s = m.species(1); p = m.parameter(1); ia = m.initialAssignment(1); ar = m.rule(1); asr = m.rule(2); rr = m.rule(3); con = m.constraint(1); r = m.reaction(1); e = m.event(1); test = test + 15; fail = 0; pass = isValidSBML_Model(m); if (pass == 0) fail = fail + 1; disp('l2v3 Model failed'); end; pass = isSBML_FunctionDefinition(fd,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 FunctionDefinition failed'); end; pass = isSBML_UnitDefinition(ud,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 UnitDefinition failed'); end; pass = isSBML_CompartmentType(ct,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 CompartmentType failed'); end; pass = isSBML_SpeciesType(st,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 SpeciesType failed'); end; pass = isSBML_Compartment(c,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 Compartment failed'); end; pass = isSBML_Species(s,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 Species failed'); end; pass = isSBML_Parameter(p,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 Parameter failed'); end; pass = isSBML_InitialAssignment(ia,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 InitialAssignment failed'); end; pass = isSBML_AlgebraicRule(ar,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 Rule 1 failed'); end; pass = isSBML_AssignmentRule(asr,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 Rule 2 failed'); end; pass = isSBML_RateRule(rr,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 Rule 3 failed'); end; pass = isSBML_Constraint(con,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 Constraint failed'); end; pass = isSBML_Reaction(r,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 Reaction failed'); end; pass = isSBML_Event(e,2, 3); if (pass == 0) fail = fail + 1; disp('l2v3 Event failed'); end; Totalfail = Totalfail + fail; m = TranslateSBML('../../Test/test-data/l2v4-all.xml'); fd = m.functionDefinition(1); ud = m.unitDefinition(1); ct = m.compartmentType(1); st = m.speciesType(1); c = m.compartment(1); s = m.species(1); p = m.parameter(1); ia = m.initialAssignment(1); ar = m.rule(1); asr = m.rule(2); rr = m.rule(3); con = m.constraint(1); r = m.reaction(1); e = m.event(1); test = test + 15; fail = 0; pass = isValidSBML_Model(m); if (pass == 0) fail = fail + 1; disp('l2v4 Model failed'); end; pass = isSBML_FunctionDefinition(fd,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 FunctionDefinition failed'); end; pass = isSBML_UnitDefinition(ud,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 UnitDefinition failed'); end; pass = isSBML_CompartmentType(ct,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 CompartmentType failed'); end; pass = isSBML_SpeciesType(st,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 SpeciesType failed'); end; pass = isSBML_Compartment(c,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 Compartment failed'); end; pass = isSBML_Species(s,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 Species failed'); end; pass = isSBML_Parameter(p,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 Parameter failed'); end; pass = isSBML_InitialAssignment(ia,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 InitialAssignment failed'); end; pass = isSBML_AlgebraicRule(ar,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 Rule 1 failed'); end; pass = isSBML_AssignmentRule(asr,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 Rule 2 failed'); end; pass = isSBML_RateRule(rr,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 Rule 3 failed'); end; pass = isSBML_Constraint(con,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 Constraint failed'); end; pass = isSBML_Reaction(r,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 Reaction failed'); end; pass = isSBML_Event(e,2, 4); if (pass == 0) fail = fail + 1; disp('l2v4 Event failed'); end; Totalfail = Totalfail + fail; m = TranslateSBML('../../Test/test-data/l3v1core.xml'); fd = m.functionDefinition(1); ud = m.unitDefinition(1); c = m.compartment(1); s = m.species(1); p = m.parameter(1); ia = m.initialAssignment(1); ar = m.rule(1); asr = m.rule(2); rr = m.rule(3); con = m.constraint(1); r = m.reaction(1); e = m.event(1); test = test + 15; fail = 0; pass = isValidSBML_Model(m); if (pass == 0) fail = fail + 1; disp('l3v1 Model failed'); end; pass = isSBML_FunctionDefinition(fd,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 FunctionDefinition failed'); end; pass = isSBML_UnitDefinition(ud,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 UnitDefinition failed'); end; pass = isSBML_Compartment(c,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Compartment failed'); end; pass = isSBML_Species(s,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Species failed'); end; pass = isSBML_Parameter(p,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Parameter failed'); end; pass = isSBML_InitialAssignment(ia,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 InitialAssignment failed'); end; pass = isSBML_AlgebraicRule(ar,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Rule 1 failed'); end; pass = isSBML_AssignmentRule(asr,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Rule 2 failed'); end; pass = isSBML_RateRule(rr,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Rule 3 failed'); end; pass = isSBML_Constraint(con,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Constraint failed'); end; pass = isSBML_Reaction(r,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Reaction failed'); end; pass = isSBML_Event(e,3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Event failed'); end; Totalfail = Totalfail + fail; else disp('LibSBML binding not installed - some tests could not be run'); end; try m = Model_create(); catch Totalfail = Totalfail + 1; disp('creating model failed'); end; if (isempty(m)) Totalfail = Totalfail + 1; disp('creating model failed'); end; disp(sprintf('Number tests: %d', test)); disp(sprintf('Number fails: %d', Totalfail)); disp(sprintf('Pass rate: %d%%', ((test-Totalfail)/test)*100)); y = Totalfail; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_UnitDefinition.m0000644000000000000000000000533211703262402027633 0ustar rootrootfunction fail = TestIsSBML_UnitDefinition % ud_l1 = struct('typecode', {'SBML_UNIT_DEFINITION'}, 'notes', {''}, 'annotation', {''},'name', ... {''}, 'unit', {''}); ud_l2 = struct('typecode', {'SBML_UNIT_DEFINITION'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', ... {''}, 'id', {''}, 'unit', {''}); ud_l2v2 = struct('typecode', {'SBML_UNIT_DEFINITION'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', ... {''}, 'id', {''}, 'unit', {''}); ud_l2v3 = struct('typecode', {'SBML_UNIT_DEFINITION'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', ... {''}, 'id', {''}, 'sboTerm', {''}, 'unit', {''}); fail = TestFunction('isSBML_UnitDefinition', 2, 1, ud_l1, 1, 1); fail = fail + TestFunction('isSBML_UnitDefinition', 3, 1, ud_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_UnitDefinition', 3, 1, ud_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_UnitDefinition', 2, 1, ud_l2, 2, 1); fail = fail + TestFunction('isSBML_UnitDefinition', 3, 1, ud_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_UnitDefinition', 3, 1, ud_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_UnitDefinition', 3, 1, ud_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_UnitDefinition', 3, 1, ud_l2v3, 2, 4, 1); fail = fail + TestFunction('isSBML_UnitDefinition', 3, 1, ud_l2v3, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, ud_l1, 1); fail = fail + TestFunction('isValid', 1, 1, ud_l2, 1); fail = fail + TestFunction('isValid', 1, 1, ud_l2v2, 1); fail = fail + TestFunction('isValid', 1, 1, ud_l2v3, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_Unit.m0000644000000000000000000000526411703262402025626 0ustar rootrootfunction fail = TestIsSBML_Unit % u_l1 = struct('typecode', {'SBML_UNIT'}, 'notes', {''}, 'annotation', {''},'kind', ... {''}, 'exponent', {''}, 'scale', {''}); u_l2 = struct('typecode', {'SBML_UNIT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'kind', ... {''}, 'exponent', {''}, 'scale', {''}, 'multiplier', {''}, 'offset', {''}); u_l2v2 = struct('typecode', {'SBML_UNIT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'kind', ... {''}, 'exponent', {''}, 'scale', {''}, 'multiplier', {''}); u_l2v3 = struct('typecode', {'SBML_UNIT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, ... 'sboTerm', {''}, 'kind', ... {''}, 'exponent', {''}, 'scale', {''}, 'multiplier', {''}); fail = TestFunction('isSBML_Unit', 2, 1, u_l1, 1, 1); fail = fail + TestFunction('isSBML_Unit', 3, 1, u_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_Unit', 3, 1, u_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_Unit', 2, 1, u_l2, 2, 1); fail = fail + TestFunction('isSBML_Unit', 3, 1, u_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_Unit', 3, 1, u_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_Unit', 3, 1, u_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_Unit', 3, 1, u_l2v3, 2, 4, 1); fail = fail + TestFunction('isSBML_Unit', 3, 1, u_l2v3, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, u_l1, 1); fail = fail + TestFunction('isValid', 1, 1, u_l2, 1); fail = fail + TestFunction('isValid', 1, 1, u_l2v2, 1); fail = fail + TestFunction('isValid', 1, 1, u_l2v3, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_Trigger.m0000644000000000000000000000463211703262402026310 0ustar rootrootfunction fail = TestIsSBML_Trigger % ct_l2v3 = struct('typecode', {'SBML_TRIGGER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},... 'sboTerm', {''}, 'math', {''}); ct_l3v1 = struct('typecode', {'SBML_TRIGGER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},... 'sboTerm', {''}, 'persistent', {''}, 'initialValue', {''}, 'math', {''}); fail = TestFunction('isSBML_Trigger', 2, 1, ct_l2v3, 1, 0); fail = fail + TestFunction('isSBML_Trigger', 3, 1, ct_l2v3, 1, 1, 0); fail = fail + TestFunction('isSBML_Trigger', 3, 1, ct_l2v3, 1, 2, 0); fail = fail + TestFunction('isSBML_Trigger', 2, 1, ct_l2v3, 2, 0); fail = fail + TestFunction('isSBML_Trigger', 3, 1, ct_l2v3, 2, 1, 0); fail = fail + TestFunction('isSBML_Trigger', 3, 1, ct_l2v3, 2, 2, 0); fail = fail + TestFunction('isSBML_Trigger', 3, 1, ct_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_Trigger', 3, 1, ct_l2v3, 2, 4, 1); fail = fail + TestFunction('isSBML_Trigger', 3, 1, ct_l2v3, 3, 1, 0); fail = fail + TestFunction('isSBML_Trigger', 3, 1, ct_l3v1, 2, 4, 1); fail = fail + TestFunction('isSBML_Trigger', 3, 1, ct_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, ct_l2v3, 1); fail = fail + TestFunction('isValid', 1, 1, ct_l3v1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_StoichiometryMath.m0000644000000000000000000000433711703262402030363 0ustar rootrootfunction fail = TestIsSBML_StoichiometryMath % ct_l2v3 = struct('typecode', {'SBML_STOICHIOMETRY_MATH'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},... 'sboTerm', {''}, 'math', {''}); fail = TestFunction('isSBML_StoichiometryMath', 2, 1, ct_l2v3, 1, 0); fail = fail + TestFunction('isSBML_StoichiometryMath', 3, 1, ct_l2v3, 1, 1, 0); fail = fail + TestFunction('isSBML_StoichiometryMath', 3, 1, ct_l2v3, 1, 2, 0); fail = fail + TestFunction('isSBML_StoichiometryMath', 2, 1, ct_l2v3, 2, 0); fail = fail + TestFunction('isSBML_StoichiometryMath', 3, 1, ct_l2v3, 2, 1, 0); fail = fail + TestFunction('isSBML_StoichiometryMath', 3, 1, ct_l2v3, 2, 2, 0); fail = fail + TestFunction('isSBML_StoichiometryMath', 3, 1, ct_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_StoichiometryMath', 3, 1, ct_l2v3, 2, 4, 1); fail = fail + TestFunction('isSBML_StoichiometryMath', 2, 1, ct_l2v3, 3, 0); fail = fail + TestFunction('isSBML_StoichiometryMath', 3, 1, ct_l2v3, 3, 1, 0); fail = fail + TestFunction('isValid', 1, 1, ct_l2v3, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_SpeciesType.m0000644000000000000000000000454711703262402027147 0ustar rootrootfunction fail = TestIsSBML_SpeciesType % st_l2v2 = struct('typecode', {'SBML_SPECIES_TYPE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', ... {''}, 'id', {''}); st_l2v3 = struct('typecode', {'SBML_SPECIES_TYPE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', ... {''}, 'id', {''}, 'sboTerm', {''}); fail = TestFunction('isSBML_SpeciesType', 2, 1, st_l2v2, 1, 0); fail = fail + TestFunction('isSBML_SpeciesType', 3, 1, st_l2v2, 1, 1, 0); fail = fail + TestFunction('isSBML_SpeciesType', 3, 1, st_l2v2, 1, 2, 0); fail = fail + TestFunction('isSBML_SpeciesType', 2, 1, st_l2v2, 2, 0); fail = fail + TestFunction('isSBML_SpeciesType', 3, 1, st_l2v2, 2, 1, 0); fail = fail + TestFunction('isSBML_SpeciesType', 3, 1, st_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_SpeciesType', 3, 1, st_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_SpeciesType', 3, 1, st_l2v3, 2, 4, 1); fail = fail + TestFunction('isSBML_SpeciesType', 3, 1, st_l2v3, 3, 1, 0); fail = fail + TestFunction('isSBML_SpeciesType', 2, 1, st_l2v3, 3, 0); fail = fail + TestFunction('isValid', 1, 1, st_l2v2, 1); fail = fail + TestFunction('isValid', 1, 1, st_l2v3, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_SpeciesReference.m0000644000000000000000000000572511703262402030123 0ustar rootrootfunction fail = TestIsSBML_SpeciesReference % sr_l1 = struct('typecode', {'SBML_SPECIES_REFERENCE'}, 'notes', {''}, 'annotation', {''},'species', ... {''}, 'stoichiometry', {''}, 'denominator', {''}); sr_l2 = struct('typecode', {'SBML_SPECIES_REFERENCE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'species', ... {''}, 'stoichiometry', {''}, 'denominator', {''}, 'stoichiometryMath', {''}); sr_l2v2 = struct('typecode', {'SBML_SPECIES_REFERENCE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'species', ... {''}, 'id', {''}, 'name', {''}, 'sboTerm', {''}, 'stoichiometry', {''}, 'stoichiometryMath', {''}); sr_l3v1 = struct('typecode', {'SBML_SPECIES_REFERENCE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'species', ... {''}, 'id', {''}, 'name', {''}, 'sboTerm', {''}, 'stoichiometry', {''}, 'constant', {''}, 'isSetStoichiometry', {''}); fail = TestFunction('isSBML_SpeciesReference', 2, 1, sr_l1, 1, 1); fail = fail + TestFunction('isSBML_SpeciesReference', 3, 1, sr_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_SpeciesReference', 3, 1, sr_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_SpeciesReference', 2, 1, sr_l2, 2, 1); fail = fail + TestFunction('isSBML_SpeciesReference', 3, 1, sr_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_SpeciesReference', 3, 1, sr_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_SpeciesReference', 3, 1, sr_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_SpeciesReference', 3, 1, sr_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_SpeciesReference', 3, 1, sr_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, sr_l1, 1); fail = fail + TestFunction('isValid', 1, 1, sr_l2, 1); fail = fail + TestFunction('isValid', 1, 1, sr_l2v2, 1); fail = fail + TestFunction('isValid', 1, 1, sr_l3v1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_SpeciesConcentrationRule.m0000644000000000000000000000455711703262402031665 0ustar rootrootfunction fail = TestIsSBML_SpeciesConcentrationRule % scr_l1 = struct('typecode', {'SBML_SPECIES_CONCENTRATION_RULE'}, 'notes', {''}, 'annotation', {''}, 'type', ... {''}, 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); fail = TestFunction('isSBML_SpeciesConcentrationRule', 2, 1, scr_l1, 1, 1); fail = fail + TestFunction('isSBML_SpeciesConcentrationRule', 3, 1, scr_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_SpeciesConcentrationRule', 3, 1, scr_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_SpeciesConcentrationRule', 2, 1, scr_l1, 2, 0); fail = fail + TestFunction('isSBML_SpeciesConcentrationRule', 2, 1, scr_l1, 3, 0); fail = fail + TestFunction('isSBML_SpeciesConcentrationRule', 3, 1, scr_l1, 2, 1, 0); fail = fail + TestFunction('isSBML_SpeciesConcentrationRule', 3, 1, scr_l1, 2, 2, 0); fail = fail + TestFunction('isSBML_SpeciesConcentrationRule', 3, 1, scr_l1, 2, 3, 0); fail = fail + TestFunction('isSBML_SpeciesConcentrationRule', 3, 1, scr_l1, 2, 4, 0); fail = fail + TestFunction('isSBML_SpeciesConcentrationRule', 3, 1, scr_l1, 3, 1, 0); fail = fail + TestFunction('isValid', 1, 1, scr_l1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_Species.m0000644000000000000000000001016411703262402026275 0ustar rootrootfunction fail = TestIsSBML_Species % s_l1 = struct('typecode', {'SBML_SPECIES'}, 'notes', {''}, 'annotation', {''},'name', {''}, 'compartment', {''}, ... 'initialAmount', {''}, 'units', {''}, 'boundaryCondition', {''}, 'charge', {''}, 'isSetInitialAmount', {''}, ... 'isSetCharge', {''}); s_l2 = struct('typecode', {'SBML_SPECIES'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, 'id', {''}, ... 'compartment', {''}, 'initialAmount', {''}, 'initialConcentration', {''}, 'substanceUnits', {''}, ... 'spatialSizeUnits', {''}, 'hasOnlySubstanceUnits', {''}, 'boundaryCondition', {''}, 'charge', {''}, ... 'constant', {''}, 'isSetInitialAmount', {''}, 'isSetInitialConcentration', {''}, 'isSetCharge', {''}); s_l2v2 = struct('typecode', {'SBML_SPECIES'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'speciesType', {''}, 'compartment', {''}, 'initialAmount', {''}, 'initialConcentration', {''}, ... 'substanceUnits', {''}, 'spatialSizeUnits', {''}, 'hasOnlySubstanceUnits', {''}, 'boundaryCondition', {''}, ... 'charge', {''}, 'constant', {''}, 'isSetInitialAmount', {''}, 'isSetInitialConcentration', {''}, 'isSetCharge', {''}); s_l2v3 = struct('typecode', {'SBML_SPECIES'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, 'name', {''}, ... 'id', {''}, 'speciesType', {''}, 'compartment', {''}, 'initialAmount', {''}, 'initialConcentration', {''}, ... 'substanceUnits', {''}, 'hasOnlySubstanceUnits', {''}, 'boundaryCondition', {''}, ... 'charge', {''}, 'constant', {''}, 'isSetInitialAmount', {''}, 'isSetInitialConcentration', {''}, 'isSetCharge', {''}); s_l3v1 = struct('typecode', {'SBML_SPECIES'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, 'name', {''}, ... 'id', {''}, 'compartment', {''}, 'initialAmount', {''}, 'initialConcentration', {''}, ... 'substanceUnits', {''}, 'hasOnlySubstanceUnits', {''}, 'boundaryCondition', {''}, ... 'constant', {''}, 'isSetInitialAmount', {''}, 'isSetInitialConcentration', {''}, 'conversionFactor', {''}); fail = TestFunction('isSBML_Species', 2, 1, s_l1, 1, 1); fail = fail + TestFunction('isSBML_Species', 3, 1, s_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_Species', 3, 1, s_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_Species', 2, 1, s_l2, 2, 1); fail = fail + TestFunction('isSBML_Species', 3, 1, s_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_Species', 3, 1, s_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_Species', 3, 1, s_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_Species', 3, 1, s_l2v3, 2, 4, 1); fail = fail + TestFunction('isSBML_Species', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, s_l1, 1); fail = fail + TestFunction('isValid', 1, 1, s_l2, 1); fail = fail + TestFunction('isValid', 1, 1, s_l2v2, 1); fail = fail + TestFunction('isValid', 1, 1, s_l2v3, 1); fail = fail + TestFunction('isValid', 1, 1, s_l3v1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_Reaction.m0000644000000000000000000001402211703262402026443 0ustar rootrootfunction fail = TestIsSBML_Reaction % p_l3 = struct('typecode', {'SBML_LOCAL_PARAMETER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'value', {''}, 'units', {''}, 'sboTerm', {''}, 'isSetValue', {''}); p_l1 = struct('typecode', {'SBML_PARAMETER'}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'value', {''}, 'units', {''}, 'isSetValue', {''}); p_l2 = struct('typecode', {'SBML_PARAMETER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'value', {''}, 'units', {''}, 'constant', {''}, 'isSetValue', {''}); p_l2v2 = struct('typecode', {'SBML_PARAMETER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'value', {''}, 'units', {''}, 'constant', {''}, 'sboTerm', {''}, 'isSetValue', {''}); kl_l1 = struct('typecode', {'SBML_KINETIC_LAW'}, 'notes', {''}, 'annotation', {''},'formula', {''}, ... 'parameter', p_l1, 'timeUnits', {''}, 'substanceUnits', {''}); kl_l2 = struct('typecode', {'SBML_KINETIC_LAW'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'formula', {''}, ... 'math', {''},'parameter', p_l2, 'timeUnits', {''}, 'substanceUnits', {''}); kl_l2v2 = struct('typecode', {'SBML_KINETIC_LAW'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'formula', {''}, ... 'math', {''},'parameter', p_l2v2, 'sboTerm', {''}); kl_l2v3 = struct('typecode', {'SBML_KINETIC_LAW'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'formula', {''}, ... 'math', {''},'parameter', p_l2v2, 'sboTerm', {''}); kl_l3v1 = struct('typecode', {'SBML_KINETIC_LAW'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, ... 'math', {''},'localParameter', p_l3, 'sboTerm', {''}); msr_l2 = struct('typecode', {'SBML_MODIFIER_SPECIES_REFERENCE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'species', {''}); msr_l2v2 = struct('typecode', {'SBML_MODIFIER_SPECIES_REFERENCE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'species', {''}, ... 'id', {''}, 'name', {''}, 'sboTerm', {''}); sm_l2v3 = struct('typecode', {'SBML_STOICHIOMETRY_MATH'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},... 'sboTerm', {''}, 'math', {''}); sr_l1 = struct('typecode', {'SBML_SPECIES_REFERENCE'}, 'notes', {''}, 'annotation', {''},'species', ... {''}, 'stoichiometry', {''}, 'denominator', {''}); sr_l2 = struct('typecode', {'SBML_SPECIES_REFERENCE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'species', ... {''}, 'stoichiometry', {''}, 'denominator', {''}, 'stoichiometryMath', {''}); sr_l2v2 = struct('typecode', {'SBML_SPECIES_REFERENCE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'species', ... {''}, 'id', {''}, 'name', {''}, 'sboTerm', {''}, 'stoichiometry', {''}, 'stoichiometryMath', {''}); sr_l3v1 = struct('typecode', {'SBML_SPECIES_REFERENCE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'species', ... {''}, 'id', {''}, 'name', {''}, 'sboTerm', {''}, 'stoichiometry', {''}, 'constant', {''}, 'isSetStoichiometry', {''}); r_l1 = struct('typecode', {'SBML_REACTION'}, 'notes', {''}, 'annotation', {''},'name', {''}, 'reactant', sr_l1, ... 'product', sr_l1, 'kineticLaw', kl_l1, 'reversible', {''}, 'fast', {''}); r_l2 = struct('typecode', {'SBML_REACTION'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, 'id', {''}, ... 'reactant', sr_l2, 'product', sr_l2, 'modifier', msr_l2, 'kineticLaw', kl_l2, 'reversible', {''}, ... 'fast', {''}, 'isSetFast', {''}); r_l2v2 = struct('typecode', {'SBML_REACTION'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'reactant', sr_l2v2, 'product', sr_l2v2, 'modifier', msr_l2v2, 'kineticLaw', kl_l2v2, 'reversible', ... {''}, 'fast', {''}, 'sboTerm', {''}, 'isSetFast', {''}); r_l3v1 = struct('typecode', {'SBML_REACTION'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'reactant', sr_l3v1, 'product', sr_l3v1, 'modifier', msr_l2v2, 'kineticLaw', kl_l3v1, 'reversible', ... {''}, 'fast', {''}, 'sboTerm', {''}, 'compartment', {''}, 'isSetFast', {''}); fail = TestFunction('isSBML_Reaction', 2, 1, r_l1, 1, 1); fail = fail + TestFunction('isSBML_Reaction', 3, 1, r_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_Reaction', 3, 1, r_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_Reaction', 2, 1, r_l2, 2, 1); fail = fail + TestFunction('isSBML_Reaction', 3, 1, r_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_Reaction', 3, 1, r_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_Reaction', 3, 1, r_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_Reaction', 3, 1, r_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_Reaction', 3, 1, r_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, r_l1, 1); fail = fail + TestFunction('isValid', 1, 1, r_l2, 1); fail = fail + TestFunction('isValid', 1, 1, r_l2v2, 1); fail = fail + TestFunction('isValid', 1, 1, r_l3v1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_RateRule.m0000644000000000000000000000523111703262402026424 0ustar rootrootfunction fail = TestIsSBML_RateRule % rr_l1 = struct('typecode', {'SBML_PARAMETER_RULE'}, 'notes', {''}, 'annotation', {''}, 'type', ... {'rate'}, 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); rr_l2 = struct('typecode', {'SBML_RATE_RULE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, ... 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); rr_l2v2 = struct('typecode', {'SBML_RATE_RULE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, ... 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); fail = TestFunction('isSBML_RateRule', 2, 1, rr_l1, 1, 1); fail = fail + TestFunction('isSBML_RateRule', 3, 1, rr_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_RateRule', 3, 1, rr_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_RateRule', 2, 1, rr_l2, 2, 1); fail = fail + TestFunction('isSBML_RateRule', 3, 1, rr_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_RateRule', 3, 1, rr_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_RateRule', 3, 1, rr_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_RateRule', 3, 1, rr_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_RateRule', 3, 1, rr_l2v2, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, rr_l1, 1); fail = fail + TestFunction('isValid', 1, 1, rr_l2, 1); fail = fail + TestFunction('isValid', 1, 1, rr_l2v2, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_Priority.m0000644000000000000000000000405611703262402026526 0ustar rootrootfunction fail = TestIsSBML_Priority % pr_l3v1 = struct('typecode', {'SBML_PRIORITY'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},... 'sboTerm', {''}, 'math', {''}); fail = TestFunction('isSBML_Priority', 2, 1, pr_l3v1, 1, 0); fail = fail + TestFunction('isSBML_Priority', 3, 1, pr_l3v1, 1, 1, 0); fail = fail + TestFunction('isSBML_Priority', 3, 1, pr_l3v1, 1, 2, 0); fail = fail + TestFunction('isSBML_Priority', 2, 1, pr_l3v1, 2, 0); fail = fail + TestFunction('isSBML_Priority', 3, 1, pr_l3v1, 2, 1, 0); fail = fail + TestFunction('isSBML_Priority', 3, 1, pr_l3v1, 2, 2, 0); fail = fail + TestFunction('isSBML_Priority', 3, 1, pr_l3v1, 2, 3, 0); fail = fail + TestFunction('isSBML_Priority', 3, 1, pr_l3v1, 2, 4, 0); fail = fail + TestFunction('isSBML_Priority', 3, 1, pr_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, pr_l3v1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_ParameterRule.m0000644000000000000000000000433611703262402027456 0ustar rootrootfunction fail = TestIsSBML_ParameterRule % pr_l1 = struct('typecode', {'SBML_PARAMETER_RULE'}, 'notes', {''}, 'annotation', {''}, 'type', ... {''}, 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); fail = TestFunction('isSBML_ParameterRule', 2, 1, pr_l1, 1, 1); fail = fail + TestFunction('isSBML_ParameterRule', 3, 1, pr_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_ParameterRule', 3, 1, pr_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_ParameterRule', 2, 1, pr_l1, 2, 0); fail = fail + TestFunction('isSBML_ParameterRule', 2, 1, pr_l1, 3, 0); fail = fail + TestFunction('isSBML_ParameterRule', 3, 1, pr_l1, 2, 1, 0); fail = fail + TestFunction('isSBML_ParameterRule', 3, 1, pr_l1, 2, 2, 0); fail = fail + TestFunction('isSBML_ParameterRule', 3, 1, pr_l1, 2, 3, 0); fail = fail + TestFunction('isSBML_ParameterRule', 3, 1, pr_l1, 2, 4, 0); fail = fail + TestFunction('isSBML_ParameterRule', 3, 1, pr_l1, 3, 1, 0); fail = fail + TestFunction('isValid', 1, 1, pr_l1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_Parameter.m0000644000000000000000000000510311703262402026617 0ustar rootrootfunction fail = TestIsSBML_Parameter % p_l1 = struct('typecode', {'SBML_PARAMETER'}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'value', {''}, 'units', {''}, 'isSetValue', {''}); p_l2 = struct('typecode', {'SBML_PARAMETER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'value', {''}, 'units', {''}, 'constant', {''}, 'isSetValue', {''}); p_l2v2 = struct('typecode', {'SBML_PARAMETER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'value', {''}, 'units', {''}, 'constant', {''}, 'sboTerm', {''}, 'isSetValue', {''}); fail = TestFunction('isSBML_Parameter', 2, 1, p_l1, 1, 1); fail = fail + TestFunction('isSBML_Parameter', 3, 1, p_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_Parameter', 3, 1, p_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_Parameter', 2, 1, p_l2, 2, 1); fail = fail + TestFunction('isSBML_Parameter', 3, 1, p_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_Parameter', 3, 1, p_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_Parameter', 3, 1, p_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_Parameter', 3, 1, p_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_Parameter', 3, 1, p_l2v2, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, p_l1, 1); fail = fail + TestFunction('isValid', 1, 1, p_l2, 1); fail = fail + TestFunction('isValid', 1, 1, p_l2v2, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_ModifierSpeciesReference.m0000644000000000000000000000467711703262402031607 0ustar rootrootfunction fail = TestIsSBML_ModifierSpeciesReference % msr_l2 = struct('typecode', {'SBML_MODIFIER_SPECIES_REFERENCE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'species', {''}); msr_l2v2 = struct('typecode', {'SBML_MODIFIER_SPECIES_REFERENCE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'species', {''}, ... 'id', {''}, 'name', {''}, 'sboTerm', {''}); fail = TestFunction('isSBML_ModifierSpeciesReference', 2, 1, msr_l2, 1, 0); fail = fail + TestFunction('isSBML_ModifierSpeciesReference', 3, 1, msr_l2, 1, 1, 0); fail = fail + TestFunction('isSBML_ModifierSpeciesReference', 3, 1, msr_l2, 1, 2, 0); fail = fail + TestFunction('isSBML_ModifierSpeciesReference', 2, 1, msr_l2, 2, 1); fail = fail + TestFunction('isSBML_ModifierSpeciesReference', 3, 1, msr_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_ModifierSpeciesReference', 3, 1, msr_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_ModifierSpeciesReference', 3, 1, msr_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_ModifierSpeciesReference', 3, 1, msr_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_ModifierSpeciesReference', 3, 1, msr_l2v2, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, msr_l2, 1); fail = fail + TestFunction('isValid', 1, 1, msr_l2v2, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_LocalParameter.m0000644000000000000000000000421711703262402027577 0ustar rootrootfunction fail = TestIsSBML_LocalParameter % p_l3 = struct('typecode', {'SBML_LOCAL_PARAMETER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'value', {''}, 'units', {''}, 'sboTerm', {''}, 'isSetValue', {''}); fail = TestFunction('isSBML_LocalParameter', 2, 1, p_l3, 1, 0); fail = fail + TestFunction('isSBML_LocalParameter', 3, 1, p_l3, 1, 1, 0); fail = fail + TestFunction('isSBML_LocalParameter', 3, 1, p_l3, 1, 2, 0); fail = fail + TestFunction('isSBML_LocalParameter', 2, 1, p_l3, 2, 0); fail = fail + TestFunction('isSBML_LocalParameter', 3, 1, p_l3, 2, 1, 0); fail = fail + TestFunction('isSBML_LocalParameter', 3, 1, p_l3, 2, 2, 0); fail = fail + TestFunction('isSBML_LocalParameter', 3, 1, p_l3, 2, 3, 0); fail = fail + TestFunction('isSBML_LocalParameter', 3, 1, p_l3, 2, 4, 0); fail = fail + TestFunction('isSBML_LocalParameter', 3, 1, p_l3, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, p_l3, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_KineticLaw.m0000644000000000000000000000743011703262402026736 0ustar rootrootfunction fail = TestIsSBML_KineticLaw % p_l3 = struct('typecode', {'SBML_LOCAL_PARAMETER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'value', {''}, 'units', {''}, 'sboTerm', {''}, 'isSetValue', {''}); p_l1 = struct('typecode', {'SBML_PARAMETER'}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'value', {''}, 'units', {''}, 'isSetValue', {''}); p_l2 = struct('typecode', {'SBML_PARAMETER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'value', {''}, 'units', {''}, 'constant', {''}, 'isSetValue', {''}); p_l2v2 = struct('typecode', {'SBML_PARAMETER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'id', {''}, 'value', {''}, 'units', {''}, 'constant', {''}, 'sboTerm', {''}, 'isSetValue', {''}); kl_l1 = struct('typecode', {'SBML_KINETIC_LAW'}, 'notes', {''}, 'annotation', {''},'formula', {''}, ... 'parameter', p_l1, 'timeUnits', {''}, 'substanceUnits', {''}); kl_l2 = struct('typecode', {'SBML_KINETIC_LAW'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'formula', {''}, ... 'math', {''},'parameter', p_l2, 'timeUnits', {''}, 'substanceUnits', {''}); kl_l2v2 = struct('typecode', {'SBML_KINETIC_LAW'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'formula', {''}, ... 'math', {''},'parameter', p_l2v2, 'sboTerm', {''}); kl_l2v3 = struct('typecode', {'SBML_KINETIC_LAW'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'formula', {''}, ... 'math', {''},'parameter', p_l2v2, 'sboTerm', {''}); kl_l3v1 = struct('typecode', {'SBML_KINETIC_LAW'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, ... 'math', {''},'localParameter', p_l3, 'sboTerm', {''}); fail = TestFunction('isSBML_KineticLaw', 2, 1, kl_l1, 1, 1); fail = fail + TestFunction('isSBML_KineticLaw', 3, 1, kl_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_KineticLaw', 3, 1, kl_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_KineticLaw', 2, 1, kl_l2, 2, 1); fail = fail + TestFunction('isSBML_KineticLaw', 3, 1, kl_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_KineticLaw', 3, 1, kl_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_KineticLaw', 3, 1, kl_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_KineticLaw', 3, 1, kl_l2v3, 2, 4, 1); fail = fail + TestFunction('isSBML_KineticLaw', 3, 1, kl_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, kl_l1, 1); fail = fail + TestFunction('isValid', 1, 1, kl_l2, 1); fail = fail + TestFunction('isValid', 1, 1, kl_l2v2, 1); fail = fail + TestFunction('isValid', 1, 1, kl_l2v3, 1); fail = fail + TestFunction('isValid', 1, 1, kl_l3v1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_InitialAssignment.m0000644000000000000000000000424411703262402030326 0ustar rootrootfunction fail = TestIsSBML_InitialAssignment % ct_l2v2 = struct('typecode', {'SBML_INITIAL_ASSIGNMENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'symbol', ... {''}, 'sboTerm', {''}, 'math', {''}); fail = TestFunction('isSBML_InitialAssignment', 2, 1, ct_l2v2, 1, 0); fail = fail + TestFunction('isSBML_InitialAssignment', 3, 1, ct_l2v2, 1, 1, 0); fail = fail + TestFunction('isSBML_InitialAssignment', 3, 1, ct_l2v2, 1, 2, 0); fail = fail + TestFunction('isSBML_InitialAssignment', 2, 1, ct_l2v2, 2, 0); fail = fail + TestFunction('isSBML_InitialAssignment', 3, 1, ct_l2v2, 2, 1, 0); fail = fail + TestFunction('isSBML_InitialAssignment', 3, 1, ct_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_InitialAssignment', 3, 1, ct_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_InitialAssignment', 3, 1, ct_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_InitialAssignment', 3, 1, ct_l2v2, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, ct_l2v2, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_FunctionDefinition.m0000644000000000000000000000460411703262402030502 0ustar rootrootfunction fail = TestIsSBML_FunctionDefinition % fd_l2 = struct('typecode', {'SBML_FUNCTION_DEFINITION'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'name', {''}, ... 'id', {''}, 'math', {''}); fd_l2v2 = struct('typecode', {'SBML_FUNCTION_DEFINITION'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, 'name', {''}, ... 'id', {''}, 'math', {''}); fail = TestFunction('isSBML_FunctionDefinition', 2, 1, fd_l2, 1, 0); fail = fail + TestFunction('isSBML_FunctionDefinition', 3, 1, fd_l2, 1, 1, 0); fail = fail + TestFunction('isSBML_FunctionDefinition', 3, 1, fd_l2, 1, 2, 0); fail = fail + TestFunction('isSBML_FunctionDefinition', 2, 1, fd_l2, 2, 1); fail = fail + TestFunction('isSBML_FunctionDefinition', 3, 1, fd_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_FunctionDefinition', 3, 1, fd_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_FunctionDefinition', 3, 1, fd_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_FunctionDefinition', 3, 1, fd_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_FunctionDefinition', 3, 1, fd_l2v2, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, fd_l2, 1); fail = fail + TestFunction('isValid', 1, 1, fd_l2v2, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_EventAssignment.m0000644000000000000000000000452111703262402030014 0ustar rootrootfunction fail = TestIsSBML_EventAssignment % ea_l2 = struct('typecode', {'SBML_EVENT_ASSIGNMENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'variable', {''}, ... 'math', {''}); ea_l2v2 = struct('typecode', {'SBML_EVENT_ASSIGNMENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'variable', {''}, ... 'sboTerm', {''}, 'math', {''}); fail = TestFunction('isSBML_EventAssignment', 2, 1, ea_l2, 1, 0); fail = fail + TestFunction('isSBML_EventAssignment', 3, 1, ea_l2, 1, 1, 0); fail = fail + TestFunction('isSBML_EventAssignment', 3, 1, ea_l2, 1, 2, 0); fail = fail + TestFunction('isSBML_EventAssignment', 2, 1, ea_l2, 2, 1); fail = fail + TestFunction('isSBML_EventAssignment', 3, 1, ea_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_EventAssignment', 3, 1, ea_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_EventAssignment', 3, 1, ea_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_EventAssignment', 3, 1, ea_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_EventAssignment', 3, 1, ea_l2v2, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, ea_l2, 1); fail = fail + TestFunction('isValid', 1, 1, ea_l2v2, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_Event.m0000644000000000000000000001025411703262402025763 0ustar rootrootfunction fail = TestIsSBML_Event % pr_l3v1 = struct('typecode', {'SBML_PRIORITY'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},... 'sboTerm', {''}, 'math', {''}); t_l2v3 = struct('typecode', {'SBML_TRIGGER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},... 'sboTerm', {''}, 'math', {''}); t_l3v1 = struct('typecode', {'SBML_TRIGGER'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},... 'sboTerm', {''}, 'persistent', {''}, 'initialValue', {''}, 'math', {''}); del_l2v3 = struct('typecode', {'SBML_DELAY'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},... 'sboTerm', {''}, 'math', {''}); ea_l2 = struct('typecode', {'SBML_EVENT_ASSIGNMENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'variable', {''}, ... 'math', {''}); ea_l2v2 = struct('typecode', {'SBML_EVENT_ASSIGNMENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'variable', {''}, ... 'sboTerm', {''}, 'math', {''}); e_l2 = struct('typecode', {'SBML_EVENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'name', {''}, 'id', {''}, ... 'trigger', {''}, 'delay', {''}, 'timeUnits', {''}, 'eventAssignment', ea_l2); e_l2v2 = struct('typecode', {'SBML_EVENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'name', {''}, 'id', {''}, ... 'trigger', {''}, 'delay', {''}, 'timeUnits', {''}, 'sboTerm', {''}, 'eventAssignment', ea_l2v2); e_l2v3 = struct('typecode', {'SBML_EVENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'name', {''}, 'id', {''}, ... 'trigger',t_l2v3, 'delay', del_l2v3, 'sboTerm', {''}, 'eventAssignment', ea_l2v2); e_l2v4 = struct('typecode', {'SBML_EVENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'name', {''}, 'id', {''}, ... 'useValuesFromTriggerTime', {''}, 'trigger', t_l2v3, 'delay', del_l2v3, 'sboTerm', {''}, 'eventAssignment', ea_l2v2); e_l3v1 = struct('typecode', {'SBML_EVENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'name', {''}, 'id', {''}, ... 'useValuesFromTriggerTime', {''}, 'trigger', t_l3v1, 'delay', del_l2v3, 'priority',pr_l3v1, 'sboTerm', {''}, 'eventAssignment', ea_l2v2); fail = TestFunction('isSBML_Event', 2, 1, e_l2, 1, 0); fail = fail + TestFunction('isSBML_Event', 3, 1, e_l2, 1, 1, 0); fail = fail + TestFunction('isSBML_Event', 3, 1, e_l2, 1, 2, 0); fail = fail + TestFunction('isSBML_Event', 2, 1, e_l2, 2, 1); fail = fail + TestFunction('isSBML_Event', 3, 1, e_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_Event', 3, 1, e_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_Event', 3, 1, e_l2v4, 2, 3, 1); fail = fail + TestFunction('isSBML_Event', 3, 1, e_l2v4, 2, 2, 0); fail = fail + TestFunction('isSBML_Event', 3, 1, e_l2v4, 2, 4, 1); fail = fail + TestFunction('isSBML_Event', 3, 1, e_l2v4, 3, 1, 0); fail = fail + TestFunction('isSBML_Event', 3, 1, e_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, e_l2, 1); fail = fail + TestFunction('isValid', 1, 1, e_l2v3, 1); fail = fail + TestFunction('isValid', 1, 1, e_l2v4, 1); fail = fail + TestFunction('isValid', 1, 1, e_l3v1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_Delay.m0000644000000000000000000000401511703262402025736 0ustar rootrootfunction fail = TestIsSBML_Delay % ct_l2v3 = struct('typecode', {'SBML_DELAY'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},... 'sboTerm', {''}, 'math', {''}); fail = TestFunction('isSBML_Delay', 2, 1, ct_l2v3, 1, 0); fail = fail + TestFunction('isSBML_Delay', 3, 1, ct_l2v3, 1, 1, 0); fail = fail + TestFunction('isSBML_Delay', 3, 1, ct_l2v3, 1, 2, 0); fail = fail + TestFunction('isSBML_Delay', 2, 1, ct_l2v3, 2, 0); fail = fail + TestFunction('isSBML_Delay', 3, 1, ct_l2v3, 2, 1, 0); fail = fail + TestFunction('isSBML_Delay', 3, 1, ct_l2v3, 2, 2, 0); fail = fail + TestFunction('isSBML_Delay', 3, 1, ct_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_Delay', 3, 1, ct_l2v3, 2, 4, 1); fail = fail + TestFunction('isSBML_Delay', 3, 1, ct_l2v3, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, ct_l2v3, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_Constraint.m0000644000000000000000000000412711703262402027030 0ustar rootrootfunction fail = TestIsSBML_Constraint % ct_l2v2 = struct('typecode', {'SBML_CONSTRAINT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'sboTerm', ... {''}, 'math', {''}, 'message', {''}); fail = TestFunction('isSBML_Constraint', 2, 1, ct_l2v2, 1, 0); fail = fail + TestFunction('isSBML_Constraint', 3, 1, ct_l2v2, 1, 1, 0); fail = fail + TestFunction('isSBML_Constraint', 3, 1, ct_l2v2, 1, 2, 0); fail = fail + TestFunction('isSBML_Constraint', 2, 1, ct_l2v2, 2, 0); fail = fail + TestFunction('isSBML_Constraint', 3, 1, ct_l2v2, 2, 1, 0); fail = fail + TestFunction('isSBML_Constraint', 3, 1, ct_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_Constraint', 3, 1, ct_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_Constraint', 3, 1, ct_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_Constraint', 3, 1, ct_l2v2, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, ct_l2v2, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_CompartmentVolumeRule.m0000644000000000000000000000451311703262402031214 0ustar rootrootfunction fail = TestIsSBML_CompartmentVolumeRule % cvr_l1 = struct('typecode', {'SBML_COMPARTMENT_VOLUME_RULE'}, 'notes', {''}, 'annotation', {''}, 'type', ... {''}, 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); fail = TestFunction('isSBML_CompartmentVolumeRule', 2, 1, cvr_l1, 1, 1); fail = fail + TestFunction('isSBML_CompartmentVolumeRule', 3, 1, cvr_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_CompartmentVolumeRule', 3, 1, cvr_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_CompartmentVolumeRule', 2, 1, cvr_l1, 2, 0); fail = fail + TestFunction('isSBML_CompartmentVolumeRule', 2, 1, cvr_l1, 3, 0); fail = fail + TestFunction('isSBML_CompartmentVolumeRule', 3, 1, cvr_l1, 2, 1, 0); fail = fail + TestFunction('isSBML_CompartmentVolumeRule', 3, 1, cvr_l1, 2, 2, 0); fail = fail + TestFunction('isSBML_CompartmentVolumeRule', 3, 1, cvr_l1, 2, 3, 0); fail = fail + TestFunction('isSBML_CompartmentVolumeRule', 3, 1, cvr_l1, 2, 4, 0); fail = fail + TestFunction('isSBML_CompartmentVolumeRule', 3, 1, cvr_l1, 3, 1, 0); fail = fail + TestFunction('isValid', 1, 1, cvr_l1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_CompartmentType.m0000644000000000000000000000463611703262402030044 0ustar rootrootfunction fail = TestIsSBML_CompartmentType % ct_l2v2 = struct('typecode', {'SBML_COMPARTMENT_TYPE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', ... {''}, 'id', {''}); ct_l2v3 = struct('typecode', {'SBML_COMPARTMENT_TYPE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', ... {''}, 'id', {''}, 'sboTerm', {''}); fail = TestFunction('isSBML_CompartmentType', 2, 1, ct_l2v2, 1, 0); fail = fail + TestFunction('isSBML_CompartmentType', 3, 1, ct_l2v2, 1, 1, 0); fail = fail + TestFunction('isSBML_CompartmentType', 3, 1, ct_l2v2, 1, 2, 0); fail = fail + TestFunction('isSBML_CompartmentType', 2, 1, ct_l2v2, 2, 0); fail = fail + TestFunction('isSBML_CompartmentType', 3, 1, ct_l2v2, 2, 1, 0); fail = fail + TestFunction('isSBML_CompartmentType', 3, 1, ct_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_CompartmentType', 3, 1, ct_l2v3, 2, 2, 1); fail = fail + TestFunction('isSBML_CompartmentType', 3, 1, ct_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_CompartmentType', 3, 1, ct_l2v3, 2, 4, 1); fail = fail + TestFunction('isSBML_CompartmentType', 3, 1, ct_l2v3, 3, 1, 0); fail = fail + TestFunction('isValid', 1, 1, ct_l2v2, 1); fail = fail + TestFunction('isValid', 1, 1, ct_l2v3, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_Compartment.m0000644000000000000000000000750111703262402027174 0ustar rootrootfunction fail = TestIsSBML_Compartment % c_l1 = struct('typecode', {'SBML_COMPARTMENT'}, 'notes', {''}, 'annotation', {''},'name', {''}, ... 'volume', {''}, 'units', {''}, 'outside', {''}, 'isSetVolume', {''}); c_l2 = struct('typecode', {'SBML_COMPARTMENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, 'id', {''}, ... 'spatialDimensions', {''}, 'size', {''}, 'units', {''}, 'outside', {''}, 'constant', {''}, ... 'isSetSize', {''},'isSetVolume', {''}); c_l2v2 = struct('typecode', {'SBML_COMPARTMENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, 'id', {''}, ... 'compartmentType', {''}, 'spatialDimensions', {''}, 'size', {''}, 'units', {''}, 'outside', {''}, ... 'constant', {''}, 'isSetSize', {''},'isSetVolume', {''}); c_l2v3 = struct('typecode', {'SBML_COMPARTMENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, 'id', {''}, ... 'compartmentType', {''}, 'spatialDimensions', {''}, 'size', {''}, 'units', {''}, 'outside', {''}, ... 'constant', {''}, 'isSetSize', {''},'isSetVolume', {''}, 'sboTerm', {''}); c_l2v4 = struct('typecode', {'SBML_COMPARTMENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, 'id', {''}, ... 'compartmentType', {''}, 'spatialDimensions', {''}, 'size', {''}, 'units', {''}, 'outside', {''}, ... 'constant', {''}, 'isSetSize', {''},'isSetVolume', {''}, 'sboTerm', {''}); c_l3v1 = struct('typecode', {'SBML_COMPARTMENT'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''},'name', {''}, 'id', {''}, ... 'spatialDimensions', {''}, 'size', {''}, 'units', {''}, ... 'constant', {''}, 'isSetSize', {''},'isSetSpatialDimensions', {''}, 'sboTerm', {''}); fail = TestFunction('isSBML_Compartment', 2, 1, c_l1, 1, 1); fail = fail + TestFunction('isSBML_Compartment', 3, 1, c_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_Compartment', 3, 1, c_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_Compartment', 2, 1, c_l2, 2, 1); fail = fail + TestFunction('isSBML_Compartment', 3, 1, c_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_Compartment', 3, 1, c_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_Compartment', 3, 1, c_l2v3, 2, 3, 1); fail = fail + TestFunction('isSBML_Compartment', 3, 1, c_l2v4, 2, 4, 1); fail = fail + TestFunction('isSBML_Compartment', 3, 1, c_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, c_l1, 1); fail = fail + TestFunction('isValid', 1, 1, c_l2, 1); fail = fail + TestFunction('isValid', 1, 1, c_l2v2, 1); fail = fail + TestFunction('isValid', 1, 1, c_l2v3, 1); fail = fail + TestFunction('isValid', 1, 1, c_l2v4, 1); fail = fail + TestFunction('isValid', 1, 1, c_l3v1, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_AssignmentRule.m0000644000000000000000000000535511703262402027650 0ustar rootrootfunction fail = TestIsSBML_AssignmentRule % ar_l1 = struct('typecode', {'SBML_COMPARTMENT_VOLUME_RULE'}, 'notes', {''}, 'annotation', {''}, 'type', ... {'scalar'}, 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); ar_l2 = struct('typecode', {'SBML_ASSIGNMENT_RULE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, ... 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); ar_l2v2 = struct('typecode', {'SBML_ASSIGNMENT_RULE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, ... 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); fail = TestFunction('isSBML_AssignmentRule', 2, 1, ar_l1, 1, 1); fail = fail + TestFunction('isSBML_AssignmentRule', 3, 1, ar_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_AssignmentRule', 3, 1, ar_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_AssignmentRule', 2, 1, ar_l2, 2, 1); fail = fail + TestFunction('isSBML_AssignmentRule', 3, 1, ar_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_AssignmentRule', 3, 1, ar_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_AssignmentRule', 3, 1, ar_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_AssignmentRule', 3, 1, ar_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_AssignmentRule', 3, 1, ar_l2v2, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, ar_l1, 1); fail = fail + TestFunction('isValid', 1, 1, ar_l2, 1); fail = fail + TestFunction('isValid', 1, 1, ar_l2v2, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/TestIsSBML_AlgebraicRule.m0000644000000000000000000000532111703262402027402 0ustar rootrootfunction fail = TestIsSBML_AlgebraicRule % ar_l1 = struct('typecode', {'SBML_ALGEBRAIC_RULE'}, 'notes', {''}, 'annotation', {''}, 'type', ... {''}, 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); ar_l2 = struct('typecode', {'SBML_ALGEBRAIC_RULE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, ... 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); ar_l2v2 = struct('typecode', {'SBML_ALGEBRAIC_RULE'}, 'metaid', {''}, 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, ... 'formula', {''}, 'variable', {''}, 'species', {''}, 'compartment', {''}, 'name', {''}, 'units', {''}); fail = TestFunction('isSBML_AlgebraicRule', 2, 1, ar_l1, 1, 1); fail = fail + TestFunction('isSBML_AlgebraicRule', 3, 1, ar_l1, 1, 1, 1); fail = fail + TestFunction('isSBML_AlgebraicRule', 3, 1, ar_l1, 1, 2, 1); fail = fail + TestFunction('isSBML_AlgebraicRule', 2, 1, ar_l2, 2, 1); fail = fail + TestFunction('isSBML_AlgebraicRule', 3, 1, ar_l2, 2, 1, 1); fail = fail + TestFunction('isSBML_AlgebraicRule', 3, 1, ar_l2v2, 2, 2, 1); fail = fail + TestFunction('isSBML_AlgebraicRule', 3, 1, ar_l2v2, 2, 3, 1); fail = fail + TestFunction('isSBML_AlgebraicRule', 3, 1, ar_l2v2, 2, 4, 1); fail = fail + TestFunction('isSBML_AlgebraicRule', 3, 1, ar_l2v2, 3, 1, 1); fail = fail + TestFunction('isValid', 1, 1, ar_l1, 1); fail = fail + TestFunction('isValid', 1, 1, ar_l2, 1); fail = fail + TestFunction('isValid', 1, 1, ar_l2v2, 1); SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Test/Contents.m0000644000000000000000000010523411603337042024533 0ustar rootroot% toolbox\Validate_MATLAB_SBML_Structures\Test % % write info here % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isValidSBML_Model.m0000644000000000000000000001542211703262404025207 0ustar rootrootfunction [valid, message] = isValidSBML_Model(SBMLStructure) % [valid, message] = isValidSBML_Model(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Model structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* The fields present in a MATLAB_SBML Model structure of the appropriate % level and version can be found using getModelFieldnames(level, version) % %check the input arguments are appropriate if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; if ~isempty(SBMLStructure) if isfield(SBMLStructure, 'SBML_level') level = SBMLStructure.SBML_level; else level = 3; end; if isfield(SBMLStructure, 'SBML_version') version = SBMLStructure.SBML_version; else version = 1; end; else level = 3; version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_MODEL'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_MODEL', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % functionDefinitions if (valid == 1 && level > 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.functionDefinition)) [valid, message] = isSBML_FunctionDefinition( ... SBMLStructure.functionDefinition(index), ... level, version); index = index + 1; end; end; % unitDefinitions if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.unitDefinition)) [valid, message] = isSBML_UnitDefinition( ... SBMLStructure.unitDefinition(index), ... level, version); index = index + 1; end; end; % compartments if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.compartment)) [valid, message] = isSBML_Compartment(SBMLStructure.compartment(index), ... level, version); index = index + 1; end; end; % species if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.species)) [valid, message] = isSBML_Species(SBMLStructure.species(index), ... level, version); index = index + 1; end; end; % compartmentTypes if (valid == 1 && level == 2 && version > 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.compartmentType)) [valid, message] = isSBML_CompartmentType(SBMLStructure.compartmentType(index), ... level, version); index = index + 1; end; end; % speciesTypes if (valid == 1 && level == 2 && version > 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.speciesType)) [valid, message] = isSBML_SpeciesType(SBMLStructure.speciesType(index), ... level, version); index = index + 1; end; end; % parameter if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.parameter)) [valid, message] = isSBML_Parameter(SBMLStructure.parameter(index), ... level, version); index = index + 1; end; end; % initialAssignment if (valid == 1 && (level > 2 || (level == 2 && version > 1))) index = 1; while (valid == 1 && index <= length(SBMLStructure.initialAssignment)) [valid, message] = isSBML_InitialAssignment( ... SBMLStructure.initialAssignment(index), ... level, version); index = index + 1; end; end; % rule if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.rule)) [valid, message] = isSBML_Rule(SBMLStructure.rule(index), ... level, version); index = index + 1; end; end; % constraints if (valid == 1 && (level > 2 || (level == 2 && version > 1))) index = 1; while (valid == 1 && index <= length(SBMLStructure.constraint)) [valid, message] = isSBML_Constraint( ... SBMLStructure.constraint(index), ... level, version); index = index + 1; end; end; % reaction if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.reaction)) [valid, message] = isSBML_Reaction(SBMLStructure.reaction(index), ... level, version); index = index + 1; end; end; % event if (valid == 1 && level > 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.event)) [valid, message] = isSBML_Event(SBMLStructure.event(index), ... level, version); index = index + 1; end; end; % report failure if (valid == 0) message = sprintf('Invalid Model structure\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isValid.m0000644000000000000000000001305011703262404023404 0ustar rootrootfunction y = isValid(varargin) % [valid, message] = isValid(SBMLStruct, level(optional), version(optional)) % % Takes % % 1. SBMLStruct, an SBML structure % 2. level (optional), an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional level defaults to a value of 3 % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML structure of the appropriate % level and version can be found using getFieldnames(typecode, level, version) % if (nargin < 1) error('need input argument'); end; switch nargin case 1 sbml_struct = varargin{1}; level = 3; version = 1; fbc_version = 1; case 2 sbml_struct = varargin{1}; level = varargin{2}; version = 1; fbc_version = 1; case 3 sbml_struct = varargin{1}; level = varargin{2}; version = varargin{3}; fbc_version = 1; case 4 sbml_struct = varargin{1}; level = varargin{2}; version = varargin{3}; fbc_version = varargin{4}; otherwise error('too many input arguments'); end; if (length(sbml_struct) > 1) error('cannot deal with arrays of structures'); end; if ~isstruct(sbml_struct) || isempty(fieldnames(sbml_struct)) y = 0; return; end; isValidLevelVersionCombination(level, version); if isfield(sbml_struct, 'fbc_version') == 1 y = isValidFBC(sbml_struct, level, version, fbc_version); return; end; typecode = sbml_struct.typecode; switch (typecode) case 'SBML_ALGEBRAIC_RULE' fhandle = str2func('isSBML_AlgebraicRule'); case 'SBML_ASSIGNMENT_RULE' fhandle = str2func('isSBML_AssignmentRule'); case 'SBML_COMPARTMENT' fhandle = str2func('isSBML_Compartment'); case 'SBML_COMPARTMENT_TYPE' fhandle = str2func('isSBML_CompartmentType'); case 'SBML_COMPARTMENT_VOLUME_RULE' fhandle = str2func('isSBML_CompartmentVolumeRule'); case 'SBML_CONSTRAINT' fhandle = str2func('isSBML_Constraint'); case 'SBML_DELAY' fhandle = str2func('isSBML_Delay'); case 'SBML_EVENT' fhandle = str2func('isSBML_Event'); case 'SBML_EVENT_ASSIGNMENT' fhandle = str2func('isSBML_EventAssignment'); case 'SBML_FUNCTION_DEFINITION' fhandle = str2func('isSBML_FunctionDefinition'); case 'SBML_INITIAL_ASSIGNMENT' fhandle = str2func('isSBML_InitialAssignment'); case 'SBML_KINETIC_LAW' fhandle = str2func('isSBML_KineticLaw'); case 'SBML_LOCAL_PARAMETER' fhandle = str2func('isSBML_LocalParameter'); case 'SBML_MODIFIER_SPECIES_REFERENCE' fhandle = str2func('isSBML_ModifierSpeciesReference'); case 'SBML_PARAMETER' fhandle = str2func('isSBML_Parameter'); case 'SBML_PARAMETER_RULE' fhandle = str2func('isSBML_ParameterRule'); case 'SBML_PRIORITY' fhandle = str2func('isSBML_Priority'); case 'SBML_RATE_RULE' fhandle = str2func('isSBML_RateRule'); case 'SBML_REACTION' fhandle = str2func('isSBML_Reaction'); case 'SBML_SPECIES' fhandle = str2func('isSBML_Species'); case 'SBML_SPECIES_CONCENTRATION_RULE' fhandle = str2func('isSBML_SpeciesConcentrationRule'); case 'SBML_SPECIES_REFERENCE' fhandle = str2func('isSBML_SpeciesReference'); case 'SBML_SPECIES_TYPE' fhandle = str2func('isSBML_SpeciesType'); case 'SBML_STOICHIOMETRY_MATH' fhandle = str2func('isSBML_StoichiometryMath'); case 'SBML_TRIGGER' fhandle = str2func('isSBML_Trigger'); case 'SBML_UNIT' fhandle = str2func('isSBML_Unit'); case 'SBML_UNIT_DEFINITION' fhandle = str2func('isSBML_UnitDefinition'); case 'SBML_MODEL' fhandle = str2func('isValidSBML_Model'); otherwise y = 0; return; end; if (nargin == 1) if strcmp(typecode, 'SBML_MODEL') y = feval(fhandle, sbml_struct); else y = (feval(fhandle, sbml_struct, 1, 1) ... || feval(fhandle, sbml_struct, 1, 2) ... || feval(fhandle, sbml_struct, 2, 1) ... || feval(fhandle, sbml_struct, 2, 2) ... || feval(fhandle, sbml_struct, 2, 3) ... || feval(fhandle, sbml_struct, 2, 4) ... || feval(fhandle, sbml_struct, 3, 1)); end; else if strcmp(typecode, 'SBML_MODEL') y = feval(fhandle, sbml_struct); else y = feval(fhandle, sbml_struct, level, version); end; end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_UnitDefinition.m0000644000000000000000000001002611703262404026112 0ustar rootrootfunction [valid, message] = isSBML_UnitDefinition(varargin) % [valid, message] = isSBML_UnitDefinition(SBMLUnitDefinition, level, version(optional)) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML UnitDefinition structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML UnitDefinition structure of the appropriate % level and version can be found using getUnitDefinitionFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_UNIT_DEFINITION'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_UNIT_DEFINITION', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % unit if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.unit)) [valid, message] = isSBML_Unit(SBMLStructure.unit(index), ... level, version); index = index + 1; end; end; % report failure if (valid == 0) message = sprintf('Invalid UnitDefinition\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Unit.m0000644000000000000000000000717111703262404024110 0ustar rootrootfunction [valid, message] = isSBML_Unit(varargin) % [valid, message] = isSBML_Unit(SBMLUnit, level, version(optional)) % % Takes % % 1. SBMLUnit, an SBML Unit structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Unit structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Unit structure of the appropriate % level and version can be found using getUnitFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_UNIT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_UNIT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Unit\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Trigger.m0000644000000000000000000000723211703262404024572 0ustar rootrootfunction [valid, message] = isSBML_Trigger(varargin) % [valid, message] = isSBML_Trigger(SBMLTrigger, level, version(optional)) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Trigger structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Trigger structure of the appropriate % level and version can be found using getTriggerFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_TRIGGER'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_TRIGGER', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Trigger\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_StoichiometryMath.m0000644000000000000000000000741211703262404026643 0ustar rootrootfunction [valid, message] = isSBML_StoichiometryMath(varargin) % [valid, message] = isSBML_StoichiometryMath(SBMLStoichiometryMath, level, version(optional)) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML StoichiometryMath structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML StoichiometryMath structure of the appropriate % level and version can be found using getStoichiometryMathFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_STOICHIOMETRY_MATH'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_STOICHIOMETRY_MATH', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid StoichiometryMath\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_SpeciesType.m0000644000000000000000000000731011703262404025421 0ustar rootrootfunction [valid, message] = isSBML_SpeciesType(varargin) % [valid, message] = isSBML_SpeciesType(SBMLSpeciesType, level, version(optional)) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML SpeciesType structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML SpeciesType structure of the appropriate % level and version can be found using getSpeciesTypeFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_SPECIES_TYPE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_SPECIES_TYPE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid SpeciesType\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_SpeciesReference.m0000644000000000000000000000737711703262404026413 0ustar rootrootfunction [valid, message] = isSBML_SpeciesReference(varargin) % [valid, message] = isSBML_SpeciesReference(SBMLSpeciesReference, level, version(optional)) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML SpeciesReference structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML SpeciesReference structure of the appropriate % level and version can be found using getSpeciesReferenceFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_SPECIES_REFERENCE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_SPECIES_REFERENCE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid SpeciesReference\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_SpeciesConcentrationRule.m0000644000000000000000000000753111703262404030143 0ustar rootrootfunction [valid, message] = isSBML_SpeciesConcentrationRule(varargin) % [valid, message] = isSBML_SpeciesConcentrationRule(SBMLSpeciesConcentrationRule, level, version(optional)) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML SpeciesConcentrationRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML SpeciesConcentrationRule structure of the appropriate % level and version can be found using getSpeciesConcentrationRuleFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_SPECIES_CONCENTRATION_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_SPECIES_CONCENTRATION_RULE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid SpeciesConcentrationRule\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Species.m0000644000000000000000000000723211703262404024562 0ustar rootrootfunction [valid, message] = isSBML_Species(varargin) % [valid, message] = isSBML_Species(SBMLSpecies, level, version(optional)) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Species structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Species structure of the appropriate % level and version can be found using getSpeciesFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_SPECIES'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_SPECIES', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Species\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Rule.m0000644000000000000000000001115711703262404024077 0ustar rootrootfunction [valid, message] = isSBML_Rule(varargin) % [valid, message] = isSBML_Rule(SBMLRule, level, version(optional)) % % Takes % % 1. SBMLRule, an SBML Rule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Rule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Rule structure of the appropriate % level and version can be found using getRuleFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; if ~isempty(SBMLStructure) if isfield(SBMLStructure, 'typecode') typecode = SBMLStructure.typecode; else valid = 0; message = 'missing typecode'; return; end; else typecode = 'SBML_ASSIGNMENT_RULE'; end; switch (typecode) case 'SBML_ALGEBRAIC_RULE' [valid, message] = isSBML_AlgebraicRule(SBMLStructure, level, version); case 'SBML_ASSIGNMENT_RULE' [valid, message] = isSBML_AssignmentRule(SBMLStructure, level, version); case 'SBML_COMPARTMENT_VOLUME_RULE' [valid, message] = isSBML_CompartmentVolumeRule(SBMLStructure, level, version); case 'SBML_PARAMETER_RULE' [valid, message] = isSBML_ParameterRule(SBMLStructure, level, version); case 'SBML_RATE_RULE' [valid, message] = isSBML_RateRule(SBMLStructure, level, version); case 'SBML_SPECIES_CONCENTRATION_RULE' [valid, message] = isSBML_SpeciesConcentrationRule(SBMLStructure, level, version); case 'SBML_RULE' [valid, message] = checkRule(SBMLStructure, level, version); otherwise valid = 0; message = 'Incorrect rule typecode'; end; function [valid, message] = checkRule(SBMLStructure, level, version) message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getAlgebraicRuleFieldnames(level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Rule\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Reaction.m0000644000000000000000000001134611703262404024734 0ustar rootrootfunction [valid, message] = isSBML_Reaction(varargin) % [valid, message] = isSBML_Reaction(SBMLReaction, level, version(optional)) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Reaction structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Reaction structure of the appropriate % level and version can be found using getReactionFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_REACTION'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_REACTION', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % reactants if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.reactant)) [valid, message] = isSBML_SpeciesReference(SBMLStructure.reactant(index), ... level, version); index = index + 1; end; end; % products if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.product)) [valid, message] = isSBML_SpeciesReference(SBMLStructure.product(index), ... level, version); index = index + 1; end; end; % modifiers if (valid == 1 && level > 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.modifier)) [valid, message] = isSBML_ModifierSpeciesReference( ... SBMLStructure.modifier(index), ... level, version); index = index + 1; end; end; % kineticLaw if (valid == 1 && length(SBMLStructure.kineticLaw) == 1) [valid, message] = isSBML_KineticLaw(SBMLStructure.kineticLaw, level, version); end; % report failure if (valid == 0) message = sprintf('Invalid Reaction\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_RateRule.m0000644000000000000000000001030311703262404024703 0ustar rootrootfunction [valid, message] = isSBML_RateRule(varargin) % [valid, message] = isSBML_RateRule(SBMLRateRule, level, version(optional)) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML RateRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML RateRule structure of the appropriate % level and version can be found using getRateRuleFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_RATE_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (level > 1) if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else % check L1 types typecode = SBMLStructure.typecode; cvr = strcmp(typecode, 'SBML_COMPARTMENT_VOLUME_RULE'); pr = strcmp(typecode, 'SBML_PARAMETER_RULE'); scr = strcmp(typecode, 'SBML_SPECIES_CONCENTRATION_RULE'); if (cvr ~= 1 && pr ~= 1 && scr ~= 1) valid = 0; message = 'typecode mismatch'; return; elseif (strcmp(SBMLStructure.type, 'rate') ~= 1) valid = 0; message = 'expected rate type'; return; end; end; else valid = 0; message = 'missing typecode'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames(typecode, level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid RateRule\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Priority.m0000644000000000000000000000724511703262404025014 0ustar rootrootfunction [valid, message] = isSBML_Priority(varargin) % [valid, message] = isSBML_Priority(SBMLPriority, level, version(optional)) % % Takes % % 1. SBMLPriority, an SBML Priority structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Priority structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Priority structure of the appropriate % level and version can be found using getPriorityFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_PRIORITY'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_PRIORITY', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Priority\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_ParameterRule.m0000644000000000000000000000733611703262404025744 0ustar rootrootfunction [valid, message] = isSBML_ParameterRule(varargin) % [valid, message] = isSBML_ParameterRule(SBMLParameterRule, level, version(optional)) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML ParameterRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML ParameterRule structure of the appropriate % level and version can be found using getParameterRuleFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_PARAMETER_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_PARAMETER_RULE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid ParameterRule\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Parameter.m0000644000000000000000000000726011703262404025110 0ustar rootrootfunction [valid, message] = isSBML_Parameter(varargin) % [valid, message] = isSBML_Parameter(SBMLParameter, level, version(optional)) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Parameter structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Parameter structure of the appropriate % level and version can be found using getParameterFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_PARAMETER'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_PARAMETER', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Parameter\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_ModifierSpeciesReference.m0000644000000000000000000000753111703262404030062 0ustar rootrootfunction [valid, message] = isSBML_ModifierSpeciesReference(varargin) % [valid, message] = isSBML_ModifierSpeciesReference(SBMLModifierSpeciesReference, level, version(optional)) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML ModifierSpeciesReference structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML ModifierSpeciesReference structure of the appropriate % level and version can be found using getModifierSpeciesReferenceFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_MODIFIER_SPECIES_REFERENCE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_MODIFIER_SPECIES_REFERENCE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid ModifierSpeciesReference\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_LocalParameter.m0000644000000000000000000000735111703262404026064 0ustar rootrootfunction [valid, message] = isSBML_LocalParameter(varargin) % [valid, message] = isSBML_LocalParameter(SBMLLocalParameter, level, version(optional)) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML LocalParameter structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML LocalParameter structure of the appropriate % level and version can be found using getLocalParameterFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_LOCAL_PARAMETER'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_LOCAL_PARAMETER', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid LocalParameter\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_KineticLaw.m0000644000000000000000000001055611703262404025224 0ustar rootrootfunction [valid, message] = isSBML_KineticLaw(varargin) % [valid, message] = isSBML_KineticLaw(SBMLKineticLaw, level, version(optional)) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML KineticLaw structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML KineticLaw structure of the appropriate % level and version can be found using getKineticLawFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_KINETIC_LAW'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_KINETIC_LAW', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % parameters if (valid == 1 && level < 3) index = 1; while (valid == 1 && index <= length(SBMLStructure.parameter)) [valid, message] = isSBML_Parameter(SBMLStructure.parameter(index), ... level, version); index = index + 1; end; end; %check that any nested structures are appropriate % localParameters if (valid == 1 && level > 2) index = 1; while (valid == 1 && index <= length(SBMLStructure.localParameter)) [valid, message] = isSBML_LocalParameter(SBMLStructure.localParameter(index), ... level, version); index = index + 1; end; end; % report failure if (valid == 0) message = sprintf('Invalid KineticLaw\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_InitialAssignment.m0000644000000000000000000000741211703262404026611 0ustar rootrootfunction [valid, message] = isSBML_InitialAssignment(varargin) % [valid, message] = isSBML_InitialAssignment(SBMLInitialAssignment, level, version(optional)) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML InitialAssignment structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML InitialAssignment structure of the appropriate % level and version can be found using getInitialAssignmentFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_INITIAL_ASSIGNMENT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_INITIAL_ASSIGNMENT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid InitialAssignment\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_FunctionDefinition.m0000644000000000000000000000742511703262404026771 0ustar rootrootfunction [valid, message] = isSBML_FunctionDefinition(varargin) % [valid, message] = isSBML_FunctionDefinition(SBMLFunctionDefinition, level, version(optional)) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FunctionDefinition structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML FunctionDefinition structure of the appropriate % level and version can be found using getFunctionDefinitionFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_FUNCTION_DEFINITION'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_FUNCTION_DEFINITION', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid FunctionDefinition\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_EventAssignment.m0000644000000000000000000000736411703262404026307 0ustar rootrootfunction [valid, message] = isSBML_EventAssignment(varargin) % [valid, message] = isSBML_EventAssignment(SBMLEventAssignment, level, version(optional)) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML EventAssignment structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML EventAssignment structure of the appropriate % level and version can be found using getEventAssignmentFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_EVENT_ASSIGNMENT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_EVENT_ASSIGNMENT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid EventAssignment\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Event.m0000644000000000000000000001271711703262404024254 0ustar rootrootfunction [valid, message] = isSBML_Event(varargin) % [valid, message] = isSBML_Event(SBMLEvent, level, version(optional)) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Event structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Event structure of the appropriate % level and version can be found using getEventFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_EVENT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_EVENT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % eventAssignments if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.eventAssignment)) [valid, message] = isSBML_EventAssignment( ... SBMLStructure.eventAssignment(index), ... level, version); index = index + 1; end; end; % trigger/delay/priority % these are level and version dependent if (valid == 1) if (level == 2 && version > 2) if (length(SBMLStructure.trigger) > 1) valid = 0; message = 'multiple trigger elements encountered'; elseif (length(SBMLStructure.delay) > 1) valid = 0; message = 'multiple delay elements encountered'; end; if (valid == 1 && length(SBMLStructure.trigger) == 1) [valid, message] = isSBML_Trigger(SBMLStructure.trigger, level, version); end; if (valid == 1 && length(SBMLStructure.delay) == 1) [valid, message] = isSBML_Delay(SBMLStructure.delay, level, version); end; elseif (level > 2) if (length(SBMLStructure.trigger) > 1) valid = 0; message = 'multiple trigger elements encountered'; elseif (length(SBMLStructure.delay) > 1) valid = 0; message = 'multiple delay elements encountered'; elseif (length(SBMLStructure.priority) > 1) valid = 0; message = 'multiple priority elements encountered'; end; if (valid == 1 && length(SBMLStructure.trigger) == 1) [valid, message] = isSBML_Trigger(SBMLStructure.trigger, level, version); end; if (valid == 1 && length(SBMLStructure.delay) == 1) [valid, message] = isSBML_Delay(SBMLStructure.delay, level, version); end; if (valid == 1 && length(SBMLStructure.priority) == 1) [valid, message] = isSBML_Priority(SBMLStructure.priority, level, version); end; end; end; % report failure if (valid == 0) message = sprintf('Invalid Event\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Delay.m0000644000000000000000000000720411703262404024224 0ustar rootrootfunction [valid, message] = isSBML_Delay(varargin) % [valid, message] = isSBML_Delay(SBMLDelay, level, version(optional)) % % Takes % % 1. SBMLDelay, an SBML Delay structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Delay structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Delay structure of the appropriate % level and version can be found using getDelayFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_DELAY'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_DELAY', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Delay\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Constraint.m0000644000000000000000000000727311703262404025320 0ustar rootrootfunction [valid, message] = isSBML_Constraint(varargin) % [valid, message] = isSBML_Constraint(SBMLConstraint, level, version(optional)) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Constraint structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Constraint structure of the appropriate % level and version can be found using getConstraintFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_CONSTRAINT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_CONSTRAINT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Constraint\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_CompartmentVolumeRule.m0000644000000000000000000000747011703262404027504 0ustar rootrootfunction [valid, message] = isSBML_CompartmentVolumeRule(varargin) % [valid, message] = isSBML_CompartmentVolumeRule(SBMLCompartmentVolumeRule, level, version(optional)) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML CompartmentVolumeRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML CompartmentVolumeRule structure of the appropriate % level and version can be found using getCompartmentVolumeRuleFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_COMPARTMENT_VOLUME_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_COMPARTMENT_VOLUME_RULE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid CompartmentVolumeRule\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_CompartmentType.m0000644000000000000000000000736411703262404026330 0ustar rootrootfunction [valid, message] = isSBML_CompartmentType(varargin) % [valid, message] = isSBML_CompartmentType(SBMLCompartmentType, level, version(optional)) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML CompartmentType structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML CompartmentType structure of the appropriate % level and version can be found using getCompartmentTypeFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_COMPARTMENT_TYPE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_COMPARTMENT_TYPE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid CompartmentType\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_Compartment.m0000644000000000000000000000730611703262404025462 0ustar rootrootfunction [valid, message] = isSBML_Compartment(varargin) % [valid, message] = isSBML_Compartment(SBMLCompartment, level, version(optional)) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Compartment structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML Compartment structure of the appropriate % level and version can be found using getCompartmentFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_COMPARTMENT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_COMPARTMENT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Compartment\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_AssignmentRule.m0000644000000000000000000001040311703262404026121 0ustar rootrootfunction [valid, message] = isSBML_AssignmentRule(varargin) % [valid, message] = isSBML_AssignmentRule(SBMLAssignmentRule, level, version(optional)) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML AssignmentRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML AssignmentRule structure of the appropriate % level and version can be found using getAssignmentRuleFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_ASSIGNMENT_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (level > 1) if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else % check L1 types typecode = SBMLStructure.typecode; cvr = strcmp(typecode, 'SBML_COMPARTMENT_VOLUME_RULE'); pr = strcmp(typecode, 'SBML_PARAMETER_RULE'); scr = strcmp(typecode, 'SBML_SPECIES_CONCENTRATION_RULE'); if (cvr ~= 1 && pr ~= 1 && scr ~= 1) valid = 0; message = 'typecode mismatch'; return; elseif (strcmp(SBMLStructure.type, 'scalar') ~= 1) valid = 0; message = 'expected scalar type'; return; end; end; else valid = 0; message = 'missing typecode'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames(typecode, level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid AssignmentRule\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/isSBML_AlgebraicRule.m0000644000000000000000000000733611703262404025675 0ustar rootrootfunction [valid, message] = isSBML_AlgebraicRule(varargin) % [valid, message] = isSBML_AlgebraicRule(SBMLAlgebraicRule, level, version(optional)) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML AlgebraicRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* the optional version defaults to a value of 1 % % *NOTE:* The fields present in a MATLAB_SBML AlgebraicRule structure of the appropriate % level and version can be found using getAlgebraicRuleFieldnames(level, version) % %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_ALGEBRAIC_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_ALGEBRAIC_RULE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid AlgebraicRule\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/hasUnknownFields.m0000644000000000000000000000071111674114414025277 0ustar rootrootfunction [unknown, message] = hasUnknownFields(SBMLStruct, SBMLFieldnames) unknown = 0; message = ''; currentFields = fieldnames(SBMLStruct); for i = 1:length(currentFields) if ((sum(ismember(SBMLFieldnames, currentFields(i))) == 0) ... && (strcmp(currentFields(i), 'level') == 0) ... && (strcmp(currentFields(i), 'version') == 0)) unknown = 1; message = sprintf('%s is an unrecognised field', currentFields{i}); return; end; end;SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/Contents.m0000644000000000000000000005075211703262404023620 0ustar rootroot% toolbox\Validate_MATLAB_SBML_Structures % % This folder contains tests that checks that the structure supplied as argument % is of the appropriate form to represent the intended element of an SBML model. % %====================================================================================== % [valid, message] = isSBML_AlgebraicRule(SBMLAlgebraicRule, level, version(optional)) %====================================================================================== % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML AlgebraicRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %======================================================================================== % [valid, message] = isSBML_AssignmentRule(SBMLAssignmentRule, level, version(optional)) %======================================================================================== % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML AssignmentRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %================================================================================== % [valid, message] = isSBML_Compartment(SBMLCompartment, level, version(optional)) %================================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Compartment structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %========================================================================================== % [valid, message] = isSBML_CompartmentType(SBMLCompartmentType, level, version(optional)) %========================================================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML CompartmentType structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %====================================================================================================== % [valid, message] = isSBML_CompartmentVolumeRule(SBMLCompartmentVolumeRule, level, version(optional)) %====================================================================================================== % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML CompartmentVolumeRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %================================================================================ % [valid, message] = isSBML_Constraint(SBMLConstraint, level, version(optional)) %================================================================================ % Takes % 1. SBMLConstraint, an SBML Constraint structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Constraint structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %====================================================================== % [valid, message] = isSBML_Delay(SBMLDelay, level, version(optional)) %====================================================================== % Takes % 1. SBMLDelay, an SBML Delay structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Delay structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %====================================================================== % [valid, message] = isSBML_Event(SBMLEvent, level, version(optional)) %====================================================================== % Takes % 1. SBMLEvent, an SBML Event structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Event structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %========================================================================================== % [valid, message] = isSBML_EventAssignment(SBMLEventAssignment, level, version(optional)) %========================================================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML EventAssignment structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %================================================================================================ % [valid, message] = isSBML_FunctionDefinition(SBMLFunctionDefinition, level, version(optional)) %================================================================================================ % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FunctionDefinition structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================================================================== % [valid, message] = isSBML_InitialAssignment(SBMLInitialAssignment, level, version(optional)) %============================================================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML InitialAssignment structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %================================================================================ % [valid, message] = isSBML_KineticLaw(SBMLKineticLaw, level, version(optional)) %================================================================================ % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML KineticLaw structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %======================================================================================== % [valid, message] = isSBML_LocalParameter(SBMLLocalParameter, level, version(optional)) %======================================================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML LocalParameter structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================ % [valid, message] = isValidSBML_Model(SBMLModel) %============================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Model structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================================================================================ % [valid, message] = isSBML_ModifierSpeciesReference(SBMLModifierSpeciesReference, level, version(optional)) %============================================================================================================ % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML ModifierSpeciesReference structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================================================== % [valid, message] = isSBML_Parameter(SBMLParameter, level, version(optional)) %============================================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Parameter structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %====================================================================================== % [valid, message] = isSBML_ParameterRule(SBMLParameterRule, level, version(optional)) %====================================================================================== % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML ParameterRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================================================ % [valid, message] = isSBML_Priority(SBMLPriority, level, version(optional)) %============================================================================ % Takes % 1. SBMLPriority, an SBML Priority structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Priority structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================================================ % [valid, message] = isSBML_RateRule(SBMLRateRule, level, version(optional)) %============================================================================ % Takes % 1. SBMLRateRule, an SBML RateRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML RateRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================================================ % [valid, message] = isSBML_Reaction(SBMLReaction, level, version(optional)) %============================================================================ % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Reaction structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %==================================================================== % [valid, message] = isSBML_Rule(SBMLRule, level, version(optional)) %==================================================================== % Takes % 1. SBMLRule, an SBML Rule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Rule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %========================================================================== % [valid, message] = isSBML_Species(SBMLSpecies, level, version(optional)) %========================================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Species structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================================================================================ % [valid, message] = isSBML_SpeciesConcentrationRule(SBMLSpeciesConcentrationRule, level, version(optional)) %============================================================================================================ % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML SpeciesConcentrationRule structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================================================================ % [valid, message] = isSBML_SpeciesReference(SBMLSpeciesReference, level, version(optional)) %============================================================================================ % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML SpeciesReference structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %================================================================================== % [valid, message] = isSBML_SpeciesType(SBMLSpeciesType, level, version(optional)) %================================================================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML SpeciesType structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================================================================== % [valid, message] = isSBML_StoichiometryMath(SBMLStoichiometryMath, level, version(optional)) %============================================================================================== % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML StoichiometryMath structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %========================================================================== % [valid, message] = isSBML_Trigger(SBMLTrigger, level, version(optional)) %========================================================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Trigger structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %==================================================================== % [valid, message] = isSBML_Unit(SBMLUnit, level, version(optional)) %==================================================================== % Takes % 1. SBMLUnit, an SBML Unit structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Unit structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %======================================================================================== % [valid, message] = isSBML_UnitDefinition(SBMLUnitDefinition, level, version(optional)) %======================================================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. level, an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML UnitDefinition structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================================================ % [valid, message] = isValid(SBMLStruct, level(optional), version(optional)) %============================================================================ % Takes % 1. SBMLStruct, an SBML structure % 2. level (optional), an integer representing an SBML level % 3. version (optional), an integer representing an SBML version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % %============================================ % [valid, message] = isValidSBML_Model(SBMLModel) %============================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Model structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % SBMLToolbox-4.1.0/toolbox/Validate_MATLAB_SBML_Structures/bind_isSBML_Model.m0000644000000000000000000042112611662457332025237 0ustar rootrootfunction [valid, message] = isValidSBML_Model(SBMLStructure) % [valid, message] = isValidSBML_Model(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML Model structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* The fields present in a MATLAB_SBML Model structure of the appropriate % level and version can be found using getModelFieldnames(level, version) % %check the input arguments are appropriate if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; if ~isempty(SBMLStructure) if isfield(SBMLStructure, 'SBML_level') level = SBMLStructure.SBML_level; else level = 3; end; if isfield(SBMLStructure, 'SBML_version') version = SBMLStructure.SBML_version; else version = 1; end; else level = 3; version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_MODEL'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_MODEL', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % functionDefinitions if (valid == 1 && level > 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.functionDefinition)) [valid, message] = isSBML_FunctionDefinition( ... SBMLStructure.functionDefinition(index), ... level, version); index = index + 1; end; end; % unitDefinitions if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.unitDefinition)) [valid, message] = isSBML_UnitDefinition( ... SBMLStructure.unitDefinition(index), ... level, version); index = index + 1; end; end; % compartments if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.compartment)) [valid, message] = isSBML_Compartment(SBMLStructure.compartment(index), ... level, version); index = index + 1; end; end; % species if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.species)) [valid, message] = isSBML_Species(SBMLStructure.species(index), ... level, version); index = index + 1; end; end; % compartmentTypes if (valid == 1 && level == 2 && version > 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.compartmentType)) [valid, message] = isSBML_CompartmentType(SBMLStructure.compartmentType(index), ... level, version); index = index + 1; end; end; % speciesTypes if (valid == 1 && level == 2 && version > 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.speciesType)) [valid, message] = isSBML_SpeciesType(SBMLStructure.speciesType(index), ... level, version); index = index + 1; end; end; % parameter if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.parameter)) [valid, message] = isSBML_Parameter(SBMLStructure.parameter(index), ... level, version); index = index + 1; end; end; % initialAssignment if (valid == 1 && (level > 2 || (level == 2 && version > 1))) index = 1; while (valid == 1 && index <= length(SBMLStructure.initialAssignment)) [valid, message] = isSBML_InitialAssignment( ... SBMLStructure.initialAssignment(index), ... level, version); index = index + 1; end; end; % rule if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.rule)) [valid, message] = isSBML_Rule(SBMLStructure.rule(index), ... level, version); index = index + 1; end; end; % constraints if (valid == 1 && (level > 2 || (level == 2 && version > 1))) index = 1; while (valid == 1 && index <= length(SBMLStructure.constraint)) [valid, message] = isSBML_Constraint( ... SBMLStructure.constraint(index), ... level, version); index = index + 1; end; end; % reaction if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.reaction)) [valid, message] = isSBML_Reaction(SBMLStructure.reaction(index), ... level, version); index = index + 1; end; end; % event if (valid == 1 && level > 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.event)) [valid, message] = isSBML_Event(SBMLStructure.event(index), ... level, version); index = index + 1; end; end; % report failure if (valid == 0) message = sprintf('Invalid Model structure\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_AlgebraicRule(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_ALGEBRAIC_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_ALGEBRAIC_RULE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid AlgebraicRule\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_AssignmentRule(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_ASSIGNMENT_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (level > 1) if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else % check L1 types typecode = SBMLStructure.typecode; cvr = strcmp(typecode, 'SBML_COMPARTMENT_VOLUME_RULE'); pr = strcmp(typecode, 'SBML_PARAMETER_RULE'); scr = strcmp(typecode, 'SBML_SPECIES_CONCENTRATION_RULE'); if (cvr ~= 1 && pr ~= 1 && scr ~= 1) valid = 0; message = 'typecode mismatch'; return; elseif (strcmp(SBMLStructure.type, 'scalar') ~= 1) valid = 0; message = 'expected scalar type'; return; end; end; else valid = 0; message = 'missing typecode'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames(typecode, level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid AssignmentRule\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Compartment(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_COMPARTMENT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_COMPARTMENT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Compartment\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_CompartmentType(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_COMPARTMENT_TYPE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_COMPARTMENT_TYPE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid CompartmentType\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_CompartmentVolumeRule(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_COMPARTMENT_VOLUME_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_COMPARTMENT_VOLUME_RULE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid CompartmentVolumeRule\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Constraint(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_CONSTRAINT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_CONSTRAINT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Constraint\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Delay(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_DELAY'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_DELAY', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Delay\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Event(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_EVENT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_EVENT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % eventAssignments if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.eventAssignment)) [valid, message] = isSBML_EventAssignment( ... SBMLStructure.eventAssignment(index), ... level, version); index = index + 1; end; end; % trigger/delay/priority % these are level and version dependent if (valid == 1) if (level == 2 && version > 2) if (length(SBMLStructure.trigger) > 1) valid = 0; message = 'multiple trigger elements encountered'; elseif (length(SBMLStructure.delay) > 1) valid = 0; message = 'multiple delay elements encountered'; end; if (valid == 1 && length(SBMLStructure.trigger) == 1) [valid, message] = isSBML_Trigger(SBMLStructure.trigger, level, version); end; if (valid == 1 && length(SBMLStructure.delay) == 1) [valid, message] = isSBML_Delay(SBMLStructure.delay, level, version); end; elseif (level > 2) if (length(SBMLStructure.trigger) > 1) valid = 0; message = 'multiple trigger elements encountered'; elseif (length(SBMLStructure.delay) > 1) valid = 0; message = 'multiple delay elements encountered'; elseif (length(SBMLStructure.priority) > 1) valid = 0; message = 'multiple priority elements encountered'; end; if (valid == 1 && length(SBMLStructure.trigger) == 1) [valid, message] = isSBML_Trigger(SBMLStructure.trigger, level, version); end; if (valid == 1 && length(SBMLStructure.delay) == 1) [valid, message] = isSBML_Delay(SBMLStructure.delay, level, version); end; if (valid == 1 && length(SBMLStructure.priority) == 1) [valid, message] = isSBML_Priority(SBMLStructure.priority, level, version); end; end; end; % report failure if (valid == 0) message = sprintf('Invalid Event\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_EventAssignment(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_EVENT_ASSIGNMENT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_EVENT_ASSIGNMENT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid EventAssignment\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_FunctionDefinition(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_FUNCTION_DEFINITION'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_FUNCTION_DEFINITION', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid FunctionDefinition\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_InitialAssignment(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_INITIAL_ASSIGNMENT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_INITIAL_ASSIGNMENT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid InitialAssignment\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_KineticLaw(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_KINETIC_LAW'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_KINETIC_LAW', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % parameters if (valid == 1 && level < 3) index = 1; while (valid == 1 && index <= length(SBMLStructure.parameter)) [valid, message] = isSBML_Parameter(SBMLStructure.parameter(index), ... level, version); index = index + 1; end; end; %check that any nested structures are appropriate % localParameters if (valid == 1 && level > 2) index = 1; while (valid == 1 && index <= length(SBMLStructure.localParameter)) [valid, message] = isSBML_LocalParameter(SBMLStructure.localParameter(index), ... level, version); index = index + 1; end; end; % report failure if (valid == 0) message = sprintf('Invalid KineticLaw\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_LocalParameter(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_LOCAL_PARAMETER'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_LOCAL_PARAMETER', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid LocalParameter\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_ModifierSpeciesReference(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_MODIFIER_SPECIES_REFERENCE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_MODIFIER_SPECIES_REFERENCE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid ModifierSpeciesReference\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Parameter(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_PARAMETER'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_PARAMETER', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Parameter\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_ParameterRule(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_PARAMETER_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_PARAMETER_RULE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid ParameterRule\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Priority(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_PRIORITY'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_PRIORITY', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Priority\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_RateRule(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_RATE_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (level > 1) if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else % check L1 types typecode = SBMLStructure.typecode; cvr = strcmp(typecode, 'SBML_COMPARTMENT_VOLUME_RULE'); pr = strcmp(typecode, 'SBML_PARAMETER_RULE'); scr = strcmp(typecode, 'SBML_SPECIES_CONCENTRATION_RULE'); if (cvr ~= 1 && pr ~= 1 && scr ~= 1) valid = 0; message = 'typecode mismatch'; return; elseif (strcmp(SBMLStructure.type, 'rate') ~= 1) valid = 0; message = 'expected rate type'; return; end; end; else valid = 0; message = 'missing typecode'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames(typecode, level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid RateRule\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Reaction(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_REACTION'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_REACTION', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % reactants if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.reactant)) [valid, message] = isSBML_SpeciesReference(SBMLStructure.reactant(index), ... level, version); index = index + 1; end; end; % products if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.product)) [valid, message] = isSBML_SpeciesReference(SBMLStructure.product(index), ... level, version); index = index + 1; end; end; % modifiers if (valid == 1 && level > 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.modifier)) [valid, message] = isSBML_ModifierSpeciesReference( ... SBMLStructure.modifier(index), ... level, version); index = index + 1; end; end; % kineticLaw if (valid == 1 && length(SBMLStructure.kineticLaw) == 1) [valid, message] = isSBML_KineticLaw(SBMLStructure.kineticLaw, level, version); end; % report failure if (valid == 0) message = sprintf('Invalid Reaction\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Rule(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; if ~isempty(SBMLStructure) if isfield(SBMLStructure, 'typecode') typecode = SBMLStructure.typecode; else valid = 0; message = 'missing typecode'; return; end; else typecode = 'SBML_ASSIGNMENT_RULE'; end; switch (typecode) case 'SBML_ALGEBRAIC_RULE' [valid, message] = isSBML_AlgebraicRule(SBMLStructure, level, version); case 'SBML_ASSIGNMENT_RULE' [valid, message] = isSBML_AssignmentRule(SBMLStructure, level, version); case 'SBML_COMPARTMENT_VOLUME_RULE' [valid, message] = isSBML_CompartmentVolumeRule(SBMLStructure, level, version); case 'SBML_PARAMETER_RULE' [valid, message] = isSBML_ParameterRule(SBMLStructure, level, version); case 'SBML_RATE_RULE' [valid, message] = isSBML_RateRule(SBMLStructure, level, version); case 'SBML_SPECIES_CONCENTRATION_RULE' [valid, message] = isSBML_SpeciesConcentrationRule(SBMLStructure, level, version); case 'SBML_RULE' [valid, message] = checkRule(SBMLStructure, level, version); otherwise valid = 0; message = 'Incorrect rule typecode'; end; function [valid, message] = checkRule(SBMLStructure, level, version) message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getAlgebraicRuleFieldnames(level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Rule\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Species(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_SPECIES'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_SPECIES', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Species\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_SpeciesConcentrationRule(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_SPECIES_CONCENTRATION_RULE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_SPECIES_CONCENTRATION_RULE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid SpeciesConcentrationRule\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_SpeciesReference(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_SPECIES_REFERENCE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_SPECIES_REFERENCE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid SpeciesReference\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_SpeciesType(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_SPECIES_TYPE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_SPECIES_TYPE', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid SpeciesType\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_StoichiometryMath(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_STOICHIOMETRY_MATH'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_STOICHIOMETRY_MATH', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid StoichiometryMath\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Trigger(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_TRIGGER'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_TRIGGER', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Trigger\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_Unit(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_UNIT'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_UNIT', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid Unit\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [valid, message] = isSBML_UnitDefinition(varargin) %check the input arguments are appropriate if (nargin < 2 || nargin > 3) error('wrong number of input arguments'); end; SBMLStructure = varargin{1}; if (length(SBMLStructure) > 1) valid = 0; message = 'cannot deal with arrays of structures'; return; end; level = varargin{2}; if (nargin == 3) version = varargin{3}; else version = 1; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_UNIT_DEFINITION'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'missing typecode field'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_UNIT_DEFINITION', level, version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % unit if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.unit)) [valid, message] = isSBML_Unit(SBMLStructure.unit(index), ... level, version); index = index + 1; end; end; % report failure if (valid == 0) message = sprintf('Invalid UnitDefinition\n%s\n', message); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function valid = isValidLevelVersionCombination(level, version) valid = 1; if ~isIntegralNumber(level) error('level must be an integer'); elseif ~isIntegralNumber(version) error('version must be an integer'); end; if (level < 1 || level > 3) error('current SBML levels are 1, 2 or 3'); end; if (level == 1) if (version < 1 || version > 2) error('SBMLToolbox supports versions 1-2 of SBML Level 1'); end; elseif (level == 2) if (version < 1 || version > 4) error('SBMLToolbox supports versions 1-4 of SBML Level 2'); end; elseif (level == 3) if (version ~= 1) error('SBMLToolbox supports only version 1 of SBML Level 3'); end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function value = isIntegralNumber(number) value = 0; integerClasses = {'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'}; % since the function isinteger does not exist in MATLAB Rel 13 % this is not used %if (isinteger(number)) if (ismember(class(number), integerClasses)) value = 1; elseif (isnumeric(number)) % if it is an integer if (number == fix(number)) value = 1; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getAlgebraicRuleFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'type', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getAssignmentRuleFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getCompartmentFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'name', ... 'volume', ... 'units', ... 'outside', ... 'isSetVolume', ... }; nNumberFields = 8; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'spatialDimensions', ... 'size', ... 'units', ... 'outside', ... 'constant', ... 'isSetSize', ... 'isSetVolume', ... }; nNumberFields = 13; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'compartmentType', ... 'spatialDimensions', ... 'size', ... 'units', ... 'outside', ... 'constant', ... 'isSetSize', ... 'isSetVolume', ... }; nNumberFields = 14; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'compartmentType', ... 'spatialDimensions', ... 'size', ... 'units', ... 'outside', ... 'constant', ... 'isSetSize', ... 'isSetVolume', ... }; nNumberFields = 15; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'compartmentType', ... 'spatialDimensions', ... 'size', ... 'units', ... 'outside', ... 'constant', ... 'isSetSize', ... 'isSetVolume', ... }; nNumberFields = 15; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'spatialDimensions', ... 'size', ... 'units', ... 'constant', ... 'isSetSize', ... 'isSetSpatialDimensions', ... }; nNumberFields = 13; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getCompartmentTypeFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... }; nNumberFields = 6; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... }; nNumberFields = 7; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... }; nNumberFields = 7; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getCompartmentVolumeRuleFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'type', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 4) SBMLfieldnames = []; nNumberFields = 0; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getConstraintFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... 'message', ... }; nNumberFields = 7; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... 'message', ... }; nNumberFields = 7; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... 'message', ... }; nNumberFields = 7; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... 'message', ... }; nNumberFields = 7; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getDelayFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getEventAssignmentFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'variable', ... 'math', ... }; nNumberFields = 6; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'variable', ... 'sboTerm', ... 'math', ... }; nNumberFields = 7; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'variable', ... 'math', ... }; nNumberFields = 7; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'variable', ... 'math', ... }; nNumberFields = 7; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'variable', ... 'math', ... }; nNumberFields = 7; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getEventFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'trigger', ... 'delay', ... 'timeUnits', ... 'eventAssignment', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'trigger', ... 'delay', ... 'timeUnits', ... 'sboTerm', ... 'eventAssignment', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'trigger', ... 'delay', ... 'eventAssignment', ... }; nNumberFields = 10; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'useValuesFromTriggerTime', ... 'trigger', ... 'delay', ... 'eventAssignment', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'useValuesFromTriggerTime', ... 'trigger', ... 'delay', ... 'priority', ... 'eventAssignment', ... }; nNumberFields = 12; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getFieldnames(typecode, ... level, version) done = 1; switch (typecode) case {'SBML_ALGEBRAIC_RULE', 'AlgebraicRule', 'algebraicRule'} fhandle = str2func('getAlgebraicRuleFieldnames'); case {'SBML_ASSIGNMENT_RULE', 'AssignmentRule', 'assignmentRule'} fhandle = str2func('getAssignmentRuleFieldnames'); case {'SBML_COMPARTMENT', 'Compartment', 'compartment'} fhandle = str2func('getCompartmentFieldnames'); case {'SBML_COMPARTMENT_TYPE', 'CompartmentType', 'compartmentType'} fhandle = str2func('getCompartmentTypeFieldnames'); case {'SBML_COMPARTMENT_VOLUME_RULE', 'CompartmentVolumeRule', 'compartmentVolumeRule'} fhandle = str2func('getCompartmentVolumeRuleFieldnames'); case {'SBML_CONSTRAINT', 'Constraint', 'constraint'} fhandle = str2func('getConstraintFieldnames'); case {'SBML_DELAY', 'Delay', 'delay'} fhandle = str2func('getDelayFieldnames'); case {'SBML_EVENT', 'Event', 'event'} fhandle = str2func('getEventFieldnames'); case {'SBML_EVENT_ASSIGNMENT', 'EventAssignment', 'eventAssignment'} fhandle = str2func('getEventAssignmentFieldnames'); case {'SBML_FUNCTION_DEFINITION', 'FunctionDefinition', 'functionDefinition'} fhandle = str2func('getFunctionDefinitionFieldnames'); case {'SBML_INITIAL_ASSIGNMENT', 'InitialAssignment', 'initialAssignment'} fhandle = str2func('getInitialAssignmentFieldnames'); case {'SBML_KINETIC_LAW', 'KineticLaw', 'kineticLaw'} fhandle = str2func('getKineticLawFieldnames'); case {'SBML_LOCAL_PARAMETER', 'LocalParameter', 'localParameter'} fhandle = str2func('getLocalParameterFieldnames'); case {'SBML_MODEL', 'Model', 'model'} fhandle = str2func('getModelFieldnames'); case {'SBML_MODIFIER_SPECIES_REFERENCE', 'ModifierSpeciesReference', 'modifierSpeciesReference'} fhandle = str2func('getModifierSpeciesReferenceFieldnames'); case {'SBML_PARAMETER', 'Parameter', 'parameter'} fhandle = str2func('getParameterFieldnames'); case {'SBML_PARAMETER_RULE', 'ParameterRule', 'parameterRule'} fhandle = str2func('getParameterRuleFieldnames'); case {'SBML_PRIORITY', 'Priority', 'priority'} fhandle = str2func('getPriorityFieldnames'); case {'SBML_RATE_RULE', 'RateRule', 'ruleRule'} fhandle = str2func('getRateRuleFieldnames'); case {'SBML_REACTION', 'Reaction', 'reaction'} fhandle = str2func('getReactionFieldnames'); case {'SBML_SPECIES', 'Species', 'species'} fhandle = str2func('getSpeciesFieldnames'); case {'SBML_SPECIES_CONCENTRATION_RULE', 'SpeciesConcentrationRule', 'speciesConcentrationRule'} fhandle = str2func('getSpeciesConcentrationRuleFieldnames'); case {'SBML_SPECIES_REFERENCE', 'SpeciesReference', 'speciesReference'} fhandle = str2func('getSpeciesReferenceFieldnames'); case {'SBML_SPECIES_TYPE', 'SpeciesType', 'speciesType'} fhandle = str2func('getSpeciesTypeFieldnames'); case {'SBML_STOICHIOMETRY_MATH', 'StoichiometryMath', 'stoichiometryMath'} fhandle = str2func('getStoichiometryMathFieldnames'); case {'SBML_TRIGGER', 'Trigger', 'trigger'} fhandle = str2func('getTriggerFieldnames'); case {'SBML_UNIT', 'Unit', 'unit'} fhandle = str2func('getUnitFieldnames'); case {'SBML_UNIT_DEFINITION', 'UnitDefinition', 'unitDefinition'} fhandle = str2func('getUnitDefinitionFieldnames'); otherwise done = 0; end; if done == 1 [SBMLfieldnames, nNumberFields] = feval(fhandle, level, version); else switch (typecode) case {'SBML_FBC_FLUXBOUND', 'FluxBound', 'fluxBound'} fhandle = str2func('getFluxBoundFieldnames'); case {'SBML_FBC_FLUXOBJECTIVE', 'FluxObjective', 'fluxObjective'} fhandle = str2func('getFluxObjectiveFieldnames'); case {'SBML_FBC_OBJECTIVE', 'Objective', 'objective'} fhandle = str2func('getObjectiveFieldnames'); case {'SBML_FBC_MODEL', 'FBCModel'} fhandle = str2func('getFBCModelFieldnames'); case {'SBML_FBC_SPECIES', 'FBCSpecies'} fhandle = str2func('getFBCSpeciesFieldnames'); otherwise error('%s\n%s', ... 'getFieldnames(typecode, level, version', ... 'typecode not recognised'); end; [SBMLfieldnames, nNumberFields] = feval(fhandle, level, version, 1); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getFunctionDefinitionFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'math', ... }; nNumberFields = 7; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'math', ... }; nNumberFields = 8; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'math', ... }; nNumberFields = 8; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'math', ... }; nNumberFields = 8; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'math', ... }; nNumberFields = 8; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getInitialAssignmentFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'symbol', ... 'math', ... }; nNumberFields = 7; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'symbol', ... 'math', ... }; nNumberFields = 7; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'symbol', ... 'math', ... }; nNumberFields = 7; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'symbol', ... 'math', ... }; nNumberFields = 7; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getKineticLawFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'formula', ... 'parameter', ... 'timeUnits', ... 'substanceUnits', ... }; nNumberFields = 7; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'math', ... 'parameter', ... 'timeUnits', ... 'substanceUnits', ... }; nNumberFields = 9; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'math', ... 'parameter', ... 'sboTerm', ... }; nNumberFields = 8; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'math', ... 'parameter', ... }; nNumberFields = 8; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'math', ... 'parameter', ... }; nNumberFields = 8; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... 'localParameter', ... }; nNumberFields = 7; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getLocalParameterFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'value', ... 'units', ... 'isSetValue', ... }; nNumberFields = 10; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getModelFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'unitDefinition', ... 'compartment', ... 'species', ... 'parameter', ... 'rule', ... 'reaction', ... }; nNumberFields = 12; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'id', ... 'functionDefinition', ... 'unitDefinition', ... 'compartment', ... 'species', ... 'parameter', ... 'rule', ... 'reaction', ... 'event', ... }; nNumberFields = 16; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'id', ... 'sboTerm', ... 'functionDefinition', ... 'unitDefinition', ... 'compartmentType', ... 'speciesType', ... 'compartment', ... 'species', ... 'parameter', ... 'initialAssignment', ... 'rule', ... 'constraint', ... 'reaction', ... 'event', ... }; nNumberFields = 21; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'id', ... 'sboTerm', ... 'functionDefinition', ... 'unitDefinition', ... 'compartmentType', ... 'speciesType', ... 'compartment', ... 'species', ... 'parameter', ... 'initialAssignment', ... 'rule', ... 'constraint', ... 'reaction', ... 'event', ... }; nNumberFields = 21; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'id', ... 'sboTerm', ... 'functionDefinition', ... 'unitDefinition', ... 'compartmentType', ... 'speciesType', ... 'compartment', ... 'species', ... 'parameter', ... 'initialAssignment', ... 'rule', ... 'constraint', ... 'reaction', ... 'event', ... }; nNumberFields = 21; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'id', ... 'sboTerm', ... 'functionDefinition', ... 'unitDefinition', ... 'compartment', ... 'species', ... 'parameter', ... 'initialAssignment', ... 'rule', ... 'constraint', ... 'reaction', ... 'event', ... 'substanceUnits', ... 'timeUnits', ... 'lengthUnits', ... 'areaUnits', ... 'volumeUnits', ... 'extentUnits', ... 'conversionFactor', ... }; nNumberFields = 26; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getModifierSpeciesReferenceFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'species', ... }; nNumberFields = 5; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'species', ... 'id', ... 'name', ... 'sboTerm', ... }; nNumberFields = 8; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... }; nNumberFields = 8; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... }; nNumberFields = 8; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... }; nNumberFields = 8; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getParameterFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'name', ... 'value', ... 'units', ... 'isSetValue', ... }; nNumberFields = 7; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'value', ... 'units', ... 'constant', ... 'isSetValue', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'value', ... 'units', ... 'constant', ... 'sboTerm', ... 'isSetValue', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'value', ... 'units', ... 'constant', ... 'isSetValue', ... }; nNumberFields = 11; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'value', ... 'units', ... 'constant', ... 'isSetValue', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'value', ... 'units', ... 'constant', ... 'isSetValue', ... }; nNumberFields = 11; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getParameterRuleFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'type', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 4) SBMLfieldnames = []; nNumberFields = 0; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getPriorityFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getRateRuleFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getReactionFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'name', ... 'reactant', ... 'product', ... 'kineticLaw', ... 'reversible', ... 'fast', ... }; nNumberFields = 9; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'reactant', ... 'product', ... 'modifier', ... 'kineticLaw', ... 'reversible', ... 'fast', ... 'isSetFast', ... }; nNumberFields = 13; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'reactant', ... 'product', ... 'modifier', ... 'kineticLaw', ... 'reversible', ... 'fast', ... 'sboTerm', ... 'isSetFast', ... }; nNumberFields = 14; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'reactant', ... 'product', ... 'modifier', ... 'kineticLaw', ... 'reversible', ... 'fast', ... 'isSetFast', ... }; nNumberFields = 14; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'reactant', ... 'product', ... 'modifier', ... 'kineticLaw', ... 'reversible', ... 'fast', ... 'isSetFast', ... }; nNumberFields = 14; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'reactant', ... 'product', ... 'modifier', ... 'kineticLaw', ... 'reversible', ... 'fast', ... 'isSetFast', ... 'compartment', ... }; nNumberFields = 15; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getRuleFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'type', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getSpeciesConcentrationRuleFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'type', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 4) SBMLfieldnames = []; nNumberFields = 0; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getSpeciesFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'name', ... 'compartment', ... 'initialAmount', ... 'units', ... 'boundaryCondition', ... 'charge', ... 'isSetInitialAmount', ... 'isSetCharge', ... }; nNumberFields = 11; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'compartment', ... 'initialAmount', ... 'initialConcentration', ... 'substanceUnits', ... 'spatialSizeUnits', ... 'hasOnlySubstanceUnits', ... 'boundaryCondition', ... 'charge', ... 'constant', ... 'isSetInitialAmount', ... 'isSetInitialConcentration', ... 'isSetCharge', ... }; nNumberFields = 18; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'speciesType', ... 'compartment', ... 'initialAmount', ... 'initialConcentration', ... 'substanceUnits', ... 'spatialSizeUnits', ... 'hasOnlySubstanceUnits', ... 'boundaryCondition', ... 'charge', ... 'constant', ... 'isSetInitialAmount', ... 'isSetInitialConcentration', ... 'isSetCharge', ... }; nNumberFields = 19; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'speciesType', ... 'compartment', ... 'initialAmount', ... 'initialConcentration', ... 'substanceUnits', ... 'hasOnlySubstanceUnits', ... 'boundaryCondition', ... 'charge', ... 'constant', ... 'isSetInitialAmount', ... 'isSetInitialConcentration', ... 'isSetCharge', ... }; nNumberFields = 19; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'speciesType', ... 'compartment', ... 'initialAmount', ... 'initialConcentration', ... 'substanceUnits', ... 'hasOnlySubstanceUnits', ... 'boundaryCondition', ... 'charge', ... 'constant', ... 'isSetInitialAmount', ... 'isSetInitialConcentration', ... 'isSetCharge', ... }; nNumberFields = 19; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'compartment', ... 'initialAmount', ... 'initialConcentration', ... 'substanceUnits', ... 'hasOnlySubstanceUnits', ... 'boundaryCondition', ... 'constant', ... 'isSetInitialAmount', ... 'isSetInitialConcentration', ... 'conversionFactor', ... }; nNumberFields = 17; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getSpeciesReferenceFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'species', ... 'stoichiometry', ... 'denominator', ... }; nNumberFields = 6; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'species', ... 'stoichiometry', ... 'denominator', ... 'stoichiometryMath', ... }; nNumberFields = 8; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'species', ... 'id', ... 'name', ... 'sboTerm', ... 'stoichiometry', ... 'stoichiometryMath', ... }; nNumberFields = 10; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... 'stoichiometry', ... 'stoichiometryMath', ... }; nNumberFields = 10; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... 'stoichiometry', ... 'stoichiometryMath', ... }; nNumberFields = 10; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... 'stoichiometry', ... 'constant', ... 'isSetStoichiometry', ... }; nNumberFields = 11; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getSpeciesTypeFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... }; nNumberFields = 6; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... }; nNumberFields = 7; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... }; nNumberFields = 7; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getStoichiometryMathFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getTriggerFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'persistent', ... 'initialValue', ... 'math', ... }; nNumberFields = 8; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getUnitDefinitionFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'name', ... 'unit', ... }; nNumberFields = 5; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'unit', ... }; nNumberFields = 7; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'unit', ... }; nNumberFields = 7; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'unit', ... }; nNumberFields = 8; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'unit', ... }; nNumberFields = 8; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'unit', ... }; nNumberFields = 8; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [SBMLfieldnames, nNumberFields] = getUnitFieldnames(level, ... version) if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'kind', ... 'exponent', ... 'scale', ... }; nNumberFields = 6; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'kind', ... 'exponent', ... 'scale', ... 'multiplier', ... 'offset', ... }; nNumberFields = 9; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'kind', ... 'exponent', ... 'scale', ... 'multiplier', ... }; nNumberFields = 8; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'kind', ... 'exponent', ... 'scale', ... 'multiplier', ... }; nNumberFields = 9; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'kind', ... 'exponent', ... 'scale', ... 'multiplier', ... }; nNumberFields = 9; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'kind', ... 'exponent', ... 'scale', ... 'multiplier', ... }; nNumberFields = 9; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SBMLToolbox-4.1.0/toolbox/test.xml0000644000000000000000000000544611703274536015526 0ustar rootroot

Simple branch system.

The reaction looks like this:

reaction-1: X0 -> S1; k1*X0;

reaction-2: S1 -> X1; k2*S1;

reaction-3: S1 -> X2; k3*S1;

k1 X0 k2 S1 k3 S1
SBMLToolbox-4.1.0/toolbox/Test/0000755000000000000000000000000011704572220014723 5ustar rootrootSBMLToolbox-4.1.0/toolbox/Test/TestFunction.m0000644000000000000000000001121711655460060017533 0ustar rootrootfunction y = TestFunction(varargin) % y = 0; if (nargin < 3) error('Need at least 3 inputs'); end; func = varargin{1}; fhandle = str2func(func); number_in = varargin{2}; number_out = varargin{3}; if (nargin < 3+number_in+number_out) error('incorrect number of arguments'); end; start_out = 4 + number_in; fail = 0; switch number_out case 0 switch number_in case 1 [a] = feval(fhandle, varargin{4}); case 2 [a] = feval(fhandle, varargin{4}, varargin{5}); case 3 [a] = feval(fhandle, varargin{4}, varargin{5}, varargin{6}); case 4 [a] = feval(fhandle, varargin{4}, varargin{5}, varargin{6}, varargin{7}); end; fail = fail + ~testEquality(a); case 1 switch number_in case 1 [a] = feval(fhandle, varargin{4}); case 2 [a] = feval(fhandle, varargin{4}, varargin{5}); case 3 [a] = feval(fhandle, varargin{4}, varargin{5}, varargin{6}); case 4 [a] = feval(fhandle, varargin{4}, varargin{5}, varargin{6}, varargin{7}); end; fail = fail + ~testEquality(a, varargin{start_out}); case 2 switch number_in case 1 [a, b] = feval(fhandle, varargin{4}); case 2 [a, b] = feval(fhandle, varargin{4}, varargin{5}); case 3 [a] = feval(fhandle, varargin{4}, varargin{5}, varargin{6}); case 4 [a] = feval(fhandle, varargin{4}, varargin{5}, varargin{6}, varargin{7}); end; fail = fail + ~testEquality(a, varargin{start_out}); fail = fail + ~testEquality(b, varargin{start_out+1}); case 3 switch number_in case 1 [a, b, c] = feval(fhandle, varargin{4}); case 2 [a, b, c] = feval(fhandle, varargin{4}, varargin{5}); case 3 [a] = feval(fhandle, varargin{4}, varargin{5}, varargin{6}); case 4 [a] = feval(fhandle, varargin{4}, varargin{5}, varargin{6}, varargin{7}); end; fail = fail + ~testEquality(a, varargin{start_out}); fail = fail + ~testEquality(b, varargin{start_out+1}); fail = fail + ~testEquality(c, varargin{start_out+2}); otherwise error('too many output'); end; if (fail > 0) y = 1; end; function y = testEquality(array1, array2) y = isequal(array1, array2); if y == 1 return; elseif length(array1) ~= length(array2) y = 0; return; elseif issparse(array1) array1_full = full(array1); array2_full = full(array2); y = testEquality(array1_full, array2_full); else y = 1; i = 1; % check whether we are dealing with a nan which will always fail equality while (y == 1 && i <= length(array1)) if ~isstruct(array1) if isnan(array1(i)) y = isnan(array2(i)); else y = isequal(array1(i), array2(i)); end; else fields = fieldnames(array1(i)); j = 1; while( y == 1 && j <= length(fields)) ff1 = getfield(array1(i), fields{j}); ff2 = getfield(array2(i), fields{j}); if (iscell(ff1)) ff1 = ff1{1}; ff2 = ff2{1}; end; if isnan(ff1) y = isnan(ff2); else y = isequal(ff1, ff2); end; j = j+1; end; end; i = i + 1; end; end; SBMLToolbox-4.1.0/toolbox/Test/test-data/0000755000000000000000000000000011704572222016613 5ustar rootrootSBMLToolbox-4.1.0/toolbox/Test/test-data/varyingParameters.xml0000644000000000000000000000261311541621274023043 0ustar rootroot v3 k1 v2 k1 k v1 t SBMLToolbox-4.1.0/toolbox/Test/test-data/testNegativeLocalParameter.xml0000644000000000000000000000452111625135174024620 0ustar rootroot cell k1 E S k2 ES cell k3 ES SBMLToolbox-4.1.0/toolbox/Test/test-data/testIsInRules.xml0000644000000000000000000000770511602043352022115 0ustar rootroot v3 c1 sr1 s2 2 v3 2 v3 2 v3 2 v3 v3 c1 v3 c1 v3 c1 v3 c1 SBMLToolbox-4.1.0/toolbox/Test/test-data/species.xml0000644000000000000000000001001411540617526020771 0ustar rootroot x y x y kf S1 S2 kr S3 S4 f s1 kr SBMLToolbox-4.1.0/toolbox/Test/test-data/sparseStoichiometry.xml0000644000000000000000000000420511540617526023423 0ustar rootroot SBMLToolbox-4.1.0/toolbox/Test/test-data/rateRules.xml0000644000000000000000000000332611540617526021314 0ustar rootroot k kt s1 SBMLToolbox-4.1.0/toolbox/Test/test-data/piecewise.xml0000644000000000000000000000302511540617526021317 0ustar rootroot p1 kf 4 p2 SBMLToolbox-4.1.0/toolbox/Test/test-data/nestedPiecewise.xml0000644000000000000000000000363011540617526022464 0ustar rootroot p1 kf 4 p2 kf 4 p2 SBMLToolbox-4.1.0/toolbox/Test/test-data/l3v1core.xml0000644000000000000000000001475111557476040021012 0ustar rootroot x x 3 x p3 x 2 x p3 p1 p s p x 3 s k p x 3 x 3 1 x p3 SBMLToolbox-4.1.0/toolbox/Test/test-data/l2v4-all.xml0000644000000000000000000001130111540617526020673 0ustar rootroot x x 3 x p3 x 3 x p3 p1 p x 3 s p s k p x 3 x 3 x p3 SBMLToolbox-4.1.0/toolbox/Test/test-data/l2v3-all.xml0000644000000000000000000001066311575652072020707 0ustar rootroot x x 3 x p3 x 3 x p3 p1 p x 3 s p s k p x 3 x p3 SBMLToolbox-4.1.0/toolbox/Test/test-data/l2v2-newComponents.xml0000644000000000000000000000432511540617526022770 0ustar rootroot y X1 1 cell v X0 t SBMLToolbox-4.1.0/toolbox/Test/test-data/l2v2-all.xml0000644000000000000000000001030111540617526020670 0ustar rootroot x x 3 x x1 x 3 x x1 x t x 3 s k t x 3 k_s x SBMLToolbox-4.1.0/toolbox/Test/test-data/l2v1-all.xml0000644000000000000000000000717711540617526020710 0ustar rootroot x x 3 kx kp x1 p1 x p t k_s k t x 3 kp x SBMLToolbox-4.1.0/toolbox/Test/test-data/l1v2-all.xml0000644000000000000000000000474711540617526020710 0ustar rootroot SBMLToolbox-4.1.0/toolbox/Test/test-data/l1v1.xml0000644000000000000000000000447011540617526020132 0ustar rootroot SBMLToolbox-4.1.0/toolbox/Test/test-data/initialAssignments.xml0000644000000000000000000001020311540617526023203 0ustar rootroot s1 k1 s3 c c1 s1 s2 s3 s3 X S1 S3 s1 s2 k S1 k S2 SBMLToolbox-4.1.0/toolbox/Test/test-data/functionDefinition.xml0000644000000000000000000000522711540662356023207 0ustar rootroot x y x y fd c x x1 s fd k x t SBMLToolbox-4.1.0/toolbox/Test/test-data/funcDefsWithInitialAssignments.xml0000644000000000000000000001003411540617526025457 0ustar rootroot x y z x y z x y x y a b c d a b c d fd s1 k1 s3 fd1 c c1 s1 s2 s3 s3 SBMLToolbox-4.1.0/toolbox/Test/test-data/csymbolTime.xml0000644000000000000000000000215611540617526021635 0ustar rootroot S1 c my_time SBMLToolbox-4.1.0/toolbox/Test/test-data/csymbolDelay.xml0000644000000000000000000000164011540617526021772 0ustar rootroot p delay p1 delta_t SBMLToolbox-4.1.0/toolbox/Test/test-data/convertedFormulas.xml0000644000000000000000000001124211540617526023044 0ustar rootroot x x 3 x x 3 x 3 x 2 p1 p1 10 s x 3 x 3 3 x SBMLToolbox-4.1.0/toolbox/Test/test-data/algebraicRules.xml0000644000000000000000000000647211540617526022277 0ustar rootroot X S1 S3 S2 S3 s2 s1 s2 k S1 k S2 SBMLToolbox-4.1.0/toolbox/Test/RunTest.m0000644000000000000000000000616011703270364016513 0ustar rootrootfunction RunTest % cd ..; cd AccessModel; cd Test; disp('Performing tests in AccessModel directory'); am = test_am; cd ..; % % NEED work to get these to pass in octave % v = ver('symbolic'); % % only run if symbolic toolbox is intalled % if (~isempty(v) && isoctave == '0') % cd ..; % cd AccessToSymbols; % cd Test; % disp('Performing tests in AccessToSymbols directory'); % RunTest; % cd ..; % end; cd ..; cd Convenience; cd Test; disp('Performing tests in Convenience directory'); conv = test_conv; cd ..; cd ..; cd MATLAB_SBML_Structure_Functions; cd Test; disp('Performing tests in MATLAB_SBML_Structure_Functions directory'); st = testStructures; cd ..; cd ..; cd Simulation; cd Test; disp('Performing tests in Simulation directory'); sim = test_sim; cd ..; cd ..; cd Validate_MATLAB_SBML_Structures; cd Test; disp('Performing tests in Validate_MATLAB_SBML_Structures directory'); valid = test_valid; cd ..; cd ..; cd fbc_package; cd test; disp('Performing tests in fbc_package directory'); fbc = runFBCTest; cd ..; cd ..; cd Test; disp('Overall tests:'); if (am == 0) disp('AccessModel: PASS'); else disp('AccessModel: FAILED'); end; if (conv == 0) disp('Convenience: PASS'); else disp('Convenience: FAILED'); end; if (st == 0) disp('Structures: PASS'); else disp('Structures: FAILED'); end; if (sim == 0) disp('Simulation: PASS'); else disp('Simulation: FAILED'); end; if (valid == 0) disp('Validation: PASS'); else disp('Validation: FAILED'); end; if (fbc == 0) disp('FBC functions: PASS'); else disp('FBC functions: FAILED'); end; if (am+conv+st+sim+valid+fbc) == 0 disp('ALL TESTS PASSED'); else disp('Some errors encountered; refer to above'); end; if isBindingInstalled() == 0 disp('***********************************************************'); disp('LibSBML binding not installed - some tests could not be run'); disp('***********************************************************'); end; SBMLToolbox-4.1.0/toolbox/Simulation/0000755000000000000000000000000011704572220016130 5ustar rootrootSBMLToolbox-4.1.0/toolbox/Simulation/WriteODEFunction.m0000644000000000000000000007226711704012540021446 0ustar rootrootfunction WriteODEFunction(varargin) % WriteODEFunction(SBMLModel, name(optional)) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. name, an optional string representing the name of the ode function to be used % % Outputs % % 1. a file 'name.m' defining a function that defines the ode equations of % the model for use with the ode solvers % (if no name supplied the model id will be used) % switch (nargin) case 0 error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'must have at least one argument'); case 1 SBMLModel = varargin{1}; filename = ''; case 2 SBMLModel = varargin{1}; filename = varargin{2}; otherwise error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'does not take more than two arguments'); end; % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'first argument must be an SBMLModel structure'); end; % ------------------------------------------------------------- % check that we can deal with the model % for i=1:length(SBMLModel.parameter) % if (SBMLModel.parameter(i).constant == 0) % error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'Cannot deal with varying parameters'); % end; % end; if SBMLModel.SBML_level > 2 if ~isempty(SBMLModel.conversionFactor) error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'Cannot deal with conversion factors'); end; for i=1:length(SBMLModel.species) if ~isempty(SBMLModel.species(i).conversionFactor) error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'Cannot deal with conversion factors'); end; end; end; for i=1:length(SBMLModel.compartment) if (SBMLModel.compartment(i).constant == 0) error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'Cannot deal with varying compartments'); end; end; % if (length(SBMLModel.species) == 0) % error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'Cannot deal with models with no species'); % end; for i=1:length(SBMLModel.event) if exist('OCTAVE_VERSION') && length(SBMLModel.event) > 0 error('Octave cannot deal with events'); end; if (~isempty(SBMLModel.event(i).delay)) error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'Cannot deal with delayed events'); end; if SBMLModel.SBML_level > 2 if (~isempty(SBMLModel.event(i).priority)) error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'Cannot deal with event priorities'); end; if (~isempty(SBMLModel.event(i).trigger) && ... (SBMLModel.event(i).trigger.initialValue == 1 || SBMLModel.event(i).trigger.persistent == 1)) error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'Cannot deal with persistent trigger'); end; end; end; for i=1:length(SBMLModel.reaction) if (SBMLModel.reaction(i).fast == 1) error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'Cannot deal with fast reactions'); end; end; if (length(SBMLModel.compartment) > 1) error('WriteODEFunction(SBMLModel, (optional) filename)\n%s', 'Cannot deal with multiple compartments'); end; if (SBMLModel.SBML_level > 1 && ~isempty(SBMLModel.time_symbol)) for i=1:length(SBMLModel.rule) if (strcmp(SBMLModel.rule(i).typecode, 'SBML_ASSIGNMENT_RULE')) if (~isempty(matchName(SBMLModel.rule(i).formula, SBMLModel.time_symbol))) error('Cannot deal with time in an assignment rule'); end; end; end; end; if (SBMLModel.SBML_level > 1 && ~isempty(SBMLModel.delay_symbol)) for i=1:length(SBMLModel.rule) if (strcmp(SBMLModel.rule(i).typecode, 'SBML_ASSIGNMENT_RULE')) if (~isempty(matchName(SBMLModel.rule(i).formula, SBMLModel.delay_symbol))) error('Cannot deal with delay in an assignment rule'); end; end; end; end; %-------------------------------------------------------------- % get information from the model [ParameterNames, ParameterValues] = GetAllParametersUnique(SBMLModel); [VarParams, VarInitValues] = GetVaryingParameters(SBMLModel); NumberParams = length(VarParams); NumberSpecies = length(SBMLModel.species); if NumberSpecies > 0 Species = AnalyseSpecies(SBMLModel); Speciesnames = GetSpecies(SBMLModel); end; if NumberParams > 0 Parameters = AnalyseVaryingParameters(SBMLModel); end; if length(SBMLModel.compartment) > 0 [CompartmentNames, CompartmentValues] = GetCompartments(SBMLModel); else CompartmentNames = []; end; if (NumberParams + NumberSpecies) == 0 error('Cannot detect any variables'); end; if (SBMLModel.SBML_level > 1) NumEvents = length(SBMLModel.event); NumFuncs = length(SBMLModel.functionDefinition); % version 2.0.2 adds the time_symbol field to the model structure % need to check that it exists if (isfield(SBMLModel, 'time_symbol')) if (~isempty(SBMLModel.time_symbol)) timeVariable = SBMLModel.time_symbol; else timeVariable = 'time'; end; else timeVariable = 'time'; end; if ((SBMLModel.SBML_level == 2 &&SBMLModel.SBML_version > 1) || ... (SBMLModel.SBML_level > 2)) if (length(SBMLModel.constraint) > 0) error('Cannot deal with constraints.'); end; end; else NumEvents = 0; NumFuncs = 0; timeVariable = 'time'; end; %--------------------------------------------------------------- % get the name/id of the model Name = ''; if (SBMLModel.SBML_level == 1) Name = SBMLModel.name; else if (isempty(SBMLModel.id)) Name = SBMLModel.name; else Name = SBMLModel.id; end; end; if (~isempty(filename)) Name = filename; elseif (length(Name) > 63) Name = Name(1:60); end; fileName = strcat(Name, '.m'); %-------------------------------------------------------------------- % open the file for writing fileID = fopen(fileName, 'w'); % write the function declaration % if no events and using octave if (exist('OCTAVE_VERSION') && NumEvents == 0) fprintf(fileID, 'function xdot = %s(x_values, %s)\n', Name, timeVariable); else fprintf(fileID, 'function xdot = %s(%s, x_values)\n', Name, timeVariable); end; % need to add comments to output file fprintf(fileID, '%% function %s takes\n', Name); fprintf(fileID, '%%\n'); fprintf(fileID, '%% either\t1) no arguments\n'); fprintf(fileID, '%% \t and returns a vector of the initial values\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '%% or \t2) time - the elapsed time since the beginning of the reactions\n'); fprintf(fileID, '%% \t x_values - vector of the current values of the variables\n'); fprintf(fileID, '%% \t and returns a vector of the rate of change of value of each of the variables\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '%% %s can be used with MATLABs odeN functions as \n', Name); fprintf(fileID, '%%\n'); fprintf(fileID, '%%\t[t,x] = ode23(@%s, [0, t_end], %s)\n', Name, Name); fprintf(fileID, '%%\n'); fprintf(fileID, '%%\t\t\twhere t_end is the end time of the simulation\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '%%The variables in this model are related to the output vectors with the following indices\n'); fprintf(fileID, '%%\tIndex\tVariable name\n'); for i = 1:NumberSpecies fprintf(fileID, '%%\t %u \t %s\n', i, char(Species(i).Name)); end; for i = 1:NumberParams fprintf(fileID, '%%\t %u \t %s\n', i+NumberSpecies, char(VarParams{i})); end; fprintf(fileID, '%%\n'); % write the variable vector fprintf(fileID, '%%--------------------------------------------------------\n'); fprintf(fileID, '%% output vector\n\n'); fprintf(fileID, 'xdot = zeros(%u, 1);\n', NumberSpecies+NumberParams); % write the compartment values fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% compartment values\n\n'); for i = 1:length(CompartmentNames) fprintf(fileID, '%s = %g;\n', CompartmentNames{i}, CompartmentValues(i)); end; % write the parameter values fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% parameter values\n\n'); for i = 1:length(ParameterNames) fprintf(fileID, '%s = %g;\n', ParameterNames{i}, ParameterValues(i)); end; % write the initial concentration values for the species fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% initial values of variables - these may be overridden by assignment rules\n'); fprintf(fileID, '%% NOTE: any use of initialAssignments has been considered in calculating the initial values\n\n'); fprintf(fileID, 'if (nargin == 0)\n'); % if time symbol is used in any subsequent formula it is undeclared % for the initial execution of the function % which would only happen when time = 0 fprintf(fileID, '\n\t%% initial time\n'); fprintf(fileID, '\t%s = 0;\n', timeVariable); fprintf(fileID, '\n\t%% initial values\n'); for i = 1:NumberSpecies if (Species(i).isConcentration == 1) fprintf(fileID, '\t%s = %g;\n', char(Species(i).Name), Species(i).initialValue); elseif (Species(i).hasAmountOnly == 1) fprintf(fileID, '\t%s = %g;\n', char(Species(i).Name), Species(i).initialValue); else fprintf(fileID, '\t%s = %g/%s;\n', char(Species(i).Name), Species(i).initialValue, Species(i).compartment); end; end; for i = 1:NumberParams fprintf(fileID, '\t%s = %g;\n', char(Parameters(i).Name), Parameters(i).initialValue); end; fprintf(fileID, '\nelse\n'); fprintf(fileID, '\t%% floating variable values\n'); for i = 1:NumberSpecies fprintf(fileID, '\t%s = x_values(%u);\n', char(Species(i).Name), i); end; for i = 1:NumberParams fprintf(fileID, '\t%s = x_values(%u);\n', char(Parameters(i).Name), i+NumberSpecies); end; fprintf(fileID, '\nend;\n'); % write assignment rules fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% assignment rules\n'); AssignRules = Model_getListOfAssignmentRules(SBMLModel); for i = 1:length(AssignRules) rule = WriteRule(AssignRules(i)); fprintf(fileID, '%s\n', rule); end; % write algebraic rules fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% algebraic rules\n'); for i = 1:NumberSpecies if (Species(i).ConvertedToAssignRule == 1) fprintf(fileID, '%s = %s;\n', char(Species(i).Name), Species(i).ConvertedRule); end; end; for i = 1:NumberParams if (Parameters(i).ConvertedToAssignRule == 1) fprintf(fileID, '%s = %s;\n', char(Parameters(i).Name), Parameters(i).ConvertedRule); end; end; % write code to calculate concentration values fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% calculate concentration values\n\n'); fprintf(fileID, 'if (nargin == 0)\n'); fprintf(fileID, '\n\t%% initial values\n'); % need to catch any initial concentrations that are not set % and case where an initial concentration is set but is incosistent with a % later rule for i = 1:NumberSpecies if (Species(i).ChangedByAssignmentRule == 0) % not set by rule - use value given if (isnan(Species(i).initialValue)) error('WriteODEFunction(SBMLModel)\n%s', 'species concentration not provided or assigned by rule'); else if (Species(i).isConcentration == 1) fprintf(fileID, '\txdot(%u) = %g;\n', i, Species(i).initialValue); elseif (Species(i).hasAmountOnly == 1) fprintf(fileID, '\txdot(%u) = %g;\n', i, Species(i).initialValue); else fprintf(fileID, '\txdot(%u) = %g/%s;\n', i, Species(i).initialValue, Species(i).compartment); end; % fprintf(fileID, '\txdot(%u) = %g;\n', i, Species(i).initialValue); end; else % initial concentration set by rule fprintf(fileID, '\txdot(%u) = %s;\n', i, char(Species(i).Name)); end; end; % for NumSpecies % parameters for i = 1:NumberParams if (Parameters(i).ChangedByAssignmentRule == 0 && Parameters(i).ConvertedToAssignRule == 0) % not set by rule - use value given if (isnan(Parameters(i).initialValue)) error('WriteODEFunction(SBMLModel)\n%s', 'parameter not provided or assigned by rule'); else fprintf(fileID, '\txdot(%u) = %g;\n', i+NumberSpecies, Parameters(i).initialValue); end; else % initial concentration set by rule fprintf(fileID, '\txdot(%u) = %s;\n', i+NumberSpecies, char(Parameters(i).Name)); end; end; % for NumParams fprintf(fileID, '\nelse\n'); fprintf(fileID, '\n\t%% rate equations\n'); NeedToOrderArray = 0; for i = 1:NumberSpecies if (Species(i).ChangedByReaction == 1) % need to look for piecewise functions if (isempty(matchFunctionName(char(Species(i).KineticLaw), 'piecewise'))) if (Species(i).hasAmountOnly == 0) Array{i} = sprintf('\txdot(%u) = (%s)/%s;\n', i, char(Species(i).KineticLaw), Species(i).compartment); else Array{i} = sprintf('\txdot(%u) = %s;\n', i, char(Species(i).KineticLaw)); end; else var = sprintf('xdot(%u)', i); Array{i} = WriteOutPiecewise(var, char(Species(i).KineticLaw)); end; elseif (Species(i).ChangedByRateRule == 1) % a rule will be in concentration by default % if (Species(i).isConcentration == 1) Array{i} = sprintf('\txdot(%u) = %s;\n', i, char(Species(i).RateRule)); % else % Array{i} = sprintf('\txdot(%u) = (%s)*%s;\n', i, char(Species(i).RateRule), Species(i).compartment); % end; % Array{i} = sprintf('\txdot(%u) = %s;\n', i, char(Species(i).RateRule)); elseif (Species(i).ChangedByAssignmentRule == 1) % here no rate law has been provided by either kinetic law or rate % rule - need to check whether the species is in an % assignment rule which may impact on the rate %%% Checking for a piecewise in the assignment rule and %%% handling it %%% Change made by Sumant Turlapati, Entelos, Inc. on June 8th, 2005 if (isempty(matchFunctionName(char(Species(i).AssignmentRule), 'piecewise'))) DifferentiatedRule = DifferentiateRule(char(Species(i).AssignmentRule), Speciesnames, SBMLModel); Array{i} = sprintf('\txdot(%u) = %s;\n', i, char(DifferentiatedRule)); NeedToOrderArray = 1; else %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% TO DO NESTED PIECEWISE Args = DealWithPiecewise(char(Species(i).AssignmentRule)); DiffRule1 = DifferentiateRule(char(Args{1}), Speciesnames, SBMLModel); DiffRule2 = DifferentiateRule(char(Args{3}), Speciesnames, SBMLModel); Array{i} = sprintf('\tif (%s) \n\t\txdot(%d) = %s;\n\telse\n\t\txdot(%u) = %s;\n\tend;\n', ... Args{2}, i, char(DiffRule1), i, char(DiffRule2)); % NeedToOrderArray = 1; end; %DifferentiatedRule = DifferentiateRule(char(Species(i).AssignmentRule), Speciesnames); %Array{i} = sprintf('\txdot(%u) = %s;\n', i, char(DifferentiatedRule)); %NeedToOrderArray = 1; elseif (Species(i).ConvertedToAssignRule == 1) % here no rate law has been provided by either kinetic law or rate % rule - need to check whether the species is in an % algebraic rule which may impact on the rate DifferentiatedRule = DifferentiateRule(char(Species(i).ConvertedRule), Speciesnames, SBMLModel); Array{i} = sprintf('\txdot(%u) = %s;\n', i, char(DifferentiatedRule)); NeedToOrderArray = 1; else % not set by anything Array{i} = sprintf('\txdot(%u) = 0;\n', i); end; end; % for Numspecies for i = 1:NumberParams if (Parameters(i).ChangedByRateRule == 1) Array{i+NumberSpecies} = sprintf('\txdot(%u) = %s;\n', i+NumberSpecies, char(Parameters(i).RateRule)); elseif (Parameters(i).ChangedByAssignmentRule == 1) if (isempty(matchFunctionName(char(Parameters(i).AssignmentRule), 'piecewise'))) DifferentiatedRule = DifferentiateRule(char(Parameters(i).AssignmentRule), VarParams, SBMLModel); Array{i+NumberSpecies} = sprintf('\txdot(%u) = %s;\n', i+NumberSpecies, char(DifferentiatedRule)); NeedToOrderArray = 1; else %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% TO DO NESTED PIECEWISE Args = DealWithPiecewise(char(Parameters(i).AssignmentRule)); DiffRule1 = DifferentiateRule(char(Args{1}), VarParams, SBMLModel); DiffRule2 = DifferentiateRule(char(Args{3}), VarParams, SBMLModel); Array{i+NumberSpecies} = sprintf('\tif (%s) \n\t\txdot(%d) = %s;\n\telse\n\t\txdot(%u) = %s;\n\tend;\n', ... Args{2}, i+NumberSpecies, char(DiffRule1), i+NumberSpecies, char(DiffRule2)); % NeedToOrderArray = 1; end; elseif (Parameters(i).ConvertedToAssignRule == 1) % here no rate law has been provided by either kinetic law or rate % rule - need to check whether the species is in an % algebraic rule which may impact on the rate DifferentiatedRule = DifferentiateRule(char(Parameters(i).ConvertedRule), VarParams, SBMLModel); Array{i+NumberSpecies} = sprintf('\txdot(%u) = %s;\n', i+NumberSpecies, char(DifferentiatedRule)); NeedToOrderArray = 1; else % not set by anything Array{i+NumberSpecies} = sprintf('\txdot(%u) = 0;\n', i+NumberSpecies); end; end; % for Numparams % need to check that assignments are made in appropriate order % deals with rules that have been differentiated where xdot may occur on % both sides of an equation if (NeedToOrderArray == 1) Array = OrderArray(Array); end; if (NumberSpecies + NumberParams) > 0 for i = 1:length(Array) fprintf(fileID, '%s', Array{i}); end; end; fprintf(fileID, '\nend;\n'); % ----------------------------------------------------------------- if (NumEvents > 0) % write two additional files for events WriteEventHandlerFunction(SBMLModel, Name); WriteEventAssignmentFunction(SBMLModel, Name); end; % ------------------------------------------------------------------ % put in any function definitions if (NumFuncs > 0) fprintf(fileID, '\n\n%%---------------------------------------------------\n%%Function definitions\n\n'); for i = 1:NumFuncs Name = SBMLModel.functionDefinition(i).id; Elements = GetArgumentsFromLambdaFunction(SBMLModel.functionDefinition(i).math); fprintf(fileID, '%%function %s\n\n', Name); fprintf(fileID, 'function returnValue = %s(', Name); for j = 1:length(Elements)-1 if (j == length(Elements)-1) fprintf(fileID, '%s', Elements{j}); else fprintf(fileID, '%s, ', Elements{j}); end; end; if (isempty(matchFunctionName(Elements{end}, 'piecewise'))) fprintf(fileID, ')\n\nreturnValue = %s;\n\n\n', Elements{end}); else pw = WriteOutPiecewise('returnValue', Elements{end}); fprintf(fileID, ')\n\n%s\n\n', pw); end; end; end; fclose(fileID); %-------------------------------------------------------------------------- function y = WriteRule(SBMLRule) y = ''; switch (SBMLRule.typecode) case 'SBML_ASSIGNMENT_RULE' if (isempty(matchFunctionName(char(SBMLRule.formula), 'piecewise'))) y = sprintf('%s = %s;', SBMLRule.variable, SBMLRule.formula); else var = sprintf('%s', SBMLRule.variable); y = WriteOutPiecewise(var, char(SBMLRule.formula)); end; case 'SBML_SPECIES_CONCENTRATION_RULE' y = sprintf('%s = %s;', SBMLRule.species, SBMLRule.formula); case 'SBML_PARAMETER_RULE' y = sprintf('%s = %s;', SBMLRule.name, SBMLRule.formula); case 'SBML_COMPARTMENT_VOLUME_RULE' y = sprintf('%s = %s;', SBMLRule.compartment, SBMLRule.formula); otherwise error('No assignment rules'); end; %-------------------------------------------------------------------------- function formula = DifferentiateRule(f, SpeciesNames, model) if (model.SBML_level > 1 && ~isempty(model.time_symbol)) if (~isempty(matchName(f, model.time_symbol))) error('Cannot deal with time in an assignment rule'); end; end; if (~isempty(matchFunctionName(f, 'piecewise'))) error('Cannot deal with nested piecewise in an assignment rule'); end; % if the formula contains a functionDefinition % need to get rid of it first for i=1:length(model.functionDefinition) id = model.functionDefinition(i).id; if (~isempty(matchFunctionName(f, id))) f = SubstituteFunction(f, model.functionDefinition(i)); % remove surrounding brackets if (strcmp(f(1), '(') && strcmp(f(end), ')')) f = f(2:end-1); end; end; end; Brackets = PairBrackets(f); Dividers = '+-'; Divide = ismember(f, Dividers); % dividers between brackets do not count if (Brackets ~= 0) [NumPairs,y] = size(Brackets); for i = 1:length(Divide) if (Divide(i) == 1) for j = 1:NumPairs if ((i > Brackets(j,1)) && (i < Brackets(j, 2))) Divide(i) = 0; end; end; end; end; end; Divider = ''; NoElements = 1; element = ''; for i = 1:length(f) if (Divide(i) == 0) element = strcat(element, f(i)); else Divider = strcat(Divider, f(i)); Elements{NoElements} = element; NoElements = NoElements + 1; element = ''; end; % catch last element if (i == length(f)) Elements{NoElements} = element; end; end; for i = 1:NoElements % check whether element contains a species name % need to catch case where element is number and % species names use numbers eg s3 element '3' found = 0; for j = 1:length(SpeciesNames) % j = 1; A = matchName(Elements{i}, SpeciesNames{j}); if (~isempty(A)) if (length(Elements{i}) == length(SpeciesNames{j})) found = 1; % exact match else % need to check what has been found poscharAfter = A(1) + length(SpeciesNames{j}); poscharBefore = A(1) - 1; if (poscharBefore > 0) charBefore = Elements{i}(poscharBefore); else charBefore = '*'; end; if (poscharAfter <= length(Elements{i})) charAfter = Elements{i}(poscharAfter); else charAfter = '*'; end; if ((charBefore == '*' || charBefore == '/') && ... (charAfter == '*' || charAfter == '/')) found = 1; end; end; if (found == 1) break; end; end; end; if (found == 0) % this element does not contain a species Elements{i} = strrep(Elements{i}, Elements{i}, '0'); else % this element does contain a species %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % WHAT IF MORE THAN ONE SPECIES % for moment assume this would not happen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Power = strfind(Elements{i}, '^'); if (~isempty(Power)) Number = ''; Digits = isstrprop(Elements{i}, 'digit'); k = Power+1; while ((k < (length(Elements{i})+1)) & (Digits(k) == 1)) Number = strcat(Number, Elements{i}(k)); k = k + 1; end; Index = str2num(Number); Replace = sprintf('%u * %s^%u*xdot(%u)', Index, SpeciesNames{j}, Index-1, j); Initial = sprintf('%s^%u', SpeciesNames{j}, Index); Elements{i} = strrep(Elements{i}, Initial, Replace); else Replace = sprintf('xdot(%u)', j); Elements{i} = strrep(Elements(i), SpeciesNames{j}, Replace); end; end; end; % put the formula back together formula = ''; for i = 1:NoElements-1 formula = strcat(formula, Elements{i}, Divider(i)); end; formula = strcat(formula, Elements{NoElements}); %-------------------------------------------------------------------------- % function to put rate assignments in appropriate order % eg % xdot(2) = 3 % xdot(1) = 3* xdot(2) function Output = OrderArray(Array) % if (length(Array) > 9) % error('cannot deal with more than 10 species yet'); % end; NewArrayIndex = 1; TempArrayIndex = 1; TempArray2Index = 1; NumberInNewArray = 0; NumberInTempArray = 0; NumberInTempArray2 = 0; TempArray2 = {}; % put any formula withoutxdot on RHS into new array for i = 1:length(Array) if (length(strfind(Array{i}, 'xdot'))> 2) % xdot occurs more than once % put in temp array TempArray{TempArrayIndex} = Array{i}; TempArrayIndices(TempArrayIndex) = i; % update TempArrayIndex = TempArrayIndex + 1; NumberInTempArray = NumberInTempArray + 1; elseif (length(strfind(Array{i}, 'xdot'))==2) % if it is piecewise it will be of form if x xdot() = else xdot() % so xdot will occur twice but not necessarily on RHS if (length(strfind(Array{i}, 'if (')) == 1 ... && strfind(Array{i}, 'if (') < 3) % put in New array NewArray{NewArrayIndex} = Array{i}; NewArrayIndices(NewArrayIndex) = i; % update NewArrayIndex = NewArrayIndex + 1; NumberInNewArray = NumberInNewArray + 1; else TempArray{TempArrayIndex} = Array{i}; TempArrayIndices(TempArrayIndex) = i; % update TempArrayIndex = TempArrayIndex + 1; NumberInTempArray = NumberInTempArray + 1; % error('cannot deal with this function %s', Array{i}); end; else % no xdot on RHS % put in New array NewArray{NewArrayIndex} = Array{i}; NewArrayIndices(NewArrayIndex) = i; % update NewArrayIndex = NewArrayIndex + 1; NumberInNewArray = NumberInNewArray + 1; end; end; while (NumberInTempArray > 0) % go thru temp array for i = 1:NumberInTempArray % find positions of xdot Xdot = strfind(TempArray{i}, 'xdot'); % check whether indices of xdot on RHS are already in new array Found = 0; for j = 2:length(Xdot) Number = str2num(TempArray{i}(Xdot(j)+5)); if (sum(ismember(NewArrayIndices, Number)) == 1) Found = 1; else Found = 0; end; end; % if all have been found put in new array if (Found == 1) % put in New array NewArray{NewArrayIndex} = TempArray{i}; NewArrayIndices(NewArrayIndex) = TempArrayIndices(i); % update NewArrayIndex = NewArrayIndex + 1; NumberInNewArray = NumberInNewArray + 1; else % put in temp array2 TempArray2{TempArray2Index} = TempArray{i}; TempArray2Indices(TempArray2Index) = TempArrayIndices(i); % update TempArray2Index = TempArray2Index + 1; NumberInTempArray2 = NumberInTempArray2 + 1; end; end; %Realloctate temp arrays if (~isempty(TempArray2)) TempArray = TempArray2; TempArrayIndices = TempArray2Indices; NumberInTempArray = NumberInTempArray2; TempArray2Index = 1; NumberInTempArray2 = 0; else NumberInTempArray = 0; end; end; % of while NumInTempArray > 0 Output = NewArray; function output = WriteOutPiecewise(var, formula) Arguments = DealWithPiecewise(formula); if (strfind('piecewise', Arguments{2})) error('Cant do this yet!'); end; Text1{1} = sprintf('\n\tif (%s)', Arguments{2}); if (matchFunctionName(Arguments{1}, 'piecewise')) Text1{2} = WriteOutPiecewise(var, Arguments{1}); else Text1{2} = sprintf('\n\t\t%s = %s;', var, Arguments{1}); end; Text1{3} = sprintf('\n\telse'); if (matchFunctionName('piecewise', Arguments{3})) Text1{4} = WriteOutPiecewise(var, Arguments{3}); else Text1{4} = sprintf('\n\t\t%s = %s;\n\tend;\n', var, Arguments{3}); end; output = Text1{1}; for (i = 2:4) output = strcat(output, Text1{i}); end; SBMLToolbox-4.1.0/toolbox/Simulation/WriteEventHandlerFunction.m0000644000000000000000000002762011703262256023421 0ustar rootrootfunction WriteEventHandlerFunction(SBMLModel, Name) % WriteEventHandlerFunction(SBMLModel, name) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. name, a string representing the name of the ode function being used % % Outputs % % 1. a file 'name_events.m' defining a function that tests whether events % have been triggered % (for use with the event option of MATLABs ode solvers) % % *NOTE:* This function is called from WriteODEFunction when a model with % events is encountered. % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('WriteEventHandlerFunction(SBMLModel)\n%s', 'argument must be an SBMLModel structure'); end; % ------------------------------------------------------------- % get information from the model [ParameterNames, ParameterValues] = GetAllParametersUnique(SBMLModel); [VarParams, VarInitValues] = GetVaryingParameters(SBMLModel); NumberParams = length(VarParams); [SpeciesNames, SpeciesValues] = GetSpecies(SBMLModel); NumberSpecies = length(SBMLModel.species); VarNames = [SpeciesNames, VarParams]; VarValues = [SpeciesValues, VarInitValues]; NumberVars = NumberSpecies + NumberParams; arrayVariable = 'var1'; if ismember(arrayVariable, VarNames) arrayVariable = 'xyz_var1'; end; if ismember(arrayVariable, VarNames) error ('Unbelievable clash of variable names between model and event handling functions'); end; %--------------------------------------------------------------- % get the name/id of the model % Name = ''; % if (SBMLModel.SBML_level == 1) % Name = SBMLModel.name; % else % if (isempty(SBMLModel.id)) % Name = SBMLModel.name; % else % Name = SBMLModel.id; % end; % end; % version 2.0.2 adds the time_symbol field to the model structure % need to check that it exists if (isfield(SBMLModel, 'time_symbol')) if (~isempty(SBMLModel.time_symbol)) timeVariable = SBMLModel.time_symbol; else timeVariable = 'time'; end; else timeVariable = 'time'; end; if (min(VarValues) == 0) degree = 1; else degree = round(log10(min(VarValues))); end; tol = 1e-10 * power(10, degree); Name = strcat(Name, '_events'); fileName = strcat(Name, '.m'); %-------------------------------------------------------------------- % open the file for writing fileID = fopen(fileName, 'w'); % write the function declaration fprintf(fileID, 'function [value,isterminal,direction] = %s(%s, %s)\n', ... Name, timeVariable, arrayVariable); % need to add comments to output file fprintf(fileID, '%% function %s takes\n', Name); fprintf(fileID, '%%\n'); fprintf(fileID, '%%\t1) current elapsed time of integration\n'); fprintf(fileID, '%%\t2) vector of current output values\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '%% and stops the integration if the value calculated is zero\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '%% %s should be used with MATLABs odeN functions as \n', Name); fprintf(fileID, '%% the events function option\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '%%\ti.e. options = odeset(''Events'', @%s)\n', Name); fprintf(fileID, '%%\n'); fprintf(fileID, '%%\t[t,x] = ode23(@function, [0, t_end], function, options)\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '\n'); fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% constant for use with < or >\neps = %g;\n\n', tol); % write the parameter values fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% parameter values\n\n'); for i = 1:length(ParameterNames) fprintf(fileID, '%s = %g;\n', ParameterNames{i}, ParameterValues(i)); end; % write the current species concentrations fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% floating variables\n'); for i = 1:NumberVars fprintf(fileID, '%s = %s(%u);\n', VarNames{i}, arrayVariable, i); end; % write the events fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% events - point at which value will return 0\n\n'); numOfFunctions = 0 ; fprintf(fileID, 'value = ['); for i = 1:length(SBMLModel.event) [Funcs, Ignored] = ParseTriggerFunction(SBMLModel.event(i).trigger,[]); for j = 1:length(Funcs) numOfFunctions = numOfFunctions + 1; %fprintf(1, '%s\n', Funcs{j}); if ((i > 1) || (j > 1)) fprintf(fileID, ', %s', Funcs{j}); else fprintf(fileID, '%s', Funcs{j}); end; end; end; fprintf(fileID, '];\n'); fprintf(fileID, '\n%%stop integration\n'); fprintf(fileID, 'isterminal = [1'); for i = 2:numOfFunctions fprintf(fileID, ', 1'); end; fprintf(fileID, '];\n\n'); % this may depend on model fprintf(fileID, '%%set direction at which event should be looked for\n'); fprintf(fileID, 'direction = [-1'); for i = 2:numOfFunctions fprintf(fileID, ', -1'); end; fprintf(fileID, '];\n\n'); fclose(fileID); %-------------------------------------------------------------------------- % other functions function [FunctionStrings, Trigger] = ParseTriggerFunction(Trigger, FunctionStrings) %fprintf(1,'parsing: %s\n', Trigger); if (isstruct(Trigger)) Trigger = LoseLeadingWhiteSpace(Trigger.math); else Trigger = LoseLeadingWhiteSpace(Trigger); end; % trigger has the form function(function(variable,constant), function(v,c)) % need to isolate each OpenBracket = strfind(Trigger, '('); Func = Trigger(1:OpenBracket-1); Trigger = Trigger(OpenBracket+1:length(Trigger)); %fprintf(1,'got function: %s\n', Func); switch (Func) case 'and' [FunctionStrings, Trigger] = ParseTwoArgumentsAndClose(Trigger, FunctionStrings); case 'or' [FunctionStrings, Trigger] = ParseTwoArgumentsAndClose(Trigger, FunctionStrings); case 'lt' [left, right, Trigger] = ParseTwoNumericArgumentsAndClose(Trigger); FunctionString = sprintf('(%s) - (%s) + eps', left, right); FunctionStrings{length(FunctionStrings)+1} = FunctionString; case 'le' [left, right, Trigger] = ParseTwoNumericArgumentsAndClose(Trigger); FunctionString = sprintf('(%s) - (%s) + eps', left, right); FunctionStrings{length(FunctionStrings)+1} = FunctionString; case 'gt' [left, right, Trigger] = ParseTwoNumericArgumentsAndClose(Trigger); FunctionString = sprintf('(%s) - (%s) + eps', right, left); FunctionStrings{length(FunctionStrings)+1} = FunctionString; case 'ge' [left, right, Trigger] = ParseTwoNumericArgumentsAndClose(Trigger); FunctionString = sprintf('(%s) - (%s) + eps', right, left); FunctionStrings{length(FunctionStrings)+1} = FunctionString; otherwise error(sprintf('unrecognised function %s in trigger', Func)); end; function [FunctionStrings, Trigger] = ParseTwoArgumentsAndClose(Trigger, FunctionStrings) %fprintf(1, 'In ParseTwoArgumentsAndClose parsing: %s\n', Trigger); [FunctionStrings, Trigger] = ParseTriggerFunction(Trigger, FunctionStrings); comma = strfind(Trigger, ','); [FunctionStrings, Trigger] = ParseTriggerFunction(Trigger(comma+1:length(Trigger)), FunctionStrings); closeBracket = strfind(Trigger, ')'); Trigger = Trigger(closeBracket+1:length(Trigger)); function [left, right, Trigger] = ParseTwoNumericArgumentsAndClose(Trigger) [left, Trigger] = ParseNumericFunction(Trigger); comma = strfind(Trigger, ','); [right, Trigger] = ParseNumericFunction(Trigger(comma+1:length(Trigger))); closeBracket = strfind(Trigger, ')'); Trigger = Trigger(closeBracket+1:length(Trigger)); function [func, Trigger] = ParseNumericFunction(Trigger) %fprintf(1,'In ParseNumericFunction parsing: %s\n', Trigger); openBracket = strfind(Trigger, '('); comma = strfind(Trigger, ','); closeBracket = strfind(Trigger, ')'); if (isempty(openBracket) || (length(comma)~=0 && comma(1) < openBracket(1)) ... || (length(closeBracket)~=0 && closeBracket(1) < openBracket(1))) % simple case where no nesting if (length(comma)~=0 && comma(1) < closeBracket(1)) % terminated by comma func = Trigger(1:comma(1)-1); Trigger = Trigger(comma(1):length(Trigger)); else if (length(closeBracket)~=0) % terminated by close bracket func = Trigger(1:closeBracket(1)-1); Trigger=Trigger(closeBracket(1):length(Trigger)); else func=Trigger; Trigger=''; end; end; else % nested case func = Trigger(1:openBracket-1); Trigger = Trigger(openBracket+1:length(Trigger)); [subfunc, Trigger] = ParseNumericFunction(Trigger); func = sprintf('%s(%s', func, subfunc); Trigger = LoseLeadingWhiteSpace(Trigger); comma = strfind(Trigger, ','); while (length(comma) ~= 0 && comma(1) == 1) [subfunc, Trigger] = ParseNumericFunction(Trigger); func = sprintf('%s,%s', func, subfunc); Trigger = LoseLeadingWhiteSpace(Trigger); comma = strfind(Trigger, ','); end func=sprintf('%s)',func); closeBracket=strfind(Trigger, ')'); Trigger = Trigger(closeBracket(1)+1:length(Trigger)); end; %fprintf(1,'at end of ParseNumericFunction function: %s\n', func); %fprintf(1,'at end of ParseNumericFunction parsing: %s\n', Trigger); function y = LoseLeadingWhiteSpace(charArray) % LoseLeadingWhiteSpace(charArray) takes an array of characters % and returns the array with any leading white space removed % %---------------------------------------------------------------- % EXAMPLE: % y = LoseLeadingWhiteSpace(' example') % y = 'example' % %------------------------------------------------------------ % check input is an array of characters if (~ischar(charArray)) error('LoseLeadingWhiteSpace(input)\n%s', 'input must be an array of characters'); end; %------------------------------------------------------------- % get the length of the array NoChars = length(charArray); %------------------------------------------------------------- % determine the number of leading spaces % create an array that indicates whether the elements of charArray are % spaces % e.g. WSpace = isspace(' v b') = [1, 1, 0, 1, 0] WSpace = isspace(charArray); % find the indices of elements that are 0 % no spaces equals the index of the first zero minus 1 % e.g. Zeros = find(WSpace == 0) = [3,5] % NoSpaces = 2; Zeros = find(WSpace == 0); if (isempty(Zeros)) NoSpaces = 0; else NoSpaces = Zeros(1)-1; end; %----------------------------------------------------------- % if there is leading white spaces rewrite the array to leave these out if (NoSpaces > 0) for i = 1: NoChars-NoSpaces y(i) = charArray(i+NoSpaces); end; else y = charArray; end; SBMLToolbox-4.1.0/toolbox/Simulation/WriteEventAssignmentFunction.m0000644000000000000000000002161511703262256024152 0ustar rootrootfunction WriteEventAssignmentFunction(SBMLModel, Name) % WriteEventAssignmentFunction(SBMLModel, name) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. name, a string representing the name of the ode function being used % % Outputs % % 1. a file 'name_eventAssign.m' defining a function that assigns values following an event % (for use with the event option of MATLABs ode solvers) % % *NOTE:* This function is called from WriteODEFunction when a model with % events is encountered. % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('WriteEventAssignmentFunction(SBMLModel)\n%s', 'argument must be an SBMLModel structure'); end; % ------------------------------------------------------------- % get information from the model % get information from the model [ParameterNames, ParameterValues] = GetAllParametersUnique(SBMLModel); [VarParams, VarInitValues] = GetVaryingParameters(SBMLModel); NumberParams = length(VarParams); [SpeciesNames, SpeciesValues] = GetSpecies(SBMLModel); NumberSpecies = length(SBMLModel.species); VarNames = [SpeciesNames, VarParams]; VarValues = [SpeciesValues, VarInitValues]; NumberVars = NumberSpecies + NumberParams; NumFuncs = length(SBMLModel.functionDefinition); Species = AnalyseSpecies(SBMLModel); Params = AnalyseVaryingParameters(SBMLModel); %--------------------------------------------------------------- % get the name/id of the model % Name = ''; % if (SBMLModel.SBML_level == 1) % Name = SBMLModel.name; % else % if (isempty(SBMLModel.id)) % Name = SBMLModel.name; % else % Name = SBMLModel.id; % end; % end; % version 2.0.2 adds the time_symbol field to the model structure % need to check that it exists if (isfield(SBMLModel, 'time_symbol')) if (~isempty(SBMLModel.time_symbol)) timeVariable = SBMLModel.time_symbol; else timeVariable = 'time'; end; else timeVariable = 'time'; end; Name = strcat(Name, '_eventAssign'); fileName = strcat(Name, '.m'); %-------------------------------------------------------------------- % open the file for writing fileID = fopen(fileName, 'w'); % write the function declaration fprintf(fileID, 'function Values = %s(%s, VarValues, eventNo)\n', Name, timeVariable); % need to add comments to output file fprintf(fileID, '%% function %s takes\n', Name); fprintf(fileID, '%%\n'); fprintf(fileID, '%% current simulation time\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '%% vector of current species values\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '%% the number of the event that has triggered\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '%% and returns the values assigned by an event assignment\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '%% %s should be used with MATLABs odeN functions\n', Name); fprintf(fileID, '%% and called to reinitialise values when an event has stopped the integration\n'); fprintf(fileID, '%%\n'); fprintf(fileID, '\n'); % write the parameter values fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% parameter values\n\n'); for i = 1:length(ParameterNames) fprintf(fileID, '%s = %g;\n', ParameterNames{i}, ParameterValues(i)); end; % write the current species concentrations fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% floating variables\n'); for i = 1:NumberVars fprintf(fileID, '%s = VarValues(%u);\n', VarNames{i}, i); end; % write the event assignments fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% event assignments\n\n'); fprintf(fileID, 'switch(eventNo)\n'); for i = 1:length(SBMLModel.event) fprintf(fileID, '\tcase %u\n', i); for j = 1:length(SBMLModel.event(i).eventAssignment) % if a variable being assigned occurs in the math of a subsequent event % assignment the value should be the original assignment = SBMLModel.event(i).eventAssignment(j).math; for s=1:NumberVars if (~isempty(matchName(SBMLModel.event(i).eventAssignment(j).math, VarNames{s}))) speciesV = sprintf('VarValues(%u)', s); assignment = strrep(assignment, VarNames{s}, speciesV); end; end; fprintf(fileID, '\t\t%s = %s;\n', SBMLModel.event(i).eventAssignment(j).variable, assignment); end; end; fprintf(fileID, '\totherwise\nend;\n'); % write assignment rules fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% assignment rules\n'); AssignRules = Model_getListOfAssignmentRules(SBMLModel); for i = 1:length(AssignRules) rule = WriteRule(AssignRules(i)); fprintf(fileID, '%s\n', rule); end; % write algebraic rules fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% algebraic rules\n'); for i = 1:NumberSpecies if (Species(i).ConvertedToAssignRule == 1) fprintf(fileID, '%s = %s;\n', char(Species(i).Name), Species(i).ConvertedRule); end; end; for i = 1:NumberParams if (Params(i).ConvertedToAssignRule == 1) fprintf(fileID, '%s = %s;\n', char(Params(i).Name), Params(i).ConvertedRule); end; end; % output values fprintf(fileID, '\n%%--------------------------------------------------------\n'); fprintf(fileID, '%% output values\n\n'); for i = 1:NumberVars fprintf(fileID, 'Values(%u) = %s;\n', i, VarNames{i}); end; % put in any function definitions if (NumFuncs > 0) fprintf(fileID, '\n\n%%---------------------------------------------------\n%%Function definitions\n\n'); for i = 1:NumFuncs Name = SBMLModel.functionDefinition(i).id; Elements = GetArgumentsFromLambdaFunction(SBMLModel.functionDefinition(i).math); fprintf(fileID, '%%function %s\n\n', Name); fprintf(fileID, 'function returnValue = %s(', Name); for j = 1:length(Elements)-1 if (j == length(Elements)-1) fprintf(fileID, '%s', Elements{j}); else fprintf(fileID, '%s, ', Elements{j}); end; end; fprintf(fileID, ')\n\nreturnValue = %s;\n\n\n', Elements{end}); end; end; fclose(fileID); %-------------------------------------------------------------------------- function y = WriteRule(SBMLRule) y = ''; switch (SBMLRule.typecode) case 'SBML_ASSIGNMENT_RULE' if (isempty(matchFunctionName(char(SBMLRule.formula), 'piecewise'))) y = sprintf('%s = %s;', SBMLRule.variable, SBMLRule.formula); else var = sprintf('%s', SBMLRule.variable); y = WriteOutPiecewise(var, char(SBMLRule.formula)); end; case 'SBML_SPECIES_CONCENTRATION_RULE' y = sprintf('%s = %s;', SBMLRule.species, SBMLRule.formula); case 'SBML_PARAMETER_RULE' y = sprintf('%s = %s;', SBMLRule.name, SBMLRule.formula); case 'SBML_COMPARTMENT_VOLUME_RULE' y = sprintf('%s = %s;', SBMLRule.compartment, SBMLRule.formula); otherwise error('No assignment rules'); end; %------------------------------------------------------------------------------ function output = WriteOutPiecewise(var, formula) Arguments = DealWithPiecewise(formula); if (strfind('piecewise', Arguments{2})) error('Cant do this yet!'); end; Text1{1} = sprintf('\n\tif (%s)', Arguments{2}); if (matchFunctionName(Arguments{1}, 'piecewise')) Text1{2} = WriteOutPiecewise(var, Arguments{1}); else Text1{2} = sprintf('\n\t\t%s = %s;', var, Arguments{1}); end; Text1{3} = sprintf('\n\telse'); if (strfind('piecewise', Arguments{3})) Text1{4} = WriteOutPiecewise(var, Arguments{3}); else Text1{4} = sprintf('\n\t\t%s = %s;\n\tend;\n', var, Arguments{3}); end; output = Text1{1}; for (i = 2:4) output = strcat(output, Text1{i}); end; SBMLToolbox-4.1.0/toolbox/Simulation/Test/0000755000000000000000000000000011704572220017047 5ustar rootrootSBMLToolbox-4.1.0/toolbox/Simulation/Test/test_sim.m0000644000000000000000000000440611703267632021067 0ustar rootrootfunction y = test_sim() % test = 0; Totalfail = 0; if isBindingInstalled() == 1 test = test + 6; fail = TestAnalyseSpecies; if (fail > 0) disp('AnalyseSpecies failed'); end; Totalfail = Totalfail + fail; test = test + 4; fail = TestDealWithPiecewise; if (fail > 0) disp('DealWithPiecewise failed'); end; Totalfail = Totalfail + fail; test = test + 3; fail = TestGetArgumentsFromLambdaFunction; if (fail > 0) disp('GetArgumentsFromLambdaFunction failed'); end; Totalfail = Totalfail + fail; test = test + 1; fail = TestAnalyseVaryingParameters; if (fail > 0) disp('AnalyseSVaryingParameters failed'); end; Totalfail = Totalfail + fail; test = test + 1; fail = test_fbc_sim; if (fail > 0) disp('test_fbc_sim failed'); end; Totalfail = Totalfail + fail; disp(sprintf('Number tests: %d', test)); disp(sprintf('Number fails: %d', Totalfail)); disp(sprintf('Pass rate: %d%%', ((test-Totalfail)/test)*100)); else disp('LibSBML binding not installed - no tests could be run'); end; y = Totalfail; SBMLToolbox-4.1.0/toolbox/Simulation/Test/test_fbc_sim.m0000644000000000000000000001065311704012540021665 0ustar rootrootfunction y = test_fbc_sim() % fbcBindingEnabled = 1; if isBindingFbcEnabled() == 0 fbcBindingEnabled = 0; end; if (fbcBindingEnabled == 0) y = 0; else fail = 0; m = TranslateSBML('../../fbc_package/test/test-data/fbc.xml'); output_2(1).Name = {'S'}; output_2(1).constant = 0; output_2(1).boundaryCondition = 0; output_2(1).initialValue = 1; output_2(1).hasAmountOnly = 0; output_2(1).isConcentration = 0; output_2(1).compartment = 'c'; output_2(1).ChangedByReaction = 0; output_2(1).KineticLaw = ''; output_2(1).ChangedByRateRule = 0; output_2(1).RateRule = ''; output_2(1).ChangedByAssignmentRule = 0; output_2(1).AssignmentRule = ''; output_2(1).InAlgebraicRule = 0; output_2(1).AlgebraicRule = ''; output_2(1).ConvertedToAssignRule = 0; output_2(1).ConvertedRule = ''; output_2(2).Name = {'S1'}; output_2(2).constant = 0; output_2(2).boundaryCondition = 0; output_2(2).initialValue = 1; output_2(2).hasAmountOnly = 0; output_2(2).isConcentration = 0; output_2(2).compartment = 'c'; output_2(2).ChangedByReaction = 1; output_2(2).KineticLaw = {' - (k_R1*S1)'}; output_2(2).ChangedByRateRule = 0; output_2(2).RateRule = ''; output_2(2).ChangedByAssignmentRule = 0; output_2(2).AssignmentRule = ''; output_2(2).InAlgebraicRule = 0; output_2(2).AlgebraicRule = ''; output_2(2).ConvertedToAssignRule = 0; output_2(2).ConvertedRule = ''; output_2(3).Name = {'S2'}; output_2(3).constant = 0; output_2(3).boundaryCondition = 0; output_2(3).initialValue = 1; output_2(3).hasAmountOnly = 0; output_2(3).isConcentration = 0; output_2(3).compartment = 'c'; output_2(3).ChangedByReaction = 1; output_2(3).KineticLaw = {' + (k_R1*S1) - (k_R2*S2)'}; output_2(3).ChangedByRateRule = 0; output_2(3).RateRule = ''; output_2(3).ChangedByAssignmentRule = 0; output_2(3).AssignmentRule = ''; output_2(3).InAlgebraicRule = 0; output_2(3).AlgebraicRule = ''; output_2(3).ConvertedToAssignRule = 0; output_2(3).ConvertedRule = ''; output_2(4).Name = {'S3'}; output_2(4).constant = 0; output_2(4).boundaryCondition = 0; output_2(4).initialValue = 1; output_2(4).hasAmountOnly = 0; output_2(4).isConcentration = 0; output_2(4).compartment = 'c'; output_2(4).ChangedByReaction = 0; output_2(4).KineticLaw = ''; output_2(4).ChangedByRateRule = 0; output_2(4).RateRule = ''; output_2(4).ChangedByAssignmentRule = 0; output_2(4).AssignmentRule = ''; output_2(4).InAlgebraicRule = 0; output_2(4).AlgebraicRule = ''; output_2(4).ConvertedToAssignRule = 0; output_2(4).ConvertedRule = ''; output_2(5).Name = {'S4'}; output_2(5).constant = 0; output_2(5).boundaryCondition = 0; output_2(5).initialValue = 1; output_2(5).hasAmountOnly = 0; output_2(5).isConcentration = 0; output_2(5).compartment = 'c'; output_2(5).ChangedByReaction = 1; output_2(5).KineticLaw = {' + (k_R2*S2)'}; output_2(5).ChangedByRateRule = 0; output_2(5).RateRule = ''; output_2(5).ChangedByAssignmentRule = 0; output_2(5).AssignmentRule = ''; output_2(5).InAlgebraicRule = 0; output_2(5).AlgebraicRule = ''; output_2(5).ConvertedToAssignRule = 0; output_2(5).ConvertedRule = ''; fail = fail + TestFunction('AnalyseSpecies', 1, 1, m, output_2); y = fail; end; SBMLToolbox-4.1.0/toolbox/Simulation/Test/TestGetArgumentsFromLambdaFunction.m0000644000000000000000000000335111703262256026133 0ustar rootrootfunction fail = TestGetArgumentsFromLambdaFunction % input1 = 'lambda(x, x+0.5)'; output1 = {'x', 'x+0.5'}; input2 = 'lambda(x, y, x + y)'; output2 = {'x', 'y', 'x+y'}; fail = TestFunction('GetArgumentsFromLambdaFunction', 1, 1, input1, output1); fail = fail + TestFunction('GetArgumentsFromLambdaFunction', 1, 1, input2, output2); m = TranslateSBML('../../Test/test-data/l2v1-all.xml'); input = m.functionDefinition.math; output = {'x', 'power(x,3)'}; fail = fail + TestFunction('GetArgumentsFromLambdaFunction', 1, 1, input, output); SBMLToolbox-4.1.0/toolbox/Simulation/Test/TestDealWithPiecewise.m0000644000000000000000000000372511703262256023437 0ustar rootrootfunction fail = TestDealWithPiecewise % input = 'piecewise(le(s2,4),1.5,0.05)'; output = {'le(s2,4)', '1.5', '0.05'}; fail = TestFunction('DealWithPiecewise', 1, 1, input, output); input = 'piecewise(piecewise(1, a<5, 2), 3, 4)'; output= {'piecewise(1,a<5,2)', '3', '4'}; fail = fail + TestFunction('DealWithPiecewise', 1, 1, input, output); m = TranslateSBML('../../Test/test-data/piecewise.xml'); input = m.reaction.kineticLaw.math; output = {'p1', 'leq(kf,4)', 'p2'}; fail = fail + TestFunction('DealWithPiecewise', 1, 1, input, output); m = TranslateSBML('../../Test/test-data/nestedPiecewise.xml'); input = m.reaction.kineticLaw.math; output = {'piecewise(p1,leq(kf,4),p2)', 'leq(kf,4)', 'p2'}; fail = fail + TestFunction('DealWithPiecewise', 1, 1, input, output); SBMLToolbox-4.1.0/toolbox/Simulation/Test/TestAnalyseVaryingParameters.m0000644000000000000000000000750111703262256025054 0ustar rootrootfunction fail = TestAnalyseVaryingParameters % m = TranslateSBML('../../Test/test-data/varyingParameters.xml'); output_1(1).Name = {'v1'}; output_1(1).initialValue = 4; output_1(1).ChangedByRateRule = 0; output_1(1).RateRule = ''; output_1(1).ChangedByAssignmentRule = 1; output_1(1).AssignmentRule = {'k1+k'}; output_1(1).InAlgebraicRule = 0; output_1(1).AlgebraicRule = ''; output_1(1).ConvertedToAssignRule = 0; output_1(1).ConvertedRule = ''; output_1(2).Name = {'v2'}; output_1(2).initialValue = 4; output_1(2).ChangedByRateRule = 1; output_1(2).RateRule = {'v1/t'}; output_1(2).ChangedByAssignmentRule = 0; output_1(2).AssignmentRule = ''; output_1(2).InAlgebraicRule = 1; output_1(2).AlgebraicRule = {{'v3+k1-v2'}}; output_1(2).ConvertedToAssignRule = 0; output_1(2).ConvertedRule = ''; output_1(3).Name = {'v3'}; output_1(3).initialValue = 4; output_1(3).ChangedByRateRule = 0; output_1(3).RateRule = ''; output_1(3).ChangedByAssignmentRule = 0; output_1(3).AssignmentRule = ''; output_1(3).InAlgebraicRule = 1; output_1(3).AlgebraicRule = {{'v3+k1-v2'}}; output_1(3).ConvertedToAssignRule = 1; output_1(3).ConvertedRule = '-k1+v2'; fail = TestFunction('AnalyseVaryingParameters', 1, 1, m, output_1); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); output_2(1).Name = {'p'}; output_2(1).initialValue = 2; output_2(1).ChangedByRateRule = 0; output_2(1).RateRule = ''; output_2(1).ChangedByAssignmentRule = 0; output_2(1).AssignmentRule = ''; output_2(1).InAlgebraicRule = 0; output_2(1).AlgebraicRule = ''; output_2(1).ConvertedToAssignRule = 0; output_2(1).ConvertedRule = ''; output_2(2).Name = {'p1'}; output_2(2).initialValue = 4; output_2(2).ChangedByRateRule = 0; output_2(2).RateRule = ''; output_2(2).ChangedByAssignmentRule = 0; output_2(2).AssignmentRule = ''; output_2(2).InAlgebraicRule = 0; output_2(2).AlgebraicRule = ''; output_2(2).ConvertedToAssignRule = 0; output_2(2).ConvertedRule = ''; output_2(3).Name = {'p2'}; output_2(3).initialValue = 4; output_2(3).ChangedByRateRule = 0; output_2(3).RateRule = ''; output_2(3).ChangedByAssignmentRule = 1; output_2(3).AssignmentRule = {'x*p3'}; output_2(3).InAlgebraicRule = 0; output_2(3).AlgebraicRule = ''; output_2(3).ConvertedToAssignRule = 0; output_2(3).ConvertedRule = ''; output_2(4).Name = {'p3'}; output_2(4).initialValue = 2; output_2(4).ChangedByRateRule = 1; output_2(4).RateRule = {'p1/p'}; output_2(4).ChangedByAssignmentRule = 0; output_2(4).AssignmentRule = ''; output_2(4).InAlgebraicRule = 0; output_2(4).AlgebraicRule = ''; output_2(4).ConvertedToAssignRule = 0; output_2(4).ConvertedRule = ''; fail = fail + TestFunction('AnalyseVaryingParameters', 1, 1, m, output_2); SBMLToolbox-4.1.0/toolbox/Simulation/Test/TestAnalyseSpecies.m0000644000000000000000000002557211704013776023016 0ustar rootrootfunction fail = TestAnalyseSpecies % m = TranslateSBML('../../Test/test-data/l1v1.xml'); output_1(1).Name = {'S1'}; output_1(1).constant = 0; output_1(1).boundaryCondition = 0; output_1(1).initialValue = 1.5; output_1(1).isConcentration = 0; output_1(1).compartment = 'compartment'; output_1(1).ChangedByReaction = 1; output_1(1).KineticLaw = {' - (k_1_R1*S1) + (k_2_R2*S2)'}; output_1(1).ChangedByRateRule = 0; output_1(1).RateRule = ''; output_1(1).ChangedByAssignmentRule = 0; output_1(1).AssignmentRule = ''; output_1(1).InAlgebraicRule = 0; output_1(1).AlgebraicRule = ''; output_1(1).ConvertedToAssignRule = 0; output_1(1).ConvertedRule = ''; output_1(2).Name = {'S2'}; output_1(2).constant = 0; output_1(2).boundaryCondition = 0; output_1(2).initialValue = 1.45; output_1(2).isConcentration = 0; output_1(2).compartment = 'compartment'; output_1(2).ChangedByReaction = 1; output_1(2).KineticLaw = {' + (k_1_R1*S1) - (k_2_R2*S2)'}; output_1(2).ChangedByRateRule = 0; output_1(2).RateRule = ''; output_1(2).ChangedByAssignmentRule = 0; output_1(2).AssignmentRule = ''; output_1(2).InAlgebraicRule = 0; output_1(2).AlgebraicRule = ''; output_1(2).ConvertedToAssignRule = 0; output_1(2).ConvertedRule = ''; output_1(3).Name = {'x0'}; output_1(3).constant = 0; output_1(3).boundaryCondition = 0; output_1(3).initialValue = 1; output_1(3).isConcentration = 0; output_1(3).compartment = 'compartment'; output_1(3).ChangedByReaction = 0; output_1(3).KineticLaw = ''; output_1(3).ChangedByRateRule = 0; output_1(3).RateRule = ''; output_1(3).ChangedByAssignmentRule = 0; output_1(3).AssignmentRule = ''; output_1(3).InAlgebraicRule = 0; output_1(3).AlgebraicRule = ''; output_1(3).ConvertedToAssignRule = 0; output_1(3).ConvertedRule = ''; fail = TestFunction('AnalyseSpecies', 1, 1, m, output_1); m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); output_2(1).Name = {'S1'}; output_2(1).constant = 0; output_2(1).boundaryCondition = 0; output_2(1).initialValue = 0.0300; output_2(1).hasAmountOnly = 0; output_2(1).isConcentration = 0; output_2(1).compartment = 'compartment'; output_2(1).ChangedByReaction = 1; output_2(1).KineticLaw = {' - (k*S1)'}; output_2(1).ChangedByRateRule = 0; output_2(1).RateRule = ''; output_2(1).ChangedByAssignmentRule = 0; output_2(1).AssignmentRule = ''; output_2(1).InAlgebraicRule = 1; output_2(1).AlgebraicRule = {{'X+S1-S3'}}; output_2(1).ConvertedToAssignRule = 0; output_2(1).ConvertedRule = ''; output_2(2).Name = {'S2'}; output_2(2).constant = 0; output_2(2).boundaryCondition = 0; output_2(2).initialValue = 0; output_2(2).hasAmountOnly = 0; output_2(2).isConcentration = 0; output_2(2).compartment = 'compartment'; output_2(2).ChangedByReaction = 1; output_2(2).KineticLaw = {' + (k*S1) - (k_R2*S2)'}; output_2(2).ChangedByRateRule = 0; output_2(2).RateRule = ''; output_2(2).ChangedByAssignmentRule = 0; output_2(2).AssignmentRule = ''; output_2(2).InAlgebraicRule = 1; output_2(2).AlgebraicRule = {{'S2+S3-s2'}}; output_2(2).ConvertedToAssignRule = 0; output_2(2).ConvertedRule = ''; output_2(3).Name = {'S3'}; output_2(3).constant = 0; output_2(3).boundaryCondition = 0; output_2(3).initialValue = 7; output_2(3).hasAmountOnly = 0; output_2(3).isConcentration = 1; output_2(3).compartment = 'compartment'; output_2(3).ChangedByReaction = 0; output_2(3).KineticLaw = ''; output_2(3).ChangedByRateRule = 0; output_2(3).RateRule = ''; output_2(3).ChangedByAssignmentRule = 1; output_2(3).AssignmentRule = {'s1+s2'}; output_2(3).InAlgebraicRule = 1; output_2(3).AlgebraicRule = {{'X+S1-S3', 'S2+S3-s2'}}; output_2(3).ConvertedToAssignRule = 0; output_2(3).ConvertedRule = ''; output_2(4).Name = {'X'}; output_2(4).constant = 0; output_2(4).boundaryCondition = 0; output_2(4).initialValue = 0; output_2(4).hasAmountOnly = 0; output_2(4).isConcentration = 0; output_2(4).compartment = 'compartment'; output_2(4).ChangedByReaction = 0; output_2(4).KineticLaw = ''; output_2(4).ChangedByRateRule = 0; output_2(4).RateRule = ''; output_2(4).ChangedByAssignmentRule = 0; output_2(4).AssignmentRule = ''; output_2(4).InAlgebraicRule = 1; output_2(4).AlgebraicRule = {{'X+S1-S3'}}; output_2(4).ConvertedToAssignRule = 1; output_2(4).ConvertedRule = '-S1+(s1+s2)'; output_2(5).Name = {'S4'}; output_2(5).constant = 0; output_2(5).boundaryCondition = 0; output_2(5).initialValue = 0; output_2(5).hasAmountOnly = 0; output_2(5).isConcentration = 0; output_2(5).compartment = 'compartment'; output_2(5).ChangedByReaction = 1; output_2(5).KineticLaw = {' + (k_R2*S2)'}; output_2(5).ChangedByRateRule = 0; output_2(5).RateRule = ''; output_2(5).ChangedByAssignmentRule = 0; output_2(5).AssignmentRule = ''; output_2(5).InAlgebraicRule = 0; output_2(5).AlgebraicRule = ''; output_2(5).ConvertedToAssignRule = 0; output_2(5).ConvertedRule = ''; fail = fail + TestFunction('AnalyseSpecies', 1, 1, m, output_2); m = TranslateSBML('../../Test/test-data/rateRules.xml'); output(1).Name = {'s1'}; output(1).constant = 0; output(1).boundaryCondition = 1; output(1).initialValue = 0; output(1).hasAmountOnly = 0; output(1).isConcentration = 0; output(1).compartment = 'c'; output(1).ChangedByReaction = 0; output(1).KineticLaw = ''; output(1).ChangedByRateRule = 1; output(1).RateRule = {'k'}; output(1).ChangedByAssignmentRule = 0; output(1).AssignmentRule = ''; output(1).InAlgebraicRule = 0; output(1).AlgebraicRule = ''; output(1).ConvertedToAssignRule = 0; output(1).ConvertedRule = ''; output(2).Name = {'s2'}; output(2).constant = 0; output(2).boundaryCondition = 0; output(2).initialValue = 0; output(2).hasAmountOnly = 0; output(2).isConcentration = 0; output(2).compartment = 'c'; output(2).ChangedByReaction = 1; output(2).KineticLaw = {' + (kt*s1)'}; output(2).ChangedByRateRule = 0; output(2).RateRule = ''; output(2).ChangedByAssignmentRule = 0; output(2).AssignmentRule = ''; output(2).InAlgebraicRule = 0; output(2).AlgebraicRule = ''; output(2).ConvertedToAssignRule = 0; output(2).ConvertedRule = ''; fail = fail + TestFunction('AnalyseSpecies', 1, 1, m, output); m = TranslateSBML('../../Test/test-data/l2v2-newComponents.xml'); output_3(1).Name = {'X0'}; output_3(1).speciesType='Glucose'; output_3(1).constant = 0; output_3(1).boundaryCondition = 0; output_3(1).initialValue = 0.026; output_3(1).hasAmountOnly = 0; output_3(1).isConcentration = 1; output_3(1).compartment = 'cell'; output_3(1).ChangedByReaction = 1; output_3(1).KineticLaw = {' - (v_in*X0/t_in)'}; output_3(1).ChangedByRateRule = 0; output_3(1).RateRule = ''; output_3(1).ChangedByAssignmentRule = 0; output_3(1).AssignmentRule = ''; output_3(1).InAlgebraicRule = 0; output_3(1).AlgebraicRule = ''; output_3(1).ConvertedToAssignRule = 0; output_3(1).ConvertedRule = ''; output_3(2).Name = {'X1'}; output_3(2).speciesType=''; output_3(2).constant = 0; output_3(2).boundaryCondition = 0; output_3(2).initialValue = 0.013; output_3(2).hasAmountOnly = 0; output_3(2).isConcentration = 1; output_3(2).compartment = 'cell'; output_3(2).ChangedByReaction = 0; output_3(2).KineticLaw = ''; output_3(2).ChangedByRateRule = 0; output_3(2).RateRule = ''; output_3(2).ChangedByAssignmentRule = 0; output_3(2).AssignmentRule = ''; output_3(2).InAlgebraicRule = 0; output_3(2).AlgebraicRule = ''; output_3(2).ConvertedToAssignRule = 0; output_3(2).ConvertedRule = ''; fail = fail + TestFunction('AnalyseSpecies', 1, 1, m, output_3); m = TranslateSBML('../../Test/test-data/functionDefinition.xml'); output_4(1).Name = {'s'}; output_4(1).speciesType=''; output_4(1).constant = 0; output_4(1).boundaryCondition = 0; output_4(1).initialValue = 0; output_4(1).hasAmountOnly = 0; output_4(1).isConcentration = 0; output_4(1).compartment = 'a'; output_4(1).ChangedByReaction = 1; output_4(1).KineticLaw = {' - (s*fd(k_r,x)/t)'}; output_4(1).ChangedByRateRule = 0; output_4(1).RateRule = ''; output_4(1).ChangedByAssignmentRule = 0; output_4(1).AssignmentRule = ''; output_4(1).InAlgebraicRule = 0; output_4(1).AlgebraicRule = ''; output_4(1).ConvertedToAssignRule = 0; output_4(1).ConvertedRule = ''; fail = fail + TestFunction('AnalyseSpecies', 1, 1, m, output_4); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); output_5(1).Name = {'s'}; output_5(1).constant = 0; output_5(1).boundaryCondition = 0; output_5(1).initialValue = 0; output_5(1).hasAmountOnly = 0; output_5(1).isConcentration = 0; output_5(1).compartment = 'a'; output_5(1).ChangedByReaction = 1; output_5(1).KineticLaw = {' - (s*p) * (s*k_r/p)'}; output_5(1).ChangedByRateRule = 0; output_5(1).RateRule = ''; output_5(1).ChangedByAssignmentRule = 0; output_5(1).AssignmentRule = ''; output_5(1).InAlgebraicRule = 0; output_5(1).AlgebraicRule = ''; output_5(1).ConvertedToAssignRule = 0; output_5(1).ConvertedRule = ''; output_5(2).Name = {'s1'}; output_5(2).constant = 1; output_5(2).boundaryCondition = 1; output_5(2).initialValue = 2.2; output_5(2).hasAmountOnly = 1; output_5(2).isConcentration = 0; output_5(2).compartment = 'a'; output_5(2).ChangedByReaction = 0; output_5(2).KineticLaw = ''; output_5(2).ChangedByRateRule = 0; output_5(2).RateRule = ''; output_5(2).ChangedByAssignmentRule = 0; output_5(2).AssignmentRule = ''; output_5(2).InAlgebraicRule = 0; output_5(2).AlgebraicRule = ''; output_5(2).ConvertedToAssignRule = 0; output_5(2).ConvertedRule = ''; output_5(3).Name = {'s2'}; output_5(3).constant = 0; output_5(3).boundaryCondition = 0; output_5(3).initialValue = NaN; output_5(3).hasAmountOnly = 0; output_5(3).isConcentration = 1; output_5(3).compartment = 'a'; output_5(3).ChangedByReaction = 1; output_5(3).KineticLaw = {' + (s*k_r/p)'}; output_5(3).ChangedByRateRule = 0; output_5(3).RateRule = ''; output_5(3).ChangedByAssignmentRule = 0; output_5(3).AssignmentRule = ''; output_5(3).InAlgebraicRule = 0; output_5(3).AlgebraicRule = ''; output_5(3).ConvertedToAssignRule = 0; output_5(3).ConvertedRule = ''; fail = fail + TestFunction('AnalyseSpecies', 1, 1, m, output_5); SBMLToolbox-4.1.0/toolbox/Simulation/SolveODEFunction.m0000644000000000000000000003143511704550170021442 0ustar rootrootfunction [t, data] = SolveODEFunction(varargin) % SolveODEFunction(varargin) % % Takes % % 1. a MATLAB_SBML model structure (required argument) % 2. time limit (default = 10) % 3. number of time steps (default lets the solver decide) % 4. a flag to indicate whether to output species values in amount/concentration % 1 amount, 0 concentration (default) % 5. a flag to indicate whether to output the simulation data as % a comma separated variable (csv) file % 1 output 0 no output (default) % 6. a filename (this is needed if WriteODEFunction was used with a % filename) % % Returns % % 1. an array of time values % 2. an array of the values of variables at each time point; species will % be in concentration or amount as specified by input arguments % % Outputs % % 1. a file 'name.csv' with the data results (if the flag to output such a % file is set to 1. % % *NOTE:* the results are generated using ode45 solver (MATLAB) or lsode % (Octave) % % get inputs if (nargin < 1) error('SolveODEFunction(SBMLModel, ...)\n%s', 'must have at least one argument'); elseif (nargin > 6) error('SolveODEFunction(SBMLModel, ...)\n%s', 'cannot have more than six arguments'); end; % first argument SBMLModel = varargin{1}; % check first input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('SolveODEFunction(SBMLModel)\n%s', 'first argument must be an SBMLModel structure'); end; % put in default values Time_limit = 10; NoSteps = -1; outAmt = 0; outCSV = 1; if (SBMLModel.SBML_level == 1) Name = SBMLModel.name; else Name = SBMLModel.id; end; if (length(Name) > 63) Name = Name(1:60); end; switch nargin case 2 Time_limit = varargin{2}; case 3 Time_limit = varargin{2}; NoSteps = varargin{3}; case 4 Time_limit = varargin{2}; NoSteps = varargin{3}; outAmt = varargin{4}; case 5 Time_limit = varargin{2}; NoSteps = varargin{3}; outAmt = varargin{4}; outCSV = varargin{5}; case 6 Time_limit = varargin{2}; NoSteps = varargin{3}; outAmt = varargin{4}; outCSV = varargin{5}; if ~isempty(varargin{6}) Name = varargin{6}; end; end; % check values are sensible if ((length(Time_limit) ~= 1) || (~isnumeric(Time_limit))) error('SolveODEFunction(SBMLModel, time)\n%s', ... 'time must be a single real number indicating a time limit'); end; if ((length(NoSteps) ~= 1) || (~isnumeric(NoSteps))) error('SolveODEFunction(SBMLModel, time, steps)\n%s', ... 'steps must be a single real number indicating the number of steps'); end; if (~isIntegralNumber(outAmt) || outAmt < 0 || outAmt > 1) error('SolveODEFunction(SBMLModel, time, steps, concFlag)\n%s', ... 'concFlag must be 0 or 1'); end; if (~isIntegralNumber(outCSV) || outCSV < 0 || outCSV > 1) error('SolveODEFunction(SBMLModel, time, steps, concFlag, csvFlag)\n%s', ... 'csvFlag must be 0 or 1'); end; if (~ischar(Name)) error('SolveODEFunction(SBMLModel, time, steps, concFlag, csvFlag, name)\n%s', ... 'name must be a string'); end; fileName = strcat(Name, '.m'); %-------------------------------------------------------------- % check that a .m file of this name exists % check whether file exists fId = fopen(fileName); if (fId == -1) if (nargin < 6) error('SolveODEFunction(SBMLModel)\n%s\n%s', ... 'You must use WriteODEFunction to output an ode function for this', ... 'model before using this function'); else error('SolveODEFunction(SBMLModel)\n%s', 'You have not used this filename with WriteODEFunction'); end; else fclose(fId); end; %------------------------------------------------------------ % calculate values to use in iterative process if (NoSteps ~= -1) delta_t = Time_limit/NoSteps; Time_span = [0:delta_t:Time_limit]; else Time_span = [0, Time_limit]; end; %-------------------------------------------------------------- % get variables from the model [VarParams, VarInitValues] = GetVaryingParameters(SBMLModel); NumberParams = length(VarParams); [SpeciesNames, SpeciesValues] = GetSpecies(SBMLModel); NumberSpecies = length(SBMLModel.species); VarNames = [SpeciesNames, VarParams]; NumVars = NumberSpecies + NumberParams; %--------------------------------------------------------------- % get function handle fhandle = str2func(Name); % get initial conditions InitConds = feval(fhandle); % set the tolerances of the odesolver to appropriate values RelTol = min(InitConds(find(InitConds > 0))) * 1e-4; if isempty(RelTol) RelTol = 1e-6; end; if (RelTol > 1e-6) RelTol = 1e-6; end; AbsTol = RelTol * 1e-4; if exist('OCTAVE_VERSION') [t, data] = runSimulationOctave(RelTol, AbsTol, fhandle, Time_span, InitConds); else if Model_getNumEvents(SBMLModel) == 0 [t, data] = runSimulation(RelTol, AbsTol, fhandle, Time_span, InitConds); else [t, data] = runEventSimulation(Name, NumVars, RelTol, AbsTol, fhandle, Time_span, InitConds); end; end; if (outAmt == 1) data = calculateAmount(SBMLModel, t, data); end; if (outCSV == 1) outputData(t, data, Name, VarNames); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [TimeCourse, VarsCourse] = runSimulation(RelTol, AbsTol, ... fhandle, Time_span, InitConds) options = odeset('RelTol', RelTol, 'AbsTol', AbsTol); [TimeCourse, VarsCourse] = runSimulator(options, fhandle, Time_span, InitConds); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [TimeCourse, VarsCourse] = runEventSimulation(Name, NumVars, RelTol, AbsTol, ... fhandle, Time_span, InitConds) eventName = strcat(Name, '_events'); afterEvent = strcat(Name, '_eventAssign'); eventHandle = str2func(eventName); AfterEventHandle = str2func(afterEvent); options = odeset('Events', eventHandle, 'RelTol', RelTol, 'AbsTol', AbsTol); TimeCourse = []; VarsCourse = []; while ((~isempty(Time_span)) && (Time_span(1) < Time_span(end))) [TimeCourse, VarsCourse, InitConds, Time_span] = ... runEventSimulator(options, fhandle, Time_span, ... InitConds, TimeCourse, VarsCourse, NumVars, ... AfterEventHandle, Time_span(end)); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [TimeCourse, VarsCourse, InitConds, Time_span] ... = runEventSimulator(options, fhandle, Time_span, InitConds, TimeCourse, ... VarsCourse, NumVars, AfterEventHandle, Time_limit) [TimeCourseA, VarsCourseA, eventTime, ab, eventNo] = ode45(fhandle, Time_span, InitConds, options); % need to catch case where the time span entered was two sequential % times from the original time-span % e.g. original Time_span = [0, 0.1, ..., 4.9, 5.0] % Time_span = [4.9, 5.0] % % ode solver will output points between if (length(Time_span) == 2) NewTimeCourse = [TimeCourseA(1); TimeCourseA(end)]; TimeCourseA = NewTimeCourse; for i = 1:NumVars NewVar(1,i) = VarsCourseA(1, i); NewVar(2,i) = VarsCourseA(end, i); end; VarsCourseA = NewVar; end; % store current values of the varaiables at the time simulation ended for i = 1:NumVars CurrentValues(i) = VarsCourseA(end, i); end; % if we are not at the end of the time span remove the last point from % each if (TimeCourseA(end) ~= Time_span(end)) TimeCourseA = TimeCourseA(1:length(TimeCourseA)-1); for i = 1:NumVars VarsCourseB(:,i) = VarsCourseA(1:end-1, i); end; else VarsCourseB = VarsCourseA; end; % adjust the time span Time_spanA = Time_span - TimeCourseA(length(TimeCourseA)); Time_span_new = Time_spanA((find(Time_spanA==0)+1): length(Time_spanA)); Time_span = []; Time_span = Time_span_new + TimeCourseA(length(TimeCourseA)); % if time span has not finished get new initial conditions % need to integrate from the time the event stopped the solver to the % next starting point to determine the new initial conditions if (~isempty(Time_span)) InitConds = runCatchUpSimulation(AfterEventHandle, eventTime(end), ... CurrentValues, eventNo(end), Time_span(1), Time_limit, options, fhandle, NumVars); end; % add the values from this iteration TimeCourse = [TimeCourse;TimeCourseA]; VarsCourse = [VarsCourse;VarsCourseB]; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function InitConds = runCatchUpSimulation(AfterEventHandle, eventTime, ... CurrentValues, eventNo, endTime, Time_limit, options, fhandle, NumVars) CurrentValues = feval(AfterEventHandle, eventTime, CurrentValues, eventNo); [t,NewValues, eventTime, ab, eventNo] = ode45(fhandle, ... [eventTime, endTime], CurrentValues, options); if ~isempty(eventTime) % an event has been triggered in this small time span for i = 1:NumVars CurrentValues(i) = NewValues(end, i); end; InitConds = runCatchUpSimulation(AfterEventHandle, eventTime(end), ... CurrentValues, eventNo(end), endTime, Time_limit, options, fhandle, NumVars); else for i = 1:NumVars InitConds(i) = NewValues(length(NewValues), i); end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [TimeCourse, VarsCourse] = runSimulator(options, fhandle, ... Time_span, InitConds) [TimeCourse, VarsCourse] = ode45(fhandle, Time_span, InitConds, options); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [TimeCourse, VarsCourse] = runSimulationOctave(RelTol, AbsTol, ... fhandle, Time_span, InitConds) lsode_options('relative tolerance', RelTol); lsode_options('absolute tolerance', AbsTol); VarsCourse = lsode(fhandle, InitConds, Time_span); TimeCourse = Time_span; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function amtData = calculateAmount(SBMLModel, TimeCourse, SpeciesCourse) [compartments, comp_values] = GetCompartments(SBMLModel); allOnes = 1; for i=1:length(comp_values) if comp_values(i) ~= 1 allOnes = 0; end; end; amtData = SpeciesCourse; if allOnes == 1 return; else for i = 1:length(TimeCourse) for j = 1:length(SBMLModel.species) % if the species hasOnlySubstanceUnits then it is already in amount if (SBMLModel.species(j).hasOnlySubstanceUnits == 1) amtData(i, j) = SpeciesCourse(i, j); else % need to deal with mutliple compartments comp = Model_getCompartmentById(SBMLModel, SBMLModel.species(j).compartment); comp_size = comp.size; % catch any anomalies if (isnan(comp_size)) comp_size = 1; end; amtData(i, j) = SpeciesCourse(i,j)*comp_size; end; end; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function outputData(TimeCourse, VarsCourse, Name, Vars) fileName = strcat(Name, '.csv'); %-------------------------------------------------------------------- % open the file for writing fileID = fopen(fileName, 'w'); numVars = length(Vars); numdata = size(VarsCourse); if (numVars ~= numdata(2)) || (length(TimeCourse) ~= numdata(1)) error ('%s\n%s', 'Incorrect numbers of data points from simulation', ... 'Please report the problem to libsbml-team @caltech.edu') end; % write the header fprintf(fileID, 'time'); for i = 1: length(Vars) fprintf(fileID, ',%s', Vars{i}); end; fprintf(fileID, '\n'); % write each time course step values for i = 1:length(TimeCourse) fprintf(fileID, '%0.5g', TimeCourse(i)); for j = 1:length(Vars) fprintf(fileID, ',%1.16g', VarsCourse(i,j)); end; fprintf(fileID, '\n'); end; fclose(fileID); SBMLToolbox-4.1.0/toolbox/Simulation/OutputODEFunction.m0000644000000000000000000000451311703262256021653 0ustar rootrootfunction OutputODEFunction(varargin) % OutputODEFunction % % *NOTE:* This function is deprecated. Use SolveODEFunction instead. % if (nargin < 1) error('OutputODEFunction(SBMLModel, ...)\n%s', 'must have at least one argument'); elseif (nargin > 7) error('OutputODEFunction(SBMLModel, ...)\n%s', 'cannot have more than seven arguments'); end; if nargin > 1 if (varargin{2} == 1) error(sprintf('The plot feature is no longer available.\nOutputODEFunction is deprecated.\nUse SolveODEFunction instead.')); end; end; m = varargin{1}; Time_limit = 10; NoSteps = -1; outAmt = 0; outCSV = 1; Name = ''; switch nargin case 3 Time_limit = varargin{3}; case 4 Time_limit = varargin{3}; NoSteps = varargin{4}; case 5 Time_limit = varargin{3}; NoSteps = varargin{4}; outCSV = varargin{5}; case 6 Time_limit = varargin{3}; NoSteps = varargin{4}; Name = varargin{6}; outCSV = varargin{5}; case 7 Time_limit = varargin{3}; NoSteps = varargin{4}; outAmt = varargin{7}; outCSV = varargin{5}; Name = varargin{6}; end; SolveODEFunction(m, Time_limit, NoSteps, outAmt, outCSV, Name); SBMLToolbox-4.1.0/toolbox/Simulation/GetArgumentsFromLambdaFunction.m0000644000000000000000000000634611703262256024363 0ustar rootrootfunction Elements = GetArgumentsFromLambdaFunction(OriginalFormula) % elements = GetArgumentsFromLambdaFunction(formula) % % Takes % % 1. formula, a string representation of a math expression that contains the MathML lambda function % % Returns % % 1. an array of the components of the lambda function % % *EXAMPLE:* % % elements = GetArgumentsFromLambdaFunction('lambda(x, x+0.5)') % % = 'x' 'x+0.5' % % elements = GetArgumentsFromLambdaFunction('lambda(x, y, x + y)') % % = 'x' 'y' 'x+y' % OriginalFormula = LoseWhiteSpace(OriginalFormula); OpeningBracketIndex = find((ismember(OriginalFormula, '(')) == 1); ClosingBracketIndex = find((ismember(OriginalFormula, ')')) == 1); CommaIndex = find((ismember(OriginalFormula, ',')) == 1); %pair the brackets Pairs = PairBrackets(OriginalFormula); Start = findstr(OriginalFormula, 'lambda'); if ((length(Start) ~= 1) || (Start ~= 1)) error ('lambda either does not occur or cannot be dealt with'); end; % find commas between arguments of lambda for i = 1:length(CommaIndex) for j = 2:length(OpeningBracketIndex) if ((CommaIndex(i) > Pairs(j,1)) && (CommaIndex(i) < Pairs(j,2))) CommaIndex(i) = 0; end; end; end; NonZeros = find(CommaIndex ~= 0); % get elements that represent the arguments of the lambda expression % as an array of character arrays % e.g. first element is between opening bracket and first relevant comma % next elements are between relevant commas % last element is between last relevant comma and closing bracket j = Pairs(1, 1); ElementNumber = 1; for i = 1:length(NonZeros) element = ''; j = j+1; while (j <= CommaIndex(NonZeros(i)) - 1) element = strcat(element, OriginalFormula(j)); j = j + 1; end; Elements{ElementNumber} = element; ElementNumber = ElementNumber + 1; end; element = ''; j = j+1; while (j < Pairs(1, 2)) element = strcat(element, OriginalFormula(j)); j = j + 1; end; Elements{ElementNumber} = element; SBMLToolbox-4.1.0/toolbox/Simulation/DealWithPiecewise.m0000644000000000000000000001170711703262256021657 0ustar rootrootfunction Elements = DealWithPiecewise(OriginalFormula) % elements = DealWithPiecewise(formula) % % Takes % % 1. formula, a string representation of a math expression that contains the MathML piecewise function % % Returns % % 1. an array of the three components of the piecewise function % % *EXAMPLE:* % % elements = DealWithPiecewise('piecewise(le(s2,4),1.5,0.05)') % % = 'le(s2,4)' '1.5' '0.05' % % *NOTE:* The function cannot deal with a piecewise statement with more % than three elements. % OriginalFormula = LoseWhiteSpace(OriginalFormula); OpeningBracketIndex = find((ismember(OriginalFormula, '(')) == 1); ClosingBracketIndex = find((ismember(OriginalFormula, ')')) == 1); CommaIndex = find((ismember(OriginalFormula, ',')) == 1); %pair the brackets Pairs = PairBrackets(OriginalFormula); Start = findstr(OriginalFormula, 'piecewise'); if (length(Start) == 0) error('DealWithPiecewise(formula)\n%s', 'piecewise either does not occur in the formula'); end; % find the commas that are between the arguments of the piecwise expression % not those that may be part of the argument % e.g. 'piecewise(gt(d,e),lt(2,e),gt(f,d))' % | | % relevant commas piecewiseBrackets = 1; while(piecewiseBrackets <= length(OpeningBracketIndex)) if (Pairs(piecewiseBrackets, 1) > Start(1)) break; else piecewiseBrackets = piecewiseBrackets + 1; end; end; for i = 1:length(CommaIndex) % if comma is outside the piecwise brackets not relevant if (CommaIndex(i) < Pairs(piecewiseBrackets, 1)) CommaIndex(i) = 0; elseif(CommaIndex(i) > Pairs(piecewiseBrackets, 2)) CommaIndex(i) = 0; end; for j = piecewiseBrackets+1:length(OpeningBracketIndex) if ((CommaIndex(i) > Pairs(j, 1)) && (CommaIndex(i) < Pairs(j, 2))) CommaIndex(i) = 0; end; end; end; NonZeros = find(CommaIndex ~= 0); % if there is only one relevant comma % implies only two arguments % MATLAB can deal with the OriginalFormula if (length(NonZeros) ~= 2) error('Not enough arguments passed') end; % get elements that represent the arguments of the piecewise expression % as an array of character arrays % e.g. first element is between opening bracket and first relevant comma % next elements are between relevant commas % last element is between last relevant comma and closing bracket j = Pairs(piecewiseBrackets, 1); ElementNumber = 1; for i = 1:length(NonZeros) element = ''; j = j+1; while (j <= CommaIndex(NonZeros(i)) - 1) element = strcat(element, OriginalFormula(j)); j = j + 1; end; % if (findstr(element, 'piecewise')) % element = DealWithPiecewise(element); % end; Elements{ElementNumber} = element; ElementNumber = ElementNumber + 1; end; element = ''; j = j+1; while (j < Pairs(piecewiseBrackets, 2)) element = strcat(element, OriginalFormula(j)); j = j + 1; end; % if (findstr(element, 'piecewise')) % element = DealWithPiecewise(element); % end; Elements{ElementNumber} = element; % check for a sign in front of leading brackets % if (Pairs (1,1) ~= 1) % if strcmp(OriginalFormula(1), '-') % Elements{1} = strcat('-',Elements{1}); % Elements{3} = strcat('-',Elements{3}); % end; % end; % % what if there is smething before or after the piecewise bit before = ''; after = ''; pw = matchFunctionName(OriginalFormula, 'piecewise'); if (pw(1) ~= 1) before = OriginalFormula(1:pw(1)-1); end; if (Pairs(piecewiseBrackets, 2) ~= length(OriginalFormula)) after = OriginalFormula(Pairs(piecewiseBrackets, 2)+1:end); end; Elements{1} = strcat(before ,Elements{1}, after); Elements{3} = strcat(before ,Elements{3}, after); SBMLToolbox-4.1.0/toolbox/Simulation/Contents.m0000644000000000000000000001147511703262256020117 0ustar rootroot% toolbox\Simulation % % The functions allow users to simulate SBML models. % %======================================== % [analysis] = AnalyseSpecies(SBMLModel) %======================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. a structure detailing the species and how they are manipulated % within the model % %================================================== % [analysis] = AnalyseVaryingParameters(SBMLModel) %================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. a structure detailing any parameters that are not constant and how they are manipulated % within the model % %======================================= % elements = DealWithPiecewise(formula) %======================================= % Takes % 1. formula, a string representation of a math expression that contains the MathML piecewise function % Returns % 1. an array of the three components of the piecewise function % % %==================================================== % elements = GetArgumentsFromLambdaFunction(formula) %==================================================== % Takes % 1. formula, a string representation of a math expression that contains the MathML lambda function % Returns % 1. an array of the components of the lambda function % %==================== % OutputODEFunction %==================== % DEPRECATED % %============================= % SolveODEFunction(varargin) %============================= % Takes % % 1. a MATLAB_SBML model structure (required argument) % 2. time limit (default = 10) % 3. number of time steps (default lets the solver decide) % 4. a flag to indicate whether to output species values in amount/concentration % 1 amount, 0 concentration (default) % 5. a flag to indicate whether to output the simulation data as % a comma separated variable (csv) file % 1 output 0 no output (default) % 6. a filename (this is needed if WriteODEFunction was used with a % filename) % Returns % 1. an array of time values % 2. an array of the values of variables at each time point; species will % be in concentration or amount as specified by input arguments % Outputs % 1. a file 'name.csv' with the data results (if the flag to output such a % file is set to 1. % %=============================================== % WriteEventAssignmentFunction(SBMLModel, name) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. name, a string representing the name of the ode function being used % Outputs % 1. a file 'name_eventAssign.m' defining a function that assigns values following an event % (for use with the event option of MATLABs ode solvers) % %============================================ % WriteEventHandlerFunction(SBMLModel, name) %============================================ % Takes % 1. SBMLModel, an SBML Model structure % 2. name, a string representing the name of the ode function being used % Outputs % 1. a file 'name_events.m' defining a function that tests whether events % have been triggered % (for use with the event option of MATLABs ode solvers) % %============================================= % WriteODEFunction(SBMLModel, name(optional)) %============================================= % Takes % 1. SBMLModel, an SBML Model structure % 2. name, an optional string representing the name of the ode function to be used % Outputs % 1. a file 'name.m' defining a function that defines the ode equations of % the model for use with the ode solvers % (if no name supplied the model id will be used) % % SBMLToolbox-4.1.0/toolbox/Simulation/AnalyseVaryingParameters.m0000644000000000000000000002533111703262256023276 0ustar rootrootfunction VaryingParameters = AnalyseVaryingParameters(SBMLModel) % [analysis] = AnalyseVaryingParameters(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. a structure detailing any parameters that are not constant and how they are manipulated % within the model % % *EXAMPLE:* % % Using the model from toolbox/Test/test-data/algebraicRules.xml % % analysis = AnalyseVaryingParameters(m) % % analysis = % Name: {'s2'} % initialValue: 4 % ChangedByRateRule: 0 % RateRule: '' % ChangedByAssignmentRule: 0 % AssignmentRule: '' % InAlgebraicRule: 1 % AlgebraicRule: {{1x1 cell}} % ConvertedToAssignRule: 1 % ConvertedRule: '-(-S2-S3)' % if (~isValidSBML_Model(SBMLModel)) error('AnalyseVaryingParameters(SBMLModel)\n%s', ... 'argument must be an SBMLModel structure'); end; VaryingParameters = []; if length(SBMLModel.parameter) == 0 return; end; [names, Values] = GetVaryingParameters(SBMLModel); [n, AssignRule] = GetParameterAssignmentRules(SBMLModel); [n, RateRule] = GetParameterRateRules(SBMLModel); [n, AlgRules] = GetParameterAlgebraicRules(SBMLModel); % create the output structure index = 1; for i = 1:length(SBMLModel.parameter) % skip constant parameters if SBMLModel.parameter(i).constant == 1 continue; end; VaryingParameters(index).Name = names(index); VaryingParameters(index).initialValue = Values(index); if (strcmp(RateRule(i), '0')) VaryingParameters(index).ChangedByRateRule = 0; VaryingParameters(index).RateRule = ''; else VaryingParameters(index).ChangedByRateRule = 1; VaryingParameters(index).RateRule = RateRule(i); end; if (strcmp(AssignRule(i), '0')) VaryingParameters(index).ChangedByAssignmentRule = 0; VaryingParameters(index).AssignmentRule = ''; else VaryingParameters(index).ChangedByAssignmentRule = 1; VaryingParameters(index).AssignmentRule = AssignRule(i); end; if (strcmp(AlgRules(i), '0')) VaryingParameters(index).InAlgebraicRule = 0; VaryingParameters(index).AlgebraicRule = ''; else VaryingParameters(index).InAlgebraicRule = 1; VaryingParameters(index).AlgebraicRule = AlgRules(i); end; if ((VaryingParameters(index).ChangedByRateRule == 0) && (VaryingParameters(index).ChangedByAssignmentRule == 0)) if (VaryingParameters(index).InAlgebraicRule == 1) VaryingParameters(index).ConvertedToAssignRule = 1; Rule = VaryingParameters(index).AlgebraicRule{1}; % need to look at whether rule contains a user definined % function FunctionIds = Model_getFunctionIds(SBMLModel); for f = 1:length(FunctionIds) if (matchFunctionName(char(Rule), FunctionIds{f})) Rule = SubstituteFunction(char(Rule), SBMLModel.functionDefinition(f)); end; end; SubsRule = SubsAssignmentRules(SBMLModel, char(Rule)); VaryingParameters(index).ConvertedRule = Rearrange(SubsRule, names{index}); else VaryingParameters(index).ConvertedToAssignRule = 0; VaryingParameters(index).ConvertedRule = ''; end; else VaryingParameters(index).ConvertedToAssignRule = 0; VaryingParameters(index).ConvertedRule = ''; end; index = index + 1; end; function form = SubsAssignmentRules(SBMLModel, rule) [VaryingParameters, AssignRule] = GetParameterAssignmentRules(SBMLModel); form = rule; % bracket the VaryingParameters to be replaced for i = 1:length(VaryingParameters) if (matchName(rule, VaryingParameters{i})) if (~strcmp(AssignRule{i}, '0')) form = strrep(form, VaryingParameters{i}, strcat('(', VaryingParameters{i}, ')')); end; end; end; for i = 1:length(VaryingParameters) if (matchName(rule, VaryingParameters{i})) if (~strcmp(AssignRule{i}, '0')) form = strrep(form, VaryingParameters{i}, AssignRule{i}); end; end; end; function output = Arrange(formula, x, vars) ops = '+-'; f = LoseWhiteSpace(formula); operators = ismember(f, ops); OpIndex = find(operators == 1); %-------------------------------------------------- % divide formula up into elements seperated by +/- if (OpIndex(1) == 1) % leading sign i.e. +x-y NumElements = length(OpIndex); j = 2; index = 2; else NumElements = length(OpIndex) + 1; j = 1; index = 1; end; for i = 1:NumElements-1 element = ''; while (j < OpIndex(index)) element = strcat(element, f(j)); j = j+1; end; Elements{i} = element; j = j + 1; index = index + 1; end; % get last element j = OpIndex(end)+1; element = ''; while (j <= length(f)) element = strcat(element, f(j)); j = j+1; end; Elements{NumElements} = element; %-------------------------------------------------- % check whether element contains x % if does keep on lhs else move to rhs changing sign output = ''; lhs = 1; for i = 1:NumElements if (matchName(Elements{i}, x)) % element contains x LHSElements{lhs} = Elements{i}; if (OpIndex(1) == 1) LHSOps(lhs) = f(OpIndex(i)); elseif (i == 1) LHSOps(lhs) = '+'; else LHSOps(lhs) = f(OpIndex(i-1)); end; lhs = lhs + 1; elseif (i == 1) % first element does not contain x if (OpIndex(1) == 1) if (strcmp(f(1), '-')) output = strcat(output, '+'); else output = strcat(output, '-'); end; else % no sign so + output = strcat(output, '-'); end; output = strcat(output, Elements{i}); else % element not first and does not contain x if (OpIndex(1) == 1) if (strcmp(f(OpIndex(i)), '-')) output = strcat(output, '+'); else output = strcat(output, '-'); end; else if (strcmp(f(OpIndex(i-1)), '-')) output = strcat(output, '+'); else output = strcat(output, '-'); end; end; output = strcat(output, Elements{i}); end; end; %------------------------------------------------------ % look at remaining LHS for i = 1:length(LHSElements) Mult{i} = ParseElement(LHSElements{i}, x); end; if (length(LHSElements) == 1) % only one element with x % check signs and multipliers if (strcmp(LHSOps(1), '-')) output = strcat('-(', output, ')'); end; if (~strcmp(Mult{1}, '1')) output = strcat(output, '/', Mult{1}); end; else divisor = ''; if (strcmp(LHSOps(1), '+')) divisor = strcat(divisor, '(', Mult{1}); else divisor = strcat(divisor, '(-', Mult{1}); end; for i = 2:length(LHSElements) divisor = strcat(divisor, LHSOps(i), Mult{i}); end; divisor = strcat(divisor, ')'); output = strcat('(', output, ')/', divisor); end; function multiplier = ParseElement(element, x) % assumes that the element is of the form n*x/m % and returns n/m in simplest form if (strcmp(element, x)) multiplier = '1'; return; end; VarIndex = matchName(element, x); MultIndex = strfind(element, '*'); DivIndex = strfind(element, '/'); if (isempty(MultIndex)) MultIndex = 1; end; if (isempty(DivIndex)) DivIndex = length(element); end; if ((DivIndex < MultIndex) ||(VarIndex < MultIndex) || (VarIndex > DivIndex)) error('Cannot deal with formula in this form: %s', element); end; n = ''; m = ''; for i = 1:MultIndex-1 n = strcat(n, element(i)); end; if (isempty(n)) n = '1'; end; for i = DivIndex+1:length(element) m = strcat(m, element(i)); end; if (isempty(m)) m = '1'; end; % if both m and n represenet numbers then they can be simplified Num_n = str2num(n); Num_m = str2num(m); if (~isempty(Num_n) && ~isempty(Num_m)) multiplier = num2str(Num_n/Num_m); else if (strcmp(m, '1')) multiplier = n; else multiplier = strcat(n, '/', m); end; end; function y = LoseWhiteSpace(charArray) % LoseWhiteSpace(charArray) takes an array of characters % and returns the array with any white space removed % %---------------------------------------------------------------- % EXAMPLE: % y = LoseWhiteSpace(' exa mp le') % y = 'example' % %------------------------------------------------------------ % check input is an array of characters if (~ischar(charArray)) error('LoseWhiteSpace(input)\n%s', 'input must be an array of characters'); end; %------------------------------------------------------------- % get the length of the array NoChars = length(charArray); %------------------------------------------------------------- % create an array that indicates whether the elements of charArray are % spaces % e.g. WSpace = isspace(' v b') = [1, 1, 0, 1, 0] % and determine how many WSpace = isspace(charArray); NoSpaces = sum(WSpace); %----------------------------------------------------------- % rewrite the array to leaving out any spaces % remove any numbers from the array of symbols if (NoSpaces > 0) NewArrayCount = 1; for i = 1:NoChars if (~isspace(charArray(i))) y(NewArrayCount) = charArray(i); NewArrayCount = NewArrayCount + 1; end; end; else y = charArray; end; SBMLToolbox-4.1.0/toolbox/Simulation/AnalyseSpecies.m0000644000000000000000000003457311704012540021224 0ustar rootrootfunction Species = AnalyseSpecies(SBMLModel) % [analysis] = AnalyseSpecies(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. a structure detailing the species and how they are manipulated % within the model % % % *EXAMPLE:* % % Using the model from toolbox/Test/test-data/algebraicRules.xml % % analysis = AnalyseSpecies(m) % % analysis = % % 1x5 struct array with fields: % Name % constant % boundaryCondition % initialValue % hasAmountOnly % isConcentration % compartment % ChangedByReaction % KineticLaw % ChangedByRateRule % RateRule % ChangedByAssignmentRule % AssignmentRule % InAlgebraicRule % AlgebraicRule % ConvertedToAssignRule % ConvertedRule % % analysis(1) = % % % Name: {'S1'} % constant: 0 % boundaryCondition: 0 % initialValue: 0.0300 % hasAmountOnly: 0 % isConcentration: 0 % compartment: 'compartment' % ChangedByReaction: 1 % KineticLaw: {' - (k*S1)'} % ChangedByRateRule: 0 % RateRule: '' % ChangedByAssignmentRule: 0 % AssignmentRule: '' % InAlgebraicRule: 1 % AlgebraicRule: {{1x1 cell}} % ConvertedToAssignRule: 0 % ConvertedRule: '' % % if (~isValidSBML_Model(SBMLModel)) error('AnalyseSpecies(SBMLModel)\n%s', 'argument must be an SBMLModel structure'); end; if length(SBMLModel.species) == 0 Species = []; return; end; [name, KineticLaw] = GetRateLawsFromReactions(SBMLModel); [n, RateRule] = GetRateLawsFromRules(SBMLModel); [n, AssignRule] = GetSpeciesAssignmentRules(SBMLModel); [n, AlgRules] = GetSpeciesAlgebraicRules(SBMLModel); [n, Values] = GetSpecies(SBMLModel); % create the output structure for i = 1:length(SBMLModel.species) Species(i).Name = name(i); % species Type if (SBMLModel.SBML_level == 2 && SBMLModel.SBML_version > 1) if exist('OCTAVE_VERSION') if isempty(SBMLModel.species(i).speciesType) Species(i).speciesType = ''; else Species(i).speciesType = SBMLModel.species(i).speciesType; end; else Species(i).speciesType = SBMLModel.species(i).speciesType; end; end; % boundary condition and constant bc = SBMLModel.species(i).boundaryCondition; if (SBMLModel.SBML_level > 1) const = SBMLModel.species(i).constant; else const = 0; end; Species(i).constant = const; Species(i).boundaryCondition = bc; %initial value / amount/ concentration Species(i).initialValue = Values(i); if (SBMLModel.SBML_level > 1) comp = Model_getCompartmentById(SBMLModel, SBMLModel.species(i).compartment); if (comp.spatialDimensions == 0) Species(i).hasAmountOnly = 1; else if (SBMLModel.species(i).hasOnlySubstanceUnits == 1) Species(i).hasAmountOnly = 1; else Species(i).hasAmountOnly = 0; end; end; if (SBMLModel.species(i).isSetInitialConcentration == 0 ... && SBMLModel.species(i).isSetInitialAmount == 0) % value is set by rule/assignment thus will be concentration % unless the compartment is 0D or species hasOnlySubstanceUnits if (comp.spatialDimensions == 0 ... || SBMLModel.species(i).hasOnlySubstanceUnits == 1) Species(i).isConcentration = 0; else Species(i).isConcentration = 1; end; elseif (SBMLModel.species(i).isSetInitialAmount == 1) % species has a value given as amount % but if overridden by assignment it will be in conc if (abs(SBMLModel.species(i).initialAmount - Values(i)) > 1e-16) Species(i).isConcentration = 1; else Species(i).isConcentration = 0; end; else % here species has a value given as concentration % if comp is 0D or species hasOnlySubstanceUnits this is not % correct and needs to be converted if (comp.spatialDimensions == 0 ... || SBMLModel.species(i).hasOnlySubstanceUnits == 1) Species(i).isConcentration = 0; if isnan(comp.size) Species(i).initialvalue = NaN; else Species(i).initialValue = Values(i)/comp.size; end; else Species(i).isConcentration = 1; end; end; else % level 1 species were in amounts Species(i).isConcentration = 0; end; Species(i).compartment = SBMLModel.species(i).compartment; if (strcmp(KineticLaw(i), '0')) Species(i).ChangedByReaction = 0; Species(i).KineticLaw = ''; else Species(i).ChangedByReaction = 1; Species(i).KineticLaw = KineticLaw(i); end; if (strcmp(RateRule(i), '0')) Species(i).ChangedByRateRule = 0; Species(i).RateRule = ''; else Species(i).ChangedByRateRule = 1; Species(i).RateRule = RateRule(i); end; if (strcmp(AssignRule(i), '0')) Species(i).ChangedByAssignmentRule = 0; Species(i).AssignmentRule = ''; else Species(i).ChangedByAssignmentRule = 1; Species(i).AssignmentRule = AssignRule(i); end; if (strcmp(AlgRules(i), '0')) Species(i).InAlgebraicRule = 0; Species(i).AlgebraicRule = ''; else Species(i).InAlgebraicRule = 1; Species(i).AlgebraicRule = AlgRules(i); end; if ((Species(i).constant == 0) ... && (Species(i).ChangedByReaction == 0) ... && (Species(i).ChangedByRateRule == 0) ... && (Species(i).ChangedByAssignmentRule == 0)) if (Species(i).InAlgebraicRule == 1) Species(i).ConvertedToAssignRule = 1; Rule = Species(i).AlgebraicRule{1}; % need to look at whether rule contains a user definined % function FunctionIds = Model_getFunctionIds(SBMLModel); for f = 1:length(FunctionIds) if (matchFunctionName(char(Rule), FunctionIds{f})) Rule = SubstituteFunction(char(Rule), SBMLModel.functionDefinition(f)); end; end; SubsRule = SubsAssignmentRules(SBMLModel, char(Rule)); Species(i).ConvertedRule = Rearrange(SubsRule, name{i}); else Species(i).ConvertedToAssignRule = 0; Species(i).ConvertedRule = ''; end; elseif ((isnan(Species(i).initialValue)) ... && (Species(i).InAlgebraicRule == 1) ... && (Species(i).ChangedByAssignmentRule == 0)) error ('The model is over parameterised and the simulation cannot make decisions regarding rules'); else Species(i).ConvertedToAssignRule = 0; Species(i).ConvertedRule = ''; end; end; function form = SubsAssignmentRules(SBMLModel, rule) [species, AssignRule] = GetSpeciesAssignmentRules(SBMLModel); form = rule; % bracket the species to be replaced for i = 1:length(species) if (matchName(rule, species{i})) if (~strcmp(AssignRule{i}, '0')) form = strrep(form, species{i}, strcat('(', species{i}, ')')); end; end; end; for i = 1:length(species) if (matchName(rule, species{i})) if (~strcmp(AssignRule{i}, '0')) form = strrep(form, species{i}, AssignRule{i}); end; end; end; function output = Arrange(formula, x, vars) ops = '+-'; f = LoseWhiteSpace(formula); operators = ismember(f, ops); OpIndex = find(operators == 1); %-------------------------------------------------- % divide formula up into elements seperated by +/- if (OpIndex(1) == 1) % leading sign i.e. +x-y NumElements = length(OpIndex); j = 2; index = 2; else NumElements = length(OpIndex) + 1; j = 1; index = 1; end; for i = 1:NumElements-1 element = ''; while (j < OpIndex(index)) element = strcat(element, f(j)); j = j+1; end; Elements{i} = element; j = j + 1; index = index + 1; end; % get last element j = OpIndex(end)+1; element = ''; while (j <= length(f)) element = strcat(element, f(j)); j = j+1; end; Elements{NumElements} = element; %-------------------------------------------------- % check whether element contains x % if does keep on lhs else move to rhs changing sign output = ''; lhs = 1; for i = 1:NumElements if (matchName(Elements{i}, x)) % element contains x LHSElements{lhs} = Elements{i}; if (OpIndex(1) == 1) LHSOps(lhs) = f(OpIndex(i)); elseif (i == 1) LHSOps(lhs) = '+'; else LHSOps(lhs) = f(OpIndex(i-1)); end; lhs = lhs + 1; elseif (i == 1) % first element does not contain x if (OpIndex(1) == 1) if (strcmp(f(1), '-')) output = strcat(output, '+'); else output = strcat(output, '-'); end; else % no sign so + output = strcat(output, '-'); end; output = strcat(output, Elements{i}); else % element not first and does not contain x if (OpIndex(1) == 1) if (strcmp(f(OpIndex(i)), '-')) output = strcat(output, '+'); else output = strcat(output, '-'); end; else if (strcmp(f(OpIndex(i-1)), '-')) output = strcat(output, '+'); else output = strcat(output, '-'); end; end; output = strcat(output, Elements{i}); end; end; %------------------------------------------------------ % look at remaining LHS for i = 1:length(LHSElements) Mult{i} = ParseElement(LHSElements{i}, x); end; if (length(LHSElements) == 1) % only one element with x % check signs and multipliers if (strcmp(LHSOps(1), '-')) output = strcat('-(', output, ')'); end; if (~strcmp(Mult{1}, '1')) output = strcat(output, '/', Mult{1}); end; else divisor = ''; if (strcmp(LHSOps(1), '+')) divisor = strcat(divisor, '(', Mult{1}); else divisor = strcat(divisor, '(-', Mult{1}); end; for i = 2:length(LHSElements) divisor = strcat(divisor, LHSOps(i), Mult{i}); end; divisor = strcat(divisor, ')'); output = strcat('(', output, ')/', divisor); end; function multiplier = ParseElement(element, x) % assumes that the element is of the form n*x/m % and returns n/m in simplest form if (strcmp(element, x)) multiplier = '1'; return; end; VarIndex = matchName(element, x); MultIndex = strfind(element, '*'); DivIndex = strfind(element, '/'); if (isempty(MultIndex)) MultIndex = 1; end; if (isempty(DivIndex)) DivIndex = length(element); end; if ((DivIndex < MultIndex) ||(VarIndex < MultIndex) || (VarIndex > DivIndex)) error('Cannot deal with formula in this form; %s', element); end; n = ''; m = ''; for i = 1:MultIndex-1 n = strcat(n, element(i)); end; if (isempty(n)) n = '1'; end; for i = DivIndex+1:length(element) m = strcat(m, element(i)); end; if (isempty(m)) m = '1'; end; % if both m and n represenet numbers then they can be simplified Num_n = str2num(n); Num_m = str2num(m); if (~isempty(Num_n) && ~isempty(Num_m)) multiplier = num2str(Num_n/Num_m); else if (strcmp(m, '1')) multiplier = n; else multiplier = strcat(n, '/', m); end; end; function y = LoseWhiteSpace(charArray) % LoseWhiteSpace(charArray) takes an array of characters % and returns the array with any white space removed % %---------------------------------------------------------------- % EXAMPLE: % y = LoseWhiteSpace(' exa mp le') % y = 'example' % %------------------------------------------------------------ % check input is an array of characters if (~ischar(charArray)) error('LoseWhiteSpace(input)\n%s', 'input must be an array of characters'); end; %------------------------------------------------------------- % get the length of the array NoChars = length(charArray); %------------------------------------------------------------- % create an array that indicates whether the elements of charArray are % spaces % e.g. WSpace = isspace(' v b') = [1, 1, 0, 1, 0] % and determine how many WSpace = isspace(charArray); NoSpaces = sum(WSpace); %----------------------------------------------------------- % rewrite the array to leaving out any spaces % remove any numbers from the array of symbols if (NoSpaces > 0) NewArrayCount = 1; for i = 1:NoChars if (~isspace(charArray(i))) y(NewArrayCount) = charArray(i); NewArrayCount = NewArrayCount + 1; end; end; else y = charArray; end; SBMLToolbox-4.1.0/toolbox/SBMLToolbox.m0000644000000000000000000000514211703262252016270 0ustar rootroot% SBMLToolbox % % SBMLToolbox is an open-source MATLAB/Octave toolbox that % provides both MATLAB and Octave users with functions for % reading, writing and manipulation data expressed in the % Systems Biology Markup Language (SBML). % % It works on Windows, Linux, and MacOS systems. % % The SBMLToolbox supports reading and writing of all levels % and versions of SBML up to Level 3 Version 1 Core. % % % FUNCTIONS include: % % % toolbox\AccessModel % % This directory contains functions that allow the user to % derive information from an SBML Model. % % toolbox\Convenience % % This directory contains a number of convenience functions % for checking information or manipulating math expressions. % % toolbox\fbc_package % % This directory contains functions that allow the user to % manipulate the additional elements of a MATLAB_SBML Model % structure introduced to support the SBML L3 'fbc' package. % % toolbox\MATLAB_SBML_Structure_Functions % % This directory contains functions that allow the user to % manipulate a MATLAB_SBML Model structure. The majority of % functions mimic their equivalent within the libSBML C API. % % toolbox\Simulation % % This directory contains functions to simulate an SBML model. % % toolbox\Validate_MATLAB_SBML_Structures % % This directory contains functions to validate the MATLAB_SBML % structures. % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/0000755000000000000000000000000011704572222021673 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/0000755000000000000000000000000011704572246024631 5ustar rootroot././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_unsetSBOTerm0000644000000000000000000000344611703262314032114 0ustar rootrootfunction SBMLUnitDefinition = UnitDefinition_unsetSBOTerm(SBMLUnitDefinition) % SBMLUnitDefinition = UnitDefinition_unsetSBOTerm(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the SBML UnitDefinition structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'sboTerm') SBMLUnitDefinition.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_unsetName.m0000644000000000000000000000342411703262314031750 0ustar rootrootfunction SBMLUnitDefinition = UnitDefinition_unsetName(SBMLUnitDefinition) % SBMLUnitDefinition = UnitDefinition_unsetName(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the SBML UnitDefinition structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'name') SBMLUnitDefinition.name = ''; else error('name not an attribute on SBML L%dV%d UnitDefinition', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_unsetMetaid.0000644000000000000000000000344011703262314032114 0ustar rootrootfunction SBMLUnitDefinition = UnitDefinition_unsetMetaid(SBMLUnitDefinition) % SBMLUnitDefinition = UnitDefinition_unsetMetaid(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the SBML UnitDefinition structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'metaid') SBMLUnitDefinition.metaid = ''; else error('metaid not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_unsetId.m0000644000000000000000000000341011703262314031417 0ustar rootrootfunction SBMLUnitDefinition = UnitDefinition_unsetId(SBMLUnitDefinition) % SBMLUnitDefinition = UnitDefinition_unsetId(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the SBML UnitDefinition structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'id') SBMLUnitDefinition.id = ''; else error('id not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_setSBOTerm.m0000644000000000000000000000372511703262314032004 0ustar rootrootfunction SBMLUnitDefinition = UnitDefinition_setSBOTerm(SBMLUnitDefinition, sboTerm) % SBMLUnitDefinition = UnitDefinition_setSBOTerm(SBMLUnitDefinition, sboTerm) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML UnitDefinition structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLUnitDefinition.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_setName.m0000644000000000000000000000364711703262314031414 0ustar rootrootfunction SBMLUnitDefinition = UnitDefinition_setName(SBMLUnitDefinition, name) % SBMLUnitDefinition = UnitDefinition_setName(SBMLUnitDefinition, name) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML UnitDefinition structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'name') if ~ischar(name) error('name must be character array') ; else SBMLUnitDefinition.name = name; end; else error('name not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_setMetaid.m0000644000000000000000000000370111703262314031726 0ustar rootrootfunction SBMLUnitDefinition = UnitDefinition_setMetaid(SBMLUnitDefinition, metaid) % SBMLUnitDefinition = UnitDefinition_setMetaid(SBMLUnitDefinition, metaid) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML UnitDefinition structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLUnitDefinition.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_setId.m0000644000000000000000000000361511703262314031063 0ustar rootrootfunction SBMLUnitDefinition = UnitDefinition_setId(SBMLUnitDefinition, id) % SBMLUnitDefinition = UnitDefinition_setId(SBMLUnitDefinition, id) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML UnitDefinition structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'id') if ~ischar(id) error('id must be character array') ; else SBMLUnitDefinition.id = id; end; else error('id not an attribute on SBML L%dV%d UnitDefinition', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_isSetSBOTerm0000644000000000000000000000342211703262314032037 0ustar rootrootfunction value = UnitDefinition_isSetSBOTerm(SBMLUnitDefinition) % value = UnitDefinition_isSetSBOTerm(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'sboTerm') value = (SBMLUnitDefinition.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_isSetName.m0000644000000000000000000000340511703262314031700 0ustar rootrootfunction value = UnitDefinition_isSetName(SBMLUnitDefinition) % value = UnitDefinition_isSetName(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'name') value = ~isempty(SBMLUnitDefinition.name); else error('name not an attribute on SBML L%dV%d UnitDefinition', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_isSetMetaid.0000644000000000000000000000342111703262314032044 0ustar rootrootfunction value = UnitDefinition_isSetMetaid(SBMLUnitDefinition) % value = UnitDefinition_isSetMetaid(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'metaid') value = ~isempty(SBMLUnitDefinition.metaid); else error('metaid not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_isSetId.m0000644000000000000000000000337111703262314031356 0ustar rootrootfunction value = UnitDefinition_isSetId(SBMLUnitDefinition) % value = UnitDefinition_isSetId(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'id') value = ~isempty(SBMLUnitDefinition.id); else error('id not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_getUnit.m0000644000000000000000000000377111703262314031435 0ustar rootrootfunction unit = UnitDefinition_getUnit(SBMLUnitDefinition, index) % unit = UnitDefinition_getUnit(SBMLUnitDefinition, index) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. index, an integer representing the index of SBML Unit structure % % Returns % % 1. the SBML Unit structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'unit') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLUnitDefinition.unit) unit = SBMLUnitDefinition.unit(index); else error('index is out of range'); end; else error('unit not an element on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_getSBOTerm.m0000644000000000000000000000336111703262314031764 0ustar rootrootfunction sboTerm = UnitDefinition_getSBOTerm(SBMLUnitDefinition) % sboTerm = UnitDefinition_getSBOTerm(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'sboTerm') sboTerm = SBMLUnitDefinition.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d UnitDefinition', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_getNumUnits.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_getNumUnits.0000644000000000000000000000335211703262314032116 0ustar rootrootfunction num = UnitDefinition_getNumUnits(SBMLUnitDefinition) % numUnits = UnitDefinition_getNumUnits(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the value of the numUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'unit') num = length(SBMLUnitDefinition.unit); else error('unit not an element on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_getName.m0000644000000000000000000000332611703262314031372 0ustar rootrootfunction name = UnitDefinition_getName(SBMLUnitDefinition) % name = UnitDefinition_getName(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'name') name = SBMLUnitDefinition.name; else error('name not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_getMetaid.m0000644000000000000000000000335011703262314031712 0ustar rootrootfunction metaid = UnitDefinition_getMetaid(SBMLUnitDefinition) % metaid = UnitDefinition_getMetaid(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'metaid') metaid = SBMLUnitDefinition.metaid; else error('metaid not an attribute on SBML L%dV%d UnitDefinition', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_getListOfUnits.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_getListOfUni0000644000000000000000000000334211703262314032131 0ustar rootrootfunction unit = UnitDefinition_getListOfUnits(SBMLUnitDefinition) % unit = UnitDefinition_getListOfUnits(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. an array of the unit structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'unit') unit = SBMLUnitDefinition.unit; else error('unit not an element on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_getId.m0000644000000000000000000000330411703262314031042 0ustar rootrootfunction id = UnitDefinition_getId(SBMLUnitDefinition) % id = UnitDefinition_getId(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'id') id = SBMLUnitDefinition.id; else error('id not an attribute on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_createUnit.m0000644000000000000000000000370011703262314032111 0ustar rootrootfunction SBMLUnitDefinition = UnitDefinition_createUnit(SBMLUnitDefinition) % SBMLUnitDefinition = UnitDefinition_createUnit(SBMLUnitDefinition) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the SBML UnitDefinition structure with a new SBML Unit structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); if isfield(SBMLUnitDefinition, 'unit') index = length(SBMLUnitDefinition.unit); SBMLUnit = Unit_create(level, version); if index == 0 SBMLUnitDefinition.unit = SBMLUnit; else SBMLUnitDefinition.unit(index+1) = SBMLUnit; end; else error('unit not an element on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_create.m0000644000000000000000000000563211703262314031257 0ustar rootrootfunction UnitDefinition = UnitDefinition_create(varargin) % UnitDefinition = UnitDefinition_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML UnitDefinition structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getUnitDefinitionFieldnames(level, version); if (num > 0) values = getUnitDefinitionDefaultValues(level, version); UnitDefinition = cell2struct(values, fieldnames, 2); UnitDefinition.unit = Unit_create(level, version); UnitDefinition.unit(1:end) = []; %add level and version UnitDefinition.level = level; UnitDefinition.version = version; %check correct structure if ~isSBML_UnitDefinition(UnitDefinition, level, version) UnitDefinition = struct(); warning('Warn:BadStruct', 'Failed to create UnitDefinition'); end; else UnitDefinition = []; warning('Warn:InvalidLV', 'UnitDefinition not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/UnitDefinition_addUnit.m0000644000000000000000000000417211703262314031402 0ustar rootrootfunction SBMLUnitDefinition = UnitDefinition_addUnit(SBMLUnitDefinition, SBMLUnit) % SBMLUnitDefinition = UnitDefinition_addUnit(SBMLUnitDefinition, SBMLUnit) % % Takes % % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. SBMLUnit, an SBML Unit structure % % Returns % % 1. the SBML UnitDefinition structure with the SBML Unit structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnitDefinition); [unit_level, unit_version] = GetLevelVersion(SBMLUnit); if level ~= unit_level error('mismatch in levels'); elseif version ~= unit_version error('mismatch in versions'); end; if isfield(SBMLUnitDefinition, 'unit') index = length(SBMLUnitDefinition.unit); if index == 0 SBMLUnitDefinition.unit = SBMLUnit; else SBMLUnitDefinition.unit(index+1) = SBMLUnit; end; else error('unit not an element on SBML L%dV%d UnitDefinition', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/UnitDefinition/Contents.m0000644000000000000000000002166011703262314026600 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\UnitDefinition % % The functions allow users to create and work with the SBML UnitDefinition structure. % %=========================================================================== % SBMLUnitDefinition = UnitDefinition_addUnit(SBMLUnitDefinition, SBMLUnit) %=========================================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. SBMLUnit, an SBML Unit structure % Returns % 1. the SBML UnitDefinition structure with the SBML Unit structure added % %============================================================================= % UnitDefinition = UnitDefinition_create(level(optional), version(optional) ) %============================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML UnitDefinition structure of the appropriate level and version % %==================================================================== % SBMLUnitDefinition = UnitDefinition_createUnit(SBMLUnitDefinition) %==================================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the SBML UnitDefinition structure with a new SBML Unit structure added % %=============================================== % id = UnitDefinition_getId(SBMLUnitDefinition) %=============================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the value of the id attribute % %========================================================== % unit = UnitDefinition_getListOfUnits(SBMLUnitDefinition) %========================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. an array of the unit structures % %======================================================= % metaid = UnitDefinition_getMetaid(SBMLUnitDefinition) %======================================================= % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the value of the metaid attribute % %=================================================== % name = UnitDefinition_getName(SBMLUnitDefinition) %=================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the value of the name attribute % %=========================================================== % numUnits = UnitDefinition_getNumUnits(SBMLUnitDefinition) %=========================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the value of the numUnits attribute % %========================================================= % sboTerm = UnitDefinition_getSBOTerm(SBMLUnitDefinition) %========================================================= % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the value of the sboTerm attribute % %========================================================== % unit = UnitDefinition_getUnit(SBMLUnitDefinition, index) %========================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. index, an integer representing the index of SBML Unit structure % Returns % 1. the SBML Unit structure at the indexed position % %==================================================== % value = UnitDefinition_isSetId(SBMLUnitDefinition) %==================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %======================================================== % value = UnitDefinition_isSetMetaid(SBMLUnitDefinition) %======================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %====================================================== % value = UnitDefinition_isSetName(SBMLUnitDefinition) %====================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %========================================================= % value = UnitDefinition_isSetSBOTerm(SBMLUnitDefinition) %========================================================= % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %=================================================================== % SBMLUnitDefinition = UnitDefinition_setId(SBMLUnitDefinition, id) %=================================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. id; a string representing the id to be set % Returns % 1. the SBML UnitDefinition structure with the new value for the id attribute % %=========================================================================== % SBMLUnitDefinition = UnitDefinition_setMetaid(SBMLUnitDefinition, metaid) %=========================================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML UnitDefinition structure with the new value for the metaid attribute % %======================================================================= % SBMLUnitDefinition = UnitDefinition_setName(SBMLUnitDefinition, name) %======================================================================= % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. name; a string representing the name to be set % Returns % 1. the SBML UnitDefinition structure with the new value for the name attribute % %============================================================================= % SBMLUnitDefinition = UnitDefinition_setSBOTerm(SBMLUnitDefinition, sboTerm) %============================================================================= % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML UnitDefinition structure with the new value for the sboTerm attribute % %================================================================= % SBMLUnitDefinition = UnitDefinition_unsetId(SBMLUnitDefinition) %================================================================= % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the SBML UnitDefinition structure with the id attribute unset % %===================================================================== % SBMLUnitDefinition = UnitDefinition_unsetMetaid(SBMLUnitDefinition) %===================================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the SBML UnitDefinition structure with the metaid attribute unset % %=================================================================== % SBMLUnitDefinition = UnitDefinition_unsetName(SBMLUnitDefinition) %=================================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the SBML UnitDefinition structure with the name attribute unset % %====================================================================== % SBMLUnitDefinition = UnitDefinition_unsetSBOTerm(SBMLUnitDefinition) %====================================================================== % Takes % 1. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the SBML UnitDefinition structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/0000755000000000000000000000000011704572244022616 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_unsetScale.m0000644000000000000000000000332211703262346026077 0ustar rootrootfunction SBMLUnit = Unit_unsetScale(SBMLUnit) % SBMLUnit = Unit_unsetScale(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the SBML Unit structure with the scale attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'scale') if level > 2 SBMLUnit.scale = NaN; else SBMLUnit.scale = 0; end; else error('offset not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_unsetSBOTerm.m0000644000000000000000000000324411703262346026326 0ustar rootrootfunction SBMLUnit = Unit_unsetSBOTerm(SBMLUnit) % SBMLUnit = Unit_unsetSBOTerm(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the SBML Unit structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'sboTerm') SBMLUnit.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_unsetOffset.m0000644000000000000000000000323511703262346026301 0ustar rootrootfunction SBMLUnit = Unit_unsetOffset(SBMLUnit) % SBMLUnit = Unit_unsetOffset(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the SBML Unit structure with the offset attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'offset') SBMLUnit.offset = 0; else error('offset not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_unsetMultiplier.m0000644000000000000000000000336511703262346027205 0ustar rootrootfunction SBMLUnit = Unit_unsetMultiplier(SBMLUnit) % SBMLUnit = Unit_unsetMultiplier(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the SBML Unit structure with the multiplier attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'multiplier') if (level > 2) SBMLUnit.multiplier = NaN; else SBMLUnit.multiplier = 1; end; else error('multiplier not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_unsetMetaid.m0000644000000000000000000000323611703262346026257 0ustar rootrootfunction SBMLUnit = Unit_unsetMetaid(SBMLUnit) % SBMLUnit = Unit_unsetMetaid(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the SBML Unit structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'metaid') SBMLUnit.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_unsetKind.m0000644000000000000000000000322211703262346025734 0ustar rootrootfunction SBMLUnit = Unit_unsetKind(SBMLUnit) % SBMLUnit = Unit_unsetKind(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the SBML Unit structure with the kind attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'kind') SBMLUnit.kind = ''; else error('kind not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_unsetExponent.m0000644000000000000000000000335011703262346026651 0ustar rootrootfunction SBMLUnit = Unit_unsetExponent(SBMLUnit) % SBMLUnit = Unit_unsetExponent(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the SBML Unit structure with the exponent attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'exponent') if (level > 2) SBMLUnit.exponent = NaN; else SBMLUnit.exponent = 1; end; else error('exponent not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_setScale.m0000644000000000000000000000350011703262346025532 0ustar rootrootfunction SBMLUnit = Unit_setScale(SBMLUnit, scale) % SBMLUnit = Unit_setScale(SBMLUnit, scale) % % Takes % % 1. SBMLUnit, an SBML Unit structure % 2. scale; number representing the value of scale to be set % % Returns % % 1. the SBML Unit structure with the new value for the scale attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'scale') if (~isIntegralNumber(scale)) error('scale must be an integer') ; else SBMLUnit.scale = scale; end; else error('scale not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_setSBOTerm.m0000644000000000000000000000352311703262346025763 0ustar rootrootfunction SBMLUnit = Unit_setSBOTerm(SBMLUnit, sboTerm) % SBMLUnit = Unit_setSBOTerm(SBMLUnit, sboTerm) % % Takes % % 1. SBMLUnit, an SBML Unit structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Unit structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLUnit.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_setOffset.m0000644000000000000000000000347411703262346025743 0ustar rootrootfunction SBMLUnit = Unit_setOffset(SBMLUnit, offset) % SBMLUnit = Unit_setOffset(SBMLUnit, offset) % % Takes % % 1. SBMLUnit, an SBML Unit structure % 2. offset, an integer representing the offset to be set % % Returns % % 1. the SBML Unit structure with the new value for the offset attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'offset') if ~isnumeric(offset) error('offset must be numeric') ; else SBMLUnit.offset = offset; end; else error('offset not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_setMultiplier.m0000644000000000000000000000356511703262346026644 0ustar rootrootfunction SBMLUnit = Unit_setMultiplier(SBMLUnit, multiplier) % SBMLUnit = Unit_setMultiplier(SBMLUnit, multiplier) % % Takes % % 1. SBMLUnit, an SBML Unit structure % 2. multiplier; number representing the value of multiplier to be set % % Returns % % 1. the SBML Unit structure with the new value for the multiplier attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'multiplier') if ~isnumeric(multiplier) error('multiplier must be numeric') ; else SBMLUnit.multiplier = multiplier; end; else error('multiplier not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_setMetaid.m0000644000000000000000000000347711703262346025723 0ustar rootrootfunction SBMLUnit = Unit_setMetaid(SBMLUnit, metaid) % SBMLUnit = Unit_setMetaid(SBMLUnit, metaid) % % Takes % % 1. SBMLUnit, an SBML Unit structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Unit structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLUnit.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_setKind.m0000644000000000000000000000344511703262346025400 0ustar rootrootfunction SBMLUnit = Unit_setKind(SBMLUnit, kind) % SBMLUnit = Unit_setKind(SBMLUnit, kind) % % Takes % % 1. SBMLUnit, an SBML Unit structure % 2. kind; a string representing the kind to be set % % Returns % % 1. the SBML Unit structure with the new value for the kind attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'kind') if ~ischar(kind) error('kind must be character array') ; else SBMLUnit.kind = kind; end; else error('kind not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_setExponent.m0000644000000000000000000000402211703262346026303 0ustar rootrootfunction SBMLUnit = Unit_setExponent(SBMLUnit, exponent) % SBMLUnit = Unit_setExponent(SBMLUnit, exponent) % % Takes % % 1. SBMLUnit, an SBML Unit structure % 2. exponent; number representing the value of exponent to be set % % Returns % % 1. the SBML Unit structure with the new value for the exponent attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'exponent') if level < 3 if ~isIntegralNumber(exponent) error('exponent must be an integer') ; else SBMLUnit.exponent = exponent; end; else if ~isnumeric(exponent) error('exponent must be numeric') ; else SBMLUnit.exponent = exponent; end; end; else error('exponent not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_isSetScale.m0000644000000000000000000000325211703262346026032 0ustar rootrootfunction value = Unit_isSetScale(SBMLUnit) % value = Unit_isSetScale(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. value = % - 1 if the scale attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'scale') value = ~isnan(SBMLUnit.scale); else error('isSetScale not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_isSetSBOTerm.m0000644000000000000000000000325611703262346026262 0ustar rootrootfunction value = Unit_isSetSBOTerm(SBMLUnit) % value = Unit_isSetSBOTerm(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'sboTerm') value = (SBMLUnit.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_isSetOffset.m0000644000000000000000000000326011703262346026230 0ustar rootrootfunction value = Unit_isSetOffset(SBMLUnit) % value = Unit_isSetOffset(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. value = % - 1 if the offset attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'offset') value = ~isnan(SBMLUnit.offset); else error('isSetOffset not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_isSetMultiplier.m0000644000000000000000000000331011703262346027124 0ustar rootrootfunction value = Unit_isSetMultiplier(SBMLUnit) % value = Unit_isSetMultiplier(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. value = % - 1 if the multiplier attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'multiplier') value = ~isnan(SBMLUnit.multiplier); else error('isSetMultiplier not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_isSetMetaid.m0000644000000000000000000000325511703262346026211 0ustar rootrootfunction value = Unit_isSetMetaid(SBMLUnit) % value = Unit_isSetMetaid(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'metaid') value = ~isempty(SBMLUnit.metaid); else error('metaid not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_isSetKind.m0000644000000000000000000000324111703262346025666 0ustar rootrootfunction value = Unit_isSetKind(SBMLUnit) % value = Unit_isSetKind(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. value = % - 1 if the kind attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'kind') value = ~isempty(SBMLUnit.kind); else error('kind not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_isSetExponent.m0000644000000000000000000000327411703262346026607 0ustar rootrootfunction value = Unit_isSetExponent(SBMLUnit) % value = Unit_isSetExponent(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. value = % - 1 if the exponent attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'exponent') value = ~isnan(SBMLUnit.exponent); else error('isSetExponent not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_getScale.m0000644000000000000000000000317311703262346025524 0ustar rootrootfunction scale = Unit_getScale(SBMLUnit) % scale = Unit_getScale(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the value of the scale attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'scale') scale = SBMLUnit.scale; else error('scale not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_getSBOTerm.m0000644000000000000000000000321511703262346025745 0ustar rootrootfunction sboTerm = Unit_getSBOTerm(SBMLUnit) % sboTerm = Unit_getSBOTerm(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'sboTerm') sboTerm = SBMLUnit.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_getOffset.m0000644000000000000000000000320411703262346025716 0ustar rootrootfunction offset = Unit_getOffset(SBMLUnit) % offset = Unit_getOffset(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the value of the offset attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'offset') offset = SBMLUnit.offset; else error('offset not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_getMultiplier.m0000644000000000000000000000325011703262346026617 0ustar rootrootfunction multiplier = Unit_getMultiplier(SBMLUnit) % multiplier = Unit_getMultiplier(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the value of the multiplier attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'multiplier') multiplier = SBMLUnit.multiplier; else error('multiplier not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_getMetaid.m0000644000000000000000000000320411703262346025673 0ustar rootrootfunction metaid = Unit_getMetaid(SBMLUnit) % metaid = Unit_getMetaid(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'metaid') metaid = SBMLUnit.metaid; else error('metaid not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_getKind.m0000644000000000000000000000316211703262346025360 0ustar rootrootfunction kind = Unit_getKind(SBMLUnit) % kind = Unit_getKind(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the value of the kind attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'kind') kind = SBMLUnit.kind; else error('kind not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_getExponent.m0000644000000000000000000000322611703262346026274 0ustar rootrootfunction exponent = Unit_getExponent(SBMLUnit) % exponent = Unit_getExponent(SBMLUnit) % % Takes % % 1. SBMLUnit, an SBML Unit structure % % Returns % % 1. the value of the exponent attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLUnit); if isfield(SBMLUnit, 'exponent') exponent = SBMLUnit.exponent; else error('exponent not an attribute on SBML L%dV%d Unit', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Unit_create.m0000644000000000000000000000524211703262346025237 0ustar rootrootfunction Unit = Unit_create(varargin) % Unit = Unit_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Unit structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getUnitFieldnames(level, version); if (num > 0) values = getUnitDefaultValues(level, version); Unit = cell2struct(values, fieldnames, 2); %add level and version Unit.level = level; Unit.version = version; %check correct structure if ~isSBML_Unit(Unit, level, version) Unit = struct(); warning('Warn:BadStruct', 'Failed to create Unit'); end; else Unit = []; warning('Warn:InvalidLV', 'Unit not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Unit/Contents.m0000644000000000000000000002141511703262346024572 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Unit % % The functions allow users to create and work with the SBML Unit structure. % %========================================================= % Unit = Unit_create(level(optional), version(optional) ) %========================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Unit structure of the appropriate level and version % %======================================= % exponent = Unit_getExponent(SBMLUnit) %======================================= % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the value of the exponent attribute % %=============================== % kind = Unit_getKind(SBMLUnit) %=============================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the value of the kind attribute % %=================================== % metaid = Unit_getMetaid(SBMLUnit) %=================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the value of the metaid attribute % %=========================================== % multiplier = Unit_getMultiplier(SBMLUnit) %=========================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the value of the multiplier attribute % %=================================== % offset = Unit_getOffset(SBMLUnit) %=================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the value of the offset attribute % %===================================== % sboTerm = Unit_getSBOTerm(SBMLUnit) %===================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the value of the sboTerm attribute % %================================= % scale = Unit_getScale(SBMLUnit) %================================= % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the value of the scale attribute % %====================================== % value = Unit_isSetExponent(SBMLUnit) %====================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. value = % - 1 if the exponent attribute is set % - 0 otherwise % %================================== % value = Unit_isSetKind(SBMLUnit) %================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. value = % - 1 if the kind attribute is set % - 0 otherwise % %==================================== % value = Unit_isSetMetaid(SBMLUnit) %==================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %======================================== % value = Unit_isSetMultiplier(SBMLUnit) %======================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. value = % - 1 if the multiplier attribute is set % - 0 otherwise % %==================================== % value = Unit_isSetOffset(SBMLUnit) %==================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. value = % - 1 if the offset attribute is set % - 0 otherwise % %===================================== % value = Unit_isSetSBOTerm(SBMLUnit) %===================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %=================================== % value = Unit_isSetScale(SBMLUnit) %=================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. value = % - 1 if the scale attribute is set % - 0 otherwise % %================================================= % SBMLUnit = Unit_setExponent(SBMLUnit, exponent) %================================================= % Takes % 1. SBMLUnit, an SBML Unit structure % 2. exponent; number representing the value of exponent to be set % Returns % 1. the SBML Unit structure with the new value for the exponent attribute % %========================================= % SBMLUnit = Unit_setKind(SBMLUnit, kind) %========================================= % Takes % 1. SBMLUnit, an SBML Unit structure % 2. kind; a string representing the kind to be set % Returns % 1. the SBML Unit structure with the new value for the kind attribute % %============================================= % SBMLUnit = Unit_setMetaid(SBMLUnit, metaid) %============================================= % Takes % 1. SBMLUnit, an SBML Unit structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Unit structure with the new value for the metaid attribute % %===================================================== % SBMLUnit = Unit_setMultiplier(SBMLUnit, multiplier) %===================================================== % Takes % 1. SBMLUnit, an SBML Unit structure % 2. multiplier; number representing the value of multiplier to be set % Returns % 1. the SBML Unit structure with the new value for the multiplier attribute % %============================================= % SBMLUnit = Unit_setOffset(SBMLUnit, offset) %============================================= % Takes % 1. SBMLUnit, an SBML Unit structure % 2. offset, an integer representing the offset to be set % Returns % 1. the SBML Unit structure with the new value for the offset attribute % %=============================================== % SBMLUnit = Unit_setSBOTerm(SBMLUnit, sboTerm) %=============================================== % Takes % 1. SBMLUnit, an SBML Unit structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Unit structure with the new value for the sboTerm attribute % %=========================================== % SBMLUnit = Unit_setScale(SBMLUnit, scale) %=========================================== % Takes % 1. SBMLUnit, an SBML Unit structure % 2. scale; number representing the value of scale to be set % Returns % 1. the SBML Unit structure with the new value for the scale attribute % %========================================= % SBMLUnit = Unit_unsetExponent(SBMLUnit) %========================================= % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the SBML Unit structure with the exponent attribute unset % %===================================== % SBMLUnit = Unit_unsetKind(SBMLUnit) %===================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the SBML Unit structure with the kind attribute unset % %======================================= % SBMLUnit = Unit_unsetMetaid(SBMLUnit) %======================================= % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the SBML Unit structure with the metaid attribute unset % %=========================================== % SBMLUnit = Unit_unsetMultiplier(SBMLUnit) %=========================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the SBML Unit structure with the multiplier attribute unset % %======================================= % SBMLUnit = Unit_unsetOffset(SBMLUnit) %======================================= % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the SBML Unit structure with the offset attribute unset % %======================================== % SBMLUnit = Unit_unsetSBOTerm(SBMLUnit) %======================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the SBML Unit structure with the sboTerm attribute unset % %====================================== % SBMLUnit = Unit_unsetScale(SBMLUnit) %====================================== % Takes % 1. SBMLUnit, an SBML Unit structure % Returns % 1. the SBML Unit structure with the scale attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/0000755000000000000000000000000011704572244023302 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_unsetSBOTerm.m0000644000000000000000000000331311703262336027472 0ustar rootrootfunction SBMLTrigger = Trigger_unsetSBOTerm(SBMLTrigger) % SBMLTrigger = Trigger_unsetSBOTerm(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. the SBML Trigger structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'sboTerm') SBMLTrigger.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_unsetMetaid.m0000644000000000000000000000330511703262336027423 0ustar rootrootfunction SBMLTrigger = Trigger_unsetMetaid(SBMLTrigger) % SBMLTrigger = Trigger_unsetMetaid(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. the SBML Trigger structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'metaid') SBMLTrigger.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_unsetMath.m0000644000000000000000000000327111703262336027113 0ustar rootrootfunction SBMLTrigger = Trigger_unsetMath(SBMLTrigger) % SBMLTrigger = Trigger_unsetMath(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. the SBML Trigger structure with the math attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'math') SBMLTrigger.math = ''; else error('math not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_setSBOTerm.m0000644000000000000000000000357211703262336027136 0ustar rootrootfunction SBMLTrigger = Trigger_setSBOTerm(SBMLTrigger, sboTerm) % SBMLTrigger = Trigger_setSBOTerm(SBMLTrigger, sboTerm) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Trigger structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLTrigger.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_setPersistent.m0000644000000000000000000000377411703262336030027 0ustar rootrootfunction SBMLTrigger = Trigger_setPersistent(SBMLTrigger, persistentValue) % SBMLTrigger = Trigger_setPersistent(SBMLTrigger, persistent) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % 2. persistent, an integer (0/1) representing the value of persistent to be set % % Returns % % 1. the SBML Trigger structure with the new value for the persistent attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'persistent') if (~isIntegralNumber(persistentValue) || persistentValue < 0 || persistentValue > 1) error('persistent must be an integer of value 0/1') ; else SBMLTrigger.persistent = persistentValue; end; else error('persistent not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_setMetaid.m0000644000000000000000000000354611703262336027067 0ustar rootrootfunction SBMLTrigger = Trigger_setMetaid(SBMLTrigger, metaid) % SBMLTrigger = Trigger_setMetaid(SBMLTrigger, metaid) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Trigger structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLTrigger.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_setMath.m0000644000000000000000000000353211703262336026550 0ustar rootrootfunction SBMLTrigger = Trigger_setMath(SBMLTrigger, math) % SBMLTrigger = Trigger_setMath(SBMLTrigger, math) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % 2. math; string representing the math expression math to be set % % Returns % % 1. the SBML Trigger structure with the new value for the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'math') if ~ischar(math) error('math must be character array') ; else SBMLTrigger.math = math; end; else error('math not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_setInitialValue.m0000644000000000000000000000400111703262336030235 0ustar rootrootfunction SBMLTrigger = Trigger_setInitialValue(SBMLTrigger, initialValue) % SBMLTrigger = Trigger_setInitialValue(SBMLTrigger, initialValue) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % 2. initialValue, an integer (0/1) representing the value of initialValue to be set % % Returns % % 1. the SBML Trigger structure with the new value for the initialValue attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'initialValue') if (~isIntegralNumber(initialValue) || initialValue < 0 || initialValue > 1) error('initialValue must be an integer of value 0/1') ; else SBMLTrigger.initialValue = initialValue; end; else error('initialValue not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_isSetSBOTerm.m0000644000000000000000000000331411703262336027424 0ustar rootrootfunction value = Trigger_isSetSBOTerm(SBMLTrigger) % value = Trigger_isSetSBOTerm(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'sboTerm') value = (SBMLTrigger.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_isSetMetaid.m0000644000000000000000000000331311703262336027353 0ustar rootrootfunction value = Trigger_isSetMetaid(SBMLTrigger) % value = Trigger_isSetMetaid(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'metaid') value = ~isempty(SBMLTrigger.metaid); else error('metaid not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_isSetMath.m0000644000000000000000000000327711703262336027052 0ustar rootrootfunction value = Trigger_isSetMath(SBMLTrigger) % value = Trigger_isSetMath(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. value = % - 1 if the math attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'math') value = ~isempty(SBMLTrigger.math); else error('math not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_getSBOTerm.m0000644000000000000000000000325311703262336027116 0ustar rootrootfunction sboTerm = Trigger_getSBOTerm(SBMLTrigger) % sboTerm = Trigger_getSBOTerm(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'sboTerm') sboTerm = SBMLTrigger.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_getPersistent.m0000644000000000000000000000332011703262336027776 0ustar rootrootfunction persistentValue = Trigger_getPersistent(SBMLTrigger) % persistent = Trigger_getPersistent(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. the value of the persistent attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'persistent') persistentValue = SBMLTrigger.persistent; else error('persistent not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_getMetaid.m0000644000000000000000000000324211703262336027044 0ustar rootrootfunction metaid = Trigger_getMetaid(SBMLTrigger) % metaid = Trigger_getMetaid(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'metaid') metaid = SBMLTrigger.metaid; else error('metaid not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_getMath.m0000644000000000000000000000322011703262336026526 0ustar rootrootfunction math = Trigger_getMath(SBMLTrigger) % math = Trigger_getMath(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. the value of the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'math') math = SBMLTrigger.math; else error('math not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_getInitialValue.m0000644000000000000000000000333011703262336030225 0ustar rootrootfunction initialValue = Trigger_getInitialValue(SBMLTrigger) % initialValue = Trigger_getInitialValue(SBMLTrigger) % % Takes % % 1. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. the value of the initialValue attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLTrigger); if isfield(SBMLTrigger, 'initialValue') initialValue = SBMLTrigger.initialValue; else error('initialValue not an attribute on SBML L%dV%d Trigger', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Trigger_create.m0000644000000000000000000000532211703262336026405 0ustar rootrootfunction Trigger = Trigger_create(varargin) % Trigger = Trigger_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Trigger structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getTriggerFieldnames(level, version); if (num > 0) values = getTriggerDefaultValues(level, version); Trigger = cell2struct(values, fieldnames, 2); %add level and version Trigger.level = level; Trigger.version = version; %check correct structure if ~isSBML_Trigger(Trigger, level, version) Trigger = struct(); warning('Warn:BadStruct', 'Failed to create Trigger'); end; else Trigger = []; warning('Warn:InvalidLV', 'Trigger not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Trigger/Contents.m0000644000000000000000000001463111703262336025257 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Trigger % % The functions allow users to create and work with the SBML Trigger structure. % %=============================================================== % Trigger = Trigger_create(level(optional), version(optional) ) %=============================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Trigger structure of the appropriate level and version % %===================================================== % initialValue = Trigger_getInitialValue(SBMLTrigger) %===================================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. the value of the initialValue attribute % %===================================== % math = Trigger_getMath(SBMLTrigger) %===================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. the value of the math attribute % %========================================= % metaid = Trigger_getMetaid(SBMLTrigger) %========================================= % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. the value of the metaid attribute % %================================================= % persistent = Trigger_getPersistent(SBMLTrigger) %================================================= % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. the value of the persistent attribute % %=========================================== % sboTerm = Trigger_getSBOTerm(SBMLTrigger) %=========================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. the value of the sboTerm attribute % %======================================== % value = Trigger_isSetMath(SBMLTrigger) %======================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. value = % - 1 if the math attribute is set % - 0 otherwise % %========================================== % value = Trigger_isSetMetaid(SBMLTrigger) %========================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %=========================================== % value = Trigger_isSetSBOTerm(SBMLTrigger) %=========================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %================================================================== % SBMLTrigger = Trigger_setInitialValue(SBMLTrigger, initialValue) %================================================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % 2. initialValue, an integer (0/1) representing the value of initialValue to be set % Returns % 1. the SBML Trigger structure with the new value for the initialValue attribute % %================================================== % SBMLTrigger = Trigger_setMath(SBMLTrigger, math) %================================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % 2. math; string representing the math expression math to be set % Returns % 1. the SBML Trigger structure with the new value for the math attribute % %====================================================== % SBMLTrigger = Trigger_setMetaid(SBMLTrigger, metaid) %====================================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Trigger structure with the new value for the metaid attribute % %============================================================== % SBMLTrigger = Trigger_setPersistent(SBMLTrigger, persistent) %============================================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % 2. persistent, an integer (0/1) representing the value of persistent to be set % Returns % 1. the SBML Trigger structure with the new value for the persistent attribute % %======================================================== % SBMLTrigger = Trigger_setSBOTerm(SBMLTrigger, sboTerm) %======================================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Trigger structure with the new value for the sboTerm attribute % %============================================== % SBMLTrigger = Trigger_unsetMath(SBMLTrigger) %============================================== % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. the SBML Trigger structure with the math attribute unset % %================================================ % SBMLTrigger = Trigger_unsetMetaid(SBMLTrigger) %================================================ % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. the SBML Trigger structure with the metaid attribute unset % %================================================= % SBMLTrigger = Trigger_unsetSBOTerm(SBMLTrigger) %================================================= % Takes % 1. SBMLTrigger, an SBML Trigger structure % Returns % 1. the SBML Trigger structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/0000755000000000000000000000000011704572244022616 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testUnitDefinition.m0000644000000000000000000000704411703262262026624 0ustar rootrootfunction [fail, num, message] = testUnitDefinition() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing UnitDefinition'); disp('Testing L1V1'); obj = UnitDefinition_create(1, 1); attributes = {... {'Name', 1}... {'Unit', 9}... }; [fail, num, message] = testObject(obj, attributes, 'UnitDefinition', fail, num, message); disp('Testing L1V2'); obj = UnitDefinition_create(1, 2); attributes = {... {'Name', 1}... {'Unit', 9}... }; [fail, num, message] = testObject(obj, attributes, 'UnitDefinition', fail, num, message); disp('Testing L2V1'); obj = UnitDefinition_create(2, 1); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'Unit', 9}... }; [fail, num, message] = testObject(obj, attributes, 'UnitDefinition', fail, num, message); disp('Testing L2V2'); obj = UnitDefinition_create(2, 2); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'Unit', 9}... }; [fail, num, message] = testObject(obj, attributes, 'UnitDefinition', fail, num, message); disp('Testing L2V3'); obj = UnitDefinition_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Unit', 9}... }; [fail, num, message] = testObject(obj, attributes, 'UnitDefinition', fail, num, message); disp('Testing L2V4'); obj = UnitDefinition_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Unit', 9}... }; [fail, num, message] = testObject(obj, attributes, 'UnitDefinition', fail, num, message); disp('Testing L3V1'); obj = UnitDefinition_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Unit', 9}... }; [fail, num, message] = testObject(obj, attributes, 'UnitDefinition', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testUnit.m0000644000000000000000000000727111703262262024615 0ustar rootrootfunction [fail, num, message] = testUnit() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Unit'); disp('Testing L1V1'); obj = Unit_create(1, 1); attributes = {... {'Kind', 1}... {'Exponent', 6}... {'Scale', 6}... }; [fail, num, message] = testObject(obj, attributes, 'Unit', fail, num, message); disp('Testing L1V2'); obj = Unit_create(1, 2); attributes = {... {'Kind', 1}... {'Exponent', 6}... {'Scale', 6}... }; [fail, num, message] = testObject(obj, attributes, 'Unit', fail, num, message); disp('Testing L2V1'); obj = Unit_create(2, 1); attributes = {... {'Metaid', 1}... {'Kind', 1}... {'Exponent', 6}... {'Scale', 6}... {'Multiplier', 4}... {'Offset', 4}... }; [fail, num, message] = testObject(obj, attributes, 'Unit', fail, num, message); disp('Testing L2V2'); obj = Unit_create(2, 2); attributes = {... {'Metaid', 1}... {'Kind', 1}... {'Exponent', 6}... {'Scale', 6}... {'Multiplier', 4}... }; [fail, num, message] = testObject(obj, attributes, 'Unit', fail, num, message); disp('Testing L2V3'); obj = Unit_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Kind', 1}... {'Exponent', 6}... {'Scale', 6}... {'Multiplier', 4}... }; [fail, num, message] = testObject(obj, attributes, 'Unit', fail, num, message); disp('Testing L2V4'); obj = Unit_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Kind', 1}... {'Exponent', 6}... {'Scale', 6}... {'Multiplier', 4}... }; [fail, num, message] = testObject(obj, attributes, 'Unit', fail, num, message); disp('Testing L3V1'); obj = Unit_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Kind', 1}... {'Exponent', 3}... {'Scale', 2}... {'Multiplier', 3}... }; [fail, num, message] = testObject(obj, attributes, 'Unit', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testTrigger.m0000644000000000000000000000566411703262262025305 0ustar rootrootfunction [fail, num, message] = testTrigger() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Trigger'); disp('Testing L1V1'); obj = Trigger_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Trigger', fail, num, message); disp('Testing L1V2'); obj = Trigger_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Trigger', fail, num, message); disp('Testing L2V1'); obj = Trigger_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Trigger', fail, num, message); disp('Testing L2V2'); obj = Trigger_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Trigger', fail, num, message); disp('Testing L2V3'); obj = Trigger_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Trigger', fail, num, message); disp('Testing L2V4'); obj = Trigger_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Trigger', fail, num, message); disp('Testing L3V1'); obj = Trigger_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Persistent', 7}... {'InitialValue', 7}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Trigger', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testStructures.m0000644000000000000000000000302311703267342026054 0ustar rootrootfunction y = testStructures() % fail = 0; fail = fail + TestCreate(); fail = fail + testComponents(); if isBindingInstalled() == 1 fail = fail + testModelGetById(); fail = fail + testModelGetByNum(); fail = fail + testIsInRules(); else disp('LibSBML binding not installed - some tests could not be run'); end; y = fail; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testStoichiometryMath.m0000644000000000000000000000563711703262262027356 0ustar rootrootfunction [fail, num, message] = testStoichiometryMath() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing StoichiometryMath'); disp('Testing L1V1'); obj = StoichiometryMath_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'StoichiometryMath', fail, num, message); disp('Testing L1V2'); obj = StoichiometryMath_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'StoichiometryMath', fail, num, message); disp('Testing L2V1'); obj = StoichiometryMath_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'StoichiometryMath', fail, num, message); disp('Testing L2V2'); obj = StoichiometryMath_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'StoichiometryMath', fail, num, message); disp('Testing L2V3'); obj = StoichiometryMath_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'StoichiometryMath', fail, num, message); disp('Testing L2V4'); obj = StoichiometryMath_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'StoichiometryMath', fail, num, message); disp('Testing L3V1'); obj = StoichiometryMath_create(3, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'StoichiometryMath', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testSpeciesType.m0000644000000000000000000000573511703262262026136 0ustar rootrootfunction [fail, num, message] = testSpeciesType() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing SpeciesType'); disp('Testing L1V1'); obj = SpeciesType_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'SpeciesType', fail, num, message); disp('Testing L1V2'); obj = SpeciesType_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'SpeciesType', fail, num, message); disp('Testing L2V1'); obj = SpeciesType_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'SpeciesType', fail, num, message); disp('Testing L2V2'); obj = SpeciesType_create(2, 2); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesType', fail, num, message); disp('Testing L2V3'); obj = SpeciesType_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesType', fail, num, message); disp('Testing L2V4'); obj = SpeciesType_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesType', fail, num, message); disp('Testing L3V1'); obj = SpeciesType_create(3, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'SpeciesType', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testSpeciesReference.m0000644000000000000000000001010611703262262027077 0ustar rootrootfunction [fail, num, message] = testSpeciesReference() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing SpeciesReference'); disp('Testing L1V1'); obj = SpeciesReference_create(1, 1); attributes = {... {'Species', 1}... {'Stoichiometry', 6}... {'Denominator', 6}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesReference', fail, num, message); disp('Testing L1V2'); obj = SpeciesReference_create(1, 2); attributes = {... {'Species', 1}... {'Stoichiometry', 6}... {'Denominator', 6}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesReference', fail, num, message); disp('Testing L2V1'); obj = SpeciesReference_create(2, 1); attributes = {... {'Metaid', 1}... {'Species', 1}... {'Stoichiometry', 6}... {'Denominator', 6}... {'StoichiometryMath', 1}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesReference', fail, num, message); disp('Testing L2V2'); obj = SpeciesReference_create(2, 2); attributes = {... {'Metaid', 1}... {'Species', 1}... {'Id', 1}... {'Name', 1}... {'SBOTerm', 2}... {'Stoichiometry', 6}... {'StoichiometryMath', 1}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesReference', fail, num, message); disp('Testing L2V3'); obj = SpeciesReference_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Species', 1}... {'Id', 1}... {'Name', 1}... {'Stoichiometry', 6}... {'StoichiometryMath', 9}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesReference', fail, num, message); disp('Testing L2V4'); obj = SpeciesReference_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Species', 1}... {'Id', 1}... {'Name', 1}... {'Stoichiometry', 6}... {'StoichiometryMath', 9}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesReference', fail, num, message); disp('Testing L3V1'); obj = SpeciesReference_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Species', 1}... {'Id', 1}... {'Name', 1}... {'Stoichiometry', 3}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesReference', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testSpeciesConcentrationRule.m0000644000000000000000000000602111703262262030640 0ustar rootrootfunction [fail, num, message] = testSpeciesConcentrationRule() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing SpeciesConcentrationRule'); disp('Testing L1V1'); obj = SpeciesConcentrationRule_create(1, 1); attributes = {... {'Type', 8}... {'Formula', 1}... {'Species', 1}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesConcentrationRule', fail, num, message); disp('Testing L1V2'); obj = SpeciesConcentrationRule_create(1, 2); attributes = {... {'Type', 8}... {'Formula', 1}... {'Species', 1}... }; [fail, num, message] = testObject(obj, attributes, 'SpeciesConcentrationRule', fail, num, message); disp('Testing L2V1'); obj = SpeciesConcentrationRule_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'SpeciesConcentrationRule', fail, num, message); disp('Testing L2V2'); obj = SpeciesConcentrationRule_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'SpeciesConcentrationRule', fail, num, message); disp('Testing L2V3'); obj = SpeciesConcentrationRule_create(2, 3); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'SpeciesConcentrationRule', fail, num, message); disp('Testing L2V4'); obj = SpeciesConcentrationRule_create(2, 4); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'SpeciesConcentrationRule', fail, num, message); disp('Testing L3V1'); obj = SpeciesConcentrationRule_create(3, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'SpeciesConcentrationRule', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testSpecies.m0000644000000000000000000001244111703262262025264 0ustar rootrootfunction [fail, num, message] = testSpecies() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Species'); disp('Testing L1V1'); obj = Species_create(1, 1); attributes = {... {'Name', 1}... {'Compartment', 1}... {'InitialAmount', 3}... {'Units', 1}... {'BoundaryCondition', 7}... {'Charge', 5}... }; [fail, num, message] = testObject(obj, attributes, 'Species', fail, num, message); disp('Testing L1V2'); obj = Species_create(1, 2); attributes = {... {'Name', 1}... {'Compartment', 1}... {'InitialAmount', 3}... {'Units', 1}... {'BoundaryCondition', 7}... {'Charge', 5}... }; [fail, num, message] = testObject(obj, attributes, 'Species', fail, num, message); disp('Testing L2V1'); obj = Species_create(2, 1); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'Compartment', 1}... {'InitialAmount', 3}... {'InitialConcentration', 3}... {'SubstanceUnits', 1}... {'SpatialSizeUnits', 1}... {'HasOnlySubstanceUnits', 7}... {'BoundaryCondition', 7}... {'Charge', 5}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Species', fail, num, message); disp('Testing L2V2'); obj = Species_create(2, 2); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'SpeciesType', 1}... {'Compartment', 1}... {'InitialAmount', 3}... {'InitialConcentration', 3}... {'SubstanceUnits', 1}... {'SpatialSizeUnits', 1}... {'HasOnlySubstanceUnits', 7}... {'BoundaryCondition', 7}... {'Charge', 5}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Species', fail, num, message); disp('Testing L2V3'); obj = Species_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'SpeciesType', 1}... {'Compartment', 1}... {'InitialAmount', 3}... {'InitialConcentration', 3}... {'SubstanceUnits', 1}... {'HasOnlySubstanceUnits', 7}... {'BoundaryCondition', 7}... {'Charge', 5}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Species', fail, num, message); disp('Testing L2V4'); obj = Species_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'SpeciesType', 1}... {'Compartment', 1}... {'InitialAmount', 3}... {'InitialConcentration', 3}... {'SubstanceUnits', 1}... {'HasOnlySubstanceUnits', 7}... {'BoundaryCondition', 7}... {'Charge', 5}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Species', fail, num, message); disp('Testing L3V1'); obj = Species_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Compartment', 1}... {'InitialAmount', 3}... {'InitialConcentration', 3}... {'SubstanceUnits', 1}... {'HasOnlySubstanceUnits', 7}... {'BoundaryCondition', 7}... {'Constant', 7}... {'ConversionFactor', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Species', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testReaction.m0000644000000000000000000001113611703262262025435 0ustar rootrootfunction [fail, num, message] = testReaction() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Reaction'); disp('Testing L1V1'); obj = Reaction_create(1, 1); attributes = {... {'Name', 1}... {'Reactant', 9}... {'Product', 9}... {'KineticLaw', 9}... {'Reversible', 7}... {'Fast', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Reaction', fail, num, message); disp('Testing L1V2'); obj = Reaction_create(1, 2); attributes = {... {'Name', 1}... {'Reactant', 9}... {'Product', 9}... {'KineticLaw', 9}... {'Reversible', 7}... {'Fast', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Reaction', fail, num, message); disp('Testing L2V1'); obj = Reaction_create(2, 1); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'Reactant', 9}... {'Product', 9}... {'Modifier', 9}... {'KineticLaw', 9}... {'Reversible', 7}... {'Fast', 5}... }; [fail, num, message] = testObject(obj, attributes, 'Reaction', fail, num, message); disp('Testing L2V2'); obj = Reaction_create(2, 2); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'Reactant', 9}... {'Product', 9}... {'Modifier', 9}... {'KineticLaw', 9}... {'Reversible', 7}... {'Fast', 5}... {'SBOTerm', 2}... }; [fail, num, message] = testObject(obj, attributes, 'Reaction', fail, num, message); disp('Testing L2V3'); obj = Reaction_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Reactant', 9}... {'Product', 9}... {'Modifier', 9}... {'KineticLaw', 9}... {'Reversible', 7}... {'Fast', 5}... }; [fail, num, message] = testObject(obj, attributes, 'Reaction', fail, num, message); disp('Testing L2V4'); obj = Reaction_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Reactant', 9}... {'Product', 9}... {'Modifier', 9}... {'KineticLaw', 9}... {'Reversible', 7}... {'Fast', 5}... }; [fail, num, message] = testObject(obj, attributes, 'Reaction', fail, num, message); disp('Testing L3V1'); obj = Reaction_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Reactant', 9}... {'Product', 9}... {'Modifier', 9}... {'KineticLaw', 9}... {'Reversible', 7}... {'Fast', 5}... {'Compartment', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Reaction', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testRateRule.m0000644000000000000000000000635211703262262025420 0ustar rootrootfunction [fail, num, message] = testRateRule() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing RateRule'); disp('Testing L1V1'); obj = RateRule_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'RateRule', fail, num, message); disp('Testing L1V2'); obj = RateRule_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'RateRule', fail, num, message); disp('Testing L2V1'); obj = RateRule_create(2, 1); attributes = {... {'Metaid', 1}... {'Formula', 1}... {'Variable', 1}... }; [fail, num, message] = testObject(obj, attributes, 'RateRule', fail, num, message); disp('Testing L2V2'); obj = RateRule_create(2, 2); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... {'Variable', 1}... }; [fail, num, message] = testObject(obj, attributes, 'RateRule', fail, num, message); disp('Testing L2V3'); obj = RateRule_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... {'Variable', 1}... }; [fail, num, message] = testObject(obj, attributes, 'RateRule', fail, num, message); disp('Testing L2V4'); obj = RateRule_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... {'Variable', 1}... }; [fail, num, message] = testObject(obj, attributes, 'RateRule', fail, num, message); disp('Testing L3V1'); obj = RateRule_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... {'Variable', 1}... }; [fail, num, message] = testObject(obj, attributes, 'RateRule', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testPriority.m0000644000000000000000000000524211703262262025513 0ustar rootrootfunction [fail, num, message] = testPriority() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Priority'); disp('Testing L1V1'); obj = Priority_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Priority', fail, num, message); disp('Testing L1V2'); obj = Priority_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Priority', fail, num, message); disp('Testing L2V1'); obj = Priority_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Priority', fail, num, message); disp('Testing L2V2'); obj = Priority_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Priority', fail, num, message); disp('Testing L2V3'); obj = Priority_create(2, 3); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Priority', fail, num, message); disp('Testing L2V4'); obj = Priority_create(2, 4); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Priority', fail, num, message); disp('Testing L3V1'); obj = Priority_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Priority', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testParameterRule.m0000644000000000000000000000562711703262262026451 0ustar rootrootfunction [fail, num, message] = testParameterRule() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing ParameterRule'); disp('Testing L1V1'); obj = ParameterRule_create(1, 1); attributes = {... {'Type', 8}... {'Formula', 1}... {'Name', 1}... {'Units', 1}... }; [fail, num, message] = testObject(obj, attributes, 'ParameterRule', fail, num, message); disp('Testing L1V2'); obj = ParameterRule_create(1, 2); attributes = {... {'Type', 8}... {'Formula', 1}... {'Name', 1}... {'Units', 1}... }; [fail, num, message] = testObject(obj, attributes, 'ParameterRule', fail, num, message); disp('Testing L2V1'); obj = ParameterRule_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'ParameterRule', fail, num, message); disp('Testing L2V2'); obj = ParameterRule_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'ParameterRule', fail, num, message); disp('Testing L2V3'); obj = ParameterRule_create(2, 3); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'ParameterRule', fail, num, message); disp('Testing L2V4'); obj = ParameterRule_create(2, 4); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'ParameterRule', fail, num, message); disp('Testing L3V1'); obj = ParameterRule_create(3, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'ParameterRule', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testParameter.m0000644000000000000000000000756211703262262025621 0ustar rootrootfunction [fail, num, message] = testParameter() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Parameter'); disp('Testing L1V1'); obj = Parameter_create(1, 1); attributes = {... {'Name', 1}... {'Value', 3}... {'Units', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Parameter', fail, num, message); disp('Testing L1V2'); obj = Parameter_create(1, 2); attributes = {... {'Name', 1}... {'Value', 3}... {'Units', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Parameter', fail, num, message); disp('Testing L2V1'); obj = Parameter_create(2, 1); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'Value', 3}... {'Units', 1}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Parameter', fail, num, message); disp('Testing L2V2'); obj = Parameter_create(2, 2); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'Value', 3}... {'Units', 1}... {'Constant', 7}... {'SBOTerm', 2}... }; [fail, num, message] = testObject(obj, attributes, 'Parameter', fail, num, message); disp('Testing L2V3'); obj = Parameter_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Value', 3}... {'Units', 1}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Parameter', fail, num, message); disp('Testing L2V4'); obj = Parameter_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Value', 3}... {'Units', 1}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Parameter', fail, num, message); disp('Testing L3V1'); obj = Parameter_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Value', 3}... {'Units', 1}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Parameter', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testObject.m0000644000000000000000000002370211703262262025101 0ustar rootrootfunction [fail, num, message] = testObject(obj, attributes, component, fail, num, message) % % different cases which indicate what type of attribute is being tested % 1 string % 2 sboTerm - ie integer with unset value = -1 % 3 double whose unset value is NaN % 4 double - always set % 5 boolean - with issetvalue % 6 int - always set % 7 boolean - no issetvalue % 8 L1RuleType - always set % 9 another structure - test add functions % 10 SBMLlevel/version - always set - ignore % if no attributes obj should be empty if length(attributes) == 0 if (~isempty(obj)) fail = fail + 1; num = num + 1; m = sprintf('create%s created an invalid object', component); disp(m); message{length(message)+1} = m; end; end; %remove any fbc prefix for i = 1:length(attributes) name = attributes{i}{1}; if length(name) > 4 if strcmp(name(1:4), 'Fbc_') attributes{i}{1} = strcat(upper(name(5:5)), name(6:end)); end; end; end; for i = 1:length(attributes) switch (attributes{i}{2}) case 7 f = 0; case 9 [f, m] = testEmpty(component, attributes{i}{1}, obj); case {4, 6, 8, 10} [f, m] = testAlwaysSet(component, attributes{i}{1}, obj); otherwise [f, m] = testIsNotSet(component, attributes{i}{1}, obj); end; num = num + 1; if f > 0 fail = fail + f; disp(m); message{length(message)+1} = m; end; end; for i = 1:length(attributes) [f, m] = testSet(component, attributes{i}{1}, obj, attributes{i}{2}); num = num + 3; if f > 0 fail = fail + f; disp(m); len = length(message); for j = 1:length(m) message{len+j} = m{j}; end; end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [fail, message] = testEmpty(component, attribute, obj) message = {}; singles = {'KineticLaw', 'Trigger', 'Delay', 'Priority', 'StoichiometryMath'}; if isIn(singles, attribute) fhandle = sprintf('%s_isSet%s', component, attribute); else fhandle = sprintf('%s_getNum%ss', component, attribute); end; result = feval(fhandle, obj); if result == 0 fail = 0; else fail = 1; message{1} = sprintf('%s should return 0', fhandle); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [fail, message] = testIsNotSet(component, attribute, obj) message = {}; fhandle = sprintf('%s_isSet%s', component, attribute); result = feval(fhandle, obj); if result == 0 fail = 0; else fail = 1; message{1} = sprintf('%s_isSet%s should return 0', component, attribute); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [fail, message] = testAlwaysSet(component, attribute, obj) message = {}; fhandle = sprintf('%s_isSet%s', component, attribute); result = feval(fhandle, obj); if result == 1 fail = 0; else fail = 1; message{1} = sprintf('%s_isSet%s should return 1', component, attribute); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [fail, message] = testSet(component, attribute, obj, type) testStr = 'abc'; testDouble = 3.3; testInt = 2; testBool = 1; testL1RuleType = 'rate'; message = {}; fail = 0; if (type == 9) [fail, message] = testAdd(component, attribute, obj); return; elseif (type == 10) % level/version return; end; fhandle_isSet = sprintf('%s_isSet%s', component, attribute); fhandle_set = sprintf('%s_set%s', component, attribute); fhandle_get = sprintf('%s_get%s', component, attribute); fhandle_unset = sprintf('%s_unset%s', component, attribute); % set and test that attribute is set switch (type) case 1 obj = feval(fhandle_set, obj, testStr); case 2 obj = feval(fhandle_set, obj, testInt); case 3 obj = feval(fhandle_set, obj, testDouble); case 4 obj = feval(fhandle_set, obj, testDouble); case 5 obj = feval(fhandle_set, obj, testBool); case 6 obj = feval(fhandle_set, obj, testInt); case 7 obj = feval(fhandle_set, obj, testBool); case 8 obj = feval(fhandle_set, obj, testL1RuleType); otherwise end; switch (type) case 7 result = 1; otherwise result = feval(fhandle_isSet, obj); end; if result ~= 1 fail = fail + 1; m = sprintf('%s_set%s failed', component, attribute); message{length(message)+1} = m; end; %get the attribute and check it is correct result = feval(fhandle_get, obj); switch (type) case 1 if ~strcmp(result, testStr) fail = fail + 1; m = sprintf('%s_get%s failed', component, attribute); message{length(message)+1} = m; end; case 2 if result ~= testInt fail = fail + 1; m = sprintf('%s_get%s failed', component, attribute); message{length(message)+1} = m; end; case 3 if result ~= testDouble fail = fail + 1; m = sprintf('%s_get%s failed', component, attribute); message{length(message)+1} = m; end; case 4 if result ~= testDouble fail = fail + 1; m = sprintf('%s_get%s failed', component, attribute); message{length(message)+1} = m; end; case 5 if result ~= testBool fail = fail + 1; m = sprintf('%s_get%s failed', component, attribute); message{length(message)+1} = m; end; case 6 if result ~= testInt fail = fail + 1; m = sprintf('%s_get%s failed', component, attribute); message{length(message)+1} = m; end; case 7 if result ~= testBool fail = fail + 1; m = sprintf('%s_get%s failed', component, attribute); message{length(message)+1} = m; end; case 8 if ~strcmp(result, testL1RuleType) fail = fail + 1; m = sprintf('%s_get%s failed', component, attribute); message{length(message)+1} = m; end; otherwise end; % unset and check it is unset switch (type) case {4, 6, 7, 8} result = 0; otherwise obj = feval(fhandle_unset, obj); result = feval(fhandle_isSet, obj); end; if result ~= 0 fail = fail + 1; m = sprintf('%s_unset%s failed', component, attribute); message{length(message)+1} = m; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [fail, message] = testAdd(component, attribute, obj) fail = 0; message = {}; singles = {'KineticLaw', 'Trigger', 'Delay', 'Priority', 'StoichiometryMath'}; if isIn(singles, attribute) single = 1; else single = 0; end; if strcmp(attribute, 'Rule') fhandle_create = 'AlgebraicRule_create'; elseif strcmp(attribute, 'Product') || strcmp(attribute, 'Reactant') fhandle_create = 'SpeciesReference_create'; elseif strcmp(attribute, 'Modifier') fhandle_create = 'ModifierSpeciesReference_create'; else fhandle_create = sprintf('%s_create', attribute); end; fhandle_get = sprintf('%s_get%s', component, attribute); if single == 1 fhandle_set = sprintf('%s_set%s', component, attribute); fhandle_isset = sprintf('%s_isSet%s', component, attribute); fhandle_unset = sprintf('%s_unset%s', component, attribute); else fhandle_set = sprintf('%s_add%s', component, attribute); fhandle_isset = sprintf('%s_getNum%ss', component, attribute); fhandle_getLO = sprintf('%s_getListOf%ss', component, attribute); end; fhandle_createSub = sprintf('%s_create%s', component, attribute); if strcmp(obj.typecode, 'SBML_MODEL') newObj = feval(fhandle_create, obj.SBML_level, obj.SBML_version); else newObj = feval(fhandle_create, obj.level, obj.version); end; % add new obj and check is now set obj = feval(fhandle_set, obj, newObj); result = feval(fhandle_isset, obj); if result == 1 fail = 0; else fail = 1; message{1} = sprintf('%s failed', fhandle_set); end; % get the obj and test if single == 1 returnObj = feval(fhandle_get, obj); else returnObj = feval(fhandle_get, obj, 1); end; if areIdentical(returnObj, newObj) fail = 0; else fail = 1; message{1} = sprintf('%s failed', fhandle_set); end; % test unset single obj if single obj = feval(fhandle_unset, obj); result = feval(fhandle_isset, obj); if result == 0 fail = 0; else fail = 1; message{1} = sprintf('%s failed', fhandle_unset); end; else obj = feval(fhandle_set, obj, newObj); lo = feval(fhandle_getLO, obj); result = length(lo); if result == 2 fail = 0; else fail = 1; message{1} = sprintf('%s failed', fhandle_getLO); end; end; % test create if single obj = feval(fhandle_createSub, obj); result = feval(fhandle_isset, obj); if result == 1 fail = 0; else fail = 1; message{1} = sprintf('%s failed', fhandle_createSub); end; else obj = feval(fhandle_createSub, obj); lo = feval(fhandle_getLO, obj); result = length(lo); if result == 3 fail = 0; else fail = 1; message{1} = sprintf('%s failed', fhandle_createSub); end; end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function value = isIn(array, thing) value = sum(ismember(array, thing)); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testModifierSpeciesReference.m0000644000000000000000000000704511703262262030566 0ustar rootrootfunction [fail, num, message] = testModifierSpeciesReference() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing ModifierSpeciesReference'); disp('Testing L1V1'); obj = ModifierSpeciesReference_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'ModifierSpeciesReference', fail, num, message); disp('Testing L1V2'); obj = ModifierSpeciesReference_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'ModifierSpeciesReference', fail, num, message); disp('Testing L2V1'); obj = ModifierSpeciesReference_create(2, 1); attributes = {... {'Metaid', 1}... {'Species', 1}... }; [fail, num, message] = testObject(obj, attributes, 'ModifierSpeciesReference', fail, num, message); disp('Testing L2V2'); obj = ModifierSpeciesReference_create(2, 2); attributes = {... {'Metaid', 1}... {'Species', 1}... {'Id', 1}... {'Name', 1}... {'SBOTerm', 2}... }; [fail, num, message] = testObject(obj, attributes, 'ModifierSpeciesReference', fail, num, message); disp('Testing L2V3'); obj = ModifierSpeciesReference_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Species', 1}... {'Id', 1}... {'Name', 1}... }; [fail, num, message] = testObject(obj, attributes, 'ModifierSpeciesReference', fail, num, message); disp('Testing L2V4'); obj = ModifierSpeciesReference_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Species', 1}... {'Id', 1}... {'Name', 1}... }; [fail, num, message] = testObject(obj, attributes, 'ModifierSpeciesReference', fail, num, message); disp('Testing L3V1'); obj = ModifierSpeciesReference_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Species', 1}... {'Id', 1}... {'Name', 1}... }; [fail, num, message] = testObject(obj, attributes, 'ModifierSpeciesReference', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testModelGetByNum.m0000644000000000000000000000614311703262262026346 0ustar rootrootfunction [fail, num, message] = testModelGetByNum() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing ModelGetByNum'); m = TranslateSBML('../../Test/test-data/l2v3-all.xml'); fd = Model_getFunctionDefinition(m, 1); m1 = Model_addFunctionDefinition(m, fd); fail = fail + ~areIdentical(fd, Model_getFunctionDefinition(m1, 2)); fd = Model_getUnitDefinition(m, 1); m1 = Model_addUnitDefinition(m, fd); fail = fail + ~areIdentical(fd, Model_getUnitDefinition(m1, 2)); fd = Model_getCompartment(m, 1); m1 = Model_addCompartment(m, fd); fail = fail + ~areIdentical(fd, Model_getCompartment(m1, 2)); fd = Model_getSpecies(m, 1); m1 = Model_addSpecies(m, fd); fail = fail + ~areIdentical(fd, Model_getSpecies(m1, 2)); fd = Model_getCompartmentType(m, 1); m1 = Model_addCompartmentType(m, fd); fail = fail + ~areIdentical(fd, Model_getCompartmentType(m1, 2)); fd = Model_getSpeciesType(m, 1); m1 = Model_addSpeciesType(m, fd); fail = fail + ~areIdentical(fd, Model_getSpeciesType(m1, 2)); fd = Model_getParameter(m, 1); m1 = Model_addParameter(m, fd); fail = fail + ~areIdentical(fd, Model_getParameter(m1, 6)); fd = Model_getInitialAssignment(m, 1); m1 = Model_addInitialAssignment(m, fd); fail = fail + ~areIdentical(fd, Model_getInitialAssignment(m1, 2)); fd = Model_getRule(m, 1); m1 = Model_addRule(m, fd); fail = fail + ~areIdentical(fd, Model_getRule(m1, 4)); fd = Model_getConstraint(m, 1); m1 = Model_addConstraint(m, fd); fail = fail + ~areIdentical(fd, Model_getConstraint(m1, 2)); fd = Model_getReaction(m, 1); m1 = Model_addReaction(m, fd); fail = fail + ~areIdentical(fd, Model_getReaction(m1, 2)); fd = Model_getEvent(m, 1); m1 = Model_addEvent(m, fd); fail = fail + ~areIdentical(fd, Model_getEvent(m1, 2)); num = 11; disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testModelGetById.m0000644000000000000000000001054611703262262026145 0ustar rootrootfunction [fail, num, message] = testModelGetById() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing ModelGetById'); m = TranslateSBML('../../Test/test-data/l2v3-all.xml'); fail = fail + ~areIdentical(Model_getFunctionDefinition(m, 1), ... Model_getFunctionDefinitionById(m, 'fd')); fail = fail + ~areIdentical(Model_getUnitDefinition(m, 1), ... Model_getUnitDefinitionById(m, 'ud1')); fail = fail + ~areIdentical(Model_getCompartmentType(m, 1), ... Model_getCompartmentTypeById(m, 'hh')); fail = fail + ~areIdentical(Model_getSpeciesType(m, 1), ... Model_getSpeciesTypeById(m, 'gg')); fail = fail + ~areIdentical(Model_getParameter(m, 1), ... Model_getParameterById(m, 'p')); fail = fail + ~areIdentical(Model_getParameter(m, 2), ... Model_getParameterById(m, 'p1')); fail = fail + ~areIdentical(Model_getParameter(m, 3), ... Model_getParameterById(m, 'p2')); fail = fail + ~areIdentical(Model_getParameter(m, 4), ... Model_getParameterById(m, 'p3')); fail = fail + ~areIdentical(Model_getParameter(m, 5), ... Model_getParameterById(m, 'x')); fail = fail + ~areIdentical(Model_getInitialAssignment(m, 1), ... Model_getInitialAssignmentBySymbol(m, 'p1')); fail = fail + ~areIdentical(Model_getCompartment(m, 1), ... Model_getCompartmentById(m, 'a')); fail = fail + ~areIdentical(Model_getSpecies(m, 1), ... Model_getSpeciesById(m, 's')); fail = fail + ~areIdentical(Model_getRule(m, 2), ... Model_getAssignmentRuleByVariable(m, 'p2')); fail = fail + ~areIdentical(Model_getRule(m, 3), ... Model_getRateRuleByVariable(m, 'p3')); fail = fail + ~areIdentical(Model_getReaction(m, 1), ... Model_getReactionById(m, 'r')); fail = fail + ~areIdentical(Model_getEvent(m, 1), ... Model_getEventById(m, 'w')); fail = fail + ~areIdentical(Model_getConstraint(m, 1), ... Model_getConstraint(m, 1)); fail = fail + ~isempty(Model_getFunctionDefinitionById(m, 'xxx')); fail = fail + ~isempty(Model_getUnitDefinitionById(m, 'xxx')); fail = fail + ~isempty(Model_getCompartmentById(m, 'xxx')); fail = fail + ~isempty(Model_getSpeciesById(m, 'xxx')); fail = fail + ~isempty(Model_getCompartmentTypeById(m, 'xxx')); fail = fail + ~isempty(Model_getSpeciesTypeById(m, 'xxx')); fail = fail + ~isempty(Model_getParameterById(m, 'xxx')); fail = fail + ~isempty(Model_getInitialAssignmentBySymbol(m, 'xxx')); fail = fail + ~isempty(Model_getReactionById(m, 'xxx')); fail = fail + ~isempty(Model_getEventById(m, 'xxx')); fail = fail + ~isempty(Model_getAssignmentRuleByVariable(m, 'xxx')); fail = fail + ~isempty(Model_getRateRuleByVariable(m, 'xxx')); num = 29; disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testModel.m0000644000000000000000000001440111703262262024727 0ustar rootrootfunction [fail, num, message] = testModel() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Model'); disp('Testing L1V1'); obj = Model_create(1, 1); attributes = {... {'SBML_level', 10}... {'SBML_version', 10}... {'Name', 1}... {'UnitDefinition', 9}... {'Compartment', 9}... {'Species', 9}... {'Parameter', 9}... {'Rule', 9}... {'Reaction', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Model', fail, num, message); disp('Testing L1V2'); obj = Model_create(1, 2); attributes = {... {'SBML_level', 10}... {'SBML_version', 10}... {'Name', 1}... {'UnitDefinition', 9}... {'Compartment', 9}... {'Species', 9}... {'Parameter', 9}... {'Rule', 9}... {'Reaction', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Model', fail, num, message); disp('Testing L2V1'); obj = Model_create(2, 1); attributes = {... {'Metaid', 1}... {'SBML_level', 10}... {'SBML_version', 10}... {'Name', 1}... {'Id', 1}... {'FunctionDefinition', 9}... {'UnitDefinition', 9}... {'Compartment', 9}... {'Species', 9}... {'Parameter', 9}... {'Rule', 9}... {'Reaction', 9}... {'Event', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Model', fail, num, message); disp('Testing L2V2'); obj = Model_create(2, 2); attributes = {... {'Metaid', 1}... {'SBML_level', 10}... {'SBML_version', 10}... {'Name', 1}... {'Id', 1}... {'SBOTerm', 2}... {'FunctionDefinition', 9}... {'UnitDefinition', 9}... {'CompartmentType', 9}... {'SpeciesType', 9}... {'Compartment', 9}... {'Species', 9}... {'Parameter', 9}... {'InitialAssignment', 9}... {'Rule', 9}... {'Constraint', 9}... {'Reaction', 9}... {'Event', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Model', fail, num, message); disp('Testing L2V3'); obj = Model_create(2, 3); attributes = {... {'Metaid', 1}... {'SBML_level', 10}... {'SBML_version', 10}... {'Name', 1}... {'Id', 1}... {'SBOTerm', 2}... {'FunctionDefinition', 9}... {'UnitDefinition', 9}... {'CompartmentType', 9}... {'SpeciesType', 9}... {'Compartment', 9}... {'Species', 9}... {'Parameter', 9}... {'InitialAssignment', 9}... {'Rule', 9}... {'Constraint', 9}... {'Reaction', 9}... {'Event', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Model', fail, num, message); disp('Testing L2V4'); obj = Model_create(2, 4); attributes = {... {'Metaid', 1}... {'SBML_level', 10}... {'SBML_version', 10}... {'Name', 1}... {'Id', 1}... {'SBOTerm', 2}... {'FunctionDefinition', 9}... {'UnitDefinition', 9}... {'CompartmentType', 9}... {'SpeciesType', 9}... {'Compartment', 9}... {'Species', 9}... {'Parameter', 9}... {'InitialAssignment', 9}... {'Rule', 9}... {'Constraint', 9}... {'Reaction', 9}... {'Event', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Model', fail, num, message); disp('Testing L3V1'); obj = Model_create(3, 1); attributes = {... {'Metaid', 1}... {'SBML_level', 10}... {'SBML_version', 10}... {'Name', 1}... {'Id', 1}... {'SBOTerm', 2}... {'FunctionDefinition', 9}... {'UnitDefinition', 9}... {'Compartment', 9}... {'Species', 9}... {'Parameter', 9}... {'InitialAssignment', 9}... {'Rule', 9}... {'Constraint', 9}... {'Reaction', 9}... {'Event', 9}... {'SubstanceUnits', 1}... {'TimeUnits', 1}... {'LengthUnits', 1}... {'AreaUnits', 1}... {'VolumeUnits', 1}... {'ExtentUnits', 1}... {'ConversionFactor', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Model', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testLocalParameter.m0000644000000000000000000000553111703262262026566 0ustar rootrootfunction [fail, num, message] = testLocalParameter() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing LocalParameter'); disp('Testing L1V1'); obj = LocalParameter_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'LocalParameter', fail, num, message); disp('Testing L1V2'); obj = LocalParameter_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'LocalParameter', fail, num, message); disp('Testing L2V1'); obj = LocalParameter_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'LocalParameter', fail, num, message); disp('Testing L2V2'); obj = LocalParameter_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'LocalParameter', fail, num, message); disp('Testing L2V3'); obj = LocalParameter_create(2, 3); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'LocalParameter', fail, num, message); disp('Testing L2V4'); obj = LocalParameter_create(2, 4); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'LocalParameter', fail, num, message); disp('Testing L3V1'); obj = LocalParameter_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Value', 3}... {'Units', 1}... }; [fail, num, message] = testObject(obj, attributes, 'LocalParameter', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testKineticLaw.m0000644000000000000000000000740611703262262025730 0ustar rootrootfunction [fail, num, message] = testKineticLaw() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing KineticLaw'); disp('Testing L1V1'); obj = KineticLaw_create(1, 1); attributes = {... {'Formula', 1}... {'Parameter', 9}... {'TimeUnits', 1}... {'SubstanceUnits', 1}... }; [fail, num, message] = testObject(obj, attributes, 'KineticLaw', fail, num, message); disp('Testing L1V2'); obj = KineticLaw_create(1, 2); attributes = {... {'Formula', 1}... {'Parameter', 9}... {'TimeUnits', 1}... {'SubstanceUnits', 1}... }; [fail, num, message] = testObject(obj, attributes, 'KineticLaw', fail, num, message); disp('Testing L2V1'); obj = KineticLaw_create(2, 1); attributes = {... {'Metaid', 1}... {'Formula', 1}... {'Math', 1}... {'Parameter', 9}... {'TimeUnits', 1}... {'SubstanceUnits', 1}... }; [fail, num, message] = testObject(obj, attributes, 'KineticLaw', fail, num, message); disp('Testing L2V2'); obj = KineticLaw_create(2, 2); attributes = {... {'Metaid', 1}... {'Formula', 1}... {'Math', 1}... {'Parameter', 9}... {'SBOTerm', 2}... }; [fail, num, message] = testObject(obj, attributes, 'KineticLaw', fail, num, message); disp('Testing L2V3'); obj = KineticLaw_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... {'Math', 1}... {'Parameter', 9}... }; [fail, num, message] = testObject(obj, attributes, 'KineticLaw', fail, num, message); disp('Testing L2V4'); obj = KineticLaw_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... {'Math', 1}... {'Parameter', 9}... }; [fail, num, message] = testObject(obj, attributes, 'KineticLaw', fail, num, message); disp('Testing L3V1'); obj = KineticLaw_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... {'LocalParameter', 9}... }; [fail, num, message] = testObject(obj, attributes, 'KineticLaw', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testIsInRules.m0000644000000000000000000001124411703262262025546 0ustar rootrootfunction fail = testIsInRules() % fail = 0; numTests = 36; m = TranslateSBML('../../Test/test-data/testIsInRules.xml'); rules = m.rule; s1 = m.species(1); s2 = m.species(2); s3 = m.species(3); c1 = m.compartment(1); c2 = m.compartment(2); c3 = m.compartment(3); p1 = m.parameter(1); p2 = m.parameter(2); p3 = m.parameter(3); sr1 = m.reaction(1).product(1); sr2 = m.reaction(1).product(2); sr3 = m.reaction(1).product(3); fail = fail + TestFunction('Compartment_isInAlgebraicRule', 2, 1, c1, rules, 1); fail = fail + TestFunction('Compartment_isInAlgebraicRule', 2, 1, c2, rules, 0); fail = fail + TestFunction('Compartment_isInAlgebraicRule', 2, 1, c3, rules, 0); fail = fail + TestFunction('Species_isInAlgebraicRule', 2, 1, s1, rules, 0); fail = fail + TestFunction('Species_isInAlgebraicRule', 2, 1, s2, rules, 1); fail = fail + TestFunction('Species_isInAlgebraicRule', 2, 1, s3, rules, 0); fail = fail + TestFunction('Parameter_isInAlgebraicRule', 2, 1, p1, rules, 0); fail = fail + TestFunction('Parameter_isInAlgebraicRule', 2, 1, p2, rules, 0); fail = fail + TestFunction('Parameter_isInAlgebraicRule', 2, 1, p3, rules, 1); fail = fail + TestFunction('SpeciesReference_isInAlgebraicRule', 2, 1, sr1, rules, 1); fail = fail + TestFunction('SpeciesReference_isInAlgebraicRule', 2, 1, sr2, rules, 0); fail = fail + TestFunction('SpeciesReference_isInAlgebraicRule', 2, 1, sr3, rules, 0); fail = fail + TestFunction('Compartment_isAssignedByRule', 2, 1, c1, rules, 0); fail = fail + TestFunction('Compartment_isAssignedByRule', 2, 1, c2, rules, 3); fail = fail + TestFunction('Compartment_isAssignedByRule', 2, 1, c3, rules, 0); fail = fail + TestFunction('Species_isAssignedByRule', 2, 1, s1, rules, 4); fail = fail + TestFunction('Species_isAssignedByRule', 2, 1, s2, rules, 0); fail = fail + TestFunction('Species_isAssignedByRule', 2, 1, s3, rules, 0); fail = fail + TestFunction('Parameter_isAssignedByRule', 2, 1, p1, rules, 2); fail = fail + TestFunction('Parameter_isAssignedByRule', 2, 1, p2, rules, 0); fail = fail + TestFunction('Parameter_isAssignedByRule', 2, 1, p3, rules, 0); fail = fail + TestFunction('SpeciesReference_isAssignedByRule', 2, 1, sr1, rules, 0); fail = fail + TestFunction('SpeciesReference_isAssignedByRule', 2, 1, sr2, rules, 5); fail = fail + TestFunction('SpeciesReference_isAssignedByRule', 2, 1, sr3, rules, 0); fail = fail + TestFunction('Compartment_isAssignedByRateRule', 2, 1, c1, rules, 0); fail = fail + TestFunction('Compartment_isAssignedByRateRule', 2, 1, c2, rules, 0); fail = fail + TestFunction('Compartment_isAssignedByRateRule', 2, 1, c3, rules, 8); fail = fail + TestFunction('Species_isAssignedByRateRule', 2, 1, s1, rules, 0); fail = fail + TestFunction('Species_isAssignedByRateRule', 2, 1, s2, rules, 0); fail = fail + TestFunction('Species_isAssignedByRateRule', 2, 1, s3, rules, 9); fail = fail + TestFunction('Parameter_isAssignedByRateRule', 2, 1, p1, rules, 0); fail = fail + TestFunction('Parameter_isAssignedByRateRule', 2, 1, p2, rules, 7); fail = fail + TestFunction('Parameter_isAssignedByRateRule', 2, 1, p3, rules, 0); fail = fail + TestFunction('SpeciesReference_isAssignedByRateRule', 2, 1, sr1, rules, 0); fail = fail + TestFunction('SpeciesReference_isAssignedByRateRule', 2, 1, sr2, rules, 0); fail = fail + TestFunction('SpeciesReference_isAssignedByRateRule', 2, 1, sr3, rules, 6); disp(sprintf('Number tests: %d', numTests)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((numTests-fail)/numTests)*100)); y = fail; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testInitialAssignment.m0000644000000000000000000000636511703262262027323 0ustar rootrootfunction [fail, num, message] = testInitialAssignment() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing InitialAssignment'); disp('Testing L1V1'); obj = InitialAssignment_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'InitialAssignment', fail, num, message); disp('Testing L1V2'); obj = InitialAssignment_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'InitialAssignment', fail, num, message); disp('Testing L2V1'); obj = InitialAssignment_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'InitialAssignment', fail, num, message); disp('Testing L2V2'); obj = InitialAssignment_create(2, 2); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Symbol', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'InitialAssignment', fail, num, message); disp('Testing L2V3'); obj = InitialAssignment_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Symbol', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'InitialAssignment', fail, num, message); disp('Testing L2V4'); obj = InitialAssignment_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Symbol', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'InitialAssignment', fail, num, message); disp('Testing L3V1'); obj = InitialAssignment_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Symbol', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'InitialAssignment', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testFunctionDefinition.m0000644000000000000000000000675611703262262027503 0ustar rootrootfunction [fail, num, message] = testFunctionDefinition() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing FunctionDefinition'); disp('Testing L1V1'); obj = FunctionDefinition_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FunctionDefinition', fail, num, message); disp('Testing L1V2'); obj = FunctionDefinition_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FunctionDefinition', fail, num, message); disp('Testing L2V1'); obj = FunctionDefinition_create(2, 1); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'FunctionDefinition', fail, num, message); disp('Testing L2V2'); obj = FunctionDefinition_create(2, 2); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'FunctionDefinition', fail, num, message); disp('Testing L2V3'); obj = FunctionDefinition_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'FunctionDefinition', fail, num, message); disp('Testing L2V4'); obj = FunctionDefinition_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'FunctionDefinition', fail, num, message); disp('Testing L3V1'); obj = FunctionDefinition_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'FunctionDefinition', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testEventAssignment.m0000644000000000000000000000651311703262262027006 0ustar rootrootfunction [fail, num, message] = testEventAssignment() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing EventAssignment'); disp('Testing L1V1'); obj = EventAssignment_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'EventAssignment', fail, num, message); disp('Testing L1V2'); obj = EventAssignment_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'EventAssignment', fail, num, message); disp('Testing L2V1'); obj = EventAssignment_create(2, 1); attributes = {... {'Metaid', 1}... {'Variable', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'EventAssignment', fail, num, message); disp('Testing L2V2'); obj = EventAssignment_create(2, 2); attributes = {... {'Metaid', 1}... {'Variable', 1}... {'SBOTerm', 2}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'EventAssignment', fail, num, message); disp('Testing L2V3'); obj = EventAssignment_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Variable', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'EventAssignment', fail, num, message); disp('Testing L2V4'); obj = EventAssignment_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Variable', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'EventAssignment', fail, num, message); disp('Testing L3V1'); obj = EventAssignment_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Variable', 1}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'EventAssignment', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testEvent.m0000644000000000000000000000752211703262262024756 0ustar rootrootfunction [fail, num, message] = testEvent() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Event'); disp('Testing L1V1'); obj = Event_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Event', fail, num, message); disp('Testing L1V2'); obj = Event_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Event', fail, num, message); disp('Testing L2V1'); obj = Event_create(2, 1); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'Trigger', 1}... {'Delay', 1}... {'TimeUnits', 1}... {'EventAssignment', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Event', fail, num, message); disp('Testing L2V2'); obj = Event_create(2, 2); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'Trigger', 1}... {'Delay', 1}... {'TimeUnits', 1}... {'SBOTerm', 2}... {'EventAssignment', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Event', fail, num, message); disp('Testing L2V3'); obj = Event_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'Trigger', 9}... {'Delay', 9}... {'EventAssignment', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Event', fail, num, message); disp('Testing L2V4'); obj = Event_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'UseValuesFromTriggerTime', 7}... {'Trigger', 9}... {'Delay', 9}... {'EventAssignment', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Event', fail, num, message); disp('Testing L3V1'); obj = Event_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'UseValuesFromTriggerTime', 7}... {'Trigger', 9}... {'Delay', 9}... {'Priority', 9}... {'EventAssignment', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Event', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testDelay.m0000644000000000000000000000551411703262262024732 0ustar rootrootfunction [fail, num, message] = testDelay() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Delay'); disp('Testing L1V1'); obj = Delay_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Delay', fail, num, message); disp('Testing L1V2'); obj = Delay_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Delay', fail, num, message); disp('Testing L2V1'); obj = Delay_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Delay', fail, num, message); disp('Testing L2V2'); obj = Delay_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Delay', fail, num, message); disp('Testing L2V3'); obj = Delay_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Delay', fail, num, message); disp('Testing L2V4'); obj = Delay_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Delay', fail, num, message); disp('Testing L3V1'); obj = Delay_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Delay', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/TestCreate.m0000644000000000000000000000540311703262262025034 0ustar rootrootfunction y = TestCreate() % fail = 0; numTests = 0; warning('off', 'Warn:InvalidLV'); if exist('OCTAVE_VERSION') warning('off', 'Octave:divide-by-zero'); end; disp('Testing create functions'); typecodes = {'SBML_ALGEBRAIC_RULE', 'SBML_ASSIGNMENT_RULE', ... 'SBML_COMPARTMENT', 'SBML_COMPARTMENT_TYPE', 'SBML_COMPARTMENT_VOLUME_RULE', ... 'SBML_CONSTRAINT', 'SBML_DELAY', 'SBML_EVENT', 'SBML_EVENT_ASSIGNMENT', ... 'SBML_FUNCTION_DEFINITION', 'SBML_INITIAL_ASSIGNMENT', 'SBML_KINETIC_LAW', ... 'SBML_LOCAL_PARAMETER', 'SBML_MODEL', 'SBML_MODIFIER_SPECIES_REFERENCE', ... 'SBML_PARAMETER', 'SBML_PARAMETER_RULE', 'SBML_PRIORITY', 'SBML_RATE_RULE', ... 'SBML_REACTION', 'SBML_SPECIES', 'SBML_SPECIES_CONCENTRATION_RULE', ... 'SBML_SPECIES_REFERENCE', 'SBML_SPECIES_TYPE', 'SBML_STOICHIOMETRY_MATH', ... 'SBML_TRIGGER', 'SBML_UNIT', 'SBML_UNIT_DEFINITION'}; warning('off', 'Warn:InvalidLV'); for i = 1:length(typecodes) for level = 1:3 switch (level) case 1 lastver = 2; case 2 lastver = 4; case 3 lastver = 1; otherwise lastver = 1; end; for version = 1:lastver warning('off', 'Warn:InvalidLV'); obj = Object_create(typecodes{i} ,level, version); numTests = numTests+1; if (~isempty(obj) && ~isValid(obj, level, version)) fail = fail + 1; end; end; end; end; warning('on', 'Warn:InvalidLV'); disp(sprintf('Number tests: %d', numTests)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((numTests-fail)/numTests)*100)); y = fail; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testConstraint.m0000644000000000000000000000621111703262262026013 0ustar rootrootfunction [fail, num, message] = testConstraint() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Constraint'); disp('Testing L1V1'); obj = Constraint_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Constraint', fail, num, message); disp('Testing L1V2'); obj = Constraint_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Constraint', fail, num, message); disp('Testing L2V1'); obj = Constraint_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Constraint', fail, num, message); disp('Testing L2V2'); obj = Constraint_create(2, 2); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... {'Message', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Constraint', fail, num, message); disp('Testing L2V3'); obj = Constraint_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... {'Message', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Constraint', fail, num, message); disp('Testing L2V4'); obj = Constraint_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... {'Message', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Constraint', fail, num, message); disp('Testing L3V1'); obj = Constraint_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Math', 1}... {'Message', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Constraint', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testComponents.m0000644000000000000000000000615111703262262026017 0ustar rootrootfunction [fail] = testComponents() % fail = 0; num = 0; message = {}; [f, n, m] = testAlgebraicRule; fail = fail + f; num = num + n; [f, n, m] = testAssignmentRule; fail = fail + f; num = num + n; [f, n, m] = testCompartment; fail = fail + f; num = num + n; [f, n, m] = testCompartmentType; fail = fail + f; num = num + n; [f, n, m] = testCompartmentVolumeRule; fail = fail + f; num = num + n; [f, n, m] = testConstraint; fail = fail + f; num = num + n; [f, n, m] = testDelay; fail = fail + f; num = num + n; [f, n, m] = testEvent; fail = fail + f; num = num + n; [f, n, m] = testEventAssignment; fail = fail + f; num = num + n; [f, n, m] = testFunctionDefinition; fail = fail + f; num = num + n; [f, n, m] = testInitialAssignment; fail = fail + f; num = num + n; [f, n, m] = testKineticLaw; fail = fail + f; num = num + n; [f, n, m] = testLocalParameter; fail = fail + f; num = num + n; [f, n, m] = testModel; fail = fail + f; num = num + n; [f, n, m] = testModifierSpeciesReference; fail = fail + f; num = num + n; [f, n, m] = testParameter; fail = fail + f; num = num + n; [f, n, m] = testParameterRule; fail = fail + f; num = num + n; [f, n, m] = testPriority; fail = fail + f; num = num + n; [f, n, m] = testRateRule; fail = fail + f; num = num + n; [f, n, m] = testReaction; fail = fail + f; num = num + n; [f, n, m] = testSpecies; fail = fail + f; num = num + n; [f, n, m] = testSpeciesConcentrationRule; fail = fail + f; num = num + n; [f, n, m] = testSpeciesReference; fail = fail + f; num = num + n; [f, n, m] = testSpeciesType; fail = fail + f; num = num + n; [f, n, m] = testStoichiometryMath; fail = fail + f; num = num + n; [f, n, m] = testTrigger; fail = fail + f; num = num + n; [f, n, m] = testUnit; fail = fail + f; num = num + n; [f, n, m] = testUnitDefinition; fail = fail + f; num = num + n; disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testCompartmentVolumeRule.m0000644000000000000000000000575111703262262030210 0ustar rootrootfunction [fail, num, message] = testCompartmentVolumeRule() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing CompartmentVolumeRule'); disp('Testing L1V1'); obj = CompartmentVolumeRule_create(1, 1); attributes = {... {'Type', 8}... {'Formula', 1}... {'Compartment', 1}... }; [fail, num, message] = testObject(obj, attributes, 'CompartmentVolumeRule', fail, num, message); disp('Testing L1V2'); obj = CompartmentVolumeRule_create(1, 2); attributes = {... {'Type', 8}... {'Formula', 1}... {'Compartment', 1}... }; [fail, num, message] = testObject(obj, attributes, 'CompartmentVolumeRule', fail, num, message); disp('Testing L2V1'); obj = CompartmentVolumeRule_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'CompartmentVolumeRule', fail, num, message); disp('Testing L2V2'); obj = CompartmentVolumeRule_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'CompartmentVolumeRule', fail, num, message); disp('Testing L2V3'); obj = CompartmentVolumeRule_create(2, 3); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'CompartmentVolumeRule', fail, num, message); disp('Testing L2V4'); obj = CompartmentVolumeRule_create(2, 4); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'CompartmentVolumeRule', fail, num, message); disp('Testing L3V1'); obj = CompartmentVolumeRule_create(3, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'CompartmentVolumeRule', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testCompartmentType.m0000644000000000000000000000603511703262262027026 0ustar rootrootfunction [fail, num, message] = testCompartmentType() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing CompartmentType'); disp('Testing L1V1'); obj = CompartmentType_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'CompartmentType', fail, num, message); disp('Testing L1V2'); obj = CompartmentType_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'CompartmentType', fail, num, message); disp('Testing L2V1'); obj = CompartmentType_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'CompartmentType', fail, num, message); disp('Testing L2V2'); obj = CompartmentType_create(2, 2); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... }; [fail, num, message] = testObject(obj, attributes, 'CompartmentType', fail, num, message); disp('Testing L2V3'); obj = CompartmentType_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... }; [fail, num, message] = testObject(obj, attributes, 'CompartmentType', fail, num, message); disp('Testing L2V4'); obj = CompartmentType_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... }; [fail, num, message] = testObject(obj, attributes, 'CompartmentType', fail, num, message); disp('Testing L3V1'); obj = CompartmentType_create(3, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'CompartmentType', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testCompartment.m0000644000000000000000000001057111703262262026164 0ustar rootrootfunction [fail, num, message] = testCompartment() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Compartment'); disp('Testing L1V1'); obj = Compartment_create(1, 1); attributes = {... {'Name', 1}... {'Volume', 3}... {'Units', 1}... {'Outside', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Compartment', fail, num, message); disp('Testing L1V2'); obj = Compartment_create(1, 2); attributes = {... {'Name', 1}... {'Volume', 3}... {'Units', 1}... {'Outside', 1}... }; [fail, num, message] = testObject(obj, attributes, 'Compartment', fail, num, message); disp('Testing L2V1'); obj = Compartment_create(2, 1); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'SpatialDimensions', 6}... {'Size', 3}... {'Units', 1}... {'Outside', 1}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Compartment', fail, num, message); disp('Testing L2V2'); obj = Compartment_create(2, 2); attributes = {... {'Metaid', 1}... {'Name', 1}... {'Id', 1}... {'CompartmentType', 1}... {'SpatialDimensions', 6}... {'Size', 3}... {'Units', 1}... {'Outside', 1}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Compartment', fail, num, message); disp('Testing L2V3'); obj = Compartment_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'CompartmentType', 1}... {'SpatialDimensions', 6}... {'Size', 3}... {'Units', 1}... {'Outside', 1}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Compartment', fail, num, message); disp('Testing L2V4'); obj = Compartment_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'CompartmentType', 1}... {'SpatialDimensions', 6}... {'Size', 3}... {'Units', 1}... {'Outside', 1}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Compartment', fail, num, message); disp('Testing L3V1'); obj = Compartment_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Name', 1}... {'Id', 1}... {'SpatialDimensions', 3}... {'Size', 3}... {'Units', 1}... {'Constant', 7}... }; [fail, num, message] = testObject(obj, attributes, 'Compartment', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testAssignmentRule.m0000644000000000000000000000651211703262262026633 0ustar rootrootfunction [fail, num, message] = testAssignmentRule() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing AssignmentRule'); disp('Testing L1V1'); obj = AssignmentRule_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'AssignmentRule', fail, num, message); disp('Testing L1V2'); obj = AssignmentRule_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'AssignmentRule', fail, num, message); disp('Testing L2V1'); obj = AssignmentRule_create(2, 1); attributes = {... {'Metaid', 1}... {'Formula', 1}... {'Variable', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AssignmentRule', fail, num, message); disp('Testing L2V2'); obj = AssignmentRule_create(2, 2); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... {'Variable', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AssignmentRule', fail, num, message); disp('Testing L2V3'); obj = AssignmentRule_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... {'Variable', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AssignmentRule', fail, num, message); disp('Testing L2V4'); obj = AssignmentRule_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... {'Variable', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AssignmentRule', fail, num, message); disp('Testing L3V1'); obj = AssignmentRule_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... {'Variable', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AssignmentRule', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Test/testAlgebraicRule.m0000644000000000000000000000636711703262262026404 0ustar rootrootfunction [fail, num, message] = testAlgebraicRule() % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing AlgebraicRule'); disp('Testing L1V1'); obj = AlgebraicRule_create(1, 1); attributes = {... {'Formula', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AlgebraicRule', fail, num, message); disp('Testing L1V2'); obj = AlgebraicRule_create(1, 2); attributes = {... {'Formula', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AlgebraicRule', fail, num, message); disp('Testing L2V1'); obj = AlgebraicRule_create(2, 1); attributes = {... {'Metaid', 1}... {'Formula', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AlgebraicRule', fail, num, message); disp('Testing L2V2'); obj = AlgebraicRule_create(2, 2); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AlgebraicRule', fail, num, message); disp('Testing L2V3'); obj = AlgebraicRule_create(2, 3); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AlgebraicRule', fail, num, message); disp('Testing L2V4'); obj = AlgebraicRule_create(2, 4); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AlgebraicRule', fail, num, message); disp('Testing L3V1'); obj = AlgebraicRule_create(3, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Formula', 1}... }; [fail, num, message] = testObject(obj, attributes, 'AlgebraicRule', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/0000755000000000000000000000000011704572246025215 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/temp.m0000644000000000000000000000000011626402770026323 0ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/propagateLevelVersion.m0000644000000000000000000000525111703262304031704 0ustar rootrootfunction model = propagateLevelVersion(SBMLModel) % SBMLModel = propagateLevelVersion(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with level and version fields added to all % sub structures % % *NOTE:* This function facilitates keeping track of the level and version % of sub objects within a model % %get level and version and check the input arguments are appropriate if ~isValidSBML_Model(SBMLModel) error('first argument must be an SBMLModel structure'); end; level = SBMLModel.SBML_level; version = SBMLModel.SBML_version; model = addLV('SBML_MODEL', SBMLModel, level, version); function model = addLV(typecode, model, level, version) fields = getFieldnames(typecode, level, version); for i=1:length(fields) subcomp = getfield(model, fields{i}); if isstruct(subcomp) if length(subcomp) > 0 model = setfield(model, fields{i}, addLevelVersion(subcomp, level, version)); end; end; end; function retStr = addLevelVersion(substr, level, version) if length(substr) == 1 retStr = addLevelVersionStruct(substr, level, version); retStr = addLV(substr.typecode, retStr, level, version); else for i=1:length(substr) retStr(i) = addLevelVersionStruct(substr(i), level, version); retStr(i) = addLV(substr(i).typecode, retStr(i), level, version); end; end; function retStr = addLevelVersionStruct(substr, level, version) retStr = substr; retStr.level = level; retStr.version = version; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/isValidLevelVersionCombination.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/isValidLevelVersionCombin0000644000000000000000000000441411703262304032212 0ustar rootrootfunction valid = isValidLevelVersionCombination(level, version) % valid = isValidLevelVersionCombination(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. valid = 1 if the level and version combinbation represent a valid % specification of SBML supported by SBMLToolbox % % *NOTE:* This function causes an error if the level/version arguments do % not represent a valid supported SBML format % valid = 1; if ~isIntegralNumber(level) error('level must be an integer'); elseif ~isIntegralNumber(version) error('version must be an integer'); end; if (level < 1 || level > 3) error('current SBML levels are 1, 2 or 3'); end; if (level == 1) if (version < 1 || version > 2) error('SBMLToolbox supports versions 1-2 of SBML Level 1'); end; elseif (level == 2) if (version < 1 || version > 4) error('SBMLToolbox supports versions 1-4 of SBML Level 2'); end; elseif (level == 3) if (version ~= 1) error('SBMLToolbox supports only version 1 of SBML Level 3'); end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getUnitFieldnames.m0000644000000000000000000000766411703262304031005 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getUnitFieldnames(level, ... version) % [fieldnames, num] = getUnitFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Unit structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'kind', ... 'exponent', ... 'scale', ... }; nNumberFields = 6; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'kind', ... 'exponent', ... 'scale', ... 'multiplier', ... 'offset', ... }; nNumberFields = 9; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'kind', ... 'exponent', ... 'scale', ... 'multiplier', ... }; nNumberFields = 8; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'kind', ... 'exponent', ... 'scale', ... 'multiplier', ... }; nNumberFields = 9; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'kind', ... 'exponent', ... 'scale', ... 'multiplier', ... }; nNumberFields = 9; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'kind', ... 'exponent', ... 'scale', ... 'multiplier', ... }; nNumberFields = 9; end; end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getUnitDefinitionFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getUnitDefinitionFieldnam0000644000000000000000000000725511703262304032227 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getUnitDefinitionFieldnames(level, ... version) % [fieldnames, num] = getUnitDefinitionFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML UnitDefinition structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'name', ... 'unit', ... }; nNumberFields = 5; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'unit', ... }; nNumberFields = 7; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'unit', ... }; nNumberFields = 7; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'unit', ... }; nNumberFields = 8; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'unit', ... }; nNumberFields = 8; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'unit', ... }; nNumberFields = 8; end; end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getUnitDefinitionDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getUnitDefinitionDefaultV0000644000000000000000000000676011703262304032222 0ustar rootrootfunction [defaultValues] = getUnitDefinitionDefaultValues(level, version) % [values] = getUnitDefinitionDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML UnitDefinition structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML UnitDefinition structure can be found using % the function `getUnitDefinitionFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_UNIT_DEFINITION', ... '', ... '', ... '', ... [], ... }; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_UNIT_DEFINITION', ... '', ... '', ... '', ... '', ... '', ... [], ... }; elseif (version == 2) defaultValues = { 'SBML_UNIT_DEFINITION', ... '', ... '', ... '', ... '', ... '', ... [], ... }; elseif (version == 3) defaultValues = { 'SBML_UNIT_DEFINITION', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... [], ... }; elseif (version == 4) defaultValues = { 'SBML_UNIT_DEFINITION', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... [], ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_UNIT_DEFINITION', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... [], ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getUnitDefaultValues.m0000644000000000000000000000716611703262304031477 0ustar rootrootfunction [defaultValues] = getUnitDefaultValues(level, version) % [values] = getUnitDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Unit structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Unit structure can be found using % the function `getUnitFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_UNIT', ... '', ... '', ... '', ... int32(1), ... int32(0)', ... }; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_UNIT', ... '', ... '', ... '', ... '', ... int32(1), ... int32(0), ... 1.0, ... 0.0, ... }; elseif (version == 2) defaultValues = { 'SBML_UNIT', ... '', ... '', ... '', ... '', ... int32(1), ... int32(0), ... 1.0, ... }; elseif (version == 3) defaultValues = { 'SBML_UNIT', ... '', ... '', ... '', ... int32(-1), ... '', ... int32(1), ... int32(0), ... 1.0, ... }; elseif (version == 4) defaultValues = { 'SBML_UNIT', ... '', ... '', ... '', ... int32(-1), ... '', ... int32(1), ... int32(0), ... 1.0, ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_UNIT', ... '', ... '', ... '', ... int32(-1), ... '', ... 0/0, ... 0/0, ... 0/0, ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getTriggerFieldnames.m0000644000000000000000000000561611703262304031464 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getTriggerFieldnames(level, ... version) % [fieldnames, num] = getTriggerFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Trigger structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'persistent', ... 'initialValue', ... 'math', ... }; nNumberFields = 8; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getTriggerDefaultValues.m0000644000000000000000000000537411703262304032162 0ustar rootrootfunction [defaultValues] = getTriggerDefaultValues(level, version) % [values] = getTriggerDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Trigger structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Trigger structure can be found using % the function `getTriggerFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = []; elseif (version == 3) defaultValues = { 'SBML_TRIGGER', ... '', ... '', ... '', ... int32(-1), ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_TRIGGER', ... '', ... '', ... '', ... int32(-1), ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_TRIGGER', ... '', ... '', ... '', ... int32(-1), ... int32(0), ... int32(0), ... '', ... }; end; end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getStoichiometryMathFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getStoichiometryMathField0000644000000000000000000000522111703262304032246 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getStoichiometryMathFieldnames(level, ... version) % [fieldnames, num] = getStoichiometryMathFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML StoichiometryMath structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getStoichiometryMathDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getStoichiometryMathDefau0000644000000000000000000000510211703262304032245 0ustar rootrootfunction [defaultValues] = getStoichiometryMathDefaultValues(level, version) % [values] = getStoichiometryMathDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML StoichiometryMath structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML StoichiometryMath structure can be found using % the function `getStoichiometryMathFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = []; elseif (version == 3) defaultValues = { 'SBML_STOICHIOMETRY_MATH', ... '', ... '', ... '', ... int32(-1), ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_STOICHIOMETRY_MATH', ... '', ... '', ... '', ... int32(-1), ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = []; end; end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesTypeFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesTypeFieldnames.0000644000000000000000000000560711703262304032141 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getSpeciesTypeFieldnames(level, ... version) % [fieldnames, num] = getSpeciesTypeFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML SpeciesType structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... }; nNumberFields = 6; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... }; nNumberFields = 7; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... }; nNumberFields = 7; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesTypeDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesTypeDefaultValu0000644000000000000000000000541411703262304032224 0ustar rootrootfunction [defaultValues] = getSpeciesTypeDefaultValues(level, version) % [values] = getSpeciesTypeDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML SpeciesType structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML SpeciesType structure can be found using % the function `getSpeciesTypeFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = { 'SBML_SPECIES_TYPE', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 3) defaultValues = { 'SBML_SPECIES_TYPE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_SPECIES_TYPE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = []; end; end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesReferenceFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesReferenceFieldn0000644000000000000000000001034611703262304032166 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getSpeciesReferenceFieldnames(level, ... version) % [fieldnames, num] = getSpeciesReferenceFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML SpeciesReference structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'species', ... 'stoichiometry', ... 'denominator', ... }; nNumberFields = 6; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'species', ... 'stoichiometry', ... 'denominator', ... 'stoichiometryMath', ... }; nNumberFields = 8; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'species', ... 'id', ... 'name', ... 'sboTerm', ... 'stoichiometry', ... 'stoichiometryMath', ... }; nNumberFields = 10; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... 'stoichiometry', ... 'stoichiometryMath', ... }; nNumberFields = 10; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... 'stoichiometry', ... 'stoichiometryMath', ... }; nNumberFields = 10; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... 'stoichiometry', ... 'constant', ... 'isSetStoichiometry', ... }; nNumberFields = 11; end; end; ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesReferenceDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesReferenceDefaul0000644000000000000000000000753711703262304032175 0ustar rootrootfunction [defaultValues] = getSpeciesReferenceDefaultValues(level, version) % [values] = getSpeciesReferenceDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML SpeciesReference structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML SpeciesReference structure can be found using % the function `getSpeciesReferenceFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_SPECIES_REFERENCE', ... '', ... '', ... '', ... int32(1), ... int32(1), ... }; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_SPECIES_REFERENCE', ... '', ... '', ... '', ... '', ... 1, ... int32(1), ... '', ... }; elseif (version == 2) defaultValues = { 'SBML_SPECIES_REFERENCE', ... '', ... '', ... '', ... '', ... '', ... '', ... int32(-1), ... 1, ... '', ... }; elseif (version == 3) defaultValues = { 'SBML_SPECIES_REFERENCE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... 1, ... [], ... }; elseif (version == 4) defaultValues = { 'SBML_SPECIES_REFERENCE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... 1, ... [], ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_SPECIES_REFERENCE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... 0/0, ... int32(0), ... int32(0), ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesFieldnames.m0000644000000000000000000001442011703262304031445 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getSpeciesFieldnames(level, ... version) % [fieldnames, num] = getSpeciesFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Species structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'name', ... 'compartment', ... 'initialAmount', ... 'units', ... 'boundaryCondition', ... 'charge', ... 'isSetInitialAmount', ... 'isSetCharge', ... }; nNumberFields = 11; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'compartment', ... 'initialAmount', ... 'initialConcentration', ... 'substanceUnits', ... 'spatialSizeUnits', ... 'hasOnlySubstanceUnits', ... 'boundaryCondition', ... 'charge', ... 'constant', ... 'isSetInitialAmount', ... 'isSetInitialConcentration', ... 'isSetCharge', ... }; nNumberFields = 18; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'speciesType', ... 'compartment', ... 'initialAmount', ... 'initialConcentration', ... 'substanceUnits', ... 'spatialSizeUnits', ... 'hasOnlySubstanceUnits', ... 'boundaryCondition', ... 'charge', ... 'constant', ... 'isSetInitialAmount', ... 'isSetInitialConcentration', ... 'isSetCharge', ... }; nNumberFields = 19; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'speciesType', ... 'compartment', ... 'initialAmount', ... 'initialConcentration', ... 'substanceUnits', ... 'hasOnlySubstanceUnits', ... 'boundaryCondition', ... 'charge', ... 'constant', ... 'isSetInitialAmount', ... 'isSetInitialConcentration', ... 'isSetCharge', ... }; nNumberFields = 19; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'speciesType', ... 'compartment', ... 'initialAmount', ... 'initialConcentration', ... 'substanceUnits', ... 'hasOnlySubstanceUnits', ... 'boundaryCondition', ... 'charge', ... 'constant', ... 'isSetInitialAmount', ... 'isSetInitialConcentration', ... 'isSetCharge', ... }; nNumberFields = 19; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'compartment', ... 'initialAmount', ... 'initialConcentration', ... 'substanceUnits', ... 'hasOnlySubstanceUnits', ... 'boundaryCondition', ... 'constant', ... 'isSetInitialAmount', ... 'isSetInitialConcentration', ... 'conversionFactor', ... }; nNumberFields = 17; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesDefaultValues.m0000644000000000000000000001216511703262304032146 0ustar rootrootfunction [defaultValues] = getSpeciesDefaultValues(level, version) % [values] = getSpeciesDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Species structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Species structure can be found using % the function `getSpeciesFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_SPECIES', ... '', ... '', ... '', ... '', ... 0/0, ... '', ... int32(0), ... 0, ... int32(0), ... int32(0), ... }; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_SPECIES', ... '', ... '', ... '', ... '', ... '', ... '', ... 0/0, ... 0/0, ... '', ... '', ... int32(0), ... int32(0), ... 0, ... int32(0), ... int32(0), ... int32(0), ... int32(0), ... }; elseif (version == 2) defaultValues = { 'SBML_SPECIES', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... 0/0, ... 0/0, ... '', ... '', ... int32(0), ... int32(0), ... 0, ... int32(0), ... int32(0), ... int32(0), ... int32(0), ... }; elseif (version == 3) defaultValues = { 'SBML_SPECIES', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... 0/0, ... 0/0, ... '', ... int32(0), ... int32(0), ... 0, ... int32(0), ... int32(0), ... int32(0), ... int32(0), ... }; elseif (version == 4) defaultValues = { 'SBML_SPECIES', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... 0/0, ... 0/0, ... '', ... int32(0), ... int32(0), ... 0, ... int32(0), ... int32(0), ... int32(0), ... int32(0), ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_SPECIES', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... 0/0, ... 0/0, ... '', ... int32(0), ... int32(0), ... int32(0), ... int32(0), ... int32(0), ... '', ... }; end; end; ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesConcentrationRuleFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesConcentrationRu0000644000000000000000000000513011703262304032256 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getSpeciesConcentrationRuleFieldnames(level, ... version) % [fieldnames, num] = getSpeciesConcentrationRuleFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML SpeciesConcentrationRule structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'type', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 4) SBMLfieldnames = []; nNumberFields = 0; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesConcentrationRuleDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getSpeciesConcentrationRu0000644000000000000000000000477411703262304032273 0ustar rootrootfunction [defaultValues] = getSpeciesConcentrationRuleDefaultValues(level, version) % [values] = getSpeciesConcentrationRuleDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML SpeciesConcentrationRule structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML SpeciesConcentrationRule structure can be found using % the function `getSpeciesConcentrationRuleFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_SPECIES_CONCENTRATION_RULE', ... '', ... '', ... 'scalar', ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = []; elseif (version == 3) defaultValues = []; elseif (version == 4) defaultValues = []; end; elseif (level == 3) if (version == 1) defaultValues = []; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getRuleFieldnames.m0000644000000000000000000001067111703262304030765 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getRuleFieldnames(level, ... version) % [fieldnames, num] = getRuleFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Rule structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'type', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getReactionFieldnames.m0000644000000000000000000001174711703262304031627 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getReactionFieldnames(level, ... version) % [fieldnames, num] = getReactionFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Reaction structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'name', ... 'reactant', ... 'product', ... 'kineticLaw', ... 'reversible', ... 'fast', ... }; nNumberFields = 9; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'reactant', ... 'product', ... 'modifier', ... 'kineticLaw', ... 'reversible', ... 'fast', ... 'isSetFast', ... }; nNumberFields = 13; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'reactant', ... 'product', ... 'modifier', ... 'kineticLaw', ... 'reversible', ... 'fast', ... 'sboTerm', ... 'isSetFast', ... }; nNumberFields = 14; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'reactant', ... 'product', ... 'modifier', ... 'kineticLaw', ... 'reversible', ... 'fast', ... 'isSetFast', ... }; nNumberFields = 14; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'reactant', ... 'product', ... 'modifier', ... 'kineticLaw', ... 'reversible', ... 'fast', ... 'isSetFast', ... }; nNumberFields = 14; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'reactant', ... 'product', ... 'modifier', ... 'kineticLaw', ... 'reversible', ... 'fast', ... 'isSetFast', ... 'compartment', ... }; nNumberFields = 15; end; end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getReactionDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getReactionDefaultValues.0000644000000000000000000001067111703262304032142 0ustar rootrootfunction [defaultValues] = getReactionDefaultValues(level, version) % [values] = getReactionDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Reaction structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Reaction structure can be found using % the function `getReactionFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_REACTION', ... '', ... '', ... '', ... [], ... [], ... [], ... int32(0), ... int32(0), ... }; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_REACTION', ... '', ... '', ... '', ... '', ... '', ... [], ... [], ... [], ... [], ... int32(0), ... int32(0), ... int32(0), ... }; elseif (version == 2) defaultValues = { 'SBML_REACTION', ... '', ... '', ... '', ... '', ... '', ... [], ... [], ... [], ... [], ... int32(0), ... int32(0), ... int32(-1), ... int32(0), ... }; elseif (version == 3) defaultValues = { 'SBML_REACTION', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... [], ... [], ... [], ... [], ... int32(0), ... int32(0), ... int32(0), ... }; elseif (version == 4) defaultValues = { 'SBML_REACTION', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... [], ... [], ... [], ... [], ... int32(0), ... int32(0), ... int32(0), ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_REACTION', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... [], ... [], ... [], ... [], ... int32(0), ... int32(0), ... int32(0), ... '', ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getRateRuleFieldnames.m0000644000000000000000000001013611703262304031575 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getRateRuleFieldnames(level, ... version) % [fieldnames, num] = getRateRuleFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML RateRule structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getRateRuleDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getRateRuleDefaultValues.0000644000000000000000000000727011703262304032122 0ustar rootrootfunction [defaultValues] = getRateRuleDefaultValues(level, version) % [values] = getRateRuleDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML RateRule structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML RateRule structure can be found using % the function `getRateRuleFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_RATE_RULE', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 2) defaultValues = { 'SBML_RATE_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 3) defaultValues = { 'SBML_RATE_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_RATE_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_RATE_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getPriorityFieldnames.m0000644000000000000000000000426511703262304031701 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getPriorityFieldnames(level, ... version) % [fieldnames, num] = getPriorityFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Priority structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; end; end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getPriorityDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getPriorityDefaultValues.0000644000000000000000000000447611703262304032225 0ustar rootrootfunction [defaultValues] = getPriorityDefaultValues(level, version) % [values] = getPriorityDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Priority structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Priority structure can be found using % the function `getPriorityFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = []; elseif (version == 3) defaultValues = []; elseif (version == 4) defaultValues = []; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_PRIORITY', ... '', ... '', ... '', ... int32(-1), ... '', ... }; end; end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getParameterRuleFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getParameterRuleFieldname0000644000000000000000000000506711703262304032213 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getParameterRuleFieldnames(level, ... version) % [fieldnames, num] = getParameterRuleFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML ParameterRule structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'type', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 4) SBMLfieldnames = []; nNumberFields = 0; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getParameterRuleDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getParameterRuleDefaultVa0000644000000000000000000000467111703262304032202 0ustar rootrootfunction [defaultValues] = getParameterRuleDefaultValues(level, version) % [values] = getParameterRuleDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML ParameterRule structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML ParameterRule structure can be found using % the function `getParameterRuleFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_PARAMETER_RULE', ... '', ... '', ... 'scalar', ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = []; elseif (version == 3) defaultValues = []; elseif (version == 4) defaultValues = []; end; elseif (level == 3) if (version == 1) defaultValues = []; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getParameterFieldnames.m0000644000000000000000000001046711703262304032001 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getParameterFieldnames(level, ... version) % [fieldnames, num] = getParameterFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Parameter structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'name', ... 'value', ... 'units', ... 'isSetValue', ... }; nNumberFields = 7; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'value', ... 'units', ... 'constant', ... 'isSetValue', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'value', ... 'units', ... 'constant', ... 'sboTerm', ... 'isSetValue', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'value', ... 'units', ... 'constant', ... 'isSetValue', ... }; nNumberFields = 11; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'value', ... 'units', ... 'constant', ... 'isSetValue', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'value', ... 'units', ... 'constant', ... 'isSetValue', ... }; nNumberFields = 11; end; end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getParameterDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getParameterDefaultValues0000644000000000000000000000772411703262304032245 0ustar rootrootfunction [defaultValues] = getParameterDefaultValues(level, version) % [values] = getParameterDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Parameter structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Parameter structure can be found using % the function `getParameterFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_PARAMETER', ... '', ... '', ... '', ... 0/0, ... '', ... int32(0), ... }; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_PARAMETER', ... '', ... '', ... '', ... '', ... '', ... 0/0, ... '', ... int32(0), ... int32(0), ... }; elseif (version == 2) defaultValues = { 'SBML_PARAMETER', ... '', ... '', ... '', ... '', ... '', ... 0/0, ... '', ... int32(0), ... int32(-1), ... int32(0), ... }; elseif (version == 3) defaultValues = { 'SBML_PARAMETER', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... 0/0, ... '', ... int32(0), ... int32(0), ... }; elseif (version == 4) defaultValues = { 'SBML_PARAMETER', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... 0/0, ... '', ... int32(0), ... int32(0), ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_PARAMETER', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... 0/0, ... '', ... int32(0), ... int32(0), ... }; end; end; ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getModifierSpeciesReferenceFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getModifierSpeciesReferen0000644000000000000000000000702711703262304032215 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getModifierSpeciesReferenceFieldnames(level, ... version) % [fieldnames, num] = getModifierSpeciesReferenceFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML ModifierSpeciesReference structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'species', ... }; nNumberFields = 5; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'species', ... 'id', ... 'name', ... 'sboTerm', ... }; nNumberFields = 8; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... }; nNumberFields = 8; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... }; nNumberFields = 8; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'species', ... 'id', ... 'name', ... }; nNumberFields = 8; end; end; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getModifierSpeciesReferenceDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getModifierSpeciesReferen0000644000000000000000000000664311703262304032220 0ustar rootrootfunction [defaultValues] = getModifierSpeciesReferenceDefaultValues(level, version) % [values] = getModifierSpeciesReferenceDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML ModifierSpeciesReference structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML ModifierSpeciesReference structure can be found using % the function `getModifierSpeciesReferenceFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_MODIFIER_SPECIES_REFERENCE', ... '', ... '', ... '', ... '', ... }; elseif (version == 2) defaultValues = { 'SBML_MODIFIER_SPECIES_REFERENCE', ... '', ... '', ... '', ... '', ... '', ... '', ... int32(-1), ... }; elseif (version == 3) defaultValues = { 'SBML_MODIFIER_SPECIES_REFERENCE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_MODIFIER_SPECIES_REFERENCE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_MODIFIER_SPECIES_REFERENCE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getModelFieldnames.m0000644000000000000000000001504011703262304031111 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getModelFieldnames(level, ... version) % [fieldnames, num] = getModelFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Model structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'unitDefinition', ... 'compartment', ... 'species', ... 'parameter', ... 'rule', ... 'reaction', ... }; nNumberFields = 12; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'id', ... 'functionDefinition', ... 'unitDefinition', ... 'compartment', ... 'species', ... 'parameter', ... 'rule', ... 'reaction', ... 'event', ... }; nNumberFields = 16; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'id', ... 'sboTerm', ... 'functionDefinition', ... 'unitDefinition', ... 'compartmentType', ... 'speciesType', ... 'compartment', ... 'species', ... 'parameter', ... 'initialAssignment', ... 'rule', ... 'constraint', ... 'reaction', ... 'event', ... }; nNumberFields = 21; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'id', ... 'sboTerm', ... 'functionDefinition', ... 'unitDefinition', ... 'compartmentType', ... 'speciesType', ... 'compartment', ... 'species', ... 'parameter', ... 'initialAssignment', ... 'rule', ... 'constraint', ... 'reaction', ... 'event', ... }; nNumberFields = 21; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'id', ... 'sboTerm', ... 'functionDefinition', ... 'unitDefinition', ... 'compartmentType', ... 'speciesType', ... 'compartment', ... 'species', ... 'parameter', ... 'initialAssignment', ... 'rule', ... 'constraint', ... 'reaction', ... 'event', ... }; nNumberFields = 21; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'SBML_level', ... 'SBML_version', ... 'name', ... 'id', ... 'sboTerm', ... 'functionDefinition', ... 'unitDefinition', ... 'compartment', ... 'species', ... 'parameter', ... 'initialAssignment', ... 'rule', ... 'constraint', ... 'reaction', ... 'event', ... 'substanceUnits', ... 'timeUnits', ... 'lengthUnits', ... 'areaUnits', ... 'volumeUnits', ... 'extentUnits', ... 'conversionFactor', ... }; nNumberFields = 26; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getModelDefaultValues.m0000644000000000000000000001250511703262304031611 0ustar rootrootfunction [defaultValues] = getModelDefaultValues(level, version) % [values] = getModelDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Model structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Model structure can be found using % the function `getModelFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_MODEL', ... '', ... '', ... level, ... version, ... '', ... [], ... [], ... [], ... [], ... [], ... [], ... }; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_MODEL', ... '', ... '', ... '', ... level, ... version, ... '', ... '', ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... }; elseif (version == 2) defaultValues = { 'SBML_MODEL', ... '', ... '', ... '', ... level, ... version, ... '', ... '', ... int32(-1), ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... }; elseif (version == 3) defaultValues = { 'SBML_MODEL', ... '', ... '', ... '', ... level, ... version, ... '', ... '', ... int32(-1), ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... }; elseif (version == 4) defaultValues = { 'SBML_MODEL', ... '', ... '', ... '', ... level, ... version, ... '', ... '', ... int32(-1), ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_MODEL', ... '', ... '', ... '', ... level, ... version, ... '', ... '', ... int32(-1), ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... [], ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... }; end; end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getLocalParameterFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getLocalParameterFieldnam0000644000000000000000000000453011703262304032163 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getLocalParameterFieldnames(level, ... version) % [fieldnames, num] = getLocalParameterFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML LocalParameter structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'value', ... 'units', ... 'isSetValue', ... }; nNumberFields = 10; end; end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getLocalParameterDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getLocalParameterDefaultV0000644000000000000000000000472211703262304032161 0ustar rootrootfunction [defaultValues] = getLocalParameterDefaultValues(level, version) % [values] = getLocalParameterDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML LocalParameter structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML LocalParameter structure can be found using % the function `getLocalParameterFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = []; elseif (version == 3) defaultValues = []; elseif (version == 4) defaultValues = []; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_LOCAL_PARAMETER', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... 0/0, ... '', ... int32(0), ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getKineticLawFieldnames.m0000644000000000000000000000757611703262304032122 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getKineticLawFieldnames(level, ... version) % [fieldnames, num] = getKineticLawFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML KineticLaw structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'formula', ... 'parameter', ... 'timeUnits', ... 'substanceUnits', ... }; nNumberFields = 7; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'math', ... 'parameter', ... 'timeUnits', ... 'substanceUnits', ... }; nNumberFields = 9; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'math', ... 'parameter', ... 'sboTerm', ... }; nNumberFields = 8; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'math', ... 'parameter', ... }; nNumberFields = 8; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'math', ... 'parameter', ... }; nNumberFields = 8; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... 'localParameter', ... }; nNumberFields = 7; end; end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getKineticLawDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getKineticLawDefaultValue0000644000000000000000000000706111703262304032166 0ustar rootrootfunction [defaultValues] = getKineticLawDefaultValues(level, version) % [values] = getKineticLawDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML KineticLaw structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML KineticLaw structure can be found using % the function `getKineticLawFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_KINETIC_LAW', ... '', ... '', ... '', ... [], ... '', ... '', ... }; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_KINETIC_LAW', ... '', ... '', ... '', ... '', ... '', ... [], ... '', ... '', ... }; elseif (version == 2) defaultValues = { 'SBML_KINETIC_LAW', ... '', ... '', ... '', ... '', ... '', ... [], ... int32(-1), ... }; elseif (version == 3) defaultValues = { 'SBML_KINETIC_LAW', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... [], ... }; elseif (version == 4) defaultValues = { 'SBML_KINETIC_LAW', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... [], ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_KINETIC_LAW', ... '', ... '', ... '', ... int32(-1), ... '', ... [], ... }; end; end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getInitialAssignmentFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getInitialAssignmentField0000644000000000000000000000630711703262304032222 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getInitialAssignmentFieldnames(level, ... version) % [fieldnames, num] = getInitialAssignmentFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML InitialAssignment structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'symbol', ... 'math', ... }; nNumberFields = 7; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'symbol', ... 'math', ... }; nNumberFields = 7; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'symbol', ... 'math', ... }; nNumberFields = 7; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'symbol', ... 'math', ... }; nNumberFields = 7; end; end; ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getInitialAssignmentDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getInitialAssignmentDefau0000644000000000000000000000610411703262304032216 0ustar rootrootfunction [defaultValues] = getInitialAssignmentDefaultValues(level, version) % [values] = getInitialAssignmentDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML InitialAssignment structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML InitialAssignment structure can be found using % the function `getInitialAssignmentFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = { 'SBML_INITIAL_ASSIGNMENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; elseif (version == 3) defaultValues = { 'SBML_INITIAL_ASSIGNMENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_INITIAL_ASSIGNMENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_INITIAL_ASSIGNMENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; end; end; ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getFunctionDefinitionFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getFunctionDefinitionFiel0000644000000000000000000000706011703262304032227 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getFunctionDefinitionFieldnames(level, ... version) % [fieldnames, num] = getFunctionDefinitionFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML FunctionDefinition structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'math', ... }; nNumberFields = 7; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'math', ... }; nNumberFields = 8; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'math', ... }; nNumberFields = 8; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'math', ... }; nNumberFields = 8; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'math', ... }; nNumberFields = 8; end; end; ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getFunctionDefinitionDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getFunctionDefinitionDefa0000644000000000000000000000662611703262304032216 0ustar rootrootfunction [defaultValues] = getFunctionDefinitionDefaultValues(level, version) % [values] = getFunctionDefinitionDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML FunctionDefinition structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML FunctionDefinition structure can be found using % the function `getFunctionDefinitionFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_FUNCTION_DEFINITION', ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 2) defaultValues = { 'SBML_FUNCTION_DEFINITION', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... }; elseif (version == 3) defaultValues = { 'SBML_FUNCTION_DEFINITION', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_FUNCTION_DEFINITION', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_FUNCTION_DEFINITION', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getFieldnames.m0000644000000000000000000001344511703262304030137 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getFieldnames(typecode, ... level, version) % [fieldnames, num] = getFieldnames(typecode, level, version) % % Takes % % 1. typecode; a string representing the type of object being queried % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML structure of the given typecode, level and version % 2. the number of fieldnames % % done = 1; switch (typecode) case {'SBML_ALGEBRAIC_RULE', 'AlgebraicRule', 'algebraicRule'} fhandle = str2func('getAlgebraicRuleFieldnames'); case {'SBML_ASSIGNMENT_RULE', 'AssignmentRule', 'assignmentRule'} fhandle = str2func('getAssignmentRuleFieldnames'); case {'SBML_COMPARTMENT', 'Compartment', 'compartment'} fhandle = str2func('getCompartmentFieldnames'); case {'SBML_COMPARTMENT_TYPE', 'CompartmentType', 'compartmentType'} fhandle = str2func('getCompartmentTypeFieldnames'); case {'SBML_COMPARTMENT_VOLUME_RULE', 'CompartmentVolumeRule', 'compartmentVolumeRule'} fhandle = str2func('getCompartmentVolumeRuleFieldnames'); case {'SBML_CONSTRAINT', 'Constraint', 'constraint'} fhandle = str2func('getConstraintFieldnames'); case {'SBML_DELAY', 'Delay', 'delay'} fhandle = str2func('getDelayFieldnames'); case {'SBML_EVENT', 'Event', 'event'} fhandle = str2func('getEventFieldnames'); case {'SBML_EVENT_ASSIGNMENT', 'EventAssignment', 'eventAssignment'} fhandle = str2func('getEventAssignmentFieldnames'); case {'SBML_FUNCTION_DEFINITION', 'FunctionDefinition', 'functionDefinition'} fhandle = str2func('getFunctionDefinitionFieldnames'); case {'SBML_INITIAL_ASSIGNMENT', 'InitialAssignment', 'initialAssignment'} fhandle = str2func('getInitialAssignmentFieldnames'); case {'SBML_KINETIC_LAW', 'KineticLaw', 'kineticLaw'} fhandle = str2func('getKineticLawFieldnames'); case {'SBML_LOCAL_PARAMETER', 'LocalParameter', 'localParameter'} fhandle = str2func('getLocalParameterFieldnames'); case {'SBML_MODEL', 'Model', 'model'} fhandle = str2func('getModelFieldnames'); case {'SBML_MODIFIER_SPECIES_REFERENCE', 'ModifierSpeciesReference', 'modifierSpeciesReference'} fhandle = str2func('getModifierSpeciesReferenceFieldnames'); case {'SBML_PARAMETER', 'Parameter', 'parameter'} fhandle = str2func('getParameterFieldnames'); case {'SBML_PARAMETER_RULE', 'ParameterRule', 'parameterRule'} fhandle = str2func('getParameterRuleFieldnames'); case {'SBML_PRIORITY', 'Priority', 'priority'} fhandle = str2func('getPriorityFieldnames'); case {'SBML_RATE_RULE', 'RateRule', 'ruleRule'} fhandle = str2func('getRateRuleFieldnames'); case {'SBML_REACTION', 'Reaction', 'reaction'} fhandle = str2func('getReactionFieldnames'); case {'SBML_SPECIES', 'Species', 'species'} fhandle = str2func('getSpeciesFieldnames'); case {'SBML_SPECIES_CONCENTRATION_RULE', 'SpeciesConcentrationRule', 'speciesConcentrationRule'} fhandle = str2func('getSpeciesConcentrationRuleFieldnames'); case {'SBML_SPECIES_REFERENCE', 'SpeciesReference', 'speciesReference'} fhandle = str2func('getSpeciesReferenceFieldnames'); case {'SBML_SPECIES_TYPE', 'SpeciesType', 'speciesType'} fhandle = str2func('getSpeciesTypeFieldnames'); case {'SBML_STOICHIOMETRY_MATH', 'StoichiometryMath', 'stoichiometryMath'} fhandle = str2func('getStoichiometryMathFieldnames'); case {'SBML_TRIGGER', 'Trigger', 'trigger'} fhandle = str2func('getTriggerFieldnames'); case {'SBML_UNIT', 'Unit', 'unit'} fhandle = str2func('getUnitFieldnames'); case {'SBML_UNIT_DEFINITION', 'UnitDefinition', 'unitDefinition'} fhandle = str2func('getUnitDefinitionFieldnames'); otherwise done = 0; end; if done == 1 [SBMLfieldnames, nNumberFields] = feval(fhandle, level, version); else switch (typecode) case {'SBML_FBC_FLUXBOUND', 'FluxBound', 'fluxBound'} fhandle = str2func('getFluxBoundFieldnames'); case {'SBML_FBC_FLUXOBJECTIVE', 'FluxObjective', 'fluxObjective'} fhandle = str2func('getFluxObjectiveFieldnames'); case {'SBML_FBC_OBJECTIVE', 'Objective', 'objective'} fhandle = str2func('getObjectiveFieldnames'); case {'SBML_FBC_MODEL', 'FBCModel'} fhandle = str2func('getFBCModelFieldnames'); case {'SBML_FBC_SPECIES', 'FBCSpecies'} fhandle = str2func('getFBCSpeciesFieldnames'); otherwise error('%s\n%s', ... 'getFieldnames(typecode, level, version', ... 'typecode not recognised'); end; [SBMLfieldnames, nNumberFields] = feval(fhandle, level, version, 1); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getEventFieldnames.m0000644000000000000000000001016111703262304031131 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getEventFieldnames(level, ... version) % [fieldnames, num] = getEventFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Event structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'trigger', ... 'delay', ... 'timeUnits', ... 'eventAssignment', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'trigger', ... 'delay', ... 'timeUnits', ... 'sboTerm', ... 'eventAssignment', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'trigger', ... 'delay', ... 'eventAssignment', ... }; nNumberFields = 10; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'useValuesFromTriggerTime', ... 'trigger', ... 'delay', ... 'eventAssignment', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'useValuesFromTriggerTime', ... 'trigger', ... 'delay', ... 'priority', ... 'eventAssignment', ... }; nNumberFields = 12; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getEventDefaultValues.m0000644000000000000000000000724111703262304031633 0ustar rootrootfunction [defaultValues] = getEventDefaultValues(level, version) % [values] = getEventDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Event structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Event structure can be found using % the function `getEventFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_EVENT', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... [], ... }; elseif (version == 2) defaultValues = { 'SBML_EVENT', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... int32(-1), ... [], ... }; elseif (version == 3) defaultValues = { 'SBML_EVENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... [], ... [], ... [], ... }; elseif (version == 4) defaultValues = { 'SBML_EVENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... int32(0), ... [], ... [], ... [], ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_EVENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... int32(0), ... [], ... [], ... [], ... [], ... }; end; end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getEventAssignmentFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getEventAssignmentFieldna0000644000000000000000000000663511703262304032235 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getEventAssignmentFieldnames(level, ... version) % [fieldnames, num] = getEventAssignmentFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML EventAssignment structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'variable', ... 'math', ... }; nNumberFields = 6; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'variable', ... 'sboTerm', ... 'math', ... }; nNumberFields = 7; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'variable', ... 'math', ... }; nNumberFields = 7; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'variable', ... 'math', ... }; nNumberFields = 7; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'variable', ... 'math', ... }; nNumberFields = 7; end; end; ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getEventAssignmentDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getEventAssignmentDefault0000644000000000000000000000636611703262304032260 0ustar rootrootfunction [defaultValues] = getEventAssignmentDefaultValues(level, version) % [values] = getEventAssignmentDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML EventAssignment structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML EventAssignment structure can be found using % the function `getEventAssignmentFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_EVENT_ASSIGNMENT', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 2) defaultValues = { 'SBML_EVENT_ASSIGNMENT', ... '', ... '', ... '', ... '', ... int32(-1), ... '', ... }; elseif (version == 3) defaultValues = { 'SBML_EVENT_ASSIGNMENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_EVENT_ASSIGNMENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_EVENT_ASSIGNMENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getDelayFieldnames.m0000644000000000000000000000546611703262304031122 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getDelayFieldnames(level, ... version) % [fieldnames, num] = getDelayFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Delay structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... }; nNumberFields = 6; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getDelayDefaultValues.m0000644000000000000000000000525411703262304031612 0ustar rootrootfunction [defaultValues] = getDelayDefaultValues(level, version) % [values] = getDelayDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Delay structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Delay structure can be found using % the function `getDelayFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = []; elseif (version == 3) defaultValues = { 'SBML_DELAY', ... '', ... '', ... '', ... int32(-1), ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_DELAY', ... '', ... '', ... '', ... int32(-1), ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_DELAY', ... '', ... '', ... '', ... int32(-1), ... '', ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getDefaultValues.m0000644000000000000000000001356111703262304030633 0ustar rootrootfunction [defaultValues] = getDefaultValues(typecode, level, version) % [values] = getDefaultValues(typecode, level, version) % % Takes % % 1. typecode; a string representing the type of object being queried % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML structure of the given typecode, level and version % % *NOTE:* The corresponding fields present in an SBML structure can be found using % the function `getFieldnames` % done = 1; switch (typecode) case {'SBML_ALGEBRAIC_RULE', 'AlgebraicRule', 'algebraicRule'} fhandle = str2func('getAlgebraicRuleDefaultValues'); case {'SBML_ASSIGNMENT_RULE', 'AssignmentRule', 'assignmentRule'} fhandle = str2func('getAssignmentRuleDefaultValues'); case {'SBML_COMPARTMENT', 'Compartment', 'compartment'} fhandle = str2func('getCompartmentDefaultValues'); case {'SBML_COMPARTMENT_TYPE', 'CompartmentType', 'compartmentType'} fhandle = str2func('getCompartmentTypeDefaultValues'); case {'SBML_COMPARTMENT_VOLUME_RULE', 'CompartmentVolumeRule', 'compartmentVolumeRule'} fhandle = str2func('getCompartmentVolumeRuleDefaultValues'); case {'SBML_CONSTRAINT', 'Constraint', 'constraint'} fhandle = str2func('getConstraintDefaultValues'); case {'SBML_DELAY', 'Delay', 'delay'} fhandle = str2func('getDelayDefaultValues'); case {'SBML_EVENT', 'Event', 'event'} fhandle = str2func('getEventDefaultValues'); case {'SBML_EVENT_ASSIGNMENT', 'EventAssignment', 'eventAssignment'} fhandle = str2func('getEventAssignmentDefaultValues'); case {'SBML_FUNCTION_DEFINITION', 'FunctionDefinition', 'functionDefinition'} fhandle = str2func('getFunctionDefinitionDefaultValues'); case {'SBML_INITIAL_ASSIGNMENT', 'InitialAssignment', 'initialAssignment'} fhandle = str2func('getInitialAssignmentDefaultValues'); case {'SBML_KINETIC_LAW', 'KineticLaw', 'kineticLaw'} fhandle = str2func('getKineticLawDefaultValues'); case {'SBML_LOCAL_PARAMETER', 'LocalParameter', 'localParameter'} fhandle = str2func('getLocalParameterDefaultValues'); case {'SBML_MODEL', 'Model', 'model'} fhandle = str2func('getModelDefaultValues'); case {'SBML_MODIFIER_SPECIES_REFERENCE', 'ModifierSpeciesReference', 'modifierSpeciesReference'} fhandle = str2func('getModifierSpeciesReferenceDefaultValues'); case {'SBML_PARAMETER', 'Parameter', 'parameter'} fhandle = str2func('getParameterDefaultValues'); case {'SBML_PARAMETER_RULE', 'ParameterRule', 'parameterRule'} fhandle = str2func('getParameterRuleDefaultValues'); case {'SBML_PRIORITY', 'Priority', 'priority'} fhandle = str2func('getPriorityDefaultValues'); case {'SBML_RATE_RULE', 'RateRule', 'ruleRule'} fhandle = str2func('getRateRuleDefaultValues'); case {'SBML_REACTION', 'Reaction', 'reaction'} fhandle = str2func('getReactionDefaultValues'); case {'SBML_SPECIES', 'Species', 'species'} fhandle = str2func('getSpeciesDefaultValues'); case {'SBML_SPECIES_CONCENTRATION_RULE', 'SpeciesConcentrationRule', 'speciesConcentrationRule'} fhandle = str2func('getSpeciesConcentrationRuleDefaultValues'); case {'SBML_SPECIES_REFERENCE', 'SpeciesReference', 'speciesReference'} fhandle = str2func('getSpeciesReferenceDefaultValues'); case {'SBML_SPECIES_TYPE', 'SpeciesType', 'speciesType'} fhandle = str2func('getSpeciesTypeDefaultValues'); case {'SBML_STOICHIOMETRY_MATH', 'StoichiometryMath', 'stoichiometryMath'} fhandle = str2func('getStoichiometryMathDefaultValues'); case {'SBML_TRIGGER', 'Trigger', 'trigger'} fhandle = str2func('getTriggerDefaultValues'); case {'SBML_UNIT', 'Unit', 'unit'} fhandle = str2func('getUnitDefaultValues'); case {'SBML_UNIT_DEFINITION', 'UnitDefinition', 'unitDefinition'} fhandle = str2func('getUnitDefinitionDefaultValues'); otherwise done = 0; end; if done == 1 [defaultValues] = feval(fhandle, level, version); else switch (typecode) case {'SBML_FBC_FLUXBOUND', 'FluxBound', 'fluxBound'} fhandle = str2func('getFluxBoundDefaultValues'); case {'SBML_FBC_FLUXOBJECTIVE', 'FluxObjective', 'fluxObjective'} fhandle = str2func('getFluxObjectiveDefaultValues'); case {'SBML_FBC_OBJECTIVE', 'Objective', 'objective'} fhandle = str2func('getObjectiveDefaultValues'); case {'SBML_FBC_MODEL', 'FBCModel'} fhandle = str2func('getFBCModelDefaultValues'); case {'SBML_FBC_SPECIES', 'FBCSpecies'} fhandle = str2func('getFBCSpeciesDefaultValues'); otherwise error('%s\n%s', ... 'getDefaultValues(typecode, level, version', ... 'typecode not recognised'); end; [defaultValues] = feval(fhandle, level, version, 1); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getConstraintFieldnames.m0000644000000000000000000000625711703262304032207 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getConstraintFieldnames(level, ... version) % [fieldnames, num] = getConstraintFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Constraint structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... 'message', ... }; nNumberFields = 7; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... 'message', ... }; nNumberFields = 7; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... 'message', ... }; nNumberFields = 7; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'math', ... 'message', ... }; nNumberFields = 7; end; end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getConstraintDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getConstraintDefaultValue0000644000000000000000000000600111703262304032251 0ustar rootrootfunction [defaultValues] = getConstraintDefaultValues(level, version) % [values] = getConstraintDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Constraint structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Constraint structure can be found using % the function `getConstraintFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = { 'SBML_CONSTRAINT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; elseif (version == 3) defaultValues = { 'SBML_CONSTRAINT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_CONSTRAINT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_CONSTRAINT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; end; end; ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentVolumeRuleFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentVolumeRuleF0000644000000000000000000000511711703262304032251 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getCompartmentVolumeRuleFieldnames(level, ... version) % [fieldnames, num] = getCompartmentVolumeRuleFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML CompartmentVolumeRule structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'type', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 3) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 4) SBMLfieldnames = []; nNumberFields = 0; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentVolumeRuleDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentVolumeRuleD0000644000000000000000000000475211703262304032253 0ustar rootrootfunction [defaultValues] = getCompartmentVolumeRuleDefaultValues(level, version) % [values] = getCompartmentVolumeRuleDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML CompartmentVolumeRule structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML CompartmentVolumeRule structure can be found using % the function `getCompartmentVolumeRuleFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_COMPARTMENT_VOLUME_RULE', ... '', ... '', ... 'scalar', ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = []; elseif (version == 3) defaultValues = []; elseif (version == 4) defaultValues = []; end; elseif (level == 3) if (version == 1) defaultValues = []; end; end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentTypeFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentTypeFieldna0000644000000000000000000000562711703262304032256 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getCompartmentTypeFieldnames(level, ... version) % [fieldnames, num] = getCompartmentTypeFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML CompartmentType structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... }; nNumberFields = 6; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... }; nNumberFields = 7; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... }; nNumberFields = 7; end; elseif (level == 3) if (version == 1) SBMLfieldnames = []; nNumberFields = 0; end; end; ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentTypeDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentTypeDefault0000644000000000000000000000545411703262304032276 0ustar rootrootfunction [defaultValues] = getCompartmentTypeDefaultValues(level, version) % [values] = getCompartmentTypeDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML CompartmentType structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML CompartmentType structure can be found using % the function `getCompartmentTypeFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = []; elseif (version == 2) defaultValues = { 'SBML_COMPARTMENT_TYPE', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 3) defaultValues = { 'SBML_COMPARTMENT_TYPE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_COMPARTMENT_TYPE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = []; end; end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentFieldnames.0000644000000000000000000001200411703262304032162 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getCompartmentFieldnames(level, ... version) % [fieldnames, num] = getCompartmentFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML Compartment structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'name', ... 'volume', ... 'units', ... 'outside', ... 'isSetVolume', ... }; nNumberFields = 8; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'spatialDimensions', ... 'size', ... 'units', ... 'outside', ... 'constant', ... 'isSetSize', ... 'isSetVolume', ... }; nNumberFields = 13; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'name', ... 'id', ... 'compartmentType', ... 'spatialDimensions', ... 'size', ... 'units', ... 'outside', ... 'constant', ... 'isSetSize', ... 'isSetVolume', ... }; nNumberFields = 14; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'compartmentType', ... 'spatialDimensions', ... 'size', ... 'units', ... 'outside', ... 'constant', ... 'isSetSize', ... 'isSetVolume', ... }; nNumberFields = 15; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'compartmentType', ... 'spatialDimensions', ... 'size', ... 'units', ... 'outside', ... 'constant', ... 'isSetSize', ... 'isSetVolume', ... }; nNumberFields = 15; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'name', ... 'id', ... 'spatialDimensions', ... 'size', ... 'units', ... 'constant', ... 'isSetSize', ... 'isSetSpatialDimensions', ... }; nNumberFields = 13; end; end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getCompartmentDefaultValu0000644000000000000000000001073011703262304032255 0ustar rootrootfunction [defaultValues] = getCompartmentDefaultValues(level, version) % [values] = getCompartmentDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML Compartment structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Compartment structure can be found using % the function `getCompartmentFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_COMPARTMENT', ... '', ... '', ... '', ... 1.0, ... '', ... '', ... int32(0), ... }; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_COMPARTMENT', ... '', ... '', ... '', ... '', ... '', ... int32(3), ... 0/0, ... '', ... '', ... int32(0), ... int32(0), ... int32(0), ... }; elseif (version == 2) defaultValues = { 'SBML_COMPARTMENT', ... '', ... '', ... '', ... '', ... '', ... '', ... int32(3), ... 0/0, ... '', ... '', ... int32(0), ... int32(0), ... int32(0), ... }; elseif (version == 3) defaultValues = { 'SBML_COMPARTMENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... int32(3), ... 0/0, ... '', ... '', ... int32(0), ... int32(0), ... int32(0), ... }; elseif (version == 4) defaultValues = { 'SBML_COMPARTMENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... int32(3), ... 0/0, ... '', ... '', ... int32(0), ... int32(0), ... int32(0), ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_COMPARTMENT', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... int32(3), ... 0/0, ... '', ... int32(0), ... int32(0), ... int32(0), ... }; end; end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getAssignmentRuleFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getAssignmentRuleFieldnam0000644000000000000000000001016011703262304032224 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getAssignmentRuleFieldnames(level, ... version) % [fieldnames, num] = getAssignmentRuleFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML AssignmentRule structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getAssignmentRuleDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getAssignmentRuleDefaultV0000644000000000000000000000736411703262304032233 0ustar rootrootfunction [defaultValues] = getAssignmentRuleDefaultValues(level, version) % [values] = getAssignmentRuleDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML AssignmentRule structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML AssignmentRule structure can be found using % the function `getAssignmentRuleFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_ASSIGNMENT_RULE', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 2) defaultValues = { 'SBML_ASSIGNMENT_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 3) defaultValues = { 'SBML_ASSIGNMENT_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_ASSIGNMENT_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_ASSIGNMENT_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; end; end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getAlgebraicRuleFieldnames.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getAlgebraicRuleFieldname0000644000000000000000000001072311703262304032137 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getAlgebraicRuleFieldnames(level, ... version) % [fieldnames, num] = getAlgebraicRuleFieldnames(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of fieldnames for an SBML AlgebraicRule structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; if (level == 1) SBMLfieldnames = { 'typecode', ... 'notes', ... 'annotation', ... 'type', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (level == 2) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 10; elseif (version == 2) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 3) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; elseif (version == 4) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; elseif (level == 3) if (version == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'formula', ... 'variable', ... 'species', ... 'compartment', ... 'name', ... 'units', ... }; nNumberFields = 11; end; end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getAlgebraicRuleDefaultValues.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/getAlgebraicRuleDefaultVa0000644000000000000000000001001711703262304032122 0ustar rootrootfunction [defaultValues] = getAlgebraicRuleDefaultValues(level, version) % [values] = getAlgebraicRuleDefaultValues(level, version) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % % Returns % % 1. an array of default values for an SBML AlgebraicRule structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML AlgebraicRule structure can be found using % the function `getAlgebraicRuleFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = { 'SBML_ALGEBRAIC_RULE', ... '', ... '', ... 'scalar', ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (level == 2) if (version == 1) defaultValues = { 'SBML_ALGEBRAIC_RULE', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 2) defaultValues = { 'SBML_ALGEBRAIC_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 3) defaultValues = { 'SBML_ALGEBRAIC_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; elseif (version == 4) defaultValues = { 'SBML_ALGEBRAIC_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; end; elseif (level == 3) if (version == 1) defaultValues = { 'SBML_ALGEBRAIC_RULE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... '', ... '', ... '', ... }; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/structFieldnames/Contents.m0000644000000000000000000006464411703262304027174 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\structFieldnames % % These functions return the fieldnames and default values for the % MATLAB_SBML structures. % %========================================================== % [values] = getAlgebraicRuleDefaultValues(level, version) %========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML AlgebraicRule structure of the given level and version % %================================================================ % [fieldnames, num] = getAlgebraicRuleFieldnames(level, version) %================================================================ % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML AlgebraicRule structure of the given level and version % 2. the number of fieldnames % %=========================================================== % [values] = getAssignmentRuleDefaultValues(level, version) %=========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML AssignmentRule structure of the given level and version % %================================================================= % [fieldnames, num] = getAssignmentRuleFieldnames(level, version) %================================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML AssignmentRule structure of the given level and version % 2. the number of fieldnames % %======================================================== % [values] = getCompartmentDefaultValues(level, version) %======================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Compartment structure of the given level and version % %============================================================== % [fieldnames, num] = getCompartmentFieldnames(level, version) %============================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Compartment structure of the given level and version % 2. the number of fieldnames % %============================================================ % [values] = getCompartmentTypeDefaultValues(level, version) %============================================================ % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML CompartmentType structure of the given level and version % %================================================================== % [fieldnames, num] = getCompartmentTypeFieldnames(level, version) %================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML CompartmentType structure of the given level and version % 2. the number of fieldnames % %================================================================== % [values] = getCompartmentVolumeRuleDefaultValues(level, version) %================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML CompartmentVolumeRule structure of the given level and version % %======================================================================== % [fieldnames, num] = getCompartmentVolumeRuleFieldnames(level, version) %======================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML CompartmentVolumeRule structure of the given level and version % 2. the number of fieldnames % %======================================================= % [values] = getConstraintDefaultValues(level, version) %======================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Constraint structure of the given level and version % %============================================================= % [fieldnames, num] = getConstraintFieldnames(level, version) %============================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Constraint structure of the given level and version % 2. the number of fieldnames % %======================================================= % [values] = getDefaultValues(typecode, level, version) %======================================================= % Takes % 1. typecode; a string representing the type of object being queried % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML structure of the given typecode, level and version % %================================================== % [values] = getDelayDefaultValues(level, version) %================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Delay structure of the given level and version % %======================================================== % [fieldnames, num] = getDelayFieldnames(level, version) %======================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Delay structure of the given level and version % 2. the number of fieldnames % %============================================================ % [values] = getEventAssignmentDefaultValues(level, version) %============================================================ % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML EventAssignment structure of the given level and version % %================================================================== % [fieldnames, num] = getEventAssignmentFieldnames(level, version) %================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML EventAssignment structure of the given level and version % 2. the number of fieldnames % %================================================== % [values] = getEventDefaultValues(level, version) %================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Event structure of the given level and version % %======================================================== % [fieldnames, num] = getEventFieldnames(level, version) %======================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Event structure of the given level and version % 2. the number of fieldnames % %============================================================= % [fieldnames, num] = getFieldnames(typecode, level, version) %============================================================= % Takes % 1. typecode; a string representing the type of object being queried % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML structure of the given typecode, level and version % 2. the number of fieldnames % %=============================================================== % [values] = getFunctionDefinitionDefaultValues(level, version) %=============================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML FunctionDefinition structure of the given level and version % %===================================================================== % [fieldnames, num] = getFunctionDefinitionFieldnames(level, version) %===================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML FunctionDefinition structure of the given level and version % 2. the number of fieldnames % %============================================================== % [values] = getInitialAssignmentDefaultValues(level, version) %============================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML InitialAssignment structure of the given level and version % %==================================================================== % [fieldnames, num] = getInitialAssignmentFieldnames(level, version) %==================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML InitialAssignment structure of the given level and version % 2. the number of fieldnames % %======================================================= % [values] = getKineticLawDefaultValues(level, version) %======================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML KineticLaw structure of the given level and version % %============================================================= % [fieldnames, num] = getKineticLawFieldnames(level, version) %============================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML KineticLaw structure of the given level and version % 2. the number of fieldnames % %=========================================================== % [values] = getLocalParameterDefaultValues(level, version) %=========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML LocalParameter structure of the given level and version % %================================================================= % [fieldnames, num] = getLocalParameterFieldnames(level, version) %================================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML LocalParameter structure of the given level and version % 2. the number of fieldnames % %================================================== % [values] = getModelDefaultValues(level, version) %================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Model structure of the given level and version % %======================================================== % [fieldnames, num] = getModelFieldnames(level, version) %======================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Model structure of the given level and version % 2. the number of fieldnames % %===================================================================== % [values] = getModifierSpeciesReferenceDefaultValues(level, version) %===================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML ModifierSpeciesReference structure of the given level and version % %=========================================================================== % [fieldnames, num] = getModifierSpeciesReferenceFieldnames(level, version) %=========================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML ModifierSpeciesReference structure of the given level and version % 2. the number of fieldnames % %====================================================== % [values] = getParameterDefaultValues(level, version) %====================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Parameter structure of the given level and version % %============================================================ % [fieldnames, num] = getParameterFieldnames(level, version) %============================================================ % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Parameter structure of the given level and version % 2. the number of fieldnames % %========================================================== % [values] = getParameterRuleDefaultValues(level, version) %========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML ParameterRule structure of the given level and version % %================================================================ % [fieldnames, num] = getParameterRuleFieldnames(level, version) %================================================================ % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML ParameterRule structure of the given level and version % 2. the number of fieldnames % %===================================================== % [values] = getPriorityDefaultValues(level, version) %===================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Priority structure of the given level and version % %=========================================================== % [fieldnames, num] = getPriorityFieldnames(level, version) %=========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Priority structure of the given level and version % 2. the number of fieldnames % %===================================================== % [values] = getRateRuleDefaultValues(level, version) %===================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML RateRule structure of the given level and version % %=========================================================== % [fieldnames, num] = getRateRuleFieldnames(level, version) %=========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML RateRule structure of the given level and version % 2. the number of fieldnames % %===================================================== % [values] = getReactionDefaultValues(level, version) %===================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Reaction structure of the given level and version % %=========================================================== % [fieldnames, num] = getReactionFieldnames(level, version) %=========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Reaction structure of the given level and version % 2. the number of fieldnames % %======================================================= % [fieldnames, num] = getRuleFieldnames(level, version) %======================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Rule structure of the given level and version % 2. the number of fieldnames % %===================================================================== % [values] = getSpeciesConcentrationRuleDefaultValues(level, version) %===================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML SpeciesConcentrationRule structure of the given level and version % %=========================================================================== % [fieldnames, num] = getSpeciesConcentrationRuleFieldnames(level, version) %=========================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML SpeciesConcentrationRule structure of the given level and version % 2. the number of fieldnames % %==================================================== % [values] = getSpeciesDefaultValues(level, version) %==================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Species structure of the given level and version % %========================================================== % [fieldnames, num] = getSpeciesFieldnames(level, version) %========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Species structure of the given level and version % 2. the number of fieldnames % %============================================================= % [values] = getSpeciesReferenceDefaultValues(level, version) %============================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML SpeciesReference structure of the given level and version % %=================================================================== % [fieldnames, num] = getSpeciesReferenceFieldnames(level, version) %=================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML SpeciesReference structure of the given level and version % 2. the number of fieldnames % %======================================================== % [values] = getSpeciesTypeDefaultValues(level, version) %======================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML SpeciesType structure of the given level and version % %============================================================== % [fieldnames, num] = getSpeciesTypeFieldnames(level, version) %============================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML SpeciesType structure of the given level and version % 2. the number of fieldnames % %============================================================== % [values] = getStoichiometryMathDefaultValues(level, version) %============================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML StoichiometryMath structure of the given level and version % %==================================================================== % [fieldnames, num] = getStoichiometryMathFieldnames(level, version) %==================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML StoichiometryMath structure of the given level and version % 2. the number of fieldnames % %==================================================== % [values] = getTriggerDefaultValues(level, version) %==================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Trigger structure of the given level and version % %========================================================== % [fieldnames, num] = getTriggerFieldnames(level, version) %========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Trigger structure of the given level and version % 2. the number of fieldnames % %================================================= % [values] = getUnitDefaultValues(level, version) %================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML Unit structure of the given level and version % %=========================================================== % [values] = getUnitDefinitionDefaultValues(level, version) %=========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of default values for an SBML UnitDefinition structure of the given level and version % %================================================================= % [fieldnames, num] = getUnitDefinitionFieldnames(level, version) %================================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML UnitDefinition structure of the given level and version % 2. the number of fieldnames % %======================================================= % [fieldnames, num] = getUnitFieldnames(level, version) %======================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. an array of fieldnames for an SBML Unit structure of the given level and version % 2. the number of fieldnames % %======================================================== % valid = isValidLevelVersionCombination(level, version) %======================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % Returns % 1. valid = 1 if the level and version combinbation represent a valid % specification of SBML supported by SBMLToolbox % %============================================== % SBMLModel = propagateLevelVersion(SBMLModel) %============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with level and version fields added to all % sub structures % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/0000755000000000000000000000000011704572244025353 5ustar rootroot././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_unsetS0000644000000000000000000000351511703262366032317 0ustar rootrootfunction SBMLStoichiometryMath = StoichiometryMath_unsetSBOTerm(SBMLStoichiometryMath) % SBMLStoichiometryMath = StoichiometryMath_unsetSBOTerm(SBMLStoichiometryMath) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % % Returns % % 1. the SBML StoichiometryMath structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'sboTerm') SBMLStoichiometryMath.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_unsetM0000644000000000000000000000350711703262366032312 0ustar rootrootfunction SBMLStoichiometryMath = StoichiometryMath_unsetMetaid(SBMLStoichiometryMath) % SBMLStoichiometryMath = StoichiometryMath_unsetMetaid(SBMLStoichiometryMath) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % % Returns % % 1. the SBML StoichiometryMath structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'metaid') SBMLStoichiometryMath.metaid = ''; else error('metaid not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_unsetMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_unsetM0000644000000000000000000000347311703262366032314 0ustar rootrootfunction SBMLStoichiometryMath = StoichiometryMath_unsetMath(SBMLStoichiometryMath) % SBMLStoichiometryMath = StoichiometryMath_unsetMath(SBMLStoichiometryMath) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % % Returns % % 1. the SBML StoichiometryMath structure with the math attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'math') SBMLStoichiometryMath.math = ''; else error('math not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_setSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_setSBO0000644000000000000000000000377411703262366032204 0ustar rootrootfunction SBMLStoichiometryMath = StoichiometryMath_setSBOTerm(SBMLStoichiometryMath, sboTerm) % SBMLStoichiometryMath = StoichiometryMath_setSBOTerm(SBMLStoichiometryMath, sboTerm) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML StoichiometryMath structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLStoichiometryMath.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_setMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_setMet0000644000000000000000000000375011703262366032300 0ustar rootrootfunction SBMLStoichiometryMath = StoichiometryMath_setMetaid(SBMLStoichiometryMath, metaid) % SBMLStoichiometryMath = StoichiometryMath_setMetaid(SBMLStoichiometryMath, metaid) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML StoichiometryMath structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLStoichiometryMath.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_setMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_setMat0000644000000000000000000000373411703262366032276 0ustar rootrootfunction SBMLStoichiometryMath = StoichiometryMath_setMath(SBMLStoichiometryMath, math) % SBMLStoichiometryMath = StoichiometryMath_setMath(SBMLStoichiometryMath, math) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % 2. math; string representing the math expression math to be set % % Returns % % 1. the SBML StoichiometryMath structure with the new value for the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'math') if ~ischar(math) error('math must be character array') ; else SBMLStoichiometryMath.math = math; end; else error('math not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_isSetS0000644000000000000000000000346011703262366032247 0ustar rootrootfunction value = StoichiometryMath_isSetSBOTerm(SBMLStoichiometryMath) % value = StoichiometryMath_isSetSBOTerm(SBMLStoichiometryMath) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'sboTerm') value = (SBMLStoichiometryMath.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_isSetM0000644000000000000000000000345711703262366032247 0ustar rootrootfunction value = StoichiometryMath_isSetMetaid(SBMLStoichiometryMath) % value = StoichiometryMath_isSetMetaid(SBMLStoichiometryMath) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'metaid') value = ~isempty(SBMLStoichiometryMath.metaid); else error('metaid not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_isSetMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_isSetM0000644000000000000000000000344311703262366032242 0ustar rootrootfunction value = StoichiometryMath_isSetMath(SBMLStoichiometryMath) % value = StoichiometryMath_isSetMath(SBMLStoichiometryMath) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % % Returns % % 1. value = % - 1 if the math attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'math') value = ~isempty(SBMLStoichiometryMath.math); else error('math not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_getSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_getSBO0000644000000000000000000000341711703262366032162 0ustar rootrootfunction sboTerm = StoichiometryMath_getSBOTerm(SBMLStoichiometryMath) % sboTerm = StoichiometryMath_getSBOTerm(SBMLStoichiometryMath) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'sboTerm') sboTerm = SBMLStoichiometryMath.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_getMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_getMet0000644000000000000000000000340611703262366032262 0ustar rootrootfunction metaid = StoichiometryMath_getMetaid(SBMLStoichiometryMath) % metaid = StoichiometryMath_getMetaid(SBMLStoichiometryMath) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'metaid') metaid = SBMLStoichiometryMath.metaid; else error('metaid not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_getMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_getMat0000644000000000000000000000336411703262366032261 0ustar rootrootfunction math = StoichiometryMath_getMath(SBMLStoichiometryMath) % math = StoichiometryMath_getMath(SBMLStoichiometryMath) % % Takes % % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % % Returns % % 1. the value of the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLStoichiometryMath); if isfield(SBMLStoichiometryMath, 'math') math = SBMLStoichiometryMath.math; else error('math not an attribute on SBML L%dV%d StoichiometryMath', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_create.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/StoichiometryMath_create0000644000000000000000000000556211703262366032305 0ustar rootrootfunction StoichiometryMath = StoichiometryMath_create(varargin) % StoichiometryMath = StoichiometryMath_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML StoichiometryMath structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getStoichiometryMathFieldnames(level, version); if (num > 0) values = getStoichiometryMathDefaultValues(level, version); StoichiometryMath = cell2struct(values, fieldnames, 2); %add level and version StoichiometryMath.level = level; StoichiometryMath.version = version; %check correct structure if ~isSBML_StoichiometryMath(StoichiometryMath, level, version) StoichiometryMath = struct(); warning('Warn:BadStruct', 'Failed to create StoichiometryMath'); end; else StoichiometryMath = []; warning('Warn:InvalidLV', 'StoichiometryMath not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/StoichiometryMath/Contents.m0000644000000000000000000001447511703262366027341 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\StoichiometryMath % % The functions allow users to create and work with the SBML StoichiometryMath structure. % %=================================================================================== % StoichiometryMath = StoichiometryMath_create(level(optional), version(optional) ) %=================================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML StoichiometryMath structure of the appropriate level and version % %========================================================= % math = StoichiometryMath_getMath(SBMLStoichiometryMath) %========================================================= % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % Returns % 1. the value of the math attribute % %============================================================= % metaid = StoichiometryMath_getMetaid(SBMLStoichiometryMath) %============================================================= % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % Returns % 1. the value of the metaid attribute % %=============================================================== % sboTerm = StoichiometryMath_getSBOTerm(SBMLStoichiometryMath) %=============================================================== % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % Returns % 1. the value of the sboTerm attribute % %============================================================ % value = StoichiometryMath_isSetMath(SBMLStoichiometryMath) %============================================================ % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % Returns % 1. value = % - 1 if the math attribute is set % - 0 otherwise % %============================================================== % value = StoichiometryMath_isSetMetaid(SBMLStoichiometryMath) %============================================================== % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %=============================================================== % value = StoichiometryMath_isSetSBOTerm(SBMLStoichiometryMath) %=============================================================== % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %================================================================================ % SBMLStoichiometryMath = StoichiometryMath_setMath(SBMLStoichiometryMath, math) %================================================================================ % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % 2. math; string representing the math expression math to be set % Returns % 1. the SBML StoichiometryMath structure with the new value for the math attribute % %==================================================================================== % SBMLStoichiometryMath = StoichiometryMath_setMetaid(SBMLStoichiometryMath, metaid) %==================================================================================== % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML StoichiometryMath structure with the new value for the metaid attribute % %====================================================================================== % SBMLStoichiometryMath = StoichiometryMath_setSBOTerm(SBMLStoichiometryMath, sboTerm) %====================================================================================== % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML StoichiometryMath structure with the new value for the sboTerm attribute % %============================================================================ % SBMLStoichiometryMath = StoichiometryMath_unsetMath(SBMLStoichiometryMath) %============================================================================ % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % Returns % 1. the SBML StoichiometryMath structure with the math attribute unset % %============================================================================== % SBMLStoichiometryMath = StoichiometryMath_unsetMetaid(SBMLStoichiometryMath) %============================================================================== % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % Returns % 1. the SBML StoichiometryMath structure with the metaid attribute unset % %=============================================================================== % SBMLStoichiometryMath = StoichiometryMath_unsetSBOTerm(SBMLStoichiometryMath) %=============================================================================== % Takes % 1. SBMLStoichiometryMath, an SBML StoichiometryMath structure % Returns % 1. the SBML StoichiometryMath structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/0000755000000000000000000000000011704572242024132 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_unsetSBOTerm.m0000644000000000000000000000337711703262356031172 0ustar rootrootfunction SBMLSpeciesType = SpeciesType_unsetSBOTerm(SBMLSpeciesType) % SBMLSpeciesType = SpeciesType_unsetSBOTerm(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. the SBML SpeciesType structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'sboTerm') SBMLSpeciesType.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_unsetName.m0000644000000000000000000000335511703262356030573 0ustar rootrootfunction SBMLSpeciesType = SpeciesType_unsetName(SBMLSpeciesType) % SBMLSpeciesType = SpeciesType_unsetName(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. the SBML SpeciesType structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'name') SBMLSpeciesType.name = ''; else error('name not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_unsetMetaid.m0000644000000000000000000000337111703262356031114 0ustar rootrootfunction SBMLSpeciesType = SpeciesType_unsetMetaid(SBMLSpeciesType) % SBMLSpeciesType = SpeciesType_unsetMetaid(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. the SBML SpeciesType structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'metaid') SBMLSpeciesType.metaid = ''; else error('metaid not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_unsetId.m0000644000000000000000000000334111703262356030242 0ustar rootrootfunction SBMLSpeciesType = SpeciesType_unsetId(SBMLSpeciesType) % SBMLSpeciesType = SpeciesType_unsetId(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. the SBML SpeciesType structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'id') SBMLSpeciesType.id = ''; else error('id not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_setSBOTerm.m0000644000000000000000000000365611703262356030627 0ustar rootrootfunction SBMLSpeciesType = SpeciesType_setSBOTerm(SBMLSpeciesType, sboTerm) % SBMLSpeciesType = SpeciesType_setSBOTerm(SBMLSpeciesType, sboTerm) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML SpeciesType structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLSpeciesType.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_setName.m0000644000000000000000000000360011703262356030221 0ustar rootrootfunction SBMLSpeciesType = SpeciesType_setName(SBMLSpeciesType, name) % SBMLSpeciesType = SpeciesType_setName(SBMLSpeciesType, name) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML SpeciesType structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'name') if ~ischar(name) error('name must be character array') ; else SBMLSpeciesType.name = name; end; else error('name not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_setMetaid.m0000644000000000000000000000363211703262356030551 0ustar rootrootfunction SBMLSpeciesType = SpeciesType_setMetaid(SBMLSpeciesType, metaid) % SBMLSpeciesType = SpeciesType_setMetaid(SBMLSpeciesType, metaid) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML SpeciesType structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLSpeciesType.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_setId.m0000644000000000000000000000354611703262356027706 0ustar rootrootfunction SBMLSpeciesType = SpeciesType_setId(SBMLSpeciesType, id) % SBMLSpeciesType = SpeciesType_setId(SBMLSpeciesType, id) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML SpeciesType structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'id') if ~ischar(id) error('id must be character array') ; else SBMLSpeciesType.id = id; end; else error('id not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_isSetSBOTerm.m0000644000000000000000000000336411703262356031117 0ustar rootrootfunction value = SpeciesType_isSetSBOTerm(SBMLSpeciesType) % value = SpeciesType_isSetSBOTerm(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'sboTerm') value = (SBMLSpeciesType.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_isSetName.m0000644000000000000000000000334711703262356030525 0ustar rootrootfunction value = SpeciesType_isSetName(SBMLSpeciesType) % value = SpeciesType_isSetName(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'name') value = ~isempty(SBMLSpeciesType.name); else error('name not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_isSetMetaid.m0000644000000000000000000000336311703262356031046 0ustar rootrootfunction value = SpeciesType_isSetMetaid(SBMLSpeciesType) % value = SpeciesType_isSetMetaid(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'metaid') value = ~isempty(SBMLSpeciesType.metaid); else error('metaid not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_isSetId.m0000644000000000000000000000333311703262356030174 0ustar rootrootfunction value = SpeciesType_isSetId(SBMLSpeciesType) % value = SpeciesType_isSetId(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'id') value = ~isempty(SBMLSpeciesType.id); else error('id not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_getSBOTerm.m0000644000000000000000000000332311703262356030602 0ustar rootrootfunction sboTerm = SpeciesType_getSBOTerm(SBMLSpeciesType) % sboTerm = SpeciesType_getSBOTerm(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'sboTerm') sboTerm = SBMLSpeciesType.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_getName.m0000644000000000000000000000327011703262356030210 0ustar rootrootfunction name = SpeciesType_getName(SBMLSpeciesType) % name = SpeciesType_getName(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'name') name = SBMLSpeciesType.name; else error('name not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_getMetaid.m0000644000000000000000000000331211703262356030530 0ustar rootrootfunction metaid = SpeciesType_getMetaid(SBMLSpeciesType) % metaid = SpeciesType_getMetaid(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'metaid') metaid = SBMLSpeciesType.metaid; else error('metaid not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_getId.m0000644000000000000000000000324611703262356027667 0ustar rootrootfunction id = SpeciesType_getId(SBMLSpeciesType) % id = SpeciesType_getId(SBMLSpeciesType) % % Takes % % 1. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesType); if isfield(SBMLSpeciesType, 'id') id = SBMLSpeciesType.id; else error('id not an attribute on SBML L%dV%d SpeciesType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/SpeciesType_create.m0000644000000000000000000000542211703262356030074 0ustar rootrootfunction SpeciesType = SpeciesType_create(varargin) % SpeciesType = SpeciesType_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML SpeciesType structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getSpeciesTypeFieldnames(level, version); if (num > 0) values = getSpeciesTypeDefaultValues(level, version); SpeciesType = cell2struct(values, fieldnames, 2); %add level and version SpeciesType.level = level; SpeciesType.version = version; %check correct structure if ~isSBML_SpeciesType(SpeciesType, level, version) SpeciesType = struct(); warning('Warn:BadStruct', 'Failed to create SpeciesType'); end; else SpeciesType = []; warning('Warn:InvalidLV', 'SpeciesType not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesType/Contents.m0000644000000000000000000001533011703262356026110 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\SpeciesType % % The functions allow users to create and work with the SBML SpeciesType structure. % %======================================================================= % SpeciesType = SpeciesType_create(level(optional), version(optional) ) %======================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML SpeciesType structure of the appropriate level and version % %========================================= % id = SpeciesType_getId(SBMLSpeciesType) %========================================= % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. the value of the id attribute % %================================================= % metaid = SpeciesType_getMetaid(SBMLSpeciesType) %================================================= % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. the value of the metaid attribute % %============================================= % name = SpeciesType_getName(SBMLSpeciesType) %============================================= % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. the value of the name attribute % %=================================================== % sboTerm = SpeciesType_getSBOTerm(SBMLSpeciesType) %=================================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. the value of the sboTerm attribute % %============================================== % value = SpeciesType_isSetId(SBMLSpeciesType) %============================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %================================================== % value = SpeciesType_isSetMetaid(SBMLSpeciesType) %================================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %================================================ % value = SpeciesType_isSetName(SBMLSpeciesType) %================================================ % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %=================================================== % value = SpeciesType_isSetSBOTerm(SBMLSpeciesType) %=================================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %========================================================== % SBMLSpeciesType = SpeciesType_setId(SBMLSpeciesType, id) %========================================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % 2. id; a string representing the id to be set % Returns % 1. the SBML SpeciesType structure with the new value for the id attribute % %================================================================== % SBMLSpeciesType = SpeciesType_setMetaid(SBMLSpeciesType, metaid) %================================================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML SpeciesType structure with the new value for the metaid attribute % %============================================================== % SBMLSpeciesType = SpeciesType_setName(SBMLSpeciesType, name) %============================================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % 2. name; a string representing the name to be set % Returns % 1. the SBML SpeciesType structure with the new value for the name attribute % %==================================================================== % SBMLSpeciesType = SpeciesType_setSBOTerm(SBMLSpeciesType, sboTerm) %==================================================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML SpeciesType structure with the new value for the sboTerm attribute % %======================================================== % SBMLSpeciesType = SpeciesType_unsetId(SBMLSpeciesType) %======================================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. the SBML SpeciesType structure with the id attribute unset % %============================================================ % SBMLSpeciesType = SpeciesType_unsetMetaid(SBMLSpeciesType) %============================================================ % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. the SBML SpeciesType structure with the metaid attribute unset % %========================================================== % SBMLSpeciesType = SpeciesType_unsetName(SBMLSpeciesType) %========================================================== % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. the SBML SpeciesType structure with the name attribute unset % %============================================================= % SBMLSpeciesType = SpeciesType_unsetSBOTerm(SBMLSpeciesType) %============================================================= % Takes % 1. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. the SBML SpeciesType structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/0000755000000000000000000000000011704572242025107 5ustar rootroot././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetStoichiometryMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetSto0000644000000000000000000000374111703262342032151 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_unsetStoichiometryMath(SBMLSpeciesReference) % SBMLSpeciesReference = SpeciesReference_unsetStoichiometryMath(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the SBML SpeciesReference structure with the stoichiometryMath field unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'stoichiometryMath') if (level == 2 && version < 3) SBMLSpeciesReference.stoichiometryMath = ''; else SBMLSpeciesReference.stoichiometryMath = []; end; else error('stoichiometryMath not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetStoichiometry.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetSto0000644000000000000000000000374611703262344032160 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_unsetStoichiometry(SBMLSpeciesReference) % SBMLSpeciesReference = SpeciesReference_unsetStoichiometry(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the SBML SpeciesReference structure with the stoichiometry attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'stoichiometry') if (level > 2) SBMLSpeciesReference.stoichiometry = NaN; SBMLSpeciesReference.isSetStoichiometry = 0; else SBMLSpeciesReference.stoichiometry = 1; end; else error('stoichiometry not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetSpe0000644000000000000000000000350211703262344032130 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_unsetSpecies(SBMLSpeciesReference) % SBMLSpeciesReference = SpeciesReference_unsetSpecies(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the SBML SpeciesReference structure with the species attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'species') SBMLSpeciesReference.species = ''; else error('species not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetSBO0000644000000000000000000000350211703262342032022 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_unsetSBOTerm(SBMLSpeciesReference) % SBMLSpeciesReference = SpeciesReference_unsetSBOTerm(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the SBML SpeciesReference structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'sboTerm') SBMLSpeciesReference.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetNam0000644000000000000000000000346011703262342032115 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_unsetName(SBMLSpeciesReference) % SBMLSpeciesReference = SpeciesReference_unsetName(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the SBML SpeciesReference structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'name') SBMLSpeciesReference.name = ''; else error('name not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetMet0000644000000000000000000000347411703262342032134 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_unsetMetaid(SBMLSpeciesReference) % SBMLSpeciesReference = SpeciesReference_unsetMetaid(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the SBML SpeciesReference structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'metaid') SBMLSpeciesReference.metaid = ''; else error('metaid not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetId.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetId.0000644000000000000000000000344411703262342032016 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_unsetId(SBMLSpeciesReference) % SBMLSpeciesReference = SpeciesReference_unsetId(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the SBML SpeciesReference structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'id') SBMLSpeciesReference.id = ''; else error('id not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetDenominator.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_unsetDen0000644000000000000000000000353311703262342032111 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_unsetDenominator(SBMLSpeciesReference) % SBMLSpeciesReference = SpeciesReference_unsetDenominator(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the SBML SpeciesReference structure with the denominator attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'denominator') SBMLSpeciesReference.denominator = NaN; else error('denominator not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setStoichiometryMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setStoic0000644000000000000000000000503511703262342032120 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_setStoichiometryMath(SBMLSpeciesReference, stoichiometryMath) % SBMLSpeciesReference = SpeciesReference_setStoichiometryMath(SBMLSpeciesReference, SBMLStoichiometryMath) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. SBMLStoichiometryMath, an SBML StoichiometryMath structure % % Returns % % 1. the SBML SpeciesReference structure with the new value for the stoichiometryMath field % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isstruct(stoichiometryMath) [sm_level, sm_version] = GetLevelVersion(stoichiometryMath); if level ~= sm_level error('mismatch in levels'); elseif version ~= sm_version error('mismatch in versions'); end; end; if isfield(SBMLSpeciesReference, 'stoichiometryMath') if (level == 2 && version < 3) && ~ischar(stoichiometryMath) error('stoichiometryMath must be character array') ; elseif (((level == 2 && version > 2) || level > 2) ... && ~isValid(stoichiometryMath, level, version)) error('stoichiometryMath must be an SBML StoichiometryMath structure'); else SBMLSpeciesReference.stoichiometryMath = stoichiometryMath; end; else error('stoichiometryMath not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setStoichiometry.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setStoic0000644000000000000000000000421111703262344032115 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_setStoichiometry(SBMLSpeciesReference, stoichiometry) % SBMLSpeciesReference = SpeciesReference_setStoichiometry(SBMLSpeciesReference, stoichiometry) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. stoichiometry; number representing the value of stoichiometry to be set % % Returns % % 1. the SBML SpeciesReference structure with the new value for the stoichiometry attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'stoichiometry') if ~isnumeric(stoichiometry) error('stoichiometry must be numeric') ; else SBMLSpeciesReference.stoichiometry = stoichiometry; if (level > 2) SBMLSpeciesReference.isSetStoichiometry = 1; end; end; else error('stoichiometry not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setSpeci0000644000000000000000000000375211703262342032106 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_setSpecies(SBMLSpeciesReference, species) % SBMLSpeciesReference = SpeciesReference_setSpecies(SBMLSpeciesReference, species) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. species; a string representing the species to be set % % Returns % % 1. the SBML SpeciesReference structure with the new value for the species attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'species') if ~ischar(species) error('species must be character array') ; else SBMLSpeciesReference.species = species; end; else error('species not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setSBOTe0000644000000000000000000000376111703262342031757 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_setSBOTerm(SBMLSpeciesReference, sboTerm) % SBMLSpeciesReference = SpeciesReference_setSBOTerm(SBMLSpeciesReference, sboTerm) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML SpeciesReference structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLSpeciesReference.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setName.0000644000000000000000000000370311703262342031775 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_setName(SBMLSpeciesReference, name) % SBMLSpeciesReference = SpeciesReference_setName(SBMLSpeciesReference, name) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML SpeciesReference structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'name') if ~ischar(name) error('name must be character array') ; else SBMLSpeciesReference.name = name; end; else error('name not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setMetai0000644000000000000000000000373511703262344032105 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_setMetaid(SBMLSpeciesReference, metaid) % SBMLSpeciesReference = SpeciesReference_setMetaid(SBMLSpeciesReference, metaid) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML SpeciesReference structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLSpeciesReference.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d SpeciesReference', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setId.m0000644000000000000000000000365111703262342031630 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_setId(SBMLSpeciesReference, id) % SBMLSpeciesReference = SpeciesReference_setId(SBMLSpeciesReference, id) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML SpeciesReference structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'id') if ~ischar(id) error('id must be character array') ; else SBMLSpeciesReference.id = id; end; else error('id not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setDenominator.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setDenom0000644000000000000000000000403311703262342032076 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_setDenominator(SBMLSpeciesReference, denominator) % SBMLSpeciesReference = SpeciesReference_setDenominator(SBMLSpeciesReference, denominator) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. denominator, an integer representing the denominator to be set % % Returns % % 1. the SBML SpeciesReference structure with the new value for the denominator attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'denominator') if ~isnumeric(denominator) error('denominator must be numeric') ; else SBMLSpeciesReference.denominator = denominator; end; else error('denominator not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setConstant.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_setConst0000644000000000000000000000407411703262342032127 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_setConstant(SBMLSpeciesReference, constant) % SBMLSpeciesReference = SpeciesReference_setConstant(SBMLSpeciesReference, constant) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. constant, an integer (0/1) representing the value of constant to be set % % Returns % % 1. the SBML SpeciesReference structure with the new value for the constant attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'constant') if (~isIntegralNumber(constant) || constant < 0 || constant > 1) error('constant must be an integer of value 0/1') ; else SBMLSpeciesReference.constant = constant; end; else error('constant not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetStoichiometryMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetSto0000644000000000000000000000355111703262344032103 0ustar rootrootfunction value = SpeciesReference_isSetStoichiometryMath(SBMLSpeciesReference) % value = SpeciesReference_isSetStoichiometryMath(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. value = % - 1 if the stoichiometryMath structure is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'stoichiometryMath') value = ~isempty(SBMLSpeciesReference.stoichiometryMath); else error('stoichiometryMath not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetStoichiometry.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetSto0000644000000000000000000000360211703262342032076 0ustar rootrootfunction value = SpeciesReference_isSetStoichiometry(SBMLSpeciesReference) % value = SpeciesReference_isSetStoichiometry(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. value = % - 1 if the stoichiometry attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'stoichiometry') if (level > 2) value = SBMLSpeciesReference.isSetStoichiometry; else value = 1; end; else error('isSetStoichiometry not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetSpe0000644000000000000000000000345511703262342032066 0ustar rootrootfunction value = SpeciesReference_isSetSpecies(SBMLSpeciesReference) % value = SpeciesReference_isSetSpecies(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. value = % - 1 if the species attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'species') value = ~isempty(SBMLSpeciesReference.species); else error('species not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetSBO0000644000000000000000000000345011703262344031757 0ustar rootrootfunction value = SpeciesReference_isSetSBOTerm(SBMLSpeciesReference) % value = SpeciesReference_isSetSBOTerm(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'sboTerm') value = (SBMLSpeciesReference.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetNam0000644000000000000000000000343311703262342032046 0ustar rootrootfunction value = SpeciesReference_isSetName(SBMLSpeciesReference) % value = SpeciesReference_isSetName(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'name') value = ~isempty(SBMLSpeciesReference.name); else error('name not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetMet0000644000000000000000000000344711703262342032065 0ustar rootrootfunction value = SpeciesReference_isSetMetaid(SBMLSpeciesReference) % value = SpeciesReference_isSetMetaid(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'metaid') value = ~isempty(SBMLSpeciesReference.metaid); else error('metaid not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetId.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetId.0000644000000000000000000000341711703262342031747 0ustar rootrootfunction value = SpeciesReference_isSetId(SBMLSpeciesReference) % value = SpeciesReference_isSetId(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'id') value = ~isempty(SBMLSpeciesReference.id); else error('id not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetDenominator.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isSetDen0000644000000000000000000000344111703262342032040 0ustar rootrootfunction value = SpeciesReference_isSetDenominator(SBMLSpeciesReference) % value = SpeciesReference_isSetDenominator(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. value = % - 1 if the denominator attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'denominator') value = 1; else error('isSetDenominator not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isInAlgebraicRule.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isInAlge0000644000000000000000000000636711703262344032031 0ustar rootrootfunction y = SpeciesReference_isInAlgebraicRule(SBMLSpeciesReference, SBMLRules) % y = SpeciesReference_isInAlgebraicRule(SBMLSpeciesReference, SBMLRules) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - an array of the indices of any algebraicRules the id of the SpeciesReference appears in % - 0 if the SpeciesReference appears in no algebraicRules % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLSpeciesReference)) error(sprintf('%s', ... 'argument must be an SBML SpeciesReference structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLSpeciesReference); if (~isSBML_SpeciesReference(SBMLSpeciesReference, sbmlLevel, sbmlVersion)) error('SpeciesReference_isInAlgebraicRule(SBMLSpeciesReference, SBMLRules)\n%s', ... 'first argument must be an SBMLSpeciesReference structure'); elseif (~isfield(SBMLSpeciesReference, 'id')) error('SpeciesReference cannot be used by rules in SBML level %u version %u', ... sbmlLevel, sbmlVersion); end; NumRules = length(SBMLRules); if (NumRules < 1) error('SpeciesReference_isInAlgebraicRule(SBMLSpeciesReference, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('SpeciesReference_isInAlgebraicRule(SBMLSpeciesReference, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the species occurs %determine the name or id of the species name = SBMLSpeciesReference.id; y = []; for i = 1:NumRules index = matchName(SBMLRules(i).formula, name); if (~isempty(index) && strcmp(SBMLRules(i).typecode, 'SBML_ALGEBRAIC_RULE')) y = [y;i]; end; end; if isempty(y) y = 0; end; ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isAssignedByRule.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isAssign0000644000000000000000000000641011703262344032103 0ustar rootrootfunction y = SpeciesReference_isAssignedByRule(SBMLSpeciesReference, SBMLRules) % y = SpeciesReference_isAssignedByRule(SBMLSpeciesReference, SBMLRules) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - the index of the assignmentRule used to assigned value to the SpeciesReference % - 0 if the SpeciesReference is not assigned by assignmentRule % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLSpeciesReference)) error(sprintf('%s', ... 'argument must be an SBML SpeciesReference structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLSpeciesReference); if (~isSBML_SpeciesReference(SBMLSpeciesReference, sbmlLevel, sbmlVersion)) error('SpeciesReference_isAssignedByRateRule(SBMLSpeciesReference, SBMLRules)\n%s', ... 'first argument must be an SBMLSpeciesReference structure'); elseif (sbmlLevel < 3) error('SpeciesReference cannot be assigned by rules in SBML level %u', sbmlLevel); end; NumRules = length(SBMLRules); if (NumRules < 1) error('SpeciesReference_isAssignedByRateRule(SBMLSpeciesReference, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('SpeciesReference_isAssignedByRateRule(SBMLSpeciesReference, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the SpeciesReference is assigned by it %determine the name or id of the SpeciesReference name = SBMLSpeciesReference.id; for i = 1:NumRules if (strcmp(SBMLRules(i).typecode, 'SBML_ASSIGNMENT_RULE')) if (strcmp(SBMLRules(i).variable, name)) % once found return as cannot occur more than once y = i; return; end; end; end; ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isAssignedByRateRule.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_isAssign0000644000000000000000000000637611703262344032116 0ustar rootrootfunction y = SpeciesReference_isAssignedByRateRule(SBMLSpeciesReference, SBMLRules) % y = SpeciesReference_isAssignedByRateRule(SBMLSpeciesReference, SBMLRules) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - the index of the rateRule used to assigned value to the SpeciesReference % - 0 if the SpeciesReference is not assigned by rateRule % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLSpeciesReference)) error(sprintf('%s', ... 'argument must be an SBML SpeciesReference structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLSpeciesReference); if (~isSBML_SpeciesReference(SBMLSpeciesReference, sbmlLevel, sbmlVersion)) error('SpeciesReference_isAssignedByRateRule(SBMLSpeciesReference, SBMLRules)\n%s', ... 'first argument must be an SBMLSpeciesReference structure'); elseif (sbmlLevel < 3) error('SpeciesReference cannot be assigned by rules in SBML level %u', sbmlLevel); end; NumRules = length(SBMLRules); if (NumRules < 1) error('SpeciesReference_isAssignedByRateRule(SBMLSpeciesReference, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('SpeciesReference_isAssignedByRateRule(SBMLSpeciesReference, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the SpeciesReference is assigned by it %determine the name or id of the SpeciesReference name = SBMLSpeciesReference.id; for i = 1:NumRules if (strcmp(SBMLRules(i).typecode, 'SBML_RATE_RULE')) if (strcmp(SBMLRules(i).variable, name)) % once found return as cannot occur more than once y = i; return; end; end; end; ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getStoichiometryMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getStoic0000644000000000000000000000353111703262342032103 0ustar rootrootfunction stoichiometryMath = SpeciesReference_getStoichiometryMath(SBMLSpeciesReference) % stoichiometryMath = SpeciesReference_getStoichiometryMath(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the SBML StoichiometryMath structure % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'stoichiometryMath') stoichiometryMath = SBMLSpeciesReference.stoichiometryMath; else error('stoichiometryMath not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getStoichiometry.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getStoic0000644000000000000000000000347511703262342032112 0ustar rootrootfunction stoichiometry = SpeciesReference_getStoichiometry(SBMLSpeciesReference) % stoichiometry = SpeciesReference_getStoichiometry(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the value of the stoichiometry attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'stoichiometry') stoichiometry = SBMLSpeciesReference.stoichiometry; else error('stoichiometry not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getSpeci0000644000000000000000000000340711703262342032067 0ustar rootrootfunction species = SpeciesReference_getSpecies(SBMLSpeciesReference) % species = SpeciesReference_getSpecies(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the value of the species attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'species') species = SBMLSpeciesReference.species; else error('species not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getSBOTe0000644000000000000000000000340711703262342031740 0ustar rootrootfunction sboTerm = SpeciesReference_getSBOTerm(SBMLSpeciesReference) % sboTerm = SpeciesReference_getSBOTerm(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'sboTerm') sboTerm = SBMLSpeciesReference.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getName.0000644000000000000000000000335411703262344031765 0ustar rootrootfunction name = SpeciesReference_getName(SBMLSpeciesReference) % name = SpeciesReference_getName(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'name') name = SBMLSpeciesReference.name; else error('name not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getMetai0000644000000000000000000000337611703262342032070 0ustar rootrootfunction metaid = SpeciesReference_getMetaid(SBMLSpeciesReference) % metaid = SpeciesReference_getMetaid(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'metaid') metaid = SBMLSpeciesReference.metaid; else error('metaid not an attribute on SBML L%dV%d SpeciesReference', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getId.m0000644000000000000000000000333211703262342031610 0ustar rootrootfunction id = SpeciesReference_getId(SBMLSpeciesReference) % id = SpeciesReference_getId(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'id') id = SBMLSpeciesReference.id; else error('id not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getDenominator.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getDenom0000644000000000000000000000345311703262344032071 0ustar rootrootfunction denominator = SpeciesReference_getDenominator(SBMLSpeciesReference) % denominator = SpeciesReference_getDenominator(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the value of the denominator attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'denominator') denominator = SBMLSpeciesReference.denominator; else error('denominator not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getConstant.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_getConst0000644000000000000000000000342011703262344032107 0ustar rootrootfunction constant = SpeciesReference_getConstant(SBMLSpeciesReference) % constant = SpeciesReference_getConstant(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the value of the constant attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'constant') constant = SBMLSpeciesReference.constant; else error('constant not an attribute on SBML L%dV%d SpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_createStoichiometryMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_createSt0000644000000000000000000000400711703262342032073 0ustar rootrootfunction SBMLSpeciesReference = SpeciesReference_createStoichiometryMath(SBMLSpeciesReference) % SBMLSpeciesReference = SpeciesReference_createStoichiometryMath(SBMLSpeciesReference) % % Takes % % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % % Returns % % 1. the SBML SpeciesReference structure with a new SBML StoichiometryMath structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesReference); if isfield(SBMLSpeciesReference, 'stoichiometryMath') SBMLStoichiometryMath = StoichiometryMath_create(level, version); if ~isempty(SBMLStoichiometryMath) SBMLSpeciesReference.stoichiometryMath = SBMLStoichiometryMath; end; else error('stoichiometryMath not an element on SBML L%dV%d SpeciesReference', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/SpeciesReference_create.m0000644000000000000000000000612511703262342032022 0ustar rootrootfunction SpeciesReference = SpeciesReference_create(varargin) % SpeciesReference = SpeciesReference_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML SpeciesReference structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getSpeciesReferenceFieldnames(level, version); if (num > 0) values = getSpeciesReferenceDefaultValues(level, version); SpeciesReference = cell2struct(values, fieldnames, 2); warning('off', 'Warn:InvalidLV'); t = StoichiometryMath_create(level, version); if ~isempty(t) SpeciesReference.stoichiometryMath = t; SpeciesReference.stoichiometryMath(1:end) = []; end; warning('on', 'Warn:InvalidLV'); %add level and version SpeciesReference.level = level; SpeciesReference.version = version; %check correct structure if ~isSBML_SpeciesReference(SpeciesReference, level, version) SpeciesReference = struct(); warning('Warn:BadStruct', 'Failed to create SpeciesReference'); end; else SpeciesReference = []; warning('Warn:InvalidLV', 'SpeciesReference not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesReference/Contents.m0000644000000000000000000005042211703262342027061 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\SpeciesReference % % The functions allow users to create and work with the SBML SpeciesReference structure. % %================================================================================= % SpeciesReference = SpeciesReference_create(level(optional), version(optional) ) %================================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML SpeciesReference structure of the appropriate level and version % %======================================================================================= % SBMLSpeciesReference = SpeciesReference_createStoichiometryMath(SBMLSpeciesReference) %======================================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the SBML SpeciesReference structure with a new SBML StoichiometryMath structure added % %=============================================================== % constant = SpeciesReference_getConstant(SBMLSpeciesReference) %=============================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the value of the constant attribute % %===================================================================== % denominator = SpeciesReference_getDenominator(SBMLSpeciesReference) %===================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the value of the denominator attribute % %=================================================== % id = SpeciesReference_getId(SBMLSpeciesReference) %=================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the value of the id attribute % %=========================================================== % metaid = SpeciesReference_getMetaid(SBMLSpeciesReference) %=========================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the value of the metaid attribute % %======================================================= % name = SpeciesReference_getName(SBMLSpeciesReference) %======================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the value of the name attribute % %============================================================= % sboTerm = SpeciesReference_getSBOTerm(SBMLSpeciesReference) %============================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the value of the sboTerm attribute % %============================================================= % species = SpeciesReference_getSpecies(SBMLSpeciesReference) %============================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the value of the species attribute % %========================================================================= % stoichiometry = SpeciesReference_getStoichiometry(SBMLSpeciesReference) %========================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the value of the stoichiometry attribute % %================================================================================= % stoichiometryMath = SpeciesReference_getStoichiometryMath(SBMLSpeciesReference) %================================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the SBML StoichiometryMath structure % %============================================================================ % y = SpeciesReference_isAssignedByRateRule(SBMLSpeciesReference, SBMLRules) %============================================================================ % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - the index of the rateRule used to assigned value to the SpeciesReference % - 0 if the SpeciesReference is not assigned by rateRule % % %======================================================================== % y = SpeciesReference_isAssignedByRule(SBMLSpeciesReference, SBMLRules) %======================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - the index of the assignmentRule used to assigned value to the SpeciesReference % - 0 if the SpeciesReference is not assigned by assignmentRule % % %========================================================================= % y = SpeciesReference_isInAlgebraicRule(SBMLSpeciesReference, SBMLRules) %========================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - an array of the indices of any algebraicRules the id of the SpeciesReference appears in % - 0 if the SpeciesReference appears in no algebraicRules % % %================================================================= % value = SpeciesReference_isSetDenominator(SBMLSpeciesReference) %================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. value = % - 1 if the denominator attribute is set % - 0 otherwise % %======================================================== % value = SpeciesReference_isSetId(SBMLSpeciesReference) %======================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %============================================================ % value = SpeciesReference_isSetMetaid(SBMLSpeciesReference) %============================================================ % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %========================================================== % value = SpeciesReference_isSetName(SBMLSpeciesReference) %========================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %============================================================= % value = SpeciesReference_isSetSBOTerm(SBMLSpeciesReference) %============================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %============================================================= % value = SpeciesReference_isSetSpecies(SBMLSpeciesReference) %============================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. value = % - 1 if the species attribute is set % - 0 otherwise % %=================================================================== % value = SpeciesReference_isSetStoichiometry(SBMLSpeciesReference) %=================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. value = % - 1 if the stoichiometry attribute is set % - 0 otherwise % %======================================================================= % value = SpeciesReference_isSetStoichiometryMath(SBMLSpeciesReference) %======================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. value = % - 1 if the stoichiometryMath structure is set % - 0 otherwise % %===================================================================================== % SBMLSpeciesReference = SpeciesReference_setConstant(SBMLSpeciesReference, constant) %===================================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. constant, an integer (0/1) representing the value of constant to be set % Returns % 1. the SBML SpeciesReference structure with the new value for the constant attribute % %=========================================================================================== % SBMLSpeciesReference = SpeciesReference_setDenominator(SBMLSpeciesReference, denominator) %=========================================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. denominator, an integer representing the denominator to be set % Returns % 1. the SBML SpeciesReference structure with the new value for the denominator attribute % %========================================================================= % SBMLSpeciesReference = SpeciesReference_setId(SBMLSpeciesReference, id) %========================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. id; a string representing the id to be set % Returns % 1. the SBML SpeciesReference structure with the new value for the id attribute % %================================================================================= % SBMLSpeciesReference = SpeciesReference_setMetaid(SBMLSpeciesReference, metaid) %================================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML SpeciesReference structure with the new value for the metaid attribute % %============================================================================= % SBMLSpeciesReference = SpeciesReference_setName(SBMLSpeciesReference, name) %============================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. name; a string representing the name to be set % Returns % 1. the SBML SpeciesReference structure with the new value for the name attribute % %=================================================================================== % SBMLSpeciesReference = SpeciesReference_setSBOTerm(SBMLSpeciesReference, sboTerm) %=================================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML SpeciesReference structure with the new value for the sboTerm attribute % %=================================================================================== % SBMLSpeciesReference = SpeciesReference_setSpecies(SBMLSpeciesReference, species) %=================================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. species; a string representing the species to be set % Returns % 1. the SBML SpeciesReference structure with the new value for the species attribute % %=============================================================================================== % SBMLSpeciesReference = SpeciesReference_setStoichiometry(SBMLSpeciesReference, stoichiometry) %=============================================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. stoichiometry; number representing the value of stoichiometry to be set % Returns % 1. the SBML SpeciesReference structure with the new value for the stoichiometry attribute % %=========================================================================================================== % SBMLSpeciesReference = SpeciesReference_setStoichiometryMath(SBMLSpeciesReference, SBMLStoichiometryMath) %=========================================================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % 2. SBMLStoichiometryMath, an SBML StoichiometryMath structure % Returns % 1. the SBML SpeciesReference structure with the new value for the stoichiometryMath field % %================================================================================ % SBMLSpeciesReference = SpeciesReference_unsetDenominator(SBMLSpeciesReference) %================================================================================ % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the SBML SpeciesReference structure with the denominator attribute unset % %======================================================================= % SBMLSpeciesReference = SpeciesReference_unsetId(SBMLSpeciesReference) %======================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the SBML SpeciesReference structure with the id attribute unset % %=========================================================================== % SBMLSpeciesReference = SpeciesReference_unsetMetaid(SBMLSpeciesReference) %=========================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the SBML SpeciesReference structure with the metaid attribute unset % %========================================================================= % SBMLSpeciesReference = SpeciesReference_unsetName(SBMLSpeciesReference) %========================================================================= % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the SBML SpeciesReference structure with the name attribute unset % %============================================================================ % SBMLSpeciesReference = SpeciesReference_unsetSBOTerm(SBMLSpeciesReference) %============================================================================ % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the SBML SpeciesReference structure with the sboTerm attribute unset % %============================================================================ % SBMLSpeciesReference = SpeciesReference_unsetSpecies(SBMLSpeciesReference) %============================================================================ % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the SBML SpeciesReference structure with the species attribute unset % %================================================================================== % SBMLSpeciesReference = SpeciesReference_unsetStoichiometry(SBMLSpeciesReference) %================================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the SBML SpeciesReference structure with the stoichiometry attribute unset % %====================================================================================== % SBMLSpeciesReference = SpeciesReference_unsetStoichiometryMath(SBMLSpeciesReference) %====================================================================================== % Takes % 1. SBMLSpeciesReference, an SBML SpeciesReference structure % Returns % 1. the SBML SpeciesReference structure with the stoichiometryMath field unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/0000755000000000000000000000000011704572240026645 5ustar rootroot././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_unsetVariable.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000365611703262342032214 0ustar rootrootfunction SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetVariable(SBMLSpeciesConcentrationRule) % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetVariable(SBMLSpeciesConcentrationRule) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % % Returns % % 1. the SBML SpeciesConcentrationRule structure with the variable attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'variable') SBMLSpeciesConcentrationRule.variable = ''; else error('variable not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_unsetType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000363411703262342032210 0ustar rootrootfunction SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetType(SBMLSpeciesConcentrationRule) % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetType(SBMLSpeciesConcentrationRule) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % % Returns % % 1. the SBML SpeciesConcentrationRule structure with the type attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'type') SBMLSpeciesConcentrationRule.type = 'scalar'; else error('type not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_unsetSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000365011703262342032206 0ustar rootrootfunction SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetSpecies(SBMLSpeciesConcentrationRule) % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetSpecies(SBMLSpeciesConcentrationRule) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % % Returns % % 1. the SBML SpeciesConcentrationRule structure with the species attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'species') SBMLSpeciesConcentrationRule.species = ''; else error('species not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_unsetFormula.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000365011703262342032206 0ustar rootrootfunction SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetFormula(SBMLSpeciesConcentrationRule) % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetFormula(SBMLSpeciesConcentrationRule) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % % Returns % % 1. the SBML SpeciesConcentrationRule structure with the formula attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'formula') SBMLSpeciesConcentrationRule.formula = ''; else error('formula not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_setType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000405111703262342032202 0ustar rootrootfunction SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setType(SBMLSpeciesConcentrationRule, type) % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setType(SBMLSpeciesConcentrationRule, type) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % 2. type; a string representing the type to be set % % Returns % % 1. the SBML SpeciesConcentrationRule structure with the new value for the type attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'type') if ~ischar(type) error('type must be character array') ; else SBMLSpeciesConcentrationRule.type = type; end; else error('type not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_setSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000412011703262342032177 0ustar rootrootfunction SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setSpecies(SBMLSpeciesConcentrationRule, species) % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setSpecies(SBMLSpeciesConcentrationRule, species) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % 2. species; a string representing the species to be set % % Returns % % 1. the SBML SpeciesConcentrationRule structure with the new value for the species attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'species') if ~ischar(species) error('species must be character array') ; else SBMLSpeciesConcentrationRule.species = species; end; else error('species not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_setFormula.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000412011703262342032177 0ustar rootrootfunction SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setFormula(SBMLSpeciesConcentrationRule, formula) % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setFormula(SBMLSpeciesConcentrationRule, formula) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % 2. formula; a string representing the formula to be set % % Returns % % 1. the SBML SpeciesConcentrationRule structure with the new value for the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'formula') if ~ischar(formula) error('formula must be character array') ; else SBMLSpeciesConcentrationRule.formula = formula; end; else error('formula not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_isSetType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000355111703262342032206 0ustar rootrootfunction value = SpeciesConcentrationRule_isSetType(SBMLSpeciesConcentrationRule) % value = SpeciesConcentrationRule_isSetType(SBMLSpeciesConcentrationRule) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % % Returns % % 1. value = % - 1 if the type attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'type') value = ~isempty(SBMLSpeciesConcentrationRule.type); else error('type not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_isSetSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000357311703262342032212 0ustar rootrootfunction value = SpeciesConcentrationRule_isSetSpecies(SBMLSpeciesConcentrationRule) % value = SpeciesConcentrationRule_isSetSpecies(SBMLSpeciesConcentrationRule) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % % Returns % % 1. value = % - 1 if the species attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'species') value = ~isempty(SBMLSpeciesConcentrationRule.species); else error('species not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_isSetFormula.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000357311703262342032212 0ustar rootrootfunction value = SpeciesConcentrationRule_isSetFormula(SBMLSpeciesConcentrationRule) % value = SpeciesConcentrationRule_isSetFormula(SBMLSpeciesConcentrationRule) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % % Returns % % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'formula') value = ~isempty(SBMLSpeciesConcentrationRule.formula); else error('formula not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_getType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000347211703262342032210 0ustar rootrootfunction type = SpeciesConcentrationRule_getType(SBMLSpeciesConcentrationRule) % type = SpeciesConcentrationRule_getType(SBMLSpeciesConcentrationRule) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % % Returns % % 1. the value of the type attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'type') type = SBMLSpeciesConcentrationRule.type; else error('type not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_getSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000352511703262342032207 0ustar rootrootfunction species = SpeciesConcentrationRule_getSpecies(SBMLSpeciesConcentrationRule) % species = SpeciesConcentrationRule_getSpecies(SBMLSpeciesConcentrationRule) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % % Returns % % 1. the value of the species attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'species') species = SBMLSpeciesConcentrationRule.species; else error('species not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_getFormula.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000352511703262342032207 0ustar rootrootfunction formula = SpeciesConcentrationRule_getFormula(SBMLSpeciesConcentrationRule) % formula = SpeciesConcentrationRule_getFormula(SBMLSpeciesConcentrationRule) % % Takes % % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % % Returns % % 1. the value of the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpeciesConcentrationRule); if isfield(SBMLSpeciesConcentrationRule, 'formula') formula = SBMLSpeciesConcentrationRule.formula; else error('formula not an attribute on SBML L%dV%d SpeciesConcentrationRule', level, version); end; ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrationRule_create.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/SpeciesConcentrat0000644000000000000000000000574211703262342032212 0ustar rootrootfunction SpeciesConcentrationRule = SpeciesConcentrationRule_create(varargin) % SpeciesConcentrationRule = SpeciesConcentrationRule_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML SpeciesConcentrationRule structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getSpeciesConcentrationRuleFieldnames(level, version); if (num > 0) values = getSpeciesConcentrationRuleDefaultValues(level, version); SpeciesConcentrationRule = cell2struct(values, fieldnames, 2); %add level and version SpeciesConcentrationRule.level = level; SpeciesConcentrationRule.version = version; %check correct structure if ~isSBML_SpeciesConcentrationRule(SpeciesConcentrationRule, level, version) SpeciesConcentrationRule = struct(); warning('Warn:BadStruct', 'Failed to create SpeciesConcentrationRule'); end; else SpeciesConcentrationRule = []; warning('Warn:InvalidLV', 'SpeciesConcentrationRule not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/SpeciesConcentrationRule/Contents.m0000644000000000000000000001726511703262342030631 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\SpeciesConcentrationRule % % The functions allow users to create and work with the SBML SpeciesConcentrationRule structure. % %================================================================================================= % SpeciesConcentrationRule = SpeciesConcentrationRule_create(level(optional), version(optional) ) %================================================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML SpeciesConcentrationRule structure of the appropriate level and version % %============================================================================= % formula = SpeciesConcentrationRule_getFormula(SBMLSpeciesConcentrationRule) %============================================================================= % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % Returns % 1. the value of the formula attribute % %============================================================================= % species = SpeciesConcentrationRule_getSpecies(SBMLSpeciesConcentrationRule) %============================================================================= % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % Returns % 1. the value of the species attribute % %======================================================================= % type = SpeciesConcentrationRule_getType(SBMLSpeciesConcentrationRule) %======================================================================= % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % Returns % 1. the value of the type attribute % %============================================================================= % value = SpeciesConcentrationRule_isSetFormula(SBMLSpeciesConcentrationRule) %============================================================================= % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % Returns % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % %============================================================================= % value = SpeciesConcentrationRule_isSetSpecies(SBMLSpeciesConcentrationRule) %============================================================================= % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % Returns % 1. value = % - 1 if the species attribute is set % - 0 otherwise % %========================================================================== % value = SpeciesConcentrationRule_isSetType(SBMLSpeciesConcentrationRule) %========================================================================== % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % Returns % 1. value = % - 1 if the type attribute is set % - 0 otherwise % %=========================================================================================================== % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setFormula(SBMLSpeciesConcentrationRule, formula) %=========================================================================================================== % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % 2. formula; a string representing the formula to be set % Returns % 1. the SBML SpeciesConcentrationRule structure with the new value for the formula attribute % %=========================================================================================================== % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setSpecies(SBMLSpeciesConcentrationRule, species) %=========================================================================================================== % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % 2. species; a string representing the species to be set % Returns % 1. the SBML SpeciesConcentrationRule structure with the new value for the species attribute % %===================================================================================================== % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setType(SBMLSpeciesConcentrationRule, type) %===================================================================================================== % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % 2. type; a string representing the type to be set % Returns % 1. the SBML SpeciesConcentrationRule structure with the new value for the type attribute % %==================================================================================================== % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetFormula(SBMLSpeciesConcentrationRule) %==================================================================================================== % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % Returns % 1. the SBML SpeciesConcentrationRule structure with the formula attribute unset % %==================================================================================================== % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetSpecies(SBMLSpeciesConcentrationRule) %==================================================================================================== % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % Returns % 1. the SBML SpeciesConcentrationRule structure with the species attribute unset % %================================================================================================= % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetType(SBMLSpeciesConcentrationRule) %================================================================================================= % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % Returns % 1. the SBML SpeciesConcentrationRule structure with the type attribute unset % %===================================================================================================== % SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetVariable(SBMLSpeciesConcentrationRule) %===================================================================================================== % Takes % 1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure % Returns % 1. the SBML SpeciesConcentrationRule structure with the variable attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/0000755000000000000000000000000011704572240023266 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetUnits.m0000644000000000000000000000330111703262332027272 0ustar rootrootfunction SBMLSpecies = Species_unsetUnits(SBMLSpecies) % SBMLSpecies = Species_unsetUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the units attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'units') SBMLSpecies.units = ''; else error('units not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetSubstanceUnits.m0000644000000000000000000000336711703262332031156 0ustar rootrootfunction SBMLSpecies = Species_unsetSubstanceUnits(SBMLSpecies) % SBMLSpecies = Species_unsetSubstanceUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the substanceUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'substanceUnits') SBMLSpecies.substanceUnits = ''; else error('substanceUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetSpeciesType.m0000644000000000000000000000334511703262332030435 0ustar rootrootfunction SBMLSpecies = Species_unsetSpeciesType(SBMLSpecies) % SBMLSpecies = Species_unsetSpeciesType(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the speciesType attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'speciesType') SBMLSpecies.speciesType = ''; else error('speciesType not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetSpatialSizeUnits.m0000644000000000000000000000340311703262332031446 0ustar rootrootfunction SBMLSpecies = Species_unsetSpatialSizeUnits(SBMLSpecies) % SBMLSpecies = Species_unsetSpatialSizeUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the spatialSizeUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'spatialSizeUnits') SBMLSpecies.spatialSizeUnits = ''; else error('spatialSizeUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetSBOTerm.m0000644000000000000000000000331511703262332027450 0ustar rootrootfunction SBMLSpecies = Species_unsetSBOTerm(SBMLSpecies) % SBMLSpecies = Species_unsetSBOTerm(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'sboTerm') SBMLSpecies.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetName.m0000644000000000000000000000327311703262332027060 0ustar rootrootfunction SBMLSpecies = Species_unsetName(SBMLSpecies) % SBMLSpecies = Species_unsetName(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'name') SBMLSpecies.name = ''; else error('name not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetMetaid.m0000644000000000000000000000330711703262332027401 0ustar rootrootfunction SBMLSpecies = Species_unsetMetaid(SBMLSpecies) % SBMLSpecies = Species_unsetMetaid(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'metaid') SBMLSpecies.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Species', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetInitialConcentration.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetInitialConcentration.0000644000000000000000000000351111703262332032136 0ustar rootrootfunction SBMLSpecies = Species_unsetInitialConcentration(SBMLSpecies) % SBMLSpecies = Species_unsetInitialConcentration(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the initialConcentration attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'initialConcentration') SBMLSpecies.initialConcentration = NaN; SBMLSpecies.isSetInitialConcentration = 0; else error('initialConcentration not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetInitialAmount.m0000644000000000000000000000343011703262332030750 0ustar rootrootfunction SBMLSpecies = Species_unsetInitialAmount(SBMLSpecies) % SBMLSpecies = Species_unsetInitialAmount(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the initialAmount attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'initialAmount') SBMLSpecies.initialAmount = NaN; SBMLSpecies.isSetInitialAmount = 0; else error('initialAmount not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetId.m0000644000000000000000000000325711703262332026536 0ustar rootrootfunction SBMLSpecies = Species_unsetId(SBMLSpecies) % SBMLSpecies = Species_unsetId(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'id') SBMLSpecies.id = ''; else error('id not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetConversionFactor.m0000644000000000000000000000340311703262332031457 0ustar rootrootfunction SBMLSpecies = Species_unsetConversionFactor(SBMLSpecies) % SBMLSpecies = Species_unsetConversionFactor(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the conversionFactor attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'conversionFactor') SBMLSpecies.conversionFactor = ''; else error('conversionFactor not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetCompartment.m0000644000000000000000000000334511703262332030471 0ustar rootrootfunction SBMLSpecies = Species_unsetCompartment(SBMLSpecies) % SBMLSpecies = Species_unsetCompartment(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the compartment attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'compartment') SBMLSpecies.compartment = ''; else error('compartment not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_unsetCharge.m0000644000000000000000000000334711703262332027373 0ustar rootrootfunction SBMLSpecies = Species_unsetCharge(SBMLSpecies) % SBMLSpecies = Species_unsetCharge(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Species structure with the charge attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'charge') SBMLSpecies.charge = NaN; SBMLSpecies.isSetCharge = 0; else error('charge not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setUnits.m0000644000000000000000000000353311703262332026736 0ustar rootrootfunction SBMLSpecies = Species_setUnits(SBMLSpecies, units) % SBMLSpecies = Species_setUnits(SBMLSpecies, units) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. units; a string representing the units to be set % % Returns % % 1. the SBML Species structure with the new value for the units attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'units') if ~ischar(units) error('units must be character array') ; else SBMLSpecies.units = units; end; else error('units not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setSubstanceUnits.m0000644000000000000000000000372011703262332030604 0ustar rootrootfunction SBMLSpecies = Species_setSubstanceUnits(SBMLSpecies, substanceUnits) % SBMLSpecies = Species_setSubstanceUnits(SBMLSpecies, substanceUnits) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. substanceUnits; a string representing the substanceUnits to be set % % Returns % % 1. the SBML Species structure with the new value for the substanceUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'substanceUnits') if ~ischar(substanceUnits) error('substanceUnits must be character array') ; else SBMLSpecies.substanceUnits = substanceUnits; end; else error('substanceUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setSpeciesType.m0000644000000000000000000000365111703262332030072 0ustar rootrootfunction SBMLSpecies = Species_setSpeciesType(SBMLSpecies, speciesType) % SBMLSpecies = Species_setSpeciesType(SBMLSpecies, speciesType) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. speciesType; a string representing the speciesType to be set % % Returns % % 1. the SBML Species structure with the new value for the speciesType attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'speciesType') if ~ischar(speciesType) error('speciesType must be character array') ; else SBMLSpecies.speciesType = speciesType; end; else error('speciesType not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setSpatialSizeUnits.m0000644000000000000000000000375211703262332031112 0ustar rootrootfunction SBMLSpecies = Species_setSpatialSizeUnits(SBMLSpecies, spatialSizeUnits) % SBMLSpecies = Species_setSpatialSizeUnits(SBMLSpecies, spatialSizeUnits) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. spatialSizeUnits; a string representing the spatialSizeUnits to be set % % Returns % % 1. the SBML Species structure with the new value for the spatialSizeUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'spatialSizeUnits') if ~ischar(spatialSizeUnits) error('spatialSizeUnits must be character array') ; else SBMLSpecies.spatialSizeUnits = spatialSizeUnits; end; else error('spatialSizeUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setSBOTerm.m0000644000000000000000000000357411703262332027114 0ustar rootrootfunction SBMLSpecies = Species_setSBOTerm(SBMLSpecies, sboTerm) % SBMLSpecies = Species_setSBOTerm(SBMLSpecies, sboTerm) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Species structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLSpecies.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setName.m0000644000000000000000000000351611703262332026515 0ustar rootrootfunction SBMLSpecies = Species_setName(SBMLSpecies, name) % SBMLSpecies = Species_setName(SBMLSpecies, name) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML Species structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'name') if ~ischar(name) error('name must be character array') ; else SBMLSpecies.name = name; end; else error('name not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setMetaid.m0000644000000000000000000000355011703262332027036 0ustar rootrootfunction SBMLSpecies = Species_setMetaid(SBMLSpecies, metaid) % SBMLSpecies = Species_setMetaid(SBMLSpecies, metaid) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Species structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLSpecies.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setInitialConcentration.m0000644000000000000000000000411711703262332031753 0ustar rootrootfunction SBMLSpecies = Species_setInitialConcentration(SBMLSpecies, initialConcentration) % SBMLSpecies = Species_setInitialConcentration(SBMLSpecies, initialConcentration) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. initialConcentration; number representing the value of initialConcentration to be set % % Returns % % 1. the SBML Species structure with the new value for the initialConcentration attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'initialConcentration') if ~isnumeric(initialConcentration) error('initialConcentration must be numeric') ; else SBMLSpecies.initialConcentration = initialConcentration; SBMLSpecies.isSetInitialConcentration = 1; end; else error('initialConcentration not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setInitialAmount.m0000644000000000000000000000375511703262332030417 0ustar rootrootfunction SBMLSpecies = Species_setInitialAmount(SBMLSpecies, initialAmount) % SBMLSpecies = Species_setInitialAmount(SBMLSpecies, initialAmount) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. initialAmount; number representing the value of initialAmount to be set % % Returns % % 1. the SBML Species structure with the new value for the initialAmount attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'initialAmount') if ~isnumeric(initialAmount) error('initialAmount must be numeric') ; else SBMLSpecies.initialAmount = initialAmount; SBMLSpecies.isSetInitialAmount = 1; end; else error('initialAmount not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setId.m0000644000000000000000000000346411703262332026173 0ustar rootrootfunction SBMLSpecies = Species_setId(SBMLSpecies, id) % SBMLSpecies = Species_setId(SBMLSpecies, id) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML Species structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'id') if ~ischar(id) error('id must be character array') ; else SBMLSpecies.id = id; end; else error('id not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setHasOnlySubstanceUnits.m0000644000000000000000000000421211703262332032077 0ustar rootrootfunction SBMLSpecies = Species_setHasOnlySubstanceUnits(SBMLSpecies, hasOnlySubstanceUnits) % SBMLSpecies = Species_setHasOnlySubstanceUnits(SBMLSpecies, hasOnlySubstanceUnits) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. hasOnlySubstanceUnits, an integer (0/1) representing the value of hasOnlySubstanceUnits to be set % % Returns % % 1. the SBML Species structure with the new value for the hasOnlySubstanceUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'hasOnlySubstanceUnits') if (~isIntegralNumber(hasOnlySubstanceUnits) || hasOnlySubstanceUnits < 0 || hasOnlySubstanceUnits > 1) error('hasOnlySubstanceUnits must be an integer of value 0/1') ; else SBMLSpecies.hasOnlySubstanceUnits = hasOnlySubstanceUnits; end; else error('hasOnlySubstanceUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setConversionFactor.m0000644000000000000000000000375211703262332031123 0ustar rootrootfunction SBMLSpecies = Species_setConversionFactor(SBMLSpecies, conversionFactor) % SBMLSpecies = Species_setConversionFactor(SBMLSpecies, conversionFactor) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. conversionFactor; a string representing the conversionFactor to be set % % Returns % % 1. the SBML Species structure with the new value for the conversionFactor attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'conversionFactor') if ~ischar(conversionFactor) error('conversionFactor must be character array') ; else SBMLSpecies.conversionFactor = conversionFactor; end; else error('conversionFactor not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setConstant.m0000644000000000000000000000370711703262332027430 0ustar rootrootfunction SBMLSpecies = Species_setConstant(SBMLSpecies, constant) % SBMLSpecies = Species_setConstant(SBMLSpecies, constant) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. constant, an integer (0/1) representing the value of constant to be set % % Returns % % 1. the SBML Species structure with the new value for the constant attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'constant') if (~isIntegralNumber(constant) || constant < 0 || constant > 1) error('constant must be an integer of value 0/1') ; else SBMLSpecies.constant = constant; end; else error('constant not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setCompartment.m0000644000000000000000000000365111703262332030126 0ustar rootrootfunction SBMLSpecies = Species_setCompartment(SBMLSpecies, compartment) % SBMLSpecies = Species_setCompartment(SBMLSpecies, compartment) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. compartment; a string representing the compartment to be set % % Returns % % 1. the SBML Species structure with the new value for the compartment attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'compartment') if ~ischar(compartment) error('compartment must be character array') ; else SBMLSpecies.compartment = compartment; end; else error('compartment not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setCharge.m0000644000000000000000000000360611703262332027026 0ustar rootrootfunction SBMLSpecies = Species_setCharge(SBMLSpecies, charge) % SBMLSpecies = Species_setCharge(SBMLSpecies, charge) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. charge, an integer representing the charge to be set % % Returns % % 1. the SBML Species structure with the new value for the charge attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'charge') if ~isnumeric(charge) error('charge must be numeric') ; else SBMLSpecies.charge = charge; SBMLSpecies.isSetCharge = 1; end; else error('charge not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_setBoundaryCondition.m0000644000000000000000000000411611703262332031264 0ustar rootrootfunction SBMLSpecies = Species_setBoundaryCondition(SBMLSpecies, boundaryCondition) % SBMLSpecies = Species_setBoundaryCondition(SBMLSpecies, boundaryCondition) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. boundaryCondition, an integer (0/1) representing the value of boundaryCondition to be set % % Returns % % 1. the SBML Species structure with the new value for the boundaryCondition attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'boundaryCondition') if (~isIntegralNumber(boundaryCondition) || boundaryCondition < 0 || boundaryCondition > 1) error('boundaryCondition must be an integer of value 0/1') ; else SBMLSpecies.boundaryCondition = boundaryCondition; end; else error('boundaryCondition not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetUnits.m0000644000000000000000000000330711703262332027231 0ustar rootrootfunction value = Species_isSetUnits(SBMLSpecies) % value = Species_isSetUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the units attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'units') value = ~isempty(SBMLSpecies.units); else error('units not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetSubstanceUnits.m0000644000000000000000000000337511703262332031106 0ustar rootrootfunction value = Species_isSetSubstanceUnits(SBMLSpecies) % value = Species_isSetSubstanceUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the substanceUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'substanceUnits') value = ~isempty(SBMLSpecies.substanceUnits); else error('substanceUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetSpeciesType.m0000644000000000000000000000335311703262332030365 0ustar rootrootfunction value = Species_isSetSpeciesType(SBMLSpecies) % value = Species_isSetSpeciesType(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the speciesType attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'speciesType') value = ~isempty(SBMLSpecies.speciesType); else error('speciesType not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetSpatialSizeUnits.m0000644000000000000000000000341111703262332031376 0ustar rootrootfunction value = Species_isSetSpatialSizeUnits(SBMLSpecies) % value = Species_isSetSpatialSizeUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the spatialSizeUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'spatialSizeUnits') value = ~isempty(SBMLSpecies.spatialSizeUnits); else error('spatialSizeUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetSBOTerm.m0000644000000000000000000000331611703262332027402 0ustar rootrootfunction value = Species_isSetSBOTerm(SBMLSpecies) % value = Species_isSetSBOTerm(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'sboTerm') value = (SBMLSpecies.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetName.m0000644000000000000000000000330111703262332027001 0ustar rootrootfunction value = Species_isSetName(SBMLSpecies) % value = Species_isSetName(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'name') value = ~isempty(SBMLSpecies.name); else error('name not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetMetaid.m0000644000000000000000000000331511703262332027331 0ustar rootrootfunction value = Species_isSetMetaid(SBMLSpecies) % value = Species_isSetMetaid(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'metaid') value = ~isempty(SBMLSpecies.metaid); else error('metaid not an attribute on SBML L%dV%d Species', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetInitialConcentration.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetInitialConcentration.0000644000000000000000000000344111703262332032071 0ustar rootrootfunction value = Species_isSetInitialConcentration(SBMLSpecies) % value = Species_isSetInitialConcentration(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the initialConcentration attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'initialConcentration') value = SBMLSpecies.isSetInitialConcentration; else error('isSetInitialConcentration not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetInitialAmount.m0000644000000000000000000000336711703262332030712 0ustar rootrootfunction value = Species_isSetInitialAmount(SBMLSpecies) % value = Species_isSetInitialAmount(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the initialAmount attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'initialAmount') value = SBMLSpecies.isSetInitialAmount; else error('isSetInitialAmount not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetId.m0000644000000000000000000000326511703262332026466 0ustar rootrootfunction value = Species_isSetId(SBMLSpecies) % value = Species_isSetId(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'id') value = ~isempty(SBMLSpecies.id); else error('id not an attribute on SBML L%dV%d Species', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetHasOnlySubstanceUnits.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetHasOnlySubstanceUnits0000644000000000000000000000344711703262332032151 0ustar rootrootfunction value = Species_isSetHasOnlySubstanceUnits(SBMLSpecies) % value = Species_isSetHasOnlySubstanceUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the hasOnlySubstanceUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'hasOnlySubstanceUnits') value = SBMLSpecies.isSetHasOnlySubstanceUnits; else error('isSetHasOnlySubstanceUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetConversionFactor.m0000644000000000000000000000341111703262332031407 0ustar rootrootfunction value = Species_isSetConversionFactor(SBMLSpecies) % value = Species_isSetConversionFactor(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the conversionFactor attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'conversionFactor') value = ~isempty(SBMLSpecies.conversionFactor); else error('conversionFactor not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetCompartment.m0000644000000000000000000000335311703262332030421 0ustar rootrootfunction value = Species_isSetCompartment(SBMLSpecies) % value = Species_isSetCompartment(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the compartment attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'compartment') value = ~isempty(SBMLSpecies.compartment); else error('compartment not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isSetCharge.m0000644000000000000000000000331511703262332027317 0ustar rootrootfunction value = Species_isSetCharge(SBMLSpecies) % value = Species_isSetCharge(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. value = % - 1 if the charge attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'charge') value = SBMLSpecies.isSetCharge; else error('isSetCharge not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isInAlgebraicRule.m0000644000000000000000000000606111703262332030443 0ustar rootrootfunction y = Species_isInAlgebraicRule(SBMLSpecies, SBMLRules) % y = Species_isInAlgebraicRule(SBMLSpecies, SBMLRules) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - an array of the indices of any algebraicRules the id of the Species appears in % - 0 if the Species appears in no algebraicRules % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLSpecies)) error(sprintf('%s', ... 'argument must be an SBML Species structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLSpecies); if (~isSBML_Species(SBMLSpecies, sbmlLevel, sbmlVersion)) error('Species_isInAlgebraicRule(SBMLSpecies, SBMLRules)\n%s', ... 'first argument must be an SBMLSpecies structure'); end; NumRules = length(SBMLRules); if (NumRules < 1) error('Species_isInAlgebraicRule(SBMLSpecies, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('Species_isInAlgebraicRule(SBMLSpecies, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the species occurs %determine the name or id of the species if (sbmlLevel == 1) name = SBMLSpecies.name; else if (isempty(SBMLSpecies.id)) name = SBMLSpecies.name; else name = SBMLSpecies.id; end; end; y = []; for i = 1:NumRules index = matchName(SBMLRules(i).formula, name); if (~isempty(index) && strcmp(SBMLRules(i).typecode, 'SBML_ALGEBRAIC_RULE')) y = [y;i]; end; end; if isempty(y) y = 0; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isAssignedByRule.m0000644000000000000000000000650111703262332030332 0ustar rootrootfunction y = Species_isAssignedByRule(SBMLSpecies, SBMLRules) % y = Species_isAssignedByRule(SBMLSpecies, SBMLRules) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - the index of the assignmentRule used to assigned value to the Species % - 0 if the Species is not assigned by assignmentRule % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLSpecies)) error(sprintf('%s', ... 'argument must be an SBML Species structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLSpecies); if (~isSBML_Species(SBMLSpecies, sbmlLevel, sbmlVersion)) error('Species_isAssignedByRule(SBMLSpecies, SBMLRules)\n%s', ... 'first argument must be an SBMLSpecies structure'); end; NumRules = length(SBMLRules); if (NumRules < 1) error('Species_isAssignedByRule(SBMLSpecies, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('Species_isAssignedByRule(SBMLSpecies, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the species is assigned by it %determine the name or id of the species if (sbmlLevel == 1) name = SBMLSpecies.name; else if (isempty(SBMLSpecies.id)) name = SBMLSpecies.name; else name = SBMLSpecies.id; end; end; for i = 1:NumRules if (strcmp(SBMLRules(i).typecode, 'SBML_ASSIGNMENT_RULE')) if (strcmp(SBMLRules(i).variable, name)) % once found return as cannot occur more than once y = i; return; end; elseif ((strcmp(SBMLRules(i).typecode, 'SBML_SPECIES_CONCENTRATION_RULE')) ... && (strcmp(SBMLRules(i).type, 'scalar'))) if (strcmp(SBMLRules(i).species, name)) y = i; return; end; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_isAssignedByRateRule.m0000644000000000000000000000650111703262332031146 0ustar rootrootfunction y = Species_isAssignedByRateRule(SBMLSpecies, SBMLRules) % y = Species_isAssignedByRateRule(SBMLSpecies, SBMLRules) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - the index of the rateRule used to assigned value to the Species % - 0 if the Species is not assigned by rateRule % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLSpecies)) error(sprintf('%s', ... 'argument must be an SBML Species structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLSpecies); if (~isSBML_Species(SBMLSpecies, sbmlLevel, sbmlVersion)) error('Species_isAssignedByRateRule(SBMLSpecies, SBMLRules)\n%s', ... 'first argument must be an SBMLSpecies structure'); end; NumRules = length(SBMLRules); if (NumRules < 1) error('Species_isAssignedByRateRule(SBMLSpecies, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('Species_isAssignedByRateRule(SBMLSpecies, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the Species is assigned by it %determine the name or id of the Species if (sbmlLevel == 1) name = SBMLSpecies.name; else if (isempty(SBMLSpecies.id)) name = SBMLSpecies.name; else name = SBMLSpecies.id; end; end; for i = 1:NumRules if (strcmp(SBMLRules(i).typecode, 'SBML_RATE_RULE')) if (strcmp(SBMLRules(i).variable, name)) % once found return as cannot occur more than once y = i; return; end; elseif ((strcmp(SBMLRules(i).typecode, 'SBML_SPECIES_CONCENTRATION_RULE')) ... && (strcmp(SBMLRules(i).type, 'rate'))) if (strcmp(SBMLRules(i).species, name)) y = i; return; end; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getUnits.m0000644000000000000000000000323311703262332026717 0ustar rootrootfunction units = Species_getUnits(SBMLSpecies) % units = Species_getUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the units attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'units') units = SBMLSpecies.units; else error('units not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getSubstanceUnits.m0000644000000000000000000000335411703262332030573 0ustar rootrootfunction substanceUnits = Species_getSubstanceUnits(SBMLSpecies) % substanceUnits = Species_getSubstanceUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the substanceUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'substanceUnits') substanceUnits = SBMLSpecies.substanceUnits; else error('substanceUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getSpeciesType.m0000644000000000000000000000332111703262332030050 0ustar rootrootfunction speciesType = Species_getSpeciesType(SBMLSpecies) % speciesType = Species_getSpeciesType(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the speciesType attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'speciesType') speciesType = SBMLSpecies.speciesType; else error('speciesType not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getSpatialSizeUnits.m0000644000000000000000000000337611703262332031100 0ustar rootrootfunction spatialSizeUnits = Species_getSpatialSizeUnits(SBMLSpecies) % spatialSizeUnits = Species_getSpatialSizeUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the spatialSizeUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'spatialSizeUnits') spatialSizeUnits = SBMLSpecies.spatialSizeUnits; else error('spatialSizeUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getSBOTerm.m0000644000000000000000000000325511703262332027074 0ustar rootrootfunction sboTerm = Species_getSBOTerm(SBMLSpecies) % sboTerm = Species_getSBOTerm(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'sboTerm') sboTerm = SBMLSpecies.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getName.m0000644000000000000000000000322211703262332026473 0ustar rootrootfunction name = Species_getName(SBMLSpecies) % name = Species_getName(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'name') name = SBMLSpecies.name; else error('name not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getMetaid.m0000644000000000000000000000324411703262332027022 0ustar rootrootfunction metaid = Species_getMetaid(SBMLSpecies) % metaid = Species_getMetaid(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'metaid') metaid = SBMLSpecies.metaid; else error('metaid not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getInitialConcentration.m0000644000000000000000000000344211703262332031737 0ustar rootrootfunction initialConcentration = Species_getInitialConcentration(SBMLSpecies) % initialConcentration = Species_getInitialConcentration(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the initialConcentration attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'initialConcentration') initialConcentration = SBMLSpecies.initialConcentration; else error('initialConcentration not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getInitialAmount.m0000644000000000000000000000334311703262332030374 0ustar rootrootfunction initialAmount = Species_getInitialAmount(SBMLSpecies) % initialAmount = Species_getInitialAmount(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the initialAmount attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'initialAmount') initialAmount = SBMLSpecies.initialAmount; else error('initialAmount not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getId.m0000644000000000000000000000320011703262332026143 0ustar rootrootfunction id = Species_getId(SBMLSpecies) % id = Species_getId(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'id') id = SBMLSpecies.id; else error('id not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getHasOnlySubstanceUnits.m0000644000000000000000000000345311703262332032071 0ustar rootrootfunction hasOnlySubstanceUnits = Species_getHasOnlySubstanceUnits(SBMLSpecies) % hasOnlySubstanceUnits = Species_getHasOnlySubstanceUnits(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the hasOnlySubstanceUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'hasOnlySubstanceUnits') hasOnlySubstanceUnits = SBMLSpecies.hasOnlySubstanceUnits; else error('hasOnlySubstanceUnits not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getConversionFactor.m0000644000000000000000000000337611703262332031111 0ustar rootrootfunction conversionFactor = Species_getConversionFactor(SBMLSpecies) % conversionFactor = Species_getConversionFactor(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the conversionFactor attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'conversionFactor') conversionFactor = SBMLSpecies.conversionFactor; else error('conversionFactor not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getConstant.m0000644000000000000000000000326611703262332027414 0ustar rootrootfunction constant = Species_getConstant(SBMLSpecies) % constant = Species_getConstant(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the constant attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'constant') constant = SBMLSpecies.constant; else error('constant not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getCompartment.m0000644000000000000000000000332111703262332030104 0ustar rootrootfunction compartment = Species_getCompartment(SBMLSpecies) % compartment = Species_getCompartment(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the compartment attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'compartment') compartment = SBMLSpecies.compartment; else error('compartment not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getCharge.m0000644000000000000000000000324411703262332027010 0ustar rootrootfunction charge = Species_getCharge(SBMLSpecies) % charge = Species_getCharge(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the charge attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'charge') charge = SBMLSpecies.charge; else error('charge not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_getBoundaryCondition.m0000644000000000000000000000340711703262332031252 0ustar rootrootfunction boundaryCondition = Species_getBoundaryCondition(SBMLSpecies) % boundaryCondition = Species_getBoundaryCondition(SBMLSpecies) % % Takes % % 1. SBMLSpecies, an SBML Species structure % % Returns % % 1. the value of the boundaryCondition attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLSpecies); if isfield(SBMLSpecies, 'boundaryCondition') boundaryCondition = SBMLSpecies.boundaryCondition; else error('boundaryCondition not an attribute on SBML L%dV%d Species', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Species_create.m0000644000000000000000000000532411703262332026363 0ustar rootrootfunction Species = Species_create(varargin) % Species = Species_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Species structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getSpeciesFieldnames(level, version); if (num > 0) values = getSpeciesDefaultValues(level, version); Species = cell2struct(values, fieldnames, 2); %add level and version Species.level = level; Species.version = version; %check correct structure if ~isSBML_Species(Species, level, version) Species = struct(); warning('Warn:BadStruct', 'Failed to create Species'); end; else Species = []; warning('Warn:InvalidLV', 'Species not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Species/Contents.m0000644000000000000000000006144611703262332025251 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Species % % The functions allow users to create and work with the SBML Species structure. % %=============================================================== % Species = Species_create(level(optional), version(optional) ) %=============================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Species structure of the appropriate level and version % %=============================================================== % boundaryCondition = Species_getBoundaryCondition(SBMLSpecies) %=============================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the boundaryCondition attribute % %========================================= % charge = Species_getCharge(SBMLSpecies) %========================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the charge attribute % %=================================================== % compartment = Species_getCompartment(SBMLSpecies) %=================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the compartment attribute % %============================================= % constant = Species_getConstant(SBMLSpecies) %============================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the constant attribute % %============================================================= % conversionFactor = Species_getConversionFactor(SBMLSpecies) %============================================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the conversionFactor attribute % %======================================================================= % hasOnlySubstanceUnits = Species_getHasOnlySubstanceUnits(SBMLSpecies) %======================================================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the hasOnlySubstanceUnits attribute % %================================= % id = Species_getId(SBMLSpecies) %================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the id attribute % %======================================================= % initialAmount = Species_getInitialAmount(SBMLSpecies) %======================================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the initialAmount attribute % %===================================================================== % initialConcentration = Species_getInitialConcentration(SBMLSpecies) %===================================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the initialConcentration attribute % %========================================= % metaid = Species_getMetaid(SBMLSpecies) %========================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the metaid attribute % %===================================== % name = Species_getName(SBMLSpecies) %===================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the name attribute % %=========================================== % sboTerm = Species_getSBOTerm(SBMLSpecies) %=========================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the sboTerm attribute % %============================================================= % spatialSizeUnits = Species_getSpatialSizeUnits(SBMLSpecies) %============================================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the spatialSizeUnits attribute % %=================================================== % speciesType = Species_getSpeciesType(SBMLSpecies) %=================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the speciesType attribute % %========================================================= % substanceUnits = Species_getSubstanceUnits(SBMLSpecies) %========================================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the substanceUnits attribute % %======================================= % units = Species_getUnits(SBMLSpecies) %======================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the value of the units attribute % %========================================================== % y = Species_isAssignedByRateRule(SBMLSpecies, SBMLRules) %========================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - the index of the rateRule used to assigned value to the Species % - 0 if the Species is not assigned by rateRule % % %====================================================== % y = Species_isAssignedByRule(SBMLSpecies, SBMLRules) %====================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - the index of the assignmentRule used to assigned value to the Species % - 0 if the Species is not assigned by assignmentRule % % %======================================================= % y = Species_isInAlgebraicRule(SBMLSpecies, SBMLRules) %======================================================= % Takes % 1. SBMLSpecies, an SBML Species structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - an array of the indices of any algebraicRules the id of the Species appears in % - 0 if the Species appears in no algebraicRules % % %========================================== % value = Species_isSetCharge(SBMLSpecies) %========================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the charge attribute is set % - 0 otherwise % %=============================================== % value = Species_isSetCompartment(SBMLSpecies) %=============================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the compartment attribute is set % - 0 otherwise % %==================================================== % value = Species_isSetConversionFactor(SBMLSpecies) %==================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the conversionFactor attribute is set % - 0 otherwise % %========================================================= % value = Species_isSetHasOnlySubstanceUnits(SBMLSpecies) %========================================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the hasOnlySubstanceUnits attribute is set % - 0 otherwise % %====================================== % value = Species_isSetId(SBMLSpecies) %====================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %================================================= % value = Species_isSetInitialAmount(SBMLSpecies) %================================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the initialAmount attribute is set % - 0 otherwise % %======================================================== % value = Species_isSetInitialConcentration(SBMLSpecies) %======================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the initialConcentration attribute is set % - 0 otherwise % %========================================== % value = Species_isSetMetaid(SBMLSpecies) %========================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %======================================== % value = Species_isSetName(SBMLSpecies) %======================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %=========================================== % value = Species_isSetSBOTerm(SBMLSpecies) %=========================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %==================================================== % value = Species_isSetSpatialSizeUnits(SBMLSpecies) %==================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the spatialSizeUnits attribute is set % - 0 otherwise % %=============================================== % value = Species_isSetSpeciesType(SBMLSpecies) %=============================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the speciesType attribute is set % - 0 otherwise % %================================================== % value = Species_isSetSubstanceUnits(SBMLSpecies) %================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the substanceUnits attribute is set % - 0 otherwise % %========================================= % value = Species_isSetUnits(SBMLSpecies) %========================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. value = % - 1 if the units attribute is set % - 0 otherwise % %============================================================================ % SBMLSpecies = Species_setBoundaryCondition(SBMLSpecies, boundaryCondition) %============================================================================ % Takes % 1. SBMLSpecies, an SBML Species structure % 2. boundaryCondition, an integer (0/1) representing the value of boundaryCondition to be set % Returns % 1. the SBML Species structure with the new value for the boundaryCondition attribute % %====================================================== % SBMLSpecies = Species_setCharge(SBMLSpecies, charge) %====================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. charge, an integer representing the charge to be set % Returns % 1. the SBML Species structure with the new value for the charge attribute % %================================================================ % SBMLSpecies = Species_setCompartment(SBMLSpecies, compartment) %================================================================ % Takes % 1. SBMLSpecies, an SBML Species structure % 2. compartment; a string representing the compartment to be set % Returns % 1. the SBML Species structure with the new value for the compartment attribute % %========================================================== % SBMLSpecies = Species_setConstant(SBMLSpecies, constant) %========================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. constant, an integer (0/1) representing the value of constant to be set % Returns % 1. the SBML Species structure with the new value for the constant attribute % %========================================================================== % SBMLSpecies = Species_setConversionFactor(SBMLSpecies, conversionFactor) %========================================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. conversionFactor; a string representing the conversionFactor to be set % Returns % 1. the SBML Species structure with the new value for the conversionFactor attribute % %==================================================================================== % SBMLSpecies = Species_setHasOnlySubstanceUnits(SBMLSpecies, hasOnlySubstanceUnits) %==================================================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. hasOnlySubstanceUnits, an integer (0/1) representing the value of hasOnlySubstanceUnits to be set % Returns % 1. the SBML Species structure with the new value for the hasOnlySubstanceUnits attribute % %============================================== % SBMLSpecies = Species_setId(SBMLSpecies, id) %============================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. id; a string representing the id to be set % Returns % 1. the SBML Species structure with the new value for the id attribute % %==================================================================== % SBMLSpecies = Species_setInitialAmount(SBMLSpecies, initialAmount) %==================================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. initialAmount; number representing the value of initialAmount to be set % Returns % 1. the SBML Species structure with the new value for the initialAmount attribute % %================================================================================== % SBMLSpecies = Species_setInitialConcentration(SBMLSpecies, initialConcentration) %================================================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. initialConcentration; number representing the value of initialConcentration to be set % Returns % 1. the SBML Species structure with the new value for the initialConcentration attribute % %====================================================== % SBMLSpecies = Species_setMetaid(SBMLSpecies, metaid) %====================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Species structure with the new value for the metaid attribute % %================================================== % SBMLSpecies = Species_setName(SBMLSpecies, name) %================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. name; a string representing the name to be set % Returns % 1. the SBML Species structure with the new value for the name attribute % %======================================================== % SBMLSpecies = Species_setSBOTerm(SBMLSpecies, sboTerm) %======================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Species structure with the new value for the sboTerm attribute % %========================================================================== % SBMLSpecies = Species_setSpatialSizeUnits(SBMLSpecies, spatialSizeUnits) %========================================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. spatialSizeUnits; a string representing the spatialSizeUnits to be set % Returns % 1. the SBML Species structure with the new value for the spatialSizeUnits attribute % %================================================================ % SBMLSpecies = Species_setSpeciesType(SBMLSpecies, speciesType) %================================================================ % Takes % 1. SBMLSpecies, an SBML Species structure % 2. speciesType; a string representing the speciesType to be set % Returns % 1. the SBML Species structure with the new value for the speciesType attribute % %====================================================================== % SBMLSpecies = Species_setSubstanceUnits(SBMLSpecies, substanceUnits) %====================================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. substanceUnits; a string representing the substanceUnits to be set % Returns % 1. the SBML Species structure with the new value for the substanceUnits attribute % %==================================================== % SBMLSpecies = Species_setUnits(SBMLSpecies, units) %==================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. units; a string representing the units to be set % Returns % 1. the SBML Species structure with the new value for the units attribute % %================================================ % SBMLSpecies = Species_unsetCharge(SBMLSpecies) %================================================ % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the charge attribute unset % %===================================================== % SBMLSpecies = Species_unsetCompartment(SBMLSpecies) %===================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the compartment attribute unset % %========================================================== % SBMLSpecies = Species_unsetConversionFactor(SBMLSpecies) %========================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the conversionFactor attribute unset % %============================================ % SBMLSpecies = Species_unsetId(SBMLSpecies) %============================================ % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the id attribute unset % %======================================================= % SBMLSpecies = Species_unsetInitialAmount(SBMLSpecies) %======================================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the initialAmount attribute unset % %============================================================== % SBMLSpecies = Species_unsetInitialConcentration(SBMLSpecies) %============================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the initialConcentration attribute unset % %================================================ % SBMLSpecies = Species_unsetMetaid(SBMLSpecies) %================================================ % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the metaid attribute unset % %============================================== % SBMLSpecies = Species_unsetName(SBMLSpecies) %============================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the name attribute unset % %================================================= % SBMLSpecies = Species_unsetSBOTerm(SBMLSpecies) %================================================= % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the sboTerm attribute unset % %========================================================== % SBMLSpecies = Species_unsetSpatialSizeUnits(SBMLSpecies) %========================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the spatialSizeUnits attribute unset % %===================================================== % SBMLSpecies = Species_unsetSpeciesType(SBMLSpecies) %===================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the speciesType attribute unset % %======================================================== % SBMLSpecies = Species_unsetSubstanceUnits(SBMLSpecies) %======================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the substanceUnits attribute unset % %=============================================== % SBMLSpecies = Species_unsetUnits(SBMLSpecies) %=============================================== % Takes % 1. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Species structure with the units attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/0000755000000000000000000000000011704572240022602 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/Rule_unsetSBOTerm.m0000644000000000000000000000324411703262340026300 0ustar rootrootfunction SBMLRule = Rule_unsetSBOTerm(SBMLRule) % SBMLRule = Rule_unsetSBOTerm(SBMLRule) % % Takes % % 1. SBMLRule, an SBML Rule structure % % Returns % % 1. the SBML Rule structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRule); if isfield(SBMLRule, 'sboTerm') SBMLRule.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Rule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/Rule_unsetFormula.m0000644000000000000000000000324411703262340026432 0ustar rootrootfunction SBMLRule = Rule_unsetFormula(SBMLRule) % SBMLRule = Rule_unsetFormula(SBMLRule) % % Takes % % 1. SBMLRule, an SBML Rule structure % % Returns % % 1. the SBML Rule structure with the formula attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRule); if isfield(SBMLRule, 'formula') SBMLRule.formula = ''; else error('formula not an attribute on SBML L%dV%d Rule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/Rule_setSBOTerm.m0000644000000000000000000000352311703262340025735 0ustar rootrootfunction SBMLRule = Rule_setSBOTerm(SBMLRule, sboTerm) % SBMLRule = Rule_setSBOTerm(SBMLRule, sboTerm) % % Takes % % 1. SBMLRule, an SBML Rule structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Rule structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRule); if isfield(SBMLRule, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLRule.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Rule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/Rule_setFormula.m0000644000000000000000000000351411703262340026067 0ustar rootrootfunction SBMLRule = Rule_setFormula(SBMLRule, formula) % SBMLRule = Rule_setFormula(SBMLRule, formula) % % Takes % % 1. SBMLRule, an SBML Rule structure % 2. formula; a string representing the formula to be set % % Returns % % 1. the SBML Rule structure with the new value for the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRule); if isfield(SBMLRule, 'formula') if ~ischar(formula) error('formula must be character array') ; else SBMLRule.formula = formula; end; else error('formula not an attribute on SBML L%dV%d Rule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/Rule_isSetSBOTerm.m0000644000000000000000000000325711703262340026235 0ustar rootrootfunction value = Rule_isSetSBOTerm(SBMLRule) % value = Rule_isSetSBOTerm(SBMLRule) % % Takes % % 1. SBMLRule, an SBML Rule structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRule); if isfield(SBMLRule, 'sboTerm') value = (SBMLRule.sboTerm > 0); else error('sboTerm not an attribute on SBML L%dV%d Rule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/Rule_isSetFormula.m0000644000000000000000000000326311703262340026364 0ustar rootrootfunction value = Rule_isSetFormula(SBMLRule) % value = Rule_isSetFormula(SBMLRule) % % Takes % % 1. SBMLRule, an SBML Rule structure % % Returns % % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRule); if isfield(SBMLRule, 'formula') value = ~isempty(SBMLRule.formula); else error('formula not an attribute on SBML L%dV%d Rule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/Rule_getSBOTerm.m0000644000000000000000000000321511703262340025717 0ustar rootrootfunction sboTerm = Rule_getSBOTerm(SBMLRule) % sboTerm = Rule_getSBOTerm(SBMLRule) % % Takes % % 1. SBMLRule, an SBML Rule structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRule); if isfield(SBMLRule, 'sboTerm') sboTerm = SBMLRule.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Rule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/Rule_getFormula.m0000644000000000000000000000321511703262340026051 0ustar rootrootfunction formula = Rule_getFormula(SBMLRule) % formula = Rule_getFormula(SBMLRule) % % Takes % % 1. SBMLRule, an SBML Rule structure % % Returns % % 1. the value of the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRule); if isfield(SBMLRule, 'formula') formula = SBMLRule.formula; else error('formula not an attribute on SBML L%dV%d Rule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/Rule_create.m0000644000000000000000000000532311703262340025211 0ustar rootrootfunction Rule = Rule_create(varargin) % Rule = Rule_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Rule structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getAlgebraicRuleFieldnames(level, version); if (num > 0) values = getAlgebraicRuleDefaultValues(level, version); Rule = cell2struct(values, fieldnames, 2); Rule.typecode = 'SBML_RULE'; %add level and version Rule.level = level; Rule.version = version; %check correct structure if ~isSBML_Rule(Rule, level, version) Rule = struct(); warning('Warn:BadStruct', 'Failed to create Rule'); end; else Rule = []; warning('Warn:InvalidLV', 'Rule not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Rule/Contents.m0000644000000000000000000000736311703262340024562 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Rule % % The functions allow users to create and work with the SBML Rule structure. % %========================================================= % Rule = Rule_create(level(optional), version(optional) ) %========================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Rule structure of the appropriate level and version % %===================================== % formula = Rule_getFormula(SBMLRule) %===================================== % Takes % 1. SBMLRule, an SBML Rule structure % Returns % 1. the value of the formula attribute % %===================================== % sboTerm = Rule_getSBOTerm(SBMLRule) %===================================== % Takes % 1. SBMLRule, an SBML Rule structure % Returns % 1. the value of the sboTerm attribute % %===================================== % value = Rule_isSetFormula(SBMLRule) %===================================== % Takes % 1. SBMLRule, an SBML Rule structure % Returns % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % %===================================== % value = Rule_isSetSBOTerm(SBMLRule) %===================================== % Takes % 1. SBMLRule, an SBML Rule structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %=============================================== % SBMLRule = Rule_setFormula(SBMLRule, formula) %=============================================== % Takes % 1. SBMLRule, an SBML Rule structure % 2. formula; a string representing the formula to be set % Returns % 1. the SBML Rule structure with the new value for the formula attribute % %=============================================== % SBMLRule = Rule_setSBOTerm(SBMLRule, sboTerm) %=============================================== % Takes % 1. SBMLRule, an SBML Rule structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Rule structure with the new value for the sboTerm attribute % %======================================== % SBMLRule = Rule_unsetFormula(SBMLRule) %======================================== % Takes % 1. SBMLRule, an SBML Rule structure % Returns % 1. the SBML Rule structure with the formula attribute unset % %======================================== % SBMLRule = Rule_unsetSBOTerm(SBMLRule) %======================================== % Takes % 1. SBMLRule, an SBML Rule structure % Returns % 1. the SBML Rule structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/0000755000000000000000000000000011704572240023437 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_unsetSBOTerm.m0000644000000000000000000000333211703262362027774 0ustar rootrootfunction SBMLReaction = Reaction_unsetSBOTerm(SBMLReaction) % SBMLReaction = Reaction_unsetSBOTerm(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'sboTerm') SBMLReaction.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_unsetReversible.m0000644000000000000000000000335411703262362030627 0ustar rootrootfunction SBMLReaction = Reaction_unsetReversible(SBMLReaction) % SBMLReaction = Reaction_unsetReversible(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with the reversible attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'reversible') SBMLReaction.reversible = ''; else error('reversible not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_unsetName.m0000644000000000000000000000331011703262362027375 0ustar rootrootfunction SBMLReaction = Reaction_unsetName(SBMLReaction) % SBMLReaction = Reaction_unsetName(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'name') SBMLReaction.name = ''; else error('name not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_unsetMetaid.m0000644000000000000000000000332411703262362027725 0ustar rootrootfunction SBMLReaction = Reaction_unsetMetaid(SBMLReaction) % SBMLReaction = Reaction_unsetMetaid(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'metaid') SBMLReaction.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_unsetKineticLaw.m0000644000000000000000000000335011703262362030553 0ustar rootrootfunction SBMLReaction = Reaction_unsetKineticLaw(SBMLReaction) % SBMLReaction = Reaction_unsetKineticLaw(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with the kineticLaw field unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'kineticLaw') SBMLReaction.kineticLaw = []; else error('kineticLaw not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_unsetId.m0000644000000000000000000000327411703262362027062 0ustar rootrootfunction SBMLReaction = Reaction_unsetId(SBMLReaction) % SBMLReaction = Reaction_unsetId(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'id') SBMLReaction.id = ''; else error('id not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_unsetFast.m0000644000000000000000000000340211703262362027414 0ustar rootrootfunction SBMLReaction = Reaction_unsetFast(SBMLReaction) % SBMLReaction = Reaction_unsetFast(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with the fast attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'fast') SBMLReaction.fast = 0; if (level > 1) SBMLReaction.isSetFast = 0; end; else error('fast not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_unsetCompartment.m0000644000000000000000000000336211703262362031015 0ustar rootrootfunction SBMLReaction = Reaction_unsetCompartment(SBMLReaction) % SBMLReaction = Reaction_unsetCompartment(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with the compartment attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'compartment') SBMLReaction.compartment = ''; else error('compartment not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_setSBOTerm.m0000644000000000000000000000361111703262362027431 0ustar rootrootfunction SBMLReaction = Reaction_setSBOTerm(SBMLReaction, sboTerm) % SBMLReaction = Reaction_setSBOTerm(SBMLReaction, sboTerm) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Reaction structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLReaction.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_setReversible.m0000644000000000000000000000376211703262362030267 0ustar rootrootfunction SBMLReaction = Reaction_setReversible(SBMLReaction, reversible) % SBMLReaction = Reaction_setReversible(SBMLReaction, reversible) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. reversible, an integer (0/1) representing the value of reversible to be set % % Returns % % 1. the SBML Reaction structure with the new value for the reversible attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'reversible') if (~isIntegralNumber(reversible) || reversible < 0 || reversible > 1) error('reversible must be an integer of value 0/1') ; else SBMLReaction.reversible = reversible; end; else error('reversible not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_setName.m0000644000000000000000000000353311703262362027041 0ustar rootrootfunction SBMLReaction = Reaction_setName(SBMLReaction, name) % SBMLReaction = Reaction_setName(SBMLReaction, name) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML Reaction structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'name') if ~ischar(name) error('name must be character array') ; else SBMLReaction.name = name; end; else error('name not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_setMetaid.m0000644000000000000000000000356511703262362027371 0ustar rootrootfunction SBMLReaction = Reaction_setMetaid(SBMLReaction, metaid) % SBMLReaction = Reaction_setMetaid(SBMLReaction, metaid) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Reaction structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLReaction.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_setKineticLaw.m0000644000000000000000000000421411703262362030210 0ustar rootrootfunction SBMLReaction = Reaction_setKineticLaw(SBMLReaction, kineticLaw) % SBMLReaction = Reaction_setKineticLaw(SBMLReaction, SBMLKineticLaw) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the SBML Reaction structure with the new value for the kineticLaw field % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isstruct(kineticLaw) [kl_level, kl_version] = GetLevelVersion(kineticLaw); if level ~= kl_level error('mismatch in levels'); elseif version ~= kl_version error('mismatch in versions'); end; end; if isfield(SBMLReaction, 'kineticLaw') if ~isValid(kineticLaw, level, version) error('KineticLaw must ba an SBML KineticLaw'); else SBMLReaction.kineticLaw = kineticLaw; end; else error('kineticLaw not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_setId.m0000644000000000000000000000350111703262362026510 0ustar rootrootfunction SBMLReaction = Reaction_setId(SBMLReaction, id) % SBMLReaction = Reaction_setId(SBMLReaction, id) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML Reaction structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'id') if ~ischar(id) error('id must be character array') ; else SBMLReaction.id = id; end; else error('id not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_setFast.m0000644000000000000000000000372611703262362027062 0ustar rootrootfunction SBMLReaction = Reaction_setFast(SBMLReaction, fast) % SBMLReaction = Reaction_setFast(SBMLReaction, fast) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. fast, an integer (0/1) representing the value of fast to be set % % Returns % % 1. the SBML Reaction structure with the new value for the fast attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'fast') if (~isIntegralNumber(fast) || fast < 0 || fast > 1) error('fast must be an integer of value 0/1') ; else SBMLReaction.fast = fast; if (level > 1) SBMLReaction.isSetFast = 1; end; end; else error('fast not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_setCompartment.m0000644000000000000000000000366611703262362030461 0ustar rootrootfunction SBMLReaction = Reaction_setCompartment(SBMLReaction, compartment) % SBMLReaction = Reaction_setCompartment(SBMLReaction, compartment) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. compartment; a string representing the compartment to be set % % Returns % % 1. the SBML Reaction structure with the new value for the compartment attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'compartment') if ~ischar(compartment) error('compartment must be character array') ; else SBMLReaction.compartment = compartment; end; else error('compartment not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_isSetSBOTerm.m0000644000000000000000000000333511703262362027730 0ustar rootrootfunction value = Reaction_isSetSBOTerm(SBMLReaction) % value = Reaction_isSetSBOTerm(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'sboTerm') value = (SBMLReaction.sboTerm >0); else error('isSetSboTerm not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_isSetReversible.m0000644000000000000000000000335711703262362030563 0ustar rootrootfunction value = Reaction_isSetReversible(SBMLReaction) % value = Reaction_isSetReversible(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. value = % - 1 if the reversible attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'reversible') value = SBMLReaction.isSetReversible; else error('isSetReversible not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_isSetName.m0000644000000000000000000000331311703262362027331 0ustar rootrootfunction value = Reaction_isSetName(SBMLReaction) % value = Reaction_isSetName(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'name') value = ~isempty(SBMLReaction.name); else error('name not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_isSetMetaid.m0000644000000000000000000000332711703262362027661 0ustar rootrootfunction value = Reaction_isSetMetaid(SBMLReaction) % value = Reaction_isSetMetaid(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'metaid') value = ~isempty(SBMLReaction.metaid); else error('metaid not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_isSetKineticLaw.m0000644000000000000000000000336411703262362030511 0ustar rootrootfunction value = Reaction_isSetKineticLaw(SBMLReaction) % value = Reaction_isSetKineticLaw(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. value = % - 1 if the kineticLaw structure is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'kineticLaw') value = ~isempty(SBMLReaction.kineticLaw); else error('isSetKineticLaw not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_isSetId.m0000644000000000000000000000327711703262362027016 0ustar rootrootfunction value = Reaction_isSetId(SBMLReaction) % value = Reaction_isSetId(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'id') value = ~isempty(SBMLReaction.id); else error('id not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_isSetFast.m0000644000000000000000000000337511703262362027356 0ustar rootrootfunction value = Reaction_isSetFast(SBMLReaction) % value = Reaction_isSetFast(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. value = % - 1 if the fast attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'fast') if (level == 1) value = 1; else value = SBMLReaction.isSetFast; end; else error('isSetFast not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_isSetCompartment.m0000644000000000000000000000336511703262362030751 0ustar rootrootfunction value = Reaction_isSetCompartment(SBMLReaction) % value = Reaction_isSetCompartment(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. value = % - 1 if the compartment attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'compartment') value = ~isempty(SBMLReaction.compartment); else error('compartment not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getSBOTerm.m0000644000000000000000000000326711703262362027424 0ustar rootrootfunction sboTerm = Reaction_getSBOTerm(SBMLReaction) % sboTerm = Reaction_getSBOTerm(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'sboTerm') sboTerm = SBMLReaction.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getReversible.m0000644000000000000000000000332211703262362030243 0ustar rootrootfunction reversible = Reaction_getReversible(SBMLReaction) % reversible = Reaction_getReversible(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the value of the reversible attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'reversible') reversible = SBMLReaction.reversible; else error('reversible not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getReactantById.m0000644000000000000000000000453311703262362030457 0ustar rootrootfunction reactant = Reaction_getReactantById(SBMLReaction, id) % reactant = Reaction_getReactantById(SBMLReaction, id) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. id; a string representing the id of SBML Reactant structure % % Returns % % 1. the SBML Reactant structure that has this id % % % check that input is correct if (~isstruct(SBMLReaction)) error(sprintf('%s', ... 'first argument must be an SBML Reaction structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLReaction); if (~isSBML_Reaction(SBMLReaction, sbmlLevel, sbmlVersion)) error(sprintf('%s\n%s', 'Reaction_getReactantById(SBMLReaction, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Reaction_getReactantById(SBMLReaction, id)', 'second argument must be a string')); elseif (sbmlLevel ~= 2) error(sprintf('%s\n%s', 'Reaction_getReactantById(SBMLReaction, id)', 'no id field in a level 1 model')); end; reactant = []; for i = 1:length(SBMLReaction.reactant) if (strcmp(id, SBMLReaction.reactant(i).species)) reactant = SBMLReaction.reactant(i); return; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getReactant.m0000644000000000000000000000374411703262362027712 0ustar rootrootfunction reactant = Reaction_getReactant(SBMLReaction, index) % reactant = Reaction_getReactant(SBMLReaction, index) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. index, an integer representing the index of SBML Reactant structure % % Returns % % 1. the SBML Reactant structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'reactant') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLReaction.reactant) reactant = SBMLReaction.reactant(index); else error('index is out of range'); end; else error('reactant not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getProductById.m0000644000000000000000000000451511703262362030336 0ustar rootrootfunction product = Reaction_getProductById(SBMLReaction, id) % product = Reaction_getProductById(SBMLReaction, id) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. id; a string representing the id of SBML Product structure % % Returns % % 1. the SBML Product structure that has this id % % % check that input is correct if (~isstruct(SBMLReaction)) error(sprintf('%s', ... 'first argument must be an SBML Reaction structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLReaction); if (~isSBML_Reaction(SBMLReaction, sbmlLevel, sbmlVersion)) error(sprintf('%s\n%s', 'Reaction_getProductById(SBMLReaction, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Reaction_getProductById(SBMLReaction, id)', 'second argument must be a string')); elseif (sbmlLevel ~= 2) error(sprintf('%s\n%s', 'Reaction_getProductById(SBMLReaction, id)', 'no id field in a level 1 model')); end; product = []; for i = 1:length(SBMLReaction.product) if (strcmp(id, SBMLReaction.product(i).species)) product = SBMLReaction.product(i); return; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getProduct.m0000644000000000000000000000373111703262362027565 0ustar rootrootfunction product = Reaction_getProduct(SBMLReaction, index) % product = Reaction_getProduct(SBMLReaction, index) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. index, an integer representing the index of SBML Product structure % % Returns % % 1. the SBML Product structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'product') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLReaction.product) product = SBMLReaction.product(index); else error('index is out of range'); end; else error('product not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getNumReactants.m0000644000000000000000000000333211703262362030546 0ustar rootrootfunction num = Reaction_getNumReactants(SBMLReaction) % num = Reaction_getNumReactants(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the number of SBML Reactant structures present in the Reaction % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'reactant') num = length(SBMLReaction.reactant); else error('reactant not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getNumProducts.m0000644000000000000000000000332411703262362030426 0ustar rootrootfunction num = Reaction_getNumProducts(SBMLReaction) % num = Reaction_getNumProducts(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the number of SBML Product structures present in the Reaction % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'product') num = length(SBMLReaction.product); else error('product not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getNumModifiers.m0000644000000000000000000000333211703262362030543 0ustar rootrootfunction num = Reaction_getNumModifiers(SBMLReaction) % num = Reaction_getNumModifiers(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the number of SBML Modifier structures present in the Reaction % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'modifier') num = length(SBMLReaction.modifier); else error('modifier not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getName.m0000644000000000000000000000323411703262362027023 0ustar rootrootfunction name = Reaction_getName(SBMLReaction) % name = Reaction_getName(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'name') name = SBMLReaction.name; else error('name not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getModifierById.m0000644000000000000000000000454711703262362030461 0ustar rootrootfunction modifier = Reaction_getModifierById(SBMLReaction, id) % modifier = Reaction_getModifierById(SBMLReaction, id) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. id; a string representing the id of SBML Modifier structure % % Returns % % 1. the SBML Modifier structure that has this id % % % check that input is correct if (~isstruct(SBMLReaction)) error(sprintf('%s', ... 'first argument must be an SBML Reaction structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLReaction); if (~isSBML_Reaction(SBMLReaction, sbmlLevel, sbmlVersion)) error(sprintf('%s\n%s', 'Reaction_getModifierById(SBMLReaction, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Reaction_getModifierById(SBMLReaction, id)', 'second argument must be a string')); elseif (sbmlLevel ~= 2) error(sprintf('%s\n%s', 'Reaction_getModifierById(SBMLReaction, id)', 'no id or modifier field in a level 1 model')); end; modifier = []; for i = 1:length(SBMLReaction.modifier) if (strcmp(id, SBMLReaction.modifier(i).species)) modifier = SBMLReaction.modifier(i); return; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getModifier.m0000644000000000000000000000374411703262362027707 0ustar rootrootfunction modifier = Reaction_getModifier(SBMLReaction, index) % modifier = Reaction_getModifier(SBMLReaction, index) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. index, an integer representing the index of SBML Modifier structure % % Returns % % 1. the SBML Modifier structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'modifier') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLReaction.modifier) modifier = SBMLReaction.modifier(index); else error('index is out of range'); end; else error('modifier not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getMetaid.m0000644000000000000000000000325611703262362027352 0ustar rootrootfunction metaid = Reaction_getMetaid(SBMLReaction) % metaid = Reaction_getMetaid(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'metaid') metaid = SBMLReaction.metaid; else error('metaid not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getListOfReactants.m0000644000000000000000000000331411703262362031207 0ustar rootrootfunction reactant = Reaction_getListOfReactants(SBMLReaction) % reactant = Reaction_getListOfReactants(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. an array of the reactant structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'reactant') reactant = SBMLReaction.reactant; else error('reactant not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getListOfProducts.m0000644000000000000000000000330311703262362031064 0ustar rootrootfunction product = Reaction_getListOfProducts(SBMLReaction) % product = Reaction_getListOfProducts(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. an array of the product structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'product') product = SBMLReaction.product; else error('product not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getListOfModifiers.m0000644000000000000000000000331411703262362031204 0ustar rootrootfunction modifier = Reaction_getListOfModifiers(SBMLReaction) % modifier = Reaction_getListOfModifiers(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. an array of the modifier structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'modifier') modifier = SBMLReaction.modifier; else error('modifier not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getKineticLaw.m0000644000000000000000000000331211703262362030172 0ustar rootrootfunction kineticLaw = Reaction_getKineticLaw(SBMLReaction) % kineticLaw = Reaction_getKineticLaw(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML KineticLaw structure % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'kineticLaw') kineticLaw = SBMLReaction.kineticLaw; else error('kineticLaw not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getId.m0000644000000000000000000000321211703262362026473 0ustar rootrootfunction id = Reaction_getId(SBMLReaction) % id = Reaction_getId(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'id') id = SBMLReaction.id; else error('id not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getFast.m0000644000000000000000000000323411703262362027040 0ustar rootrootfunction fast = Reaction_getFast(SBMLReaction) % fast = Reaction_getFast(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the value of the fast attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'fast') fast = SBMLReaction.fast; else error('fast not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_getCompartment.m0000644000000000000000000000333311703262362030434 0ustar rootrootfunction compartment = Reaction_getCompartment(SBMLReaction) % compartment = Reaction_getCompartment(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the value of the compartment attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'compartment') compartment = SBMLReaction.compartment; else error('compartment not an attribute on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_createReactant.m0000644000000000000000000000365011703262362030372 0ustar rootrootfunction SBMLReaction = Reaction_createReactant(SBMLReaction) % SBMLReaction = Reaction_createReactant(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with a new SBML SpeciesReference structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'reactant') index = length(SBMLReaction.reactant); SBMLReactant = SpeciesReference_create(level, version); if index == 0 SBMLReaction.reactant = SBMLReactant; else SBMLReaction.reactant(index+1) = SBMLReactant; end; else error('reactant not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_createProduct.m0000644000000000000000000000363611703262362030255 0ustar rootrootfunction SBMLReaction = Reaction_createProduct(SBMLReaction) % SBMLReaction = Reaction_createProduct(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with a new SBML SpeciesReference structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'product') index = length(SBMLReaction.product); SBMLProduct = SpeciesReference_create(level, version); if index == 0 SBMLReaction.product = SBMLProduct; else SBMLReaction.product(index+1) = SBMLProduct; end; else error('product not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_createModifier.m0000644000000000000000000000367011703262362030371 0ustar rootrootfunction SBMLReaction = Reaction_createModifier(SBMLReaction) % SBMLReaction = Reaction_createModifier(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with a new SBML ModifierSpeciesReference structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'modifier') index = length(SBMLReaction.modifier); SBMLModifier = ModifierSpeciesReference_create(level, version); if index == 0 SBMLReaction.modifier = SBMLModifier; else SBMLReaction.modifier(index+1) = SBMLModifier; end; else error('modifier not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_createKineticLaw.m0000644000000000000000000000346211703262362030664 0ustar rootrootfunction SBMLReaction = Reaction_createKineticLaw(SBMLReaction) % SBMLReaction = Reaction_createKineticLaw(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Reaction structure with a new SBML KineticLaw structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); if isfield(SBMLReaction, 'kineticLaw') SBMLKineticLaw = KineticLaw_create(level, version); SBMLReaction.kineticLaw = SBMLKineticLaw; else error('kineticLaw not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_create.m0000644000000000000000000000636411703262362026715 0ustar rootrootfunction Reaction = Reaction_create(varargin) % Reaction = Reaction_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Reaction structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getReactionFieldnames(level, version); if (num > 0) values = getReactionDefaultValues(level, version); Reaction = cell2struct(values, fieldnames, 2); %add empty substructures Reaction.reactant = SpeciesReference_create(level, version); Reaction.reactant(1:end) = []; Reaction.product = SpeciesReference_create(level, version); Reaction.product(1:end) = []; Reaction.kineticLaw = KineticLaw_create(level, version); Reaction.kineticLaw(1:end) = []; warning('off', 'Warn:InvalidLV'); t = ModifierSpeciesReference_create(level, version); if ~isempty(t) Reaction.modifier = t; Reaction.modifier(1:end) = []; end; warning('on', 'Warn:InvalidLV'); %add level and version Reaction.level = level; Reaction.version = version; %check correct structure if ~isSBML_Reaction(Reaction, level, version) Reaction = struct(); warning('Warn:BadStruct', 'Failed to create Reaction'); end; else Reaction = []; warning('Warn:InvalidLV', 'Reaction not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_addReactant.m0000644000000000000000000000415611703262362027661 0ustar rootrootfunction SBMLReaction = Reaction_addReactant(SBMLReaction, SBMLReactant) % SBMLReaction = Reaction_addReactant(SBMLReaction, SBMLReactant) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. SBMLReactant, an SBML Reactant structure % % Returns % % 1. the SBML Reaction structure with the SBML Reactant structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); [reactant_level, reactant_version] = GetLevelVersion(SBMLReactant); if level ~= reactant_level error('mismatch in levels'); elseif version ~= reactant_version error('mismatch in versions'); end; if isfield(SBMLReaction, 'reactant') index = length(SBMLReaction.reactant); if index == 0 SBMLReaction.reactant = SBMLReactant; else SBMLReaction.reactant(index+1) = SBMLReactant; end; else error('reactant not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_addProduct.m0000644000000000000000000000413311703262362027533 0ustar rootrootfunction SBMLReaction = Reaction_addProduct(SBMLReaction, SBMLProduct) % SBMLReaction = Reaction_addProduct(SBMLReaction, SBMLProduct) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. SBMLProduct, an SBML Product structure % % Returns % % 1. the SBML Reaction structure with the SBML Product structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); [product_level, product_version] = GetLevelVersion(SBMLProduct); if level ~= product_level error('mismatch in levels'); elseif version ~= product_version error('mismatch in versions'); end; if isfield(SBMLReaction, 'product') index = length(SBMLReaction.product); if index == 0 SBMLReaction.product = SBMLProduct; else SBMLReaction.product(index+1) = SBMLProduct; end; else error('product not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Reaction_addModifier.m0000644000000000000000000000415611703262362027656 0ustar rootrootfunction SBMLReaction = Reaction_addModifier(SBMLReaction, SBMLModifier) % SBMLReaction = Reaction_addModifier(SBMLReaction, SBMLModifier) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % 2. SBMLModifier, an SBML Modifier structure % % Returns % % 1. the SBML Reaction structure with the SBML Modifier structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLReaction); [modifier_level, modifier_version] = GetLevelVersion(SBMLModifier); if level ~= modifier_level error('mismatch in levels'); elseif version ~= modifier_version error('mismatch in versions'); end; if isfield(SBMLReaction, 'modifier') index = length(SBMLReaction.modifier); if index == 0 SBMLReaction.modifier = SBMLModifier; else SBMLReaction.modifier(index+1) = SBMLModifier; end; else error('modifier not an element on SBML L%dV%d Reaction', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Reaction/Contents.m0000644000000000000000000004216111703262362025416 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Reaction % % The functions allow users to create and work with the SBML Reaction structure. % %================================================================= % SBMLReaction = Reaction_addModifier(SBMLReaction, SBMLModifier) %================================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. SBMLModifier, an SBML Modifier structure % Returns % 1. the SBML Reaction structure with the SBML Modifier structure added % %=============================================================== % SBMLReaction = Reaction_addProduct(SBMLReaction, SBMLProduct) %=============================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. SBMLProduct, an SBML Product structure % Returns % 1. the SBML Reaction structure with the SBML Product structure added % %================================================================= % SBMLReaction = Reaction_addReactant(SBMLReaction, SBMLReactant) %================================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. SBMLReactant, an SBML Reactant structure % Returns % 1. the SBML Reaction structure with the SBML Reactant structure added % %================================================================= % Reaction = Reaction_create(level(optional), version(optional) ) %================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Reaction structure of the appropriate level and version % %======================================================== % SBMLReaction = Reaction_createKineticLaw(SBMLReaction) %======================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with a new SBML KineticLaw structure added % %====================================================== % SBMLReaction = Reaction_createModifier(SBMLReaction) %====================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with a new SBML ModifierSpeciesReference structure added % %===================================================== % SBMLReaction = Reaction_createProduct(SBMLReaction) %===================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with a new SBML SpeciesReference structure added % %====================================================== % SBMLReaction = Reaction_createReactant(SBMLReaction) %====================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with a new SBML SpeciesReference structure added % %===================================================== % compartment = Reaction_getCompartment(SBMLReaction) %===================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the value of the compartment attribute % %======================================= % fast = Reaction_getFast(SBMLReaction) %======================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the value of the fast attribute % %=================================== % id = Reaction_getId(SBMLReaction) %=================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the value of the id attribute % %=================================================== % kineticLaw = Reaction_getKineticLaw(SBMLReaction) %=================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML KineticLaw structure % %====================================================== % modifier = Reaction_getListOfModifiers(SBMLReaction) %====================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. an array of the modifier structures % %==================================================== % product = Reaction_getListOfProducts(SBMLReaction) %==================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. an array of the product structures % %====================================================== % reactant = Reaction_getListOfReactants(SBMLReaction) %====================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. an array of the reactant structures % %=========================================== % metaid = Reaction_getMetaid(SBMLReaction) %=========================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the value of the metaid attribute % %====================================================== % modifier = Reaction_getModifier(SBMLReaction, index) %====================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. index, an integer representing the index of SBML Modifier structure % Returns % 1. the SBML Modifier structure at the indexed position % %======================================================= % modifier = Reaction_getModifierById(SBMLReaction, id) %======================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. id; a string representing the id of SBML Modifier structure % Returns % 1. the SBML Modifier structure that has this id % %======================================= % name = Reaction_getName(SBMLReaction) %======================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the value of the name attribute % %============================================== % num = Reaction_getNumModifiers(SBMLReaction) %============================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the number of SBML Modifier structures present in the Reaction % %============================================= % num = Reaction_getNumProducts(SBMLReaction) %============================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the number of SBML Product structures present in the Reaction % %============================================== % num = Reaction_getNumReactants(SBMLReaction) %============================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the number of SBML Reactant structures present in the Reaction % %==================================================== % product = Reaction_getProduct(SBMLReaction, index) %==================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. index, an integer representing the index of SBML Product structure % Returns % 1. the SBML Product structure at the indexed position % %===================================================== % product = Reaction_getProductById(SBMLReaction, id) %===================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. id; a string representing the id of SBML Product structure % Returns % 1. the SBML Product structure that has this id % %====================================================== % reactant = Reaction_getReactant(SBMLReaction, index) %====================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. index, an integer representing the index of SBML Reactant structure % Returns % 1. the SBML Reactant structure at the indexed position % %======================================================= % reactant = Reaction_getReactantById(SBMLReaction, id) %======================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. id; a string representing the id of SBML Reactant structure % Returns % 1. the SBML Reactant structure that has this id % %=================================================== % reversible = Reaction_getReversible(SBMLReaction) %=================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the value of the reversible attribute % %============================================= % sboTerm = Reaction_getSBOTerm(SBMLReaction) %============================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the value of the sboTerm attribute % %================================================= % value = Reaction_isSetCompartment(SBMLReaction) %================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. value = % - 1 if the compartment attribute is set % - 0 otherwise % %========================================== % value = Reaction_isSetFast(SBMLReaction) %========================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. value = % - 1 if the fast attribute is set % - 0 otherwise % %======================================== % value = Reaction_isSetId(SBMLReaction) %======================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %================================================ % value = Reaction_isSetKineticLaw(SBMLReaction) %================================================ % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. value = % - 1 if the kineticLaw structure is set % - 0 otherwise % %============================================ % value = Reaction_isSetMetaid(SBMLReaction) %============================================ % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %========================================== % value = Reaction_isSetName(SBMLReaction) %========================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %================================================ % value = Reaction_isSetReversible(SBMLReaction) %================================================ % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. value = % - 1 if the reversible attribute is set % - 0 otherwise % %============================================= % value = Reaction_isSetSBOTerm(SBMLReaction) %============================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %=================================================================== % SBMLReaction = Reaction_setCompartment(SBMLReaction, compartment) %=================================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. compartment; a string representing the compartment to be set % Returns % 1. the SBML Reaction structure with the new value for the compartment attribute % %===================================================== % SBMLReaction = Reaction_setFast(SBMLReaction, fast) %===================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. fast, an integer (0/1) representing the value of fast to be set % Returns % 1. the SBML Reaction structure with the new value for the fast attribute % %================================================= % SBMLReaction = Reaction_setId(SBMLReaction, id) %================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. id; a string representing the id to be set % Returns % 1. the SBML Reaction structure with the new value for the id attribute % %===================================================================== % SBMLReaction = Reaction_setKineticLaw(SBMLReaction, SBMLKineticLaw) %===================================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the SBML Reaction structure with the new value for the kineticLaw field % %========================================================= % SBMLReaction = Reaction_setMetaid(SBMLReaction, metaid) %========================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Reaction structure with the new value for the metaid attribute % %===================================================== % SBMLReaction = Reaction_setName(SBMLReaction, name) %===================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. name; a string representing the name to be set % Returns % 1. the SBML Reaction structure with the new value for the name attribute % %================================================================= % SBMLReaction = Reaction_setReversible(SBMLReaction, reversible) %================================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. reversible, an integer (0/1) representing the value of reversible to be set % Returns % 1. the SBML Reaction structure with the new value for the reversible attribute % %=========================================================== % SBMLReaction = Reaction_setSBOTerm(SBMLReaction, sboTerm) %=========================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Reaction structure with the new value for the sboTerm attribute % %======================================================== % SBMLReaction = Reaction_unsetCompartment(SBMLReaction) %======================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with the compartment attribute unset % %================================================= % SBMLReaction = Reaction_unsetFast(SBMLReaction) %================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with the fast attribute unset % %=============================================== % SBMLReaction = Reaction_unsetId(SBMLReaction) %=============================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with the id attribute unset % %======================================================= % SBMLReaction = Reaction_unsetKineticLaw(SBMLReaction) %======================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with the kineticLaw field unset % %=================================================== % SBMLReaction = Reaction_unsetMetaid(SBMLReaction) %=================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with the metaid attribute unset % %================================================= % SBMLReaction = Reaction_unsetName(SBMLReaction) %================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with the name attribute unset % %======================================================= % SBMLReaction = Reaction_unsetReversible(SBMLReaction) %======================================================= % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with the reversible attribute unset % %==================================================== % SBMLReaction = Reaction_unsetSBOTerm(SBMLReaction) %==================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Reaction structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/0000755000000000000000000000000011704572236023423 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_unsetVariable.m0000644000000000000000000000333611703262350030205 0ustar rootrootfunction SBMLRateRule = RateRule_unsetVariable(SBMLRateRule) % SBMLRateRule = RateRule_unsetVariable(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. the SBML RateRule structure with the variable attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'variable') SBMLRateRule.variable = ''; else error('variable not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_unsetSBOTerm.m0000644000000000000000000000333011703262350027725 0ustar rootrootfunction SBMLRateRule = RateRule_unsetSBOTerm(SBMLRateRule) % SBMLRateRule = RateRule_unsetSBOTerm(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. the SBML RateRule structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'sboTerm') SBMLRateRule.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_unsetMetaid.m0000644000000000000000000000332211703262350027656 0ustar rootrootfunction SBMLRateRule = RateRule_unsetMetaid(SBMLRateRule) % SBMLRateRule = RateRule_unsetMetaid(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. the SBML RateRule structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'metaid') SBMLRateRule.metaid = ''; else error('metaid not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_unsetFormula.m0000644000000000000000000000333011703262350030057 0ustar rootrootfunction SBMLRateRule = RateRule_unsetFormula(SBMLRateRule) % SBMLRateRule = RateRule_unsetFormula(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. the SBML RateRule structure with the formula attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'formula') SBMLRateRule.formula = ''; else error('formula not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_setVariable.m0000644000000000000000000000361511703262350027642 0ustar rootrootfunction SBMLRateRule = RateRule_setVariable(SBMLRateRule, variable) % SBMLRateRule = RateRule_setVariable(SBMLRateRule, variable) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % 2. variable; a string representing the variable to be set % % Returns % % 1. the SBML RateRule structure with the new value for the variable attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'variable') if ~ischar(variable) error('variable must be character array') ; else SBMLRateRule.variable = variable; end; else error('variable not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_setSBOTerm.m0000644000000000000000000000360711703262350027371 0ustar rootrootfunction SBMLRateRule = RateRule_setSBOTerm(SBMLRateRule, sboTerm) % SBMLRateRule = RateRule_setSBOTerm(SBMLRateRule, sboTerm) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML RateRule structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLRateRule.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_setMetaid.m0000644000000000000000000000356311703262350027322 0ustar rootrootfunction SBMLRateRule = RateRule_setMetaid(SBMLRateRule, metaid) % SBMLRateRule = RateRule_setMetaid(SBMLRateRule, metaid) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML RateRule structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLRateRule.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_setFormula.m0000644000000000000000000000360011703262350027514 0ustar rootrootfunction SBMLRateRule = RateRule_setFormula(SBMLRateRule, formula) % SBMLRateRule = RateRule_setFormula(SBMLRateRule, formula) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % 2. formula; a string representing the formula to be set % % Returns % % 1. the SBML RateRule structure with the new value for the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'formula') if ~ischar(formula) error('formula must be character array') ; else SBMLRateRule.formula = formula; end; else error('formula not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_isSetVariable.m0000644000000000000000000000334111703262350030132 0ustar rootrootfunction value = RateRule_isSetVariable(SBMLRateRule) % value = RateRule_isSetVariable(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. value = % - 1 if the variable attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'variable') value = ~isempty(SBMLRateRule.variable); else error('variable not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_isSetSBOTerm.m0000644000000000000000000000332611703262350027663 0ustar rootrootfunction value = RateRule_isSetSBOTerm(SBMLRateRule) % value = RateRule_isSetSBOTerm(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'sboTerm') value = (SBMLRateRule.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_isSetMetaid.m0000644000000000000000000000332511703262350027612 0ustar rootrootfunction value = RateRule_isSetMetaid(SBMLRateRule) % value = RateRule_isSetMetaid(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'metaid') value = ~isempty(SBMLRateRule.metaid); else error('metaid not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_isSetFormula.m0000644000000000000000000000333311703262350030013 0ustar rootrootfunction value = RateRule_isSetFormula(SBMLRateRule) % value = RateRule_isSetFormula(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'formula') value = ~isempty(SBMLRateRule.formula); else error('formula not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_getVariable.m0000644000000000000000000000327611703262350027631 0ustar rootrootfunction variable = RateRule_getVariable(SBMLRateRule) % variable = RateRule_getVariable(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. the value of the variable attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'variable') variable = SBMLRateRule.variable; else error('variable not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_getSBOTerm.m0000644000000000000000000000326511703262350027355 0ustar rootrootfunction sboTerm = RateRule_getSBOTerm(SBMLRateRule) % sboTerm = RateRule_getSBOTerm(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'sboTerm') sboTerm = SBMLRateRule.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_getMetaid.m0000644000000000000000000000325411703262350027303 0ustar rootrootfunction metaid = RateRule_getMetaid(SBMLRateRule) % metaid = RateRule_getMetaid(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'metaid') metaid = SBMLRateRule.metaid; else error('metaid not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_getFormula.m0000644000000000000000000000326511703262350027507 0ustar rootrootfunction formula = RateRule_getFormula(SBMLRateRule) % formula = RateRule_getFormula(SBMLRateRule) % % Takes % % 1. SBMLRateRule, an SBML RateRule structure % % Returns % % 1. the value of the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLRateRule); if isfield(SBMLRateRule, 'formula') formula = SBMLRateRule.formula; else error('formula not an attribute on SBML L%dV%d RateRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/RateRule_create.m0000644000000000000000000000534211703262350026643 0ustar rootrootfunction RateRule = RateRule_create(varargin) % RateRule = RateRule_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML RateRule structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getRateRuleFieldnames(level, version); if (num > 0) values = getRateRuleDefaultValues(level, version); RateRule = cell2struct(values, fieldnames, 2); %add level and version RateRule.level = level; RateRule.version = version; %check correct structure if ~isSBML_RateRule(RateRule, level, version) RateRule = struct(); warning('Warn:BadStruct', 'Failed to create RateRule'); end; else RateRule = []; warning('Warn:InvalidLV', 'RateRule not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/RateRule/Contents.m0000644000000000000000000001466511703262350025402 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\RateRule % % The functions allow users to create and work with the SBML RateRule structure. % %================================================================= % RateRule = RateRule_create(level(optional), version(optional) ) %================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML RateRule structure of the appropriate level and version % %============================================= % formula = RateRule_getFormula(SBMLRateRule) %============================================= % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. the value of the formula attribute % %=========================================== % metaid = RateRule_getMetaid(SBMLRateRule) %=========================================== % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. the value of the metaid attribute % %============================================= % sboTerm = RateRule_getSBOTerm(SBMLRateRule) %============================================= % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. the value of the sboTerm attribute % %=============================================== % variable = RateRule_getVariable(SBMLRateRule) %=============================================== % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. the value of the variable attribute % %============================================= % value = RateRule_isSetFormula(SBMLRateRule) %============================================= % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % %============================================ % value = RateRule_isSetMetaid(SBMLRateRule) %============================================ % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %============================================= % value = RateRule_isSetSBOTerm(SBMLRateRule) %============================================= % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %============================================== % value = RateRule_isSetVariable(SBMLRateRule) %============================================== % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. value = % - 1 if the variable attribute is set % - 0 otherwise % %=========================================================== % SBMLRateRule = RateRule_setFormula(SBMLRateRule, formula) %=========================================================== % Takes % 1. SBMLRateRule, an SBML RateRule structure % 2. formula; a string representing the formula to be set % Returns % 1. the SBML RateRule structure with the new value for the formula attribute % %========================================================= % SBMLRateRule = RateRule_setMetaid(SBMLRateRule, metaid) %========================================================= % Takes % 1. SBMLRateRule, an SBML RateRule structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML RateRule structure with the new value for the metaid attribute % %=========================================================== % SBMLRateRule = RateRule_setSBOTerm(SBMLRateRule, sboTerm) %=========================================================== % Takes % 1. SBMLRateRule, an SBML RateRule structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML RateRule structure with the new value for the sboTerm attribute % %============================================================= % SBMLRateRule = RateRule_setVariable(SBMLRateRule, variable) %============================================================= % Takes % 1. SBMLRateRule, an SBML RateRule structure % 2. variable; a string representing the variable to be set % Returns % 1. the SBML RateRule structure with the new value for the variable attribute % %==================================================== % SBMLRateRule = RateRule_unsetFormula(SBMLRateRule) %==================================================== % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. the SBML RateRule structure with the formula attribute unset % %=================================================== % SBMLRateRule = RateRule_unsetMetaid(SBMLRateRule) %=================================================== % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. the SBML RateRule structure with the metaid attribute unset % %==================================================== % SBMLRateRule = RateRule_unsetSBOTerm(SBMLRateRule) %==================================================== % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. the SBML RateRule structure with the sboTerm attribute unset % %===================================================== % SBMLRateRule = RateRule_unsetVariable(SBMLRateRule) %===================================================== % Takes % 1. SBMLRateRule, an SBML RateRule structure % Returns % 1. the SBML RateRule structure with the variable attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/0000755000000000000000000000000011704572246023522 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_unsetSBOTerm.m0000644000000000000000000000333011703262304030120 0ustar rootrootfunction SBMLPriority = Priority_unsetSBOTerm(SBMLPriority) % SBMLPriority = Priority_unsetSBOTerm(SBMLPriority) % % Takes % % 1. SBMLPriority, an SBML Priority structure % % Returns % % 1. the SBML Priority structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'sboTerm') SBMLPriority.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_unsetMetaid.m0000644000000000000000000000332211703262304030051 0ustar rootrootfunction SBMLPriority = Priority_unsetMetaid(SBMLPriority) % SBMLPriority = Priority_unsetMetaid(SBMLPriority) % % Takes % % 1. SBMLPriority, an SBML Priority structure % % Returns % % 1. the SBML Priority structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'metaid') SBMLPriority.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_unsetMath.m0000644000000000000000000000330611703262304027541 0ustar rootrootfunction SBMLPriority = Priority_unsetMath(SBMLPriority) % SBMLPriority = Priority_unsetMath(SBMLPriority) % % Takes % % 1. SBMLPriority, an SBML Priority structure % % Returns % % 1. the SBML Priority structure with the math attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'math') SBMLPriority.math = ''; else error('math not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_setSBOTerm.m0000644000000000000000000000360711703262304027564 0ustar rootrootfunction SBMLPriority = Priority_setSBOTerm(SBMLPriority, sboTerm) % SBMLPriority = Priority_setSBOTerm(SBMLPriority, sboTerm) % % Takes % % 1. SBMLPriority, an SBML Priority structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Priority structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLPriority.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_setMetaid.m0000644000000000000000000000356311703262304027515 0ustar rootrootfunction SBMLPriority = Priority_setMetaid(SBMLPriority, metaid) % SBMLPriority = Priority_setMetaid(SBMLPriority, metaid) % % Takes % % 1. SBMLPriority, an SBML Priority structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Priority structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLPriority.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_setMath.m0000644000000000000000000000354711703262304027205 0ustar rootrootfunction SBMLPriority = Priority_setMath(SBMLPriority, math) % SBMLPriority = Priority_setMath(SBMLPriority, math) % % Takes % % 1. SBMLPriority, an SBML Priority structure % 2. math; string representing the math expression math to be set % % Returns % % 1. the SBML Priority structure with the new value for the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'math') if ~ischar(math) error('math must be character array') ; else SBMLPriority.math = math; end; else error('math not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_isSetSBOTerm.m0000644000000000000000000000332611703262304030056 0ustar rootrootfunction value = Priority_isSetSBOTerm(SBMLPriority) % value = Priority_isSetSBOTerm(SBMLPriority) % % Takes % % 1. SBMLPriority, an SBML Priority structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'sboTerm') value = (SBMLPriority.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_isSetMetaid.m0000644000000000000000000000332511703262304030005 0ustar rootrootfunction value = Priority_isSetMetaid(SBMLPriority) % value = Priority_isSetMetaid(SBMLPriority) % % Takes % % 1. SBMLPriority, an SBML Priority structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'metaid') value = ~isempty(SBMLPriority.metaid); else error('metaid not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_isSetMath.m0000644000000000000000000000331111703262304027466 0ustar rootrootfunction value = Priority_isSetMath(SBMLPriority) % value = Priority_isSetMath(SBMLPriority) % % Takes % % 1. SBMLPriority, an SBML Priority structure % % Returns % % 1. value = % - 1 if the math attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'math') value = ~isempty(SBMLPriority.math); else error('math not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_getSBOTerm.m0000644000000000000000000000326511703262304027550 0ustar rootrootfunction sboTerm = Priority_getSBOTerm(SBMLPriority) % sboTerm = Priority_getSBOTerm(SBMLPriority) % % Takes % % 1. SBMLPriority, an SBML Priority structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'sboTerm') sboTerm = SBMLPriority.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_getMetaid.m0000644000000000000000000000325411703262304027476 0ustar rootrootfunction metaid = Priority_getMetaid(SBMLPriority) % metaid = Priority_getMetaid(SBMLPriority) % % Takes % % 1. SBMLPriority, an SBML Priority structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'metaid') metaid = SBMLPriority.metaid; else error('metaid not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_getMath.m0000644000000000000000000000323211703262304027160 0ustar rootrootfunction math = Priority_getMath(SBMLPriority) % math = Priority_getMath(SBMLPriority) % % Takes % % 1. SBMLPriority, an SBML Priority structure % % Returns % % 1. the value of the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLPriority); if isfield(SBMLPriority, 'math') math = SBMLPriority.math; else error('math not an attribute on SBML L%dV%d Priority', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Priority_create.m0000644000000000000000000000534211703262304027036 0ustar rootrootfunction Priority = Priority_create(varargin) % Priority = Priority_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Priority structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getPriorityFieldnames(level, version); if (num > 0) values = getPriorityDefaultValues(level, version); Priority = cell2struct(values, fieldnames, 2); %add level and version Priority.level = level; Priority.version = version; %check correct structure if ~isSBML_Priority(Priority, level, version) Priority = struct(); warning('Warn:BadStruct', 'Failed to create Priority'); end; else Priority = []; warning('Warn:InvalidLV', 'Priority not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Priority/Contents.m0000644000000000000000000001226411703262304025470 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Priority % % The functions allow users to create and work with the SBML Priority structure. % %================================================================= % Priority = Priority_create(level(optional), version(optional) ) %================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Priority structure of the appropriate level and version % %======================================= % math = Priority_getMath(SBMLPriority) %======================================= % Takes % 1. SBMLPriority, an SBML Priority structure % Returns % 1. the value of the math attribute % %=========================================== % metaid = Priority_getMetaid(SBMLPriority) %=========================================== % Takes % 1. SBMLPriority, an SBML Priority structure % Returns % 1. the value of the metaid attribute % %============================================= % sboTerm = Priority_getSBOTerm(SBMLPriority) %============================================= % Takes % 1. SBMLPriority, an SBML Priority structure % Returns % 1. the value of the sboTerm attribute % %========================================== % value = Priority_isSetMath(SBMLPriority) %========================================== % Takes % 1. SBMLPriority, an SBML Priority structure % Returns % 1. value = % - 1 if the math attribute is set % - 0 otherwise % %============================================ % value = Priority_isSetMetaid(SBMLPriority) %============================================ % Takes % 1. SBMLPriority, an SBML Priority structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %============================================= % value = Priority_isSetSBOTerm(SBMLPriority) %============================================= % Takes % 1. SBMLPriority, an SBML Priority structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %===================================================== % SBMLPriority = Priority_setMath(SBMLPriority, math) %===================================================== % Takes % 1. SBMLPriority, an SBML Priority structure % 2. math; string representing the math expression math to be set % Returns % 1. the SBML Priority structure with the new value for the math attribute % %========================================================= % SBMLPriority = Priority_setMetaid(SBMLPriority, metaid) %========================================================= % Takes % 1. SBMLPriority, an SBML Priority structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Priority structure with the new value for the metaid attribute % %=========================================================== % SBMLPriority = Priority_setSBOTerm(SBMLPriority, sboTerm) %=========================================================== % Takes % 1. SBMLPriority, an SBML Priority structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Priority structure with the new value for the sboTerm attribute % %================================================= % SBMLPriority = Priority_unsetMath(SBMLPriority) %================================================= % Takes % 1. SBMLPriority, an SBML Priority structure % Returns % 1. the SBML Priority structure with the math attribute unset % %=================================================== % SBMLPriority = Priority_unsetMetaid(SBMLPriority) %=================================================== % Takes % 1. SBMLPriority, an SBML Priority structure % Returns % 1. the SBML Priority structure with the metaid attribute unset % %==================================================== % SBMLPriority = Priority_unsetSBOTerm(SBMLPriority) %==================================================== % Takes % 1. SBMLPriority, an SBML Priority structure % Returns % 1. the SBML Priority structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/0000755000000000000000000000000011704572236024450 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_unsetUnits.m0000644000000000000000000000341511703262364031637 0ustar rootrootfunction SBMLParameterRule = ParameterRule_unsetUnits(SBMLParameterRule) % SBMLParameterRule = ParameterRule_unsetUnits(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. the SBML ParameterRule structure with the units attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'units') SBMLParameterRule.units = ''; else error('units not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_unsetType.m0000644000000000000000000000341511703262364031456 0ustar rootrootfunction SBMLParameterRule = ParameterRule_unsetType(SBMLParameterRule) % SBMLParameterRule = ParameterRule_unsetType(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. the SBML ParameterRule structure with the type attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'type') SBMLParameterRule.type = 'scalar'; else error('type not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_unsetName.m0000644000000000000000000000340711703262364031416 0ustar rootrootfunction SBMLParameterRule = ParameterRule_unsetName(SBMLParameterRule) % SBMLParameterRule = ParameterRule_unsetName(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. the SBML ParameterRule structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'name') SBMLParameterRule.name = ''; else error('name not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_unsetFormula.m0000644000000000000000000000343111703262364032140 0ustar rootrootfunction SBMLParameterRule = ParameterRule_unsetFormula(SBMLParameterRule) % SBMLParameterRule = ParameterRule_unsetFormula(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. the SBML ParameterRule structure with the formula attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'formula') SBMLParameterRule.formula = ''; else error('formula not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_setUnits.m0000644000000000000000000000364711703262364031303 0ustar rootrootfunction SBMLParameterRule = ParameterRule_setUnits(SBMLParameterRule, units) % SBMLParameterRule = ParameterRule_setUnits(SBMLParameterRule, units) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % 2. units; a string representing the units to be set % % Returns % % 1. the SBML ParameterRule structure with the new value for the units attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'units') if ~ischar(units) error('units must be character array') ; else SBMLParameterRule.units = units; end; else error('units not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_setType.m0000644000000000000000000000363211703262364031114 0ustar rootrootfunction SBMLParameterRule = ParameterRule_setType(SBMLParameterRule, type) % SBMLParameterRule = ParameterRule_setType(SBMLParameterRule, type) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % 2. type; a string representing the type to be set % % Returns % % 1. the SBML ParameterRule structure with the new value for the type attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'type') if ~ischar(type) error('type must be character array') ; else SBMLParameterRule.type = type; end; else error('type not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_setName.m0000644000000000000000000000363211703262364031053 0ustar rootrootfunction SBMLParameterRule = ParameterRule_setName(SBMLParameterRule, name) % SBMLParameterRule = ParameterRule_setName(SBMLParameterRule, name) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML ParameterRule structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'name') if ~ischar(name) error('name must be character array') ; else SBMLParameterRule.name = name; end; else error('name not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_setFormula.m0000644000000000000000000000370111703262364031575 0ustar rootrootfunction SBMLParameterRule = ParameterRule_setFormula(SBMLParameterRule, formula) % SBMLParameterRule = ParameterRule_setFormula(SBMLParameterRule, formula) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % 2. formula; a string representing the formula to be set % % Returns % % 1. the SBML ParameterRule structure with the new value for the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'formula') if ~ischar(formula) error('formula must be character array') ; else SBMLParameterRule.formula = formula; end; else error('formula not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_isSetUnits.m0000644000000000000000000000340111703262364031563 0ustar rootrootfunction value = ParameterRule_isSetUnits(SBMLParameterRule) % value = ParameterRule_isSetUnits(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. value = % - 1 if the units attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'units') value = ~isempty(SBMLParameterRule.units); else error('units not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_isSetType.m0000644000000000000000000000337311703262364031412 0ustar rootrootfunction value = ParameterRule_isSetType(SBMLParameterRule) % value = ParameterRule_isSetType(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. value = % - 1 if the type attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'type') value = ~isempty(SBMLParameterRule.type); else error('type not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_isSetName.m0000644000000000000000000000337311703262364031351 0ustar rootrootfunction value = ParameterRule_isSetName(SBMLParameterRule) % value = ParameterRule_isSetName(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'name') value = ~isempty(SBMLParameterRule.name); else error('name not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_isSetFormula.m0000644000000000000000000000341511703262364032073 0ustar rootrootfunction value = ParameterRule_isSetFormula(SBMLParameterRule) % value = ParameterRule_isSetFormula(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'formula') value = ~isempty(SBMLParameterRule.formula); else error('formula not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_getUnits.m0000644000000000000000000000332511703262364031260 0ustar rootrootfunction units = ParameterRule_getUnits(SBMLParameterRule) % units = ParameterRule_getUnits(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. the value of the units attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'units') units = SBMLParameterRule.units; else error('units not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_getType.m0000644000000000000000000000331411703262364031075 0ustar rootrootfunction type = ParameterRule_getType(SBMLParameterRule) % type = ParameterRule_getType(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. the value of the type attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'type') type = SBMLParameterRule.type; else error('type not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_getName.m0000644000000000000000000000331411703262364031034 0ustar rootrootfunction name = ParameterRule_getName(SBMLParameterRule) % name = ParameterRule_getName(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'name') name = SBMLParameterRule.name; else error('name not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_getFormula.m0000644000000000000000000000334711703262364031567 0ustar rootrootfunction formula = ParameterRule_getFormula(SBMLParameterRule) % formula = ParameterRule_getFormula(SBMLParameterRule) % % Takes % % 1. SBMLParameterRule, an SBML ParameterRule structure % % Returns % % 1. the value of the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameterRule); if isfield(SBMLParameterRule, 'formula') formula = SBMLParameterRule.formula; else error('formula not an attribute on SBML L%dV%d ParameterRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/ParameterRule_create.m0000644000000000000000000000546211703262364030725 0ustar rootrootfunction ParameterRule = ParameterRule_create(varargin) % ParameterRule = ParameterRule_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML ParameterRule structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getParameterRuleFieldnames(level, version); if (num > 0) values = getParameterRuleDefaultValues(level, version); ParameterRule = cell2struct(values, fieldnames, 2); %add level and version ParameterRule.level = level; ParameterRule.version = version; %check correct structure if ~isSBML_ParameterRule(ParameterRule, level, version) ParameterRule = struct(); warning('Warn:BadStruct', 'Failed to create ParameterRule'); end; else ParameterRule = []; warning('Warn:InvalidLV', 'ParameterRule not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ParameterRule/Contents.m0000644000000000000000000001610011703262364026416 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\ParameterRule % % The functions allow users to create and work with the SBML ParameterRule structure. % %=========================================================================== % ParameterRule = ParameterRule_create(level(optional), version(optional) ) %=========================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML ParameterRule structure of the appropriate level and version % %======================================================= % formula = ParameterRule_getFormula(SBMLParameterRule) %======================================================= % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. the value of the formula attribute % %================================================= % name = ParameterRule_getName(SBMLParameterRule) %================================================= % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. the value of the name attribute % %================================================= % type = ParameterRule_getType(SBMLParameterRule) %================================================= % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. the value of the type attribute % %=================================================== % units = ParameterRule_getUnits(SBMLParameterRule) %=================================================== % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. the value of the units attribute % %======================================================= % value = ParameterRule_isSetFormula(SBMLParameterRule) %======================================================= % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % %==================================================== % value = ParameterRule_isSetName(SBMLParameterRule) %==================================================== % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %==================================================== % value = ParameterRule_isSetType(SBMLParameterRule) %==================================================== % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. value = % - 1 if the type attribute is set % - 0 otherwise % %===================================================== % value = ParameterRule_isSetUnits(SBMLParameterRule) %===================================================== % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. value = % - 1 if the units attribute is set % - 0 otherwise % %========================================================================== % SBMLParameterRule = ParameterRule_setFormula(SBMLParameterRule, formula) %========================================================================== % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % 2. formula; a string representing the formula to be set % Returns % 1. the SBML ParameterRule structure with the new value for the formula attribute % %==================================================================== % SBMLParameterRule = ParameterRule_setName(SBMLParameterRule, name) %==================================================================== % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % 2. name; a string representing the name to be set % Returns % 1. the SBML ParameterRule structure with the new value for the name attribute % %==================================================================== % SBMLParameterRule = ParameterRule_setType(SBMLParameterRule, type) %==================================================================== % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % 2. type; a string representing the type to be set % Returns % 1. the SBML ParameterRule structure with the new value for the type attribute % %====================================================================== % SBMLParameterRule = ParameterRule_setUnits(SBMLParameterRule, units) %====================================================================== % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % 2. units; a string representing the units to be set % Returns % 1. the SBML ParameterRule structure with the new value for the units attribute % %=================================================================== % SBMLParameterRule = ParameterRule_unsetFormula(SBMLParameterRule) %=================================================================== % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. the SBML ParameterRule structure with the formula attribute unset % %================================================================ % SBMLParameterRule = ParameterRule_unsetName(SBMLParameterRule) %================================================================ % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. the SBML ParameterRule structure with the name attribute unset % %================================================================ % SBMLParameterRule = ParameterRule_unsetType(SBMLParameterRule) %================================================================ % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. the SBML ParameterRule structure with the type attribute unset % %================================================================= % SBMLParameterRule = ParameterRule_unsetUnits(SBMLParameterRule) %================================================================= % Takes % 1. SBMLParameterRule, an SBML ParameterRule structure % Returns % 1. the SBML ParameterRule structure with the units attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/0000755000000000000000000000000011704572236023620 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_unsetValue.m0000644000000000000000000000337411703262350030130 0ustar rootrootfunction SBMLParameter = Parameter_unsetValue(SBMLParameter) % SBMLParameter = Parameter_unsetValue(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the SBML Parameter structure with the value attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'value') SBMLParameter.value = NaN; SBMLParameter.isSetValue = 0; else error('value not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_unsetUnits.m0000644000000000000000000000333311703262350030151 0ustar rootrootfunction SBMLParameter = Parameter_unsetUnits(SBMLParameter) % SBMLParameter = Parameter_unsetUnits(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the SBML Parameter structure with the units attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'units') SBMLParameter.units = ''; else error('units not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_unsetSBOTerm.m0000644000000000000000000000334711703262350030327 0ustar rootrootfunction SBMLParameter = Parameter_unsetSBOTerm(SBMLParameter) % SBMLParameter = Parameter_unsetSBOTerm(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the SBML Parameter structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'sboTerm') SBMLParameter.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_unsetName.m0000644000000000000000000000332511703262350027730 0ustar rootrootfunction SBMLParameter = Parameter_unsetName(SBMLParameter) % SBMLParameter = Parameter_unsetName(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the SBML Parameter structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'name') SBMLParameter.name = ''; else error('name not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_unsetMetaid.m0000644000000000000000000000334111703262350030251 0ustar rootrootfunction SBMLParameter = Parameter_unsetMetaid(SBMLParameter) % SBMLParameter = Parameter_unsetMetaid(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the SBML Parameter structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'metaid') SBMLParameter.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_unsetId.m0000644000000000000000000000331111703262350027377 0ustar rootrootfunction SBMLParameter = Parameter_unsetId(SBMLParameter) % SBMLParameter = Parameter_unsetId(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the SBML Parameter structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'id') SBMLParameter.id = ''; else error('id not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_setValue.m0000644000000000000000000000363111703262350027561 0ustar rootrootfunction SBMLParameter = Parameter_setValue(SBMLParameter, value) % SBMLParameter = Parameter_setValue(SBMLParameter, value) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. value; number representing the value of value to be set % % Returns % % 1. the SBML Parameter structure with the new value for the value attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'value') if ~isnumeric(value) error('value must be numeric') ; else SBMLParameter.value = value; SBMLParameter.isSetValue = 1; end; else error('value not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_setUnits.m0000644000000000000000000000356511703262350027615 0ustar rootrootfunction SBMLParameter = Parameter_setUnits(SBMLParameter, units) % SBMLParameter = Parameter_setUnits(SBMLParameter, units) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. units; a string representing the units to be set % % Returns % % 1. the SBML Parameter structure with the new value for the units attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'units') if ~ischar(units) error('units must be character array') ; else SBMLParameter.units = units; end; else error('units not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_setSBOTerm.m0000644000000000000000000000362611703262350027764 0ustar rootrootfunction SBMLParameter = Parameter_setSBOTerm(SBMLParameter, sboTerm) % SBMLParameter = Parameter_setSBOTerm(SBMLParameter, sboTerm) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Parameter structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLParameter.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_setName.m0000644000000000000000000000355011703262350027365 0ustar rootrootfunction SBMLParameter = Parameter_setName(SBMLParameter, name) % SBMLParameter = Parameter_setName(SBMLParameter, name) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML Parameter structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'name') if ~ischar(name) error('name must be character array') ; else SBMLParameter.name = name; end; else error('name not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_setMetaid.m0000644000000000000000000000360211703262350027706 0ustar rootrootfunction SBMLParameter = Parameter_setMetaid(SBMLParameter, metaid) % SBMLParameter = Parameter_setMetaid(SBMLParameter, metaid) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Parameter structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLParameter.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_setId.m0000644000000000000000000000351611703262350027043 0ustar rootrootfunction SBMLParameter = Parameter_setId(SBMLParameter, id) % SBMLParameter = Parameter_setId(SBMLParameter, id) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML Parameter structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'id') if ~ischar(id) error('id must be character array') ; else SBMLParameter.id = id; end; else error('id not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_setConstant.m0000644000000000000000000000374111703262350030300 0ustar rootrootfunction SBMLParameter = Parameter_setConstant(SBMLParameter, constant) % SBMLParameter = Parameter_setConstant(SBMLParameter, constant) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. constant, an integer (0/1) representing the value of constant to be set % % Returns % % 1. the SBML Parameter structure with the new value for the constant attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'constant') if (~isIntegralNumber(constant) || constant < 0 || constant > 1) error('constant must be an integer of value 0/1') ; else SBMLParameter.constant = constant; end; else error('constant not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_isSetValue.m0000644000000000000000000000333311703262350030054 0ustar rootrootfunction value = Parameter_isSetValue(SBMLParameter) % value = Parameter_isSetValue(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. value = % - 1 if the value attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'value') value = SBMLParameter.isSetValue; else error('isSetValue not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_isSetUnits.m0000644000000000000000000000333311703262350030102 0ustar rootrootfunction value = Parameter_isSetUnits(SBMLParameter) % value = Parameter_isSetUnits(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. value = % - 1 if the units attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'units') value = ~isempty(SBMLParameter.units); else error('units not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_isSetSBOTerm.m0000644000000000000000000000334211703262350030253 0ustar rootrootfunction value = Parameter_isSetSBOTerm(SBMLParameter) % value = Parameter_isSetSBOTerm(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'sboTerm') value = (SBMLParameter.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_isSetName.m0000644000000000000000000000332511703262350027661 0ustar rootrootfunction value = Parameter_isSetName(SBMLParameter) % value = Parameter_isSetName(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'name') value = ~isempty(SBMLParameter.name); else error('name not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_isSetMetaid.m0000644000000000000000000000334111703262350030202 0ustar rootrootfunction value = Parameter_isSetMetaid(SBMLParameter) % value = Parameter_isSetMetaid(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'metaid') value = ~isempty(SBMLParameter.metaid); else error('metaid not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_isSetId.m0000644000000000000000000000331111703262350027330 0ustar rootrootfunction value = Parameter_isSetId(SBMLParameter) % value = Parameter_isSetId(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'id') value = ~isempty(SBMLParameter.id); else error('id not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_isInAlgebraicRule.m0000644000000000000000000000614511703262350031320 0ustar rootrootfunction y = Parameter_isInAlgebraicRule(SBMLParameter, SBMLRules) % y = Parameter_isInAlgebraicRule(SBMLParameter, SBMLRules) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - an array of the indices of any algebraicRules the id of the Parameter appears in % - 0 if the Parameter appears in no algebraicRules % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLParameter)) error(sprintf('%s', ... 'argument must be an SBML Parameter structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLParameter); if (~isSBML_Parameter(SBMLParameter, sbmlLevel, sbmlVersion)) error('Parameter_isInAlgebraicRule(SBMLParameter, SBMLRules)\n%s', ... 'first argument must be an SBMLParameter structure'); end; NumRules = length(SBMLRules); if (NumRules < 1) error('Parameter_isInAlgebraicRule(SBMLParameter, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('Parameter_isInAlgebraicRule(SBMLParameter, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the Parameter occurs %determine the name or id of the Parameter if (sbmlLevel == 1) name = SBMLParameter.name; else if (isempty(SBMLParameter.id)) name = SBMLParameter.name; else name = SBMLParameter.id; end; end; y = []; for i = 1:NumRules index = matchName(SBMLRules(i).formula, name); if (~isempty(index) && strcmp(SBMLRules(i).typecode, 'SBML_ALGEBRAIC_RULE')) y = [y;i]; end; end; if isempty(y) y = 0; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_isAssignedByRule.m0000644000000000000000000000655311703262350031213 0ustar rootrootfunction y = Parameter_isAssignedByRule(SBMLParameter, SBMLRules) % y = Parameter_isAssignedByRule(SBMLParameter, SBMLRules) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - the index of the assignmentRule used to assigned value to the Parameter % - 0 if the Parameter is not assigned by assignmentRule % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLParameter)) error(sprintf('%s', ... 'argument must be an SBML Parameter structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLParameter); if (~isSBML_Parameter(SBMLParameter, sbmlLevel, sbmlVersion)) error('Parameter_isAssignedByRule(SBMLParameter, SBMLRules)\n%s', ... 'first argument must be an SBMLParameter structure'); end; NumRules = length(SBMLRules); if (NumRules < 1) error('Parameter_isAssignedByRule(SBMLParameter, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('Parameter_isAssignedByRule(SBMLParameter, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the Parameter is assigned by it %determine the name or id of the Parameter if (sbmlLevel == 1) name = SBMLParameter.name; else if (isempty(SBMLParameter.id)) name = SBMLParameter.name; else name = SBMLParameter.id; end; end; for i = 1:NumRules if (strcmp(SBMLRules(i).typecode, 'SBML_ASSIGNMENT_RULE')) if (strcmp(SBMLRules(i).variable, name)) % once found return as cannot occur more than once y = i; return; end; elseif ((strcmp(SBMLRules(i).typecode, 'SBML_PARAMETER_RULE')) ... && (strcmp(SBMLRules(i).type, 'scalar'))) if (strcmp(SBMLRules(i).parameter, name)) y = i; return; end; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_isAssignedByRateRule.m0000644000000000000000000000655311703262350032027 0ustar rootrootfunction y = Parameter_isAssignedByRateRule(SBMLParameter, SBMLRules) % y = Parameter_isAssignedByRateRule(SBMLParameter, SBMLRules) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - the index of the rateRule used to assigned value to the Parameter % - 0 if the Parameter is not assigned by rateRule % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLParameter)) error(sprintf('%s', ... 'argument must be an SBML Parameter structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLParameter); if (~isSBML_Parameter(SBMLParameter, sbmlLevel, sbmlVersion)) error('Parameter_isAssignedByRateRule(SBMLParameter, SBMLRules)\n%s', ... 'first argument must be an SBMLParameter structure'); end; NumRules = length(SBMLRules); if (NumRules < 1) error('Parameter_isAssignedByRateRule(SBMLParameter, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('Parameter_isAssignedByRateRule(SBMLParameter, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the Parameter is assigned by it %determine the name or id of the Parameter if (sbmlLevel == 1) name = SBMLParameter.name; else if (isempty(SBMLParameter.id)) name = SBMLParameter.name; else name = SBMLParameter.id; end; end; for i = 1:NumRules if (strcmp(SBMLRules(i).typecode, 'SBML_RATE_RULE')) if (strcmp(SBMLRules(i).variable, name)) % once found return as cannot occur more than once y = i; return; end; elseif ((strcmp(SBMLRules(i).typecode, 'SBML_PARAMETER_RULE')) ... && (strcmp(SBMLRules(i).type, 'rate'))) if (strcmp(SBMLRules(i).parameter, name)) y = i; return; end; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_getValue.m0000644000000000000000000000325711703262350027551 0ustar rootrootfunction value = Parameter_getValue(SBMLParameter) % value = Parameter_getValue(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the value of the value attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'value') value = SBMLParameter.value; else error('value not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_getUnits.m0000644000000000000000000000325711703262350027577 0ustar rootrootfunction units = Parameter_getUnits(SBMLParameter) % units = Parameter_getUnits(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the value of the units attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'units') units = SBMLParameter.units; else error('units not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_getSBOTerm.m0000644000000000000000000000330111703262350027736 0ustar rootrootfunction sboTerm = Parameter_getSBOTerm(SBMLParameter) % sboTerm = Parameter_getSBOTerm(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'sboTerm') sboTerm = SBMLParameter.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_getName.m0000644000000000000000000000324611703262350027353 0ustar rootrootfunction name = Parameter_getName(SBMLParameter) % name = Parameter_getName(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'name') name = SBMLParameter.name; else error('name not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_getMetaid.m0000644000000000000000000000327011703262350027673 0ustar rootrootfunction metaid = Parameter_getMetaid(SBMLParameter) % metaid = Parameter_getMetaid(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'metaid') metaid = SBMLParameter.metaid; else error('metaid not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_getId.m0000644000000000000000000000322411703262350027023 0ustar rootrootfunction id = Parameter_getId(SBMLParameter) % id = Parameter_getId(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'id') id = SBMLParameter.id; else error('id not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_getConstant.m0000644000000000000000000000331211703262350030256 0ustar rootrootfunction constant = Parameter_getConstant(SBMLParameter) % constant = Parameter_getConstant(SBMLParameter) % % Takes % % 1. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the value of the constant attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLParameter); if isfield(SBMLParameter, 'constant') constant = SBMLParameter.constant; else error('constant not an attribute on SBML L%dV%d Parameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Parameter_create.m0000644000000000000000000000536411703262350027241 0ustar rootrootfunction Parameter = Parameter_create(varargin) % Parameter = Parameter_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Parameter structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getParameterFieldnames(level, version); if (num > 0) values = getParameterDefaultValues(level, version); Parameter = cell2struct(values, fieldnames, 2); %add level and version Parameter.level = level; Parameter.version = version; %check correct structure if ~isSBML_Parameter(Parameter, level, version) Parameter = struct(); warning('Warn:BadStruct', 'Failed to create Parameter'); end; else Parameter = []; warning('Warn:InvalidLV', 'Parameter not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Parameter/Contents.m0000644000000000000000000003444011703262350025570 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Parameter % % The functions allow users to create and work with the SBML Parameter structure. % %=================================================================== % Parameter = Parameter_create(level(optional), version(optional) ) %=================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Parameter structure of the appropriate level and version % %================================================= % constant = Parameter_getConstant(SBMLParameter) %================================================= % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the value of the constant attribute % %===================================== % id = Parameter_getId(SBMLParameter) %===================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the value of the id attribute % %============================================= % metaid = Parameter_getMetaid(SBMLParameter) %============================================= % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the value of the metaid attribute % %========================================= % name = Parameter_getName(SBMLParameter) %========================================= % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the value of the name attribute % %=============================================== % sboTerm = Parameter_getSBOTerm(SBMLParameter) %=============================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the value of the sboTerm attribute % %=========================================== % units = Parameter_getUnits(SBMLParameter) %=========================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the value of the units attribute % %=========================================== % value = Parameter_getValue(SBMLParameter) %=========================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the value of the value attribute % %============================================================== % y = Parameter_isAssignedByRateRule(SBMLParameter, SBMLRules) %============================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - the index of the rateRule used to assigned value to the Parameter % - 0 if the Parameter is not assigned by rateRule % % %========================================================== % y = Parameter_isAssignedByRule(SBMLParameter, SBMLRules) %========================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - the index of the assignmentRule used to assigned value to the Parameter % - 0 if the Parameter is not assigned by assignmentRule % % %=========================================================== % y = Parameter_isInAlgebraicRule(SBMLParameter, SBMLRules) %=========================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - an array of the indices of any algebraicRules the id of the Parameter appears in % - 0 if the Parameter appears in no algebraicRules % % %========================================== % value = Parameter_isSetId(SBMLParameter) %========================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %============================================== % value = Parameter_isSetMetaid(SBMLParameter) %============================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %============================================ % value = Parameter_isSetName(SBMLParameter) %============================================ % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %=============================================== % value = Parameter_isSetSBOTerm(SBMLParameter) %=============================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %============================================= % value = Parameter_isSetUnits(SBMLParameter) %============================================= % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. value = % - 1 if the units attribute is set % - 0 otherwise % %============================================= % value = Parameter_isSetValue(SBMLParameter) %============================================= % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. value = % - 1 if the value attribute is set % - 0 otherwise % %================================================================ % SBMLParameter = Parameter_setConstant(SBMLParameter, constant) %================================================================ % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. constant, an integer (0/1) representing the value of constant to be set % Returns % 1. the SBML Parameter structure with the new value for the constant attribute % %==================================================== % SBMLParameter = Parameter_setId(SBMLParameter, id) %==================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. id; a string representing the id to be set % Returns % 1. the SBML Parameter structure with the new value for the id attribute % %============================================================ % SBMLParameter = Parameter_setMetaid(SBMLParameter, metaid) %============================================================ % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Parameter structure with the new value for the metaid attribute % %======================================================== % SBMLParameter = Parameter_setName(SBMLParameter, name) %======================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. name; a string representing the name to be set % Returns % 1. the SBML Parameter structure with the new value for the name attribute % %============================================================== % SBMLParameter = Parameter_setSBOTerm(SBMLParameter, sboTerm) %============================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Parameter structure with the new value for the sboTerm attribute % %========================================================== % SBMLParameter = Parameter_setUnits(SBMLParameter, units) %========================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. units; a string representing the units to be set % Returns % 1. the SBML Parameter structure with the new value for the units attribute % %========================================================== % SBMLParameter = Parameter_setValue(SBMLParameter, value) %========================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % 2. value; number representing the value of value to be set % Returns % 1. the SBML Parameter structure with the new value for the value attribute % %================================================== % SBMLParameter = Parameter_unsetId(SBMLParameter) %================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the SBML Parameter structure with the id attribute unset % %====================================================== % SBMLParameter = Parameter_unsetMetaid(SBMLParameter) %====================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the SBML Parameter structure with the metaid attribute unset % %==================================================== % SBMLParameter = Parameter_unsetName(SBMLParameter) %==================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the SBML Parameter structure with the name attribute unset % %======================================================= % SBMLParameter = Parameter_unsetSBOTerm(SBMLParameter) %======================================================= % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the SBML Parameter structure with the sboTerm attribute unset % %===================================================== % SBMLParameter = Parameter_unsetUnits(SBMLParameter) %===================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the SBML Parameter structure with the units attribute unset % %===================================================== % SBMLParameter = Parameter_unsetValue(SBMLParameter) %===================================================== % Takes % 1. SBMLParameter, an SBML Parameter structure % Returns % 1. the SBML Parameter structure with the value attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Object_create.m0000644000000000000000000001143211703262354024604 0ustar rootrootfunction SBMLObject = Object_create(typecode, level, version) % SBMLStructure = Object_create(typecode, level, version) % % Takes % % 1. typecode; a string representing the type of object being queried % 2. level; an integer representing an SBML level % 3. version; an integer representing an SBML version % % Returns % % 1. an SBML structure representing the given typecode, level and version % % switch (typecode) case {'SBML_ALGEBRAIC_RULE', 'AlgebraicRule', 'algebraicRule'} fhandle = str2func('AlgebraicRule_create'); case {'SBML_ASSIGNMENT_RULE', 'AssignmentRule', 'assignmentRule'} fhandle = str2func('AssignmentRule_create'); case {'SBML_COMPARTMENT', 'Compartment', 'compartment'} fhandle = str2func('Compartment_create'); case {'SBML_COMPARTMENT_TYPE', 'CompartmentType', 'compartmentType'} fhandle = str2func('CompartmentType_create'); case {'SBML_COMPARTMENT_VOLUME_RULE', 'CompartmentVolumeRule', 'compartmentVolumeRule'} fhandle = str2func('CompartmentVolumeRule_create'); case {'SBML_CONSTRAINT', 'Constraint', 'constraint'} fhandle = str2func('Constraint_create'); case {'SBML_DELAY', 'Delay', 'delay'} fhandle = str2func('Delay_create'); case {'SBML_EVENT', 'Event', 'event'} fhandle = str2func('Event_create'); case {'SBML_EVENT_ASSIGNMENT', 'EventAssignment', 'eventAssignment'} fhandle = str2func('EventAssignment_create'); case {'SBML_FUNCTION_DEFINITION', 'FunctionDefinition', 'functionDefinition'} fhandle = str2func('FunctionDefinition_create'); case {'SBML_INITIAL_ASSIGNMENT', 'InitialAssignment', 'initialAssignment'} fhandle = str2func('InitialAssignment_create'); case {'SBML_KINETIC_LAW', 'KineticLaw', 'kineticLaw'} fhandle = str2func('KineticLaw_create'); case {'SBML_LOCAL_PARAMETER', 'LocalParameter', 'localParameter'} fhandle = str2func('LocalParameter_create'); case {'SBML_MODEL', 'Model', 'model'} fhandle = str2func('Model_create'); case {'SBML_MODIFIER_SPECIES_REFERENCE', 'ModifierSpeciesReference', 'modifierSpeciesReference'} fhandle = str2func('ModifierSpeciesReference_create'); case {'SBML_PARAMETER', 'Parameter', 'parameter'} fhandle = str2func('Parameter_create'); case {'SBML_PARAMETER_RULE', 'ParameterRule', 'parameterRule'} fhandle = str2func('ParameterRule_create'); case {'SBML_PRIORITY', 'Priority', 'priority'} fhandle = str2func('Priority_create'); case {'SBML_RATE_RULE', 'RateRule', 'ruleRule'} fhandle = str2func('RateRule_create'); case {'SBML_REACTION', 'Reaction', 'reaction'} fhandle = str2func('Reaction_create'); case {'SBML_SPECIES', 'Species', 'species'} fhandle = str2func('Species_create'); case {'SBML_SPECIES_CONCENTRATION_RULE', 'SpeciesConcentrationRule', 'speciesConcentrationRule'} fhandle = str2func('SpeciesConcentrationRule_create'); case {'SBML_SPECIES_REFERENCE', 'SpeciesReference', 'speciesReference'} fhandle = str2func('SpeciesReference_create'); case {'SBML_SPECIES_TYPE', 'SpeciesType', 'speciesType'} fhandle = str2func('SpeciesType_create'); case {'SBML_STOICHIOMETRY_MATH', 'StoichiometryMath', 'stoichiometryMath'} fhandle = str2func('StoichiometryMath_create'); case {'SBML_TRIGGER', 'Trigger', 'trigger'} fhandle = str2func('Trigger_create'); case {'SBML_UNIT', 'Unit', 'unit'} fhandle = str2func('Unit_create'); case {'SBML_UNIT_DEFINITION', 'UnitDefinition', 'unitDefinition'} fhandle = str2func('UnitDefinition_create'); otherwise error('%s\n%s', ... 'Object_create(typecode, level, version)', ... 'typecode not recognised'); end; SBMLObject = feval(fhandle, level, version); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/0000755000000000000000000000000011704572236026571 5ustar rootroot././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_unsetSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000365011703262316032053 0ustar rootrootfunction SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetSpecies(SBMLModifierSpeciesReference) % SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetSpecies(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. the SBML ModifierSpeciesReference structure with the species attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'species') SBMLModifierSpeciesReference.species = ''; else error('species not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000365011703262316032053 0ustar rootrootfunction SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetSBOTerm(SBMLModifierSpeciesReference) % SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetSBOTerm(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. the SBML ModifierSpeciesReference structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'sboTerm') SBMLModifierSpeciesReference.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_unsetName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000362611703262316032056 0ustar rootrootfunction SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetName(SBMLModifierSpeciesReference) % SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetName(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. the SBML ModifierSpeciesReference structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'name') SBMLModifierSpeciesReference.name = ''; else error('name not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000364211703262316032054 0ustar rootrootfunction SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetMetaid(SBMLModifierSpeciesReference) % SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetMetaid(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. the SBML ModifierSpeciesReference structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'metaid') SBMLModifierSpeciesReference.metaid = ''; else error('metaid not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_unsetId.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000361211703262316032051 0ustar rootrootfunction SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetId(SBMLModifierSpeciesReference) % SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetId(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. the SBML ModifierSpeciesReference structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'id') SBMLModifierSpeciesReference.id = ''; else error('id not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_setSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000412011703262316032044 0ustar rootrootfunction SBMLModifierSpeciesReference = ModifierSpeciesReference_setSpecies(SBMLModifierSpeciesReference, species) % SBMLModifierSpeciesReference = ModifierSpeciesReference_setSpecies(SBMLModifierSpeciesReference, species) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. species; a string representing the species to be set % % Returns % % 1. the SBML ModifierSpeciesReference structure with the new value for the species attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'species') if ~ischar(species) error('species must be character array') ; else SBMLModifierSpeciesReference.species = species; end; else error('species not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_setSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000412711703262316032053 0ustar rootrootfunction SBMLModifierSpeciesReference = ModifierSpeciesReference_setSBOTerm(SBMLModifierSpeciesReference, sboTerm) % SBMLModifierSpeciesReference = ModifierSpeciesReference_setSBOTerm(SBMLModifierSpeciesReference, sboTerm) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML ModifierSpeciesReference structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLModifierSpeciesReference.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_setName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000405111703262316032047 0ustar rootrootfunction SBMLModifierSpeciesReference = ModifierSpeciesReference_setName(SBMLModifierSpeciesReference, name) % SBMLModifierSpeciesReference = ModifierSpeciesReference_setName(SBMLModifierSpeciesReference, name) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML ModifierSpeciesReference structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'name') if ~ischar(name) error('name must be character array') ; else SBMLModifierSpeciesReference.name = name; end; else error('name not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_setMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000410311703262316032045 0ustar rootrootfunction SBMLModifierSpeciesReference = ModifierSpeciesReference_setMetaid(SBMLModifierSpeciesReference, metaid) % SBMLModifierSpeciesReference = ModifierSpeciesReference_setMetaid(SBMLModifierSpeciesReference, metaid) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML ModifierSpeciesReference structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLModifierSpeciesReference.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_setId.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000401711703262316032051 0ustar rootrootfunction SBMLModifierSpeciesReference = ModifierSpeciesReference_setId(SBMLModifierSpeciesReference, id) % SBMLModifierSpeciesReference = ModifierSpeciesReference_setId(SBMLModifierSpeciesReference, id) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML ModifierSpeciesReference structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'id') if ~ischar(id) error('id must be character array') ; else SBMLModifierSpeciesReference.id = id; end; else error('id not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_isSetSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000357311703262316032057 0ustar rootrootfunction value = ModifierSpeciesReference_isSetSpecies(SBMLModifierSpeciesReference) % value = ModifierSpeciesReference_isSetSpecies(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. value = % - 1 if the species attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'species') value = ~isempty(SBMLModifierSpeciesReference.species); else error('species not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000356611703262316032061 0ustar rootrootfunction value = ModifierSpeciesReference_isSetSBOTerm(SBMLModifierSpeciesReference) % value = ModifierSpeciesReference_isSetSBOTerm(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'sboTerm') value = (SBMLModifierSpeciesReference.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_isSetName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000355111703262316032053 0ustar rootrootfunction value = ModifierSpeciesReference_isSetName(SBMLModifierSpeciesReference) % value = ModifierSpeciesReference_isSetName(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'name') value = ~isempty(SBMLModifierSpeciesReference.name); else error('name not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000356511703262316032060 0ustar rootrootfunction value = ModifierSpeciesReference_isSetMetaid(SBMLModifierSpeciesReference) % value = ModifierSpeciesReference_isSetMetaid(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'metaid') value = ~isempty(SBMLModifierSpeciesReference.metaid); else error('metaid not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_isSetId.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000353511703262316032055 0ustar rootrootfunction value = ModifierSpeciesReference_isSetId(SBMLModifierSpeciesReference) % value = ModifierSpeciesReference_isSetId(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'id') value = ~isempty(SBMLModifierSpeciesReference.id); else error('id not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_getSpecies.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000352511703262316032054 0ustar rootrootfunction species = ModifierSpeciesReference_getSpecies(SBMLModifierSpeciesReference) % species = ModifierSpeciesReference_getSpecies(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. the value of the species attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'species') species = SBMLModifierSpeciesReference.species; else error('species not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_getSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000352511703262316032054 0ustar rootrootfunction sboTerm = ModifierSpeciesReference_getSBOTerm(SBMLModifierSpeciesReference) % sboTerm = ModifierSpeciesReference_getSBOTerm(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'sboTerm') sboTerm = SBMLModifierSpeciesReference.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_getName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000347211703262316032055 0ustar rootrootfunction name = ModifierSpeciesReference_getName(SBMLModifierSpeciesReference) % name = ModifierSpeciesReference_getName(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'name') name = SBMLModifierSpeciesReference.name; else error('name not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_getMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000351411703262316032052 0ustar rootrootfunction metaid = ModifierSpeciesReference_getMetaid(SBMLModifierSpeciesReference) % metaid = ModifierSpeciesReference_getMetaid(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'metaid') metaid = SBMLModifierSpeciesReference.metaid; else error('metaid not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_getId.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000345011703262316032051 0ustar rootrootfunction id = ModifierSpeciesReference_getId(SBMLModifierSpeciesReference) % id = ModifierSpeciesReference_getId(SBMLModifierSpeciesReference) % % Takes % % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModifierSpeciesReference); if isfield(SBMLModifierSpeciesReference, 'id') id = SBMLModifierSpeciesReference.id; else error('id not an attribute on SBML L%dV%d ModifierSpeciesReference', level, version); end; ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesReference_create.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/ModifierSpeciesRe0000644000000000000000000000574211703262316032057 0ustar rootrootfunction ModifierSpeciesReference = ModifierSpeciesReference_create(varargin) % ModifierSpeciesReference = ModifierSpeciesReference_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML ModifierSpeciesReference structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getModifierSpeciesReferenceFieldnames(level, version); if (num > 0) values = getModifierSpeciesReferenceDefaultValues(level, version); ModifierSpeciesReference = cell2struct(values, fieldnames, 2); %add level and version ModifierSpeciesReference.level = level; ModifierSpeciesReference.version = version; %check correct structure if ~isSBML_ModifierSpeciesReference(ModifierSpeciesReference, level, version) ModifierSpeciesReference = struct(); warning('Warn:BadStruct', 'Failed to create ModifierSpeciesReference'); end; else ModifierSpeciesReference = []; warning('Warn:InvalidLV', 'ModifierSpeciesReference not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/ModifierSpeciesReference/Contents.m0000644000000000000000000002523411703262316030544 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\ModifierSpeciesReference % % The functions allow users to create and work with the SBML ModifierSpeciesReference structure. % %================================================================================================= % ModifierSpeciesReference = ModifierSpeciesReference_create(level(optional), version(optional) ) %================================================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML ModifierSpeciesReference structure of the appropriate level and version % %=================================================================== % id = ModifierSpeciesReference_getId(SBMLModifierSpeciesReference) %=================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. the value of the id attribute % %=========================================================================== % metaid = ModifierSpeciesReference_getMetaid(SBMLModifierSpeciesReference) %=========================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. the value of the metaid attribute % %======================================================================= % name = ModifierSpeciesReference_getName(SBMLModifierSpeciesReference) %======================================================================= % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. the value of the name attribute % %============================================================================= % sboTerm = ModifierSpeciesReference_getSBOTerm(SBMLModifierSpeciesReference) %============================================================================= % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. the value of the sboTerm attribute % %============================================================================= % species = ModifierSpeciesReference_getSpecies(SBMLModifierSpeciesReference) %============================================================================= % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. the value of the species attribute % %======================================================================== % value = ModifierSpeciesReference_isSetId(SBMLModifierSpeciesReference) %======================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %============================================================================ % value = ModifierSpeciesReference_isSetMetaid(SBMLModifierSpeciesReference) %============================================================================ % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %========================================================================== % value = ModifierSpeciesReference_isSetName(SBMLModifierSpeciesReference) %========================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %============================================================================= % value = ModifierSpeciesReference_isSetSBOTerm(SBMLModifierSpeciesReference) %============================================================================= % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %============================================================================= % value = ModifierSpeciesReference_isSetSpecies(SBMLModifierSpeciesReference) %============================================================================= % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. value = % - 1 if the species attribute is set % - 0 otherwise % %================================================================================================= % SBMLModifierSpeciesReference = ModifierSpeciesReference_setId(SBMLModifierSpeciesReference, id) %================================================================================================= % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. id; a string representing the id to be set % Returns % 1. the SBML ModifierSpeciesReference structure with the new value for the id attribute % %========================================================================================================= % SBMLModifierSpeciesReference = ModifierSpeciesReference_setMetaid(SBMLModifierSpeciesReference, metaid) %========================================================================================================= % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML ModifierSpeciesReference structure with the new value for the metaid attribute % %===================================================================================================== % SBMLModifierSpeciesReference = ModifierSpeciesReference_setName(SBMLModifierSpeciesReference, name) %===================================================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. name; a string representing the name to be set % Returns % 1. the SBML ModifierSpeciesReference structure with the new value for the name attribute % %=========================================================================================================== % SBMLModifierSpeciesReference = ModifierSpeciesReference_setSBOTerm(SBMLModifierSpeciesReference, sboTerm) %=========================================================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML ModifierSpeciesReference structure with the new value for the sboTerm attribute % %=========================================================================================================== % SBMLModifierSpeciesReference = ModifierSpeciesReference_setSpecies(SBMLModifierSpeciesReference, species) %=========================================================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % 2. species; a string representing the species to be set % Returns % 1. the SBML ModifierSpeciesReference structure with the new value for the species attribute % %=============================================================================================== % SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetId(SBMLModifierSpeciesReference) %=============================================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. the SBML ModifierSpeciesReference structure with the id attribute unset % %=================================================================================================== % SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetMetaid(SBMLModifierSpeciesReference) %=================================================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. the SBML ModifierSpeciesReference structure with the metaid attribute unset % %================================================================================================= % SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetName(SBMLModifierSpeciesReference) %================================================================================================= % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. the SBML ModifierSpeciesReference structure with the name attribute unset % %==================================================================================================== % SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetSBOTerm(SBMLModifierSpeciesReference) %==================================================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. the SBML ModifierSpeciesReference structure with the sboTerm attribute unset % %==================================================================================================== % SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetSpecies(SBMLModifierSpeciesReference) %==================================================================================================== % Takes % 1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure % Returns % 1. the SBML ModifierSpeciesReference structure with the species attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/0000755000000000000000000000000011704572234022736 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetVolumeUnits.m0000644000000000000000000000333711703262276027614 0ustar rootrootfunction SBMLModel = Model_unsetVolumeUnits(SBMLModel) % SBMLModel = Model_unsetVolumeUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the volumeUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'volumeUnits') SBMLModel.volumeUnits = ''; else error('volumeUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetTimeUnits.m0000644000000000000000000000332311703262300027222 0ustar rootrootfunction SBMLModel = Model_unsetTimeUnits(SBMLModel) % SBMLModel = Model_unsetTimeUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the timeUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'timeUnits') SBMLModel.timeUnits = ''; else error('timeUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetSubstanceUnits.m0000644000000000000000000000336111703262300030255 0ustar rootrootfunction SBMLModel = Model_unsetSubstanceUnits(SBMLModel) % SBMLModel = Model_unsetSubstanceUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the substanceUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'substanceUnits') SBMLModel.substanceUnits = ''; else error('substanceUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetSBOTerm.m0000644000000000000000000000330711703262276026572 0ustar rootrootfunction SBMLModel = Model_unsetSBOTerm(SBMLModel) % SBMLModel = Model_unsetSBOTerm(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'sboTerm') SBMLModel.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetName.m0000644000000000000000000000326511703262300026166 0ustar rootrootfunction SBMLModel = Model_unsetName(SBMLModel) % SBMLModel = Model_unsetName(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'name') SBMLModel.name = ''; else error('name not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetMetaid.m0000644000000000000000000000330111703262276026514 0ustar rootrootfunction SBMLModel = Model_unsetMetaid(SBMLModel) % SBMLModel = Model_unsetMetaid(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'metaid') SBMLModel.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetLengthUnits.m0000644000000000000000000000333711703262276027566 0ustar rootrootfunction SBMLModel = Model_unsetLengthUnits(SBMLModel) % SBMLModel = Model_unsetLengthUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the lengthUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'lengthUnits') SBMLModel.lengthUnits = ''; else error('lengthUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetId.m0000644000000000000000000000325111703262276025651 0ustar rootrootfunction SBMLModel = Model_unsetId(SBMLModel) % SBMLModel = Model_unsetId(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'id') SBMLModel.id = ''; else error('id not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetExtentUnits.m0000644000000000000000000000333711703262276027614 0ustar rootrootfunction SBMLModel = Model_unsetExtentUnits(SBMLModel) % SBMLModel = Model_unsetExtentUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the extentUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'extentUnits') SBMLModel.extentUnits = ''; else error('extentUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetConversionFactor.m0000644000000000000000000000337511703262276030610 0ustar rootrootfunction SBMLModel = Model_unsetConversionFactor(SBMLModel) % SBMLModel = Model_unsetConversionFactor(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the conversionFactor attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'conversionFactor') SBMLModel.conversionFactor = ''; else error('conversionFactor not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_unsetAreaUnits.m0000644000000000000000000000332311703262276027210 0ustar rootrootfunction SBMLModel = Model_unsetAreaUnits(SBMLModel) % SBMLModel = Model_unsetAreaUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the areaUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'areaUnits') SBMLModel.areaUnits = ''; else error('areaUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setVolumeUnits.m0000644000000000000000000000364311703262276027251 0ustar rootrootfunction SBMLModel = Model_setVolumeUnits(SBMLModel, volumeUnits) % SBMLModel = Model_setVolumeUnits(SBMLModel, volumeUnits) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. volumeUnits; a string representing the volumeUnits to be set % % Returns % % 1. the SBML Model structure with the new value for the volumeUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'volumeUnits') if ~ischar(volumeUnits) error('volumeUnits must be character array') ; else SBMLModel.volumeUnits = volumeUnits; end; else error('volumeUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setTimeUnits.m0000644000000000000000000000361111703262276026673 0ustar rootrootfunction SBMLModel = Model_setTimeUnits(SBMLModel, timeUnits) % SBMLModel = Model_setTimeUnits(SBMLModel, timeUnits) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. timeUnits; a string representing the timeUnits to be set % % Returns % % 1. the SBML Model structure with the new value for the timeUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'timeUnits') if ~ischar(timeUnits) error('timeUnits must be character array') ; else SBMLModel.timeUnits = timeUnits; end; else error('timeUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setSubstanceUnits.m0000644000000000000000000000371211703262276027726 0ustar rootrootfunction SBMLModel = Model_setSubstanceUnits(SBMLModel, substanceUnits) % SBMLModel = Model_setSubstanceUnits(SBMLModel, substanceUnits) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. substanceUnits; a string representing the substanceUnits to be set % % Returns % % 1. the SBML Model structure with the new value for the substanceUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'substanceUnits') if ~ischar(substanceUnits) error('substanceUnits must be character array') ; else SBMLModel.substanceUnits = substanceUnits; end; else error('substanceUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setSBOTerm.m0000644000000000000000000000356611703262276026236 0ustar rootrootfunction SBMLModel = Model_setSBOTerm(SBMLModel, sboTerm) % SBMLModel = Model_setSBOTerm(SBMLModel, sboTerm) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Model structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLModel.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setName.m0000644000000000000000000000351011703262276025630 0ustar rootrootfunction SBMLModel = Model_setName(SBMLModel, name) % SBMLModel = Model_setName(SBMLModel, name) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML Model structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'name') if ~ischar(name) error('name must be character array') ; else SBMLModel.name = name; end; else error('name not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setMetaid.m0000644000000000000000000000354211703262276026160 0ustar rootrootfunction SBMLModel = Model_setMetaid(SBMLModel, metaid) % SBMLModel = Model_setMetaid(SBMLModel, metaid) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Model structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLModel.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setLengthUnits.m0000644000000000000000000000364311703262276027223 0ustar rootrootfunction SBMLModel = Model_setLengthUnits(SBMLModel, lengthUnits) % SBMLModel = Model_setLengthUnits(SBMLModel, lengthUnits) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. lengthUnits; a string representing the lengthUnits to be set % % Returns % % 1. the SBML Model structure with the new value for the lengthUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'lengthUnits') if ~ischar(lengthUnits) error('lengthUnits must be character array') ; else SBMLModel.lengthUnits = lengthUnits; end; else error('lengthUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setId.m0000644000000000000000000000345611703262276025315 0ustar rootrootfunction SBMLModel = Model_setId(SBMLModel, id) % SBMLModel = Model_setId(SBMLModel, id) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML Model structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'id') if ~ischar(id) error('id must be character array') ; else SBMLModel.id = id; end; else error('id not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setExtentUnits.m0000644000000000000000000000364311703262276027251 0ustar rootrootfunction SBMLModel = Model_setExtentUnits(SBMLModel, extentUnits) % SBMLModel = Model_setExtentUnits(SBMLModel, extentUnits) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. extentUnits; a string representing the extentUnits to be set % % Returns % % 1. the SBML Model structure with the new value for the extentUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'extentUnits') if ~ischar(extentUnits) error('extentUnits must be character array') ; else SBMLModel.extentUnits = extentUnits; end; else error('extentUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setConversionFactor.m0000644000000000000000000000374411703262276030245 0ustar rootrootfunction SBMLModel = Model_setConversionFactor(SBMLModel, conversionFactor) % SBMLModel = Model_setConversionFactor(SBMLModel, conversionFactor) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. conversionFactor; a string representing the conversionFactor to be set % % Returns % % 1. the SBML Model structure with the new value for the conversionFactor attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'conversionFactor') if ~ischar(conversionFactor) error('conversionFactor must be character array') ; else SBMLModel.conversionFactor = conversionFactor; end; else error('conversionFactor not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_setAreaUnits.m0000644000000000000000000000361111703262300026631 0ustar rootrootfunction SBMLModel = Model_setAreaUnits(SBMLModel, areaUnits) % SBMLModel = Model_setAreaUnits(SBMLModel, areaUnits) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. areaUnits; a string representing the areaUnits to be set % % Returns % % 1. the SBML Model structure with the new value for the areaUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'areaUnits') if ~ischar(areaUnits) error('areaUnits must be character array') ; else SBMLModel.areaUnits = areaUnits; end; else error('areaUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetVolumeUnits.m0000644000000000000000000000335311703262300027527 0ustar rootrootfunction value = Model_isSetVolumeUnits(SBMLModel) % value = Model_isSetVolumeUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the volumeUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'volumeUnits') value = ~isempty(SBMLModel.volumeUnits); else error('volumeUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetTimeUnits.m0000644000000000000000000000333711703262300027160 0ustar rootrootfunction value = Model_isSetTimeUnits(SBMLModel) % value = Model_isSetTimeUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the timeUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'timeUnits') value = ~isempty(SBMLModel.timeUnits); else error('timeUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetSubstanceUnits.m0000644000000000000000000000337511703262276030227 0ustar rootrootfunction value = Model_isSetSubstanceUnits(SBMLModel) % value = Model_isSetSubstanceUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the substanceUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'substanceUnits') value = ~isempty(SBMLModel.substanceUnits); else error('substanceUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetSBOTerm.m0000644000000000000000000000331611703262276026523 0ustar rootrootfunction value = Model_isSetSBOTerm(SBMLModel) % value = Model_isSetSBOTerm(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'sboTerm') value = (SBMLModel.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetSBML_version.m0000644000000000000000000000336611703262276027557 0ustar rootrootfunction value = Model_isSetSBML_version(SBMLModel) % value = Model_isSetSBML_version(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the sBML_version attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'SBML_version') value = ~isempty(SBMLModel.SBML_version); else error('isSetSBML_version not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetSBML_level.m0000644000000000000000000000335211703262276027174 0ustar rootrootfunction value = Model_isSetSBML_level(SBMLModel) % value = Model_isSetSBML_level(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the sBML_level attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'SBML_level') value = ~isempty(SBMLModel.SBML_level); else error('isSetSBML_level not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetName.m0000644000000000000000000000330111703262276026122 0ustar rootrootfunction value = Model_isSetName(SBMLModel) % value = Model_isSetName(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'name') value = ~isempty(SBMLModel.name); else error('name not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetMetaid.m0000644000000000000000000000331511703262276026452 0ustar rootrootfunction value = Model_isSetMetaid(SBMLModel) % value = Model_isSetMetaid(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'metaid') value = ~isempty(SBMLModel.metaid); else error('metaid not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetLengthUnits.m0000644000000000000000000000335311703262276027515 0ustar rootrootfunction value = Model_isSetLengthUnits(SBMLModel) % value = Model_isSetLengthUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the lengthUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'lengthUnits') value = ~isempty(SBMLModel.lengthUnits); else error('lengthUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetId.m0000644000000000000000000000326511703262276025607 0ustar rootrootfunction value = Model_isSetId(SBMLModel) % value = Model_isSetId(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'id') value = ~isempty(SBMLModel.id); else error('id not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetExtentUnits.m0000644000000000000000000000335311703262300027527 0ustar rootrootfunction value = Model_isSetExtentUnits(SBMLModel) % value = Model_isSetExtentUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the extentUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'extentUnits') value = ~isempty(SBMLModel.extentUnits); else error('extentUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetConversionFactor.m0000644000000000000000000000341111703262276030530 0ustar rootrootfunction value = Model_isSetConversionFactor(SBMLModel) % value = Model_isSetConversionFactor(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the conversionFactor attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'conversionFactor') value = ~isempty(SBMLModel.conversionFactor); else error('conversionFactor not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_isSetAreaUnits.m0000644000000000000000000000333711703262300027132 0ustar rootrootfunction value = Model_isSetAreaUnits(SBMLModel) % value = Model_isSetAreaUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. value = % - 1 if the areaUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'areaUnits') value = ~isempty(SBMLModel.areaUnits); else error('areaUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getVolumeUnits.m0000644000000000000000000000332111703262276027226 0ustar rootrootfunction volumeUnits = Model_getVolumeUnits(SBMLModel) % volumeUnits = Model_getVolumeUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the volumeUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'volumeUnits') volumeUnits = SBMLModel.volumeUnits; else error('volumeUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getUnitDefinitionById.m0000644000000000000000000000467011703262300030430 0ustar rootrootfunction unitDefinition = Model_getUnitDefinitionById(SBMLModel, id) % unitDefinition = Model_getUnitDefinitionById(SBMLModel, id) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML UnitDefinition structure % % Returns % % 1. the SBML UnitDefinition structure that has this id % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getUnitDefinitionById(SBMLModel, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Model_getUnitDefinitionById(SBMLModel, id)', 'second argument must be a string')); elseif (SBMLModel.SBML_level == 1) error(sprintf('%s\n%s', 'Model_getUnitDefinitionById(SBMLModel, id)', 'no id field in a level 1 model')); end; unitDefinition = []; for i = 1:length(SBMLModel.unitDefinition) if (strcmp(id, SBMLModel.unitDefinition(i).id)) unitDefinition = SBMLModel.unitDefinition(i); break; end; end; %if level and version fields are not on returned object add them if ~isempty(unitDefinition) && ~isfield(unitDefinition, 'level') unitDefinition.level = SBMLModel.SBML_level; unitDefinition.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getUnitDefinition.m0000644000000000000000000000431211703262300027651 0ustar rootrootfunction unitDefinition = Model_getUnitDefinition(SBMLModel, index) % unitDefinition = Model_getUnitDefinition(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML UnitDefinition structure % % Returns % % 1. the SBML UnitDefinition structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'unitDefinition') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.unitDefinition) unitDefinition = SBMLModel.unitDefinition(index); else error('index is out of range'); end; else error('unitDefinition not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(unitDefinition, 'level') unitDefinition.level = level; unitDefinition.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getTimeUnits.m0000644000000000000000000000327711703262276026667 0ustar rootrootfunction timeUnits = Model_getTimeUnits(SBMLModel) % timeUnits = Model_getTimeUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the timeUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'timeUnits') timeUnits = SBMLModel.timeUnits; else error('timeUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getSubstanceUnits.m0000644000000000000000000000335411703262276027714 0ustar rootrootfunction substanceUnits = Model_getSubstanceUnits(SBMLModel) % substanceUnits = Model_getSubstanceUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the substanceUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'substanceUnits') substanceUnits = SBMLModel.substanceUnits; else error('substanceUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getSpeciesTypeById.m0000644000000000000000000000460211703262276027744 0ustar rootrootfunction speciesType = Model_getSpeciesTypeById(SBMLModel, id) % speciesType = Model_getSpeciesTypeById(SBMLModel, id) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML SpeciesType structure % % Returns % % 1. the SBML SpeciesType structure that has this id % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getSpeciesTypeById(SBMLModel, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Model_getSpeciesTypeById(SBMLModel, id)', 'second argument must be a string')); elseif (SBMLModel.SBML_level ~= 2) error(sprintf('%s\n%s', 'Model_getSpeciesTypeById(SBMLModel, id)', 'no id field in a level 1 model')); end; speciesType = []; for i = 1:length(SBMLModel.speciesType) if (strcmp(id, SBMLModel.speciesType(i).id)) speciesType = SBMLModel.speciesType(i); break; end; end; %if level and version fields are not on returned object add them if ~isempty(speciesType) && ~isfield(speciesType, 'level') speciesType.level = SBMLModel.SBML_level; speciesType.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getSpeciesType.m0000644000000000000000000000424011703262276027172 0ustar rootrootfunction speciesType = Model_getSpeciesType(SBMLModel, index) % speciesType = Model_getSpeciesType(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML SpeciesType structure % % Returns % % 1. the SBML SpeciesType structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'speciesType') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.speciesType) speciesType = SBMLModel.speciesType(index); else error('index is out of range'); end; else error('speciesType not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(speciesType, 'level') speciesType.level = level; speciesType.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getSpeciesById.m0000644000000000000000000000447211703262276027107 0ustar rootrootfunction species = Model_getSpeciesById(SBMLModel, id) % species = Model_getSpeciesById(SBMLModel, id) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML Species structure % % Returns % % 1. the SBML Species structure that has this id % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getSpeciesById(SBMLModel, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Model_getSpeciesById(SBMLModel, id)', 'second argument must be a string')); elseif (SBMLModel.SBML_level == 1) error(sprintf('%s\n%s', 'Model_getSpeciesById(SBMLModel, id)', 'no id field in a level 1 model')); end; species = []; for i = 1:length(SBMLModel.species) if (strcmp(id, SBMLModel.species(i).id)) species = SBMLModel.species(i); break; end; end; %if level and version fields are not on returned object add them if ~isempty(species) && ~isfield(species, 'level') species.level = SBMLModel.SBML_level; species.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getSpecies.m0000644000000000000000000000415011703262300026314 0ustar rootrootfunction species = Model_getSpecies(SBMLModel, index) % species = Model_getSpecies(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Species structure % % Returns % % 1. the SBML Species structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'species') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.species) species = SBMLModel.species(index); else error('index is out of range'); end; else error('species not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(species, 'level') species.level = level; species.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getSBOTerm.m0000644000000000000000000000325511703262276026215 0ustar rootrootfunction sboTerm = Model_getSBOTerm(SBMLModel) % sboTerm = Model_getSBOTerm(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'sboTerm') sboTerm = SBMLModel.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getSBML_version.m0000644000000000000000000000333211703262300027224 0ustar rootrootfunction SBML_version = Model_getSBML_version(SBMLModel) % sBML_version = Model_getSBML_version(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the sBML_version attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'SBML_version') SBML_version = SBMLModel.SBML_version; else error('SBML_version not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getSBML_level.m0000644000000000000000000000331011703262276026656 0ustar rootrootfunction SBML_level = Model_getSBML_level(SBMLModel) % sBML_level = Model_getSBML_level(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the sBML_level attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'SBML_level') SBML_level = SBMLModel.SBML_level; else error('SBML_level not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getRule.m0000644000000000000000000000407611703262276025653 0ustar rootrootfunction rule = Model_getRule(SBMLModel, index) % rule = Model_getRule(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Rule structure % % Returns % % 1. the SBML Rule structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'rule') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.rule) rule = SBMLModel.rule(index); else error('index is out of range'); end; else error('rule not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(rule, 'level') rule.level = level; rule.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getReactionById.m0000644000000000000000000000451411703262300027241 0ustar rootrootfunction reaction = Model_getReactionById(SBMLModel, id) % reaction = Model_getReactionById(SBMLModel, id) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML Reaction structure % % Returns % % 1. the SBML Reaction structure that has this id % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getReactionById(SBMLModel, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Model_getReactionById(SBMLModel, id)', 'second argument must be a string')); elseif (SBMLModel.SBML_level == 1) error(sprintf('%s\n%s', 'Model_getReactionById(SBMLModel, id)', 'no id field in a level 1 model')); end; reaction = []; for i = 1:length(SBMLModel.reaction) if (strcmp(id, SBMLModel.reaction(i).id)) reaction = SBMLModel.reaction(i); break; end; end; %if level and version fields are not on returned object add them if ~isempty(reaction) && ~isfield(reaction, 'level') reaction.level = SBMLModel.SBML_level; reaction.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getReaction.m0000644000000000000000000000416611703262300026474 0ustar rootrootfunction reaction = Model_getReaction(SBMLModel, index) % reaction = Model_getReaction(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Reaction structure % % Returns % % 1. the SBML Reaction structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'reaction') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.reaction) reaction = SBMLModel.reaction(index); else error('index is out of range'); end; else error('reaction not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(reaction, 'level') reaction.level = level; reaction.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getRateRuleByVariable.m0000644000000000000000000000463711703262300030417 0ustar rootrootfunction rule = Model_getRateRuleByVariable(SBMLModel, variable) % rateRule = Model_getRateRuleByVariable(SBMLModel, variable) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. variable; a string representing the variable of SBML RateRule structure % % Returns % % 1. the SBML RateRule structure that has this variable % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getRateRuleByVariable(SBMLModel, variable)', 'first argument must be an SBML model structure')); elseif (~ischar(variable)) error(sprintf('%s\n%s', 'Model_getRateRuleByVariable(SBMLModel, variable)', 'second argument must be a string')); end; rule = []; % get level and version sbmlLevel = SBMLModel.SBML_level; sbmlVersion = SBMLModel.SBML_version; for i = 1:length(SBMLModel.rule) if (isSBML_RateRule(SBMLModel.rule(i), sbmlLevel, sbmlVersion)) if (strcmp(variable, RateRule_getVariable(SBMLModel.rule(i)))) rule = SBMLModel.rule(i); break; end; end; end; %if level and version fields are not on returned object add them if ~isempty(rule) && ~isfield(rule, 'level') rule.level = SBMLModel.SBML_level; rule.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getParameterById.m0000644000000000000000000000453611703262276027435 0ustar rootrootfunction parameter = Model_getParameterById(SBMLModel, id) % parameter = Model_getParameterById(SBMLModel, id) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML Parameter structure % % Returns % % 1. the SBML Parameter structure that has this id % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getParameterById(SBMLModel, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Model_getParameterById(SBMLModel, id)', 'second argument must be a string')); elseif (SBMLModel.SBML_level == 1) error(sprintf('%s\n%s', 'Model_getParameterById(SBMLModel, id)', 'no id field in a level 1 model')); end; parameter = []; for i = 1:length(SBMLModel.parameter) if (strcmp(id, SBMLModel.parameter(i).id)) parameter = SBMLModel.parameter(i); break; end; end; %if level and version fields are not on returned object add them if ~isempty(parameter) && ~isfield(parameter, 'level') parameter.level = SBMLModel.SBML_level; parameter.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getParameter.m0000644000000000000000000000420411703262276026655 0ustar rootrootfunction parameter = Model_getParameter(SBMLModel, index) % parameter = Model_getParameter(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Parameter structure % % Returns % % 1. the SBML Parameter structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'parameter') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.parameter) parameter = SBMLModel.parameter(index); else error('index is out of range'); end; else error('parameter not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(parameter, 'level') parameter.level = level; parameter.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumUnitDefinitions.m0000644000000000000000000000336111703262276030533 0ustar rootrootfunction num = Model_getNumUnitDefinitions(SBMLModel) % num = Model_getNumUnitDefinitions(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML UnitDefinition structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'unitDefinition') num = length(SBMLModel.unitDefinition); else error('unitDefinition not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumSpeciesTypes.m0000644000000000000000000000333711703262300030027 0ustar rootrootfunction num = Model_getNumSpeciesTypes(SBMLModel) % num = Model_getNumSpeciesTypes(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML SpeciesType structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'speciesType') num = length(SBMLModel.speciesType); else error('speciesType not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumSpeciess.m0000644000000000000000000000330711703262300027162 0ustar rootrootfunction num = Model_getNumSpeciess(SBMLModel) % num = Model_getNumSpeciess(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML Species structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'species') num = length(SBMLModel.species); else error('species not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumSpecies.m0000644000000000000000000000331411703262276027011 0ustar rootrootfunction number = Model_getNumSpecies(SBMLModel) % num = Model_getNumSpecies(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML Species structures present in the Model % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getNumSpecies(SBMLModel)', 'argument must be an SBML model structure')); end; number = 0; if (~isempty(SBMLModel.species)) number = length(SBMLModel.species); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumRules.m0000644000000000000000000000326511703262300026501 0ustar rootrootfunction num = Model_getNumRules(SBMLModel) % num = Model_getNumRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML Rule structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'rule') num = length(SBMLModel.rule); else error('rule not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumReactions.m0000644000000000000000000000331511703262276027346 0ustar rootrootfunction num = Model_getNumReactions(SBMLModel) % num = Model_getNumReactions(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML Reaction structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'reaction') num = length(SBMLModel.reaction); else error('reaction not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumRateRules.m0000644000000000000000000000445311703262276027331 0ustar rootrootfunction y = Model_getNumRateRules(SBMLModel) % num = Model_getNumRateRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML RateRule structures present in the Model % % y = 0; %------------------------------------------------------------ % get level SBMLLevel = SBMLModel.SBML_level; for i = 1:length(SBMLModel.rule) if (strcmp(SBMLModel.rule(i).typecode, 'SBML_RATE_RULE')) y = y + 1; elseif(SBMLLevel == 1) if ((strcmp(SBMLModel.rule(i).typecode, 'SBML_ASSIGNMENT_RULE')) & (strcmp(SBMLModel.rule(i).type, 'rate'))) y = y + 1; elseif ((strcmp(SBMLModel.rule(i).typecode, 'SBML_SPECIES_CONCENTRATION_RULE')) & (strcmp(SBMLModel.rule(i).type, 'rate'))) y = y + 1; elseif ((strcmp(SBMLModel.rule(i).typecode, 'SBML_COMPARTMENT_VOLUME_RULE')) & (strcmp(SBMLModel.rule(i).type, 'rate'))) y = y + 1; elseif ((strcmp(SBMLModel.rule(i).typecode, 'SBML_PARAMETER_RULE')) & (strcmp(SBMLModel.rule(i).type, 'rate'))) y = y + 1; end; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumParameters.m0000644000000000000000000000332311703262276027521 0ustar rootrootfunction num = Model_getNumParameters(SBMLModel) % num = Model_getNumParameters(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML Parameter structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'parameter') num = length(SBMLModel.parameter); else error('parameter not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumInitialAssignments.m0000644000000000000000000000340311703262300031206 0ustar rootrootfunction num = Model_getNumInitialAssignments(SBMLModel) % num = Model_getNumInitialAssignments(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML InitialAssignment structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'initialAssignment') num = length(SBMLModel.initialAssignment); else error('initialAssignment not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumFunctionDefinitions.m0000644000000000000000000000341111703262276031375 0ustar rootrootfunction num = Model_getNumFunctionDefinitions(SBMLModel) % num = Model_getNumFunctionDefinitions(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML FunctionDefinition structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'functionDefinition') num = length(SBMLModel.functionDefinition); else error('functionDefinition not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumEvents.m0000644000000000000000000000327311703262276026666 0ustar rootrootfunction num = Model_getNumEvents(SBMLModel) % num = Model_getNumEvents(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML Event structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'event') num = length(SBMLModel.event); else error('event not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumConstraints.m0000644000000000000000000000333111703262276027724 0ustar rootrootfunction num = Model_getNumConstraints(SBMLModel) % num = Model_getNumConstraints(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML Constraint structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'constraint') num = length(SBMLModel.constraint); else error('constraint not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumCompartmentTypes.m0000644000000000000000000000336711703262276030744 0ustar rootrootfunction num = Model_getNumCompartmentTypes(SBMLModel) % num = Model_getNumCompartmentTypes(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML CompartmentType structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'compartmentType') num = length(SBMLModel.compartmentType); else error('compartmentType not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumCompartments.m0000644000000000000000000000333711703262276030077 0ustar rootrootfunction num = Model_getNumCompartments(SBMLModel) % num = Model_getNumCompartments(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML Compartment structures present in the Model % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'compartment') num = length(SBMLModel.compartment); else error('compartment not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumAssignmentRules.m0000644000000000000000000000426711703262276030551 0ustar rootrootfunction y = Model_getNumAssignmentRules(SBMLModel) % num = Model_getNumAssignmentRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML AssignmentRule structures present in the Model % % y = 0; %------------------------------------------------------------ % get level SBMLLevel = SBMLModel.SBML_level; for i = 1:length(SBMLModel.rule) if (strcmp(SBMLModel.rule(i).typecode, 'SBML_ASSIGNMENT_RULE')) y = y + 1; elseif(SBMLLevel == 1) if ((strcmp(SBMLModel.rule(i).typecode, 'SBML_SPECIES_CONCENTRATION_RULE')) & (strcmp(SBMLModel.rule(i).type, 'scalar'))) y = y + 1; elseif ((strcmp(SBMLModel.rule(i).typecode, 'SBML_COMPARTMENT_VOLUME_RULE')) & (strcmp(SBMLModel.rule(i).type, 'scalar'))) y = y + 1; elseif ((strcmp(SBMLModel.rule(i).typecode, 'SBML_PARAMETER_RULE')) & (strcmp(SBMLModel.rule(i).type, 'scalar'))) y = y + 1; end; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getNumAlgebraicRules.m0000644000000000000000000000323011703262276030277 0ustar rootrootfunction y = Model_getNumAlgebraicRules(SBMLModel) % num = Model_getNumAlgebraicRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the number of SBML AlgebraicRule structures present in the Model % % y = 0; %------------------------------------------------------------ for i = 1:length(SBMLModel.rule) if (strcmp(SBMLModel.rule(i).typecode, 'SBML_ALGEBRAIC_RULE')) y = y + 1; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getName.m0000644000000000000000000000322211703262276025614 0ustar rootrootfunction name = Model_getName(SBMLModel) % name = Model_getName(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'name') name = SBMLModel.name; else error('name not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getMetaid.m0000644000000000000000000000324411703262300026127 0ustar rootrootfunction metaid = Model_getMetaid(SBMLModel) % metaid = Model_getMetaid(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'metaid') metaid = SBMLModel.metaid; else error('metaid not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfUnitDefinitions.m0000644000000000000000000000337011703262300031160 0ustar rootrootfunction unitDefinition = Model_getListOfUnitDefinitions(SBMLModel) % unitDefinition = Model_getListOfUnitDefinitions(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the unitDefinition structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'unitDefinition') unitDefinition = SBMLModel.unitDefinition; else error('unitDefinition not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfSpeciesTypes.m0000644000000000000000000000333511703262276030502 0ustar rootrootfunction speciesType = Model_getListOfSpeciesTypes(SBMLModel) % speciesType = Model_getListOfSpeciesTypes(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the speciesType structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'speciesType') speciesType = SBMLModel.speciesType; else error('speciesType not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfSpeciess.m0000644000000000000000000000327111703262300027623 0ustar rootrootfunction species = Model_getListOfSpeciess(SBMLModel) % species = Model_getListOfSpeciess(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the species structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'species') species = SBMLModel.species; else error('species not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfSpecies.m0000644000000000000000000000320411703262276027450 0ustar rootrootfunction species = Model_getListOfSpecies(SBMLModel) % species = Model_getListOfSpecies(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the species structures % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getListOfSpecies(SBMLModel)', 'argument must be an SBML model structure')); end; species = SBMLModel.species; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfRules.m0000644000000000000000000000323611703262276027154 0ustar rootrootfunction rule = Model_getListOfRules(SBMLModel) % rule = Model_getListOfRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the rule structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'rule') rule = SBMLModel.rule; else error('rule not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfReactions.m0000644000000000000000000000330211703262276030003 0ustar rootrootfunction reaction = Model_getListOfReactions(SBMLModel) % reaction = Model_getListOfReactions(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the reaction structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'reaction') reaction = SBMLModel.reaction; else error('reaction not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfRateRules.m0000644000000000000000000000351611703262300027755 0ustar rootrootfunction RateRules = Model_getListOfRateRules(SBMLModel) % rateRule = Model_getListOfRateRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the rateRule structures % % j = 1; for i = 1:length(SBMLModel.rule) if (strcmp(SBMLModel.rule(i).typecode, 'SBML_RATE_RULE')) RateRules(j) = SBMLModel.rule(i); j = j + 1; elseif (SBMLModel.SBML_level == 1) if (strcmp(SBMLModel.rule(i).type, 'rate')) RateRules(j) = SBMLModel.rule(i); j = j + 1; end; end; end; if (j == 1) RateRules = ''; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfParameters.m0000644000000000000000000000331311703262276030161 0ustar rootrootfunction parameter = Model_getListOfParameters(SBMLModel) % parameter = Model_getListOfParameters(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the parameter structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'parameter') parameter = SBMLModel.parameter; else error('parameter not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfInitialAssignments.m0000644000000000000000000000342311703262276031665 0ustar rootrootfunction initialAssignment = Model_getListOfInitialAssignments(SBMLModel) % initialAssignment = Model_getListOfInitialAssignments(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the initialAssignment structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'initialAssignment') initialAssignment = SBMLModel.initialAssignment; else error('initialAssignment not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfFunctionDefinitions.m0000644000000000000000000000343411703262300032027 0ustar rootrootfunction functionDefinition = Model_getListOfFunctionDefinitions(SBMLModel) % functionDefinition = Model_getListOfFunctionDefinitions(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the functionDefinition structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'functionDefinition') functionDefinition = SBMLModel.functionDefinition; else error('functionDefinition not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfEvents.m0000644000000000000000000000324711703262276027330 0ustar rootrootfunction event = Model_getListOfEvents(SBMLModel) % event = Model_getListOfEvents(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the event structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'event') event = SBMLModel.event; else error('event not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfConstraints.m0000644000000000000000000000332411703262276030367 0ustar rootrootfunction constraint = Model_getListOfConstraints(SBMLModel) % constraint = Model_getListOfConstraints(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the constraint structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'constraint') constraint = SBMLModel.constraint; else error('constraint not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfCompartmentTypes.m0000644000000000000000000000340111703262300031356 0ustar rootrootfunction compartmentType = Model_getListOfCompartmentTypes(SBMLModel) % compartmentType = Model_getListOfCompartmentTypes(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the compartmentType structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'compartmentType') compartmentType = SBMLModel.compartmentType; else error('compartmentType not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfCompartments.m0000644000000000000000000000333511703262276030536 0ustar rootrootfunction compartment = Model_getListOfCompartments(SBMLModel) % compartment = Model_getListOfCompartments(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the compartment structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'compartment') compartment = SBMLModel.compartment; else error('compartment not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfByTypecode.m0000644000000000000000000000661611703262276030136 0ustar rootrootfunction array = Model_getListOfByTypecode(SBMLModel, SBMLTypecode) % listOf = Model_getListOfByTypecode(SBMLModel, typecode) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. typecode; a string representing the typecode of SBML ListOf structure % % Returns % % 1. the SBML ListOf structure that has this typecode % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getListOfByTypecode(SBMLModel, SBMLTypecode)', 'first argument must be an SBML model structure')); elseif (~CheckTypecode(SBMLTypecode)) error(sprintf('%s\n%s', 'Model_getListOfByTypecode(SBMLModel, SBMLTypecode)', 'second argument must be a string representing an SBML typecode')); end; switch (SBMLTypecode) case 'SBML_FUNCTION_DEFINITION' array = SBMLModel.functionDefinition; case 'SBML_UNIT_DEFINITION' array = SBMLModel.unitDefinition; case 'SBML_COMPARTMENT' array = SBMLModel.compartment; case 'SBML_SPECIES' array = SBMLModel.species; case 'SBML_PARAMETER' array = SBMLModel.parameter; case {'SBML_ASSIGNMENT_RULE', 'SBML_ALGEBRAIC_RULE', 'SBML_RATE_RULE', 'SBML_SPECIES_CONCENTRATION_RULE', 'SBML_COMPARTMENT_VOLUME_RULE', 'SBML_PARAMETER_RULE'} array = SBMLModel.rule; case 'SBML_REACTION' array = SBMLModel.reaction; case 'SBML_EVENT' array = SBMLModel.event; otherwise array = []; end; %------------------------------------------------------------------------------------ function value = CheckTypecode(SBMLTypecode) % % CheckTypecode % takes a string representing an SBMLTypecode % and returns 1 if it is a valid typecode and 0 otherwise % % value = CheckTypecode('SBMLTypecode') ValidTypecodes = {'SBML_COMPARTMENT', 'SBML_EVENT', 'SBML_FUNCTION_DEFINITION', 'SBML_PARAMETER', 'SBML_REACTION', 'SBML_SPECIES', ... 'SBML_UNIT_DEFINITION', 'SBML_ASSIGNMENT_RULE', 'SBML_ALGEBRAIC_RULE', 'SBML_RATE_RULE', 'SBML_SPECIES_CONCENTRATION_RULE', ... 'SBML_COMPARTMENT_VOLUME_RULE', 'SBML_PARAMETER_RULE'}; value = 1; if (~ischar(SBMLTypecode)) value = 0; elseif (~ismember(SBMLTypecode, ValidTypecodes)) value = 0; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfAssignmentRules.m0000644000000000000000000000451011703262276031201 0ustar rootrootfunction AssignRules = Model_getListOfAssignmentRules(SBMLModel) % assignmentRule = Model_getListOfAssignmentRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the assignmentRule structures % % j = 1; for i = 1:length(SBMLModel.rule) if (strcmp(SBMLModel.rule(i).typecode, 'SBML_ASSIGNMENT_RULE')) AssignRules(j) = SBMLModel.rule(i); j = j + 1; elseif (SBMLModel.SBML_level == 1) if ((strcmp(SBMLModel.rule(i).typecode, 'SBML_SPECIES_CONCENTRATION_RULE')) & (strcmp(SBMLModel.rule(i).type, 'scalar'))) AssignRules(j) = SBMLModel.rule(i); j = j + 1; elseif ((strcmp(SBMLModel.rule(i).typecode, 'SBML_COMPARTMENT_VOLUME_RULE')) & (strcmp(SBMLModel.rule(i).type, 'scalar'))) AssignRules(j) = SBMLModel.rule(i); j = j + 1; elseif ((strcmp(SBMLModel.rule(i).typecode, 'SBML_PARAMETER_RULE')) & (strcmp(SBMLModel.rule(i).type, 'scalar'))) AssignRules(j) = SBMLModel.rule(i); j = j + 1; end; end; end; if (j == 1) AssignRules = ''; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getListOfAlgebraicRules.m0000644000000000000000000000326611703262276030751 0ustar rootrootfunction AlgebraicRules = Model_getListOfAlgebraicRules(SBMLModel) % algebraicRule = Model_getListOfAlgebraicRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of the algebraicRule structures % % j = 1; for i = 1:length(SBMLModel.rule) if (strcmp(SBMLModel.rule(i).typecode, 'SBML_ALGEBRAIC_RULE')) AlgebraicRules(j) = SBMLModel.rule(i); j = j + 1; end; end; if (j == 1) AlgebraicRules = ''; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getLengthUnits.m0000644000000000000000000000332111703262276027200 0ustar rootrootfunction lengthUnits = Model_getLengthUnits(SBMLModel) % lengthUnits = Model_getLengthUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the lengthUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'lengthUnits') lengthUnits = SBMLModel.lengthUnits; else error('lengthUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getInitialAssignmentBySymbol.m0000644000000000000000000000521211703262276032040 0ustar rootrootfunction initialAssignment = Model_getInitialAssignmentBySymbol(SBMLModel, symbol) % initialAssignment = Model_getInitialAssignmentBySymbol(SBMLModel, symbol) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. symbol; a string representing the symbol of SBML InitialAssignment structure % % Returns % % 1. the SBML InitialAssignment structure that has this symbol % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getInitialAssignmentBySymbol(SBMLModel, symbol)', 'first argument must be an SBML model structure')); elseif (~ischar(symbol)) error(sprintf('%s\n%s', 'Model_getInitialAssignmentBySymbol(SBMLModel, symbol)', 'second argument must be a string')); elseif ((SBMLModel.SBML_level == 2 && SBMLModel.SBML_version == 1) ... || SBMLModel.SBML_level == 1) error(sprintf('%s\n%s', 'Model_getInitialAssignmentBySymbol(SBMLModel, symbol)', ... 'no symbol field in a level 1 or l2v1 model')); end; initialAssignment = []; for i = 1:length(SBMLModel.initialAssignment) if (strcmp(symbol, SBMLModel.initialAssignment(i).symbol)) initialAssignment = SBMLModel.initialAssignment(i); break; end; end; %if level and version fields are not on returned object add them if ~isempty(initialAssignment) && ~isfield(initialAssignment, 'level') initialAssignment.level = SBMLModel.SBML_level; initialAssignment.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getInitialAssignment.m0000644000000000000000000000436411703262300030352 0ustar rootrootfunction initialAssignment = Model_getInitialAssignment(SBMLModel, index) % initialAssignment = Model_getInitialAssignment(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML InitialAssignment structure % % Returns % % 1. the SBML InitialAssignment structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'initialAssignment') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.initialAssignment) initialAssignment = SBMLModel.initialAssignment(index); else error('index is out of range'); end; else error('initialAssignment not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(initialAssignment, 'level') initialAssignment.level = level; initialAssignment.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getId.m0000644000000000000000000000320011703262276025264 0ustar rootrootfunction id = Model_getId(SBMLModel) % id = Model_getId(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'id') id = SBMLModel.id; else error('id not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getFunctionIds.m0000644000000000000000000000352311703262300027151 0ustar rootrootfunction FunctionIds = Model_getFunctionIds(SBMLModel) % functionIds = Model_getFunctionIds(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the functionIds attribute % % %------------------------------------------------------------------- % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('Model_getFunctionIds(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; FunctionIds = {}; if (SBMLModel.SBML_level == 2) for i = 1:length(SBMLModel.functionDefinition) FunctionIds{i} = SBMLModel.functionDefinition(i).id; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getFunctionDefinitionById.m0000644000000000000000000000501411703262276031303 0ustar rootrootfunction functionDefinition = Model_getFunctionDefinitionById(SBMLModel, id) % functionDefinition = Model_getFunctionDefinitionById(SBMLModel, id) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML FunctionDefinition structure % % Returns % % 1. the SBML FunctionDefinition structure that has this id % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getFunctionDefinitionById(SBMLModel, id)', 'first argument must be an SBML model structure')); elseif (SBMLModel.SBML_level == 1) error(sprintf('%s\n%s', 'Model_getFunctionDefinitionById(SBMLModel, id)', 'no function definitions in a level 1 model')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Model_getFunctionDefinitionById(SBMLModel, id)', 'second argument must be a string')); end; functionDefinition = []; for i = 1:length(SBMLModel.functionDefinition) if (strcmp(id, SBMLModel.functionDefinition(i).id)) functionDefinition = SBMLModel.functionDefinition(i); break; end; end; %if level and version fields are not on returned object add them if ~isempty(functionDefinition) && ~isfield(functionDefinition, 'level') functionDefinition.level = SBMLModel.SBML_level; functionDefinition.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getFunctionDefinition.m0000644000000000000000000000440211703262300030517 0ustar rootrootfunction functionDefinition = Model_getFunctionDefinition(SBMLModel, index) % functionDefinition = Model_getFunctionDefinition(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML FunctionDefinition structure % % Returns % % 1. the SBML FunctionDefinition structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'functionDefinition') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.functionDefinition) functionDefinition = SBMLModel.functionDefinition(index); else error('index is out of range'); end; else error('functionDefinition not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(functionDefinition, 'level') functionDefinition.level = level; functionDefinition.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getExtentUnits.m0000644000000000000000000000332111703262276027226 0ustar rootrootfunction extentUnits = Model_getExtentUnits(SBMLModel) % extentUnits = Model_getExtentUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the extentUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'extentUnits') extentUnits = SBMLModel.extentUnits; else error('extentUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getEventById.m0000644000000000000000000000442411703262300026556 0ustar rootrootfunction event = Model_getEventById(SBMLModel, id) % event = Model_getEventById(SBMLModel, id) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML Event structure % % Returns % % 1. the SBML Event structure that has this id % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getEventById(SBMLModel, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Model_getEventById(SBMLModel, id)', 'second argument must be a string')); elseif (SBMLModel.SBML_level == 1) error(sprintf('%s\n%s', 'Model_getEventById(SBMLModel, id)', 'no events in a level 1 model')); end; event = []; for i = 1:length(SBMLModel.event) if (strcmp(id, SBMLModel.event(i).id)) event = SBMLModel.event(i); break; end; end; %if level and version fields are not on returned object add them if ~isempty(event) && ~isfield(event, 'level') event.level = SBMLModel.SBML_level; event.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getEvent.m0000644000000000000000000000411411703262276026016 0ustar rootrootfunction event = Model_getEvent(SBMLModel, index) % event = Model_getEvent(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Event structure % % Returns % % 1. the SBML Event structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'event') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.event) event = SBMLModel.event(index); else error('index is out of range'); end; else error('event not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(event, 'level') event.level = level; event.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getConversionFactor.m0000644000000000000000000000337611703262276030232 0ustar rootrootfunction conversionFactor = Model_getConversionFactor(SBMLModel) % conversionFactor = Model_getConversionFactor(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the conversionFactor attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'conversionFactor') conversionFactor = SBMLModel.conversionFactor; else error('conversionFactor not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getConstraint.m0000644000000000000000000000422211703262276027061 0ustar rootrootfunction constraint = Model_getConstraint(SBMLModel, index) % constraint = Model_getConstraint(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Constraint structure % % Returns % % 1. the SBML Constraint structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'constraint') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.constraint) constraint = SBMLModel.constraint(index); else error('index is out of range'); end; else error('constraint not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(constraint, 'level') constraint.level = level; constraint.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getCompartmentTypeById.m0000644000000000000000000000471211703262276030644 0ustar rootrootfunction compartmentType = Model_getCompartmentTypeById(SBMLModel, id) % compartmentType = Model_getCompartmentTypeById(SBMLModel, id) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML CompartmentType structure % % Returns % % 1. the SBML CompartmentType structure that has this id % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getCompartmentTypeById(SBMLModel, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Model_getCompartmentTypeById(SBMLModel, id)', 'second argument must be a string')); elseif (SBMLModel.SBML_level ~= 2) error(sprintf('%s\n%s', 'Model_getCompartmentTypeById(SBMLModel, id)', 'no id field in a level 1 model')); end; compartmentType = []; for i = 1:length(SBMLModel.compartmentType) if (strcmp(id, SBMLModel.compartmentType(i).id)) compartmentType = SBMLModel.compartmentType(i); break; end; end; %if level and version fields are not on returned object add them if ~isempty(compartmentType) && ~isfield(compartmentType, 'level') compartmentType.level = SBMLModel.SBML_level; compartmentType.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getCompartmentType.m0000644000000000000000000000433011703262276030070 0ustar rootrootfunction compartmentType = Model_getCompartmentType(SBMLModel, index) % compartmentType = Model_getCompartmentType(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML CompartmentType structure % % Returns % % 1. the SBML CompartmentType structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'compartmentType') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.compartmentType) compartmentType = SBMLModel.compartmentType(index); else error('index is out of range'); end; else error('compartmentType not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(compartmentType, 'level') compartmentType.level = level; compartmentType.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getCompartmentById.m0000644000000000000000000000460211703262276030000 0ustar rootrootfunction compartment = Model_getCompartmentById(SBMLModel, id) % compartment = Model_getCompartmentById(SBMLModel, id) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML Compartment structure % % Returns % % 1. the SBML Compartment structure that has this id % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getCompartmentById(SBMLModel, id)', 'first argument must be an SBML model structure')); elseif (~ischar(id)) error(sprintf('%s\n%s', 'Model_getCompartmentById(SBMLModel, id)', 'second argument must be a string')); elseif (SBMLModel.SBML_level == 1) error(sprintf('%s\n%s', 'Model_getCompartmentById(SBMLModel, id)', 'no id field in a level 1 model')); end; compartment = []; for i = 1:length(SBMLModel.compartment) if (strcmp(id, SBMLModel.compartment(i).id)) compartment = SBMLModel.compartment(i); break; end; end; %if level and version fields are not on returned object add them if ~isempty(compartment) && ~isfield(compartment, 'level') compartment.level = SBMLModel.SBML_level; compartment.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getCompartment.m0000644000000000000000000000424011703262300027212 0ustar rootrootfunction compartment = Model_getCompartment(SBMLModel, index) % compartment = Model_getCompartment(SBMLModel, index) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Compartment structure % % Returns % % 1. the SBML Compartment structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'compartment') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLModel.compartment) compartment = SBMLModel.compartment(index); else error('index is out of range'); end; else error('compartment not an element on SBML L%dV%d Model', level, version); end; %if level and version fields are not on returned object add them if ~isfield(compartment, 'level') compartment.level = level; compartment.version = version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getAssignmentRuleByVariable.m0000644000000000000000000000472511703262276031646 0ustar rootrootfunction rule = Model_getAssignmentRuleByVariable(SBMLModel, variable) % assignmentRule = Model_getAssignmentRuleByVariable(SBMLModel, variable) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. variable; a string representing the variable of SBML AssignmentRule structure % % Returns % % 1. the SBML AssignmentRule structure that has this variable % % % check that input is correct if (~isValidSBML_Model(SBMLModel)) error(sprintf('%s\n%s', 'Model_getAssignmentRuleByVariable(SBMLModel, variable)', 'first argument must be an SBML model structure')); elseif (~ischar(variable)) error(sprintf('%s\n%s', 'Model_getAssignmentRuleByVariable(SBMLModel, variable)', 'second argument must be a string')); end; rule = []; % get level and version sbmlLevel = SBMLModel.SBML_level; sbmlVersion = SBMLModel.SBML_version; for i = 1:length(SBMLModel.rule) if (isSBML_AssignmentRule(SBMLModel.rule(i), sbmlLevel, sbmlVersion)) if (strcmp(variable, AssignmentRule_getVariable(SBMLModel.rule(i)))) rule = SBMLModel.rule(i); break; end; end; end; %if level and version fields are not on returned object add them if ~isempty(rule) && ~isfield(rule, 'level') rule.level = SBMLModel.SBML_level; rule.version = SBMLModel.SBML_version; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_getAreaUnits.m0000644000000000000000000000330111703262276026625 0ustar rootrootfunction areaUnits = Model_getAreaUnits(SBMLModel) % areaUnits = Model_getAreaUnits(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the areaUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'areaUnits') areaUnits = SBMLModel.areaUnits; else error('areaUnits not an attribute on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createUnitDefinition.m0000644000000000000000000000404011703262276030347 0ustar rootrootfunction SBMLModel = Model_createUnitDefinition(SBMLModel) % SBMLModel = Model_createUnitDefinition(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML UnitDefinition structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'unitDefinition') index = length(SBMLModel.unitDefinition); SBMLUnitDefinition = UnitDefinition_create(level, version); if index == 0 SBMLModel.unitDefinition = SBMLUnitDefinition; else if ~isfield(SBMLModel.unitDefinition(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.unitDefinition(index+1) = SBMLUnitDefinition; end; else error('unitDefinition not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createSpeciesType.m0000644000000000000000000000377111703262276027666 0ustar rootrootfunction SBMLModel = Model_createSpeciesType(SBMLModel) % SBMLModel = Model_createSpeciesType(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML SpeciesType structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'speciesType') index = length(SBMLModel.speciesType); SBMLSpeciesType = SpeciesType_create(level, version); if index == 0 SBMLModel.speciesType = SBMLSpeciesType; else if ~isfield(SBMLModel.speciesType(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.speciesType(index+1) = SBMLSpeciesType; end; else error('speciesType not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createSpecies.m0000644000000000000000000000370511703262276027021 0ustar rootrootfunction SBMLModel = Model_createSpecies(SBMLModel) % SBMLModel = Model_createSpecies(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML Species structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'species') index = length(SBMLModel.species); SBMLSpecies = Species_create(level, version); if index == 0 SBMLModel.species = SBMLSpecies; else if ~isfield(SBMLModel.species(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.species(index+1) = SBMLSpecies; end; else error('species not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createRule.m0000644000000000000000000000363611703262276026340 0ustar rootrootfunction SBMLModel = Model_createRule(SBMLModel) % SBMLModel = Model_createRule(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML Rule structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'rule') index = length(SBMLModel.rule); SBMLRule = Rule_create(level, version); if index == 0 SBMLModel.rule = SBMLRule; else if ~isfield(SBMLModel.rule(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.rule(index+1) = SBMLRule; end; else error('rule not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createReaction.m0000644000000000000000000000372211703262276027171 0ustar rootrootfunction SBMLModel = Model_createReaction(SBMLModel) % SBMLModel = Model_createReaction(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML Reaction structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'reaction') index = length(SBMLModel.reaction); SBMLReaction = Reaction_create(level, version); if index == 0 SBMLModel.reaction = SBMLReaction; else if ~isfield(SBMLModel.reaction(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.reaction(index+1) = SBMLReaction; end; else error('reaction not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createParameter.m0000644000000000000000000000373711703262300027337 0ustar rootrootfunction SBMLModel = Model_createParameter(SBMLModel) % SBMLModel = Model_createParameter(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML Parameter structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'parameter') index = length(SBMLModel.parameter); SBMLParameter = Parameter_create(level, version); if index == 0 SBMLModel.parameter = SBMLParameter; else if ~isfield(SBMLModel.parameter(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.parameter(index+1) = SBMLParameter; end; else error('parameter not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createInitialAssignment.m0000644000000000000000000000410711703262300031031 0ustar rootrootfunction SBMLModel = Model_createInitialAssignment(SBMLModel) % SBMLModel = Model_createInitialAssignment(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML InitialAssignment structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'initialAssignment') index = length(SBMLModel.initialAssignment); SBMLInitialAssignment = InitialAssignment_create(level, version); if index == 0 SBMLModel.initialAssignment = SBMLInitialAssignment; else if ~isfield(SBMLModel.initialAssignment(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.initialAssignment(index+1) = SBMLInitialAssignment; end; else error('initialAssignment not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createFunctionDefinition.m0000644000000000000000000000412411703262276031220 0ustar rootrootfunction SBMLModel = Model_createFunctionDefinition(SBMLModel) % SBMLModel = Model_createFunctionDefinition(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML FunctionDefinition structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'functionDefinition') index = length(SBMLModel.functionDefinition); SBMLFunctionDefinition = FunctionDefinition_create(level, version); if index == 0 SBMLModel.functionDefinition = SBMLFunctionDefinition; else if ~isfield(SBMLModel.functionDefinition(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.functionDefinition(index+1) = SBMLFunctionDefinition; end; else error('functionDefinition not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createEvent.m0000644000000000000000000000365311703262276026511 0ustar rootrootfunction SBMLModel = Model_createEvent(SBMLModel) % SBMLModel = Model_createEvent(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML Event structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'event') index = length(SBMLModel.event); SBMLEvent = Event_create(level, version); if index == 0 SBMLModel.event = SBMLEvent; else if ~isfield(SBMLModel.event(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.event(index+1) = SBMLEvent; end; else error('event not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createConstraint.m0000644000000000000000000000375411703262276027556 0ustar rootrootfunction SBMLModel = Model_createConstraint(SBMLModel) % SBMLModel = Model_createConstraint(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML Constraint structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'constraint') index = length(SBMLModel.constraint); SBMLConstraint = Constraint_create(level, version); if index == 0 SBMLModel.constraint = SBMLConstraint; else if ~isfield(SBMLModel.constraint(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.constraint(index+1) = SBMLConstraint; end; else error('constraint not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createCompartmentType.m0000644000000000000000000000405511703262276030560 0ustar rootrootfunction SBMLModel = Model_createCompartmentType(SBMLModel) % SBMLModel = Model_createCompartmentType(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML CompartmentType structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'compartmentType') index = length(SBMLModel.compartmentType); SBMLCompartmentType = CompartmentType_create(level, version); if index == 0 SBMLModel.compartmentType = SBMLCompartmentType; else if ~isfield(SBMLModel.compartmentType(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.compartmentType(index+1) = SBMLCompartmentType; end; else error('compartmentType not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_createCompartment.m0000644000000000000000000000377111703262276027722 0ustar rootrootfunction SBMLModel = Model_createCompartment(SBMLModel) % SBMLModel = Model_createCompartment(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the SBML Model structure with the SBML Compartment structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); if isfield(SBMLModel, 'compartment') index = length(SBMLModel.compartment); SBMLCompartment = Compartment_create(level, version); if index == 0 SBMLModel.compartment = SBMLCompartment; else if ~isfield(SBMLModel.compartment(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.compartment(index+1) = SBMLCompartment; end; else error('compartment not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_create.m0000644000000000000000000001065111703262276025503 0ustar rootrootfunction Model = Model_create(varargin) % Model = Model_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Model structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; % note state of the Level version warning ss = warning('query', 'Warn:InvalidLV'); warnLV = strcmp(ss.state, 'off'); %get fields and values and create the structure [fieldnames, num] = getModelFieldnames(level, version); if (num > 0) values = getModelDefaultValues(level, version); Model = cell2struct(values, fieldnames, 2); %add empty substructures Model.unitDefinition = UnitDefinition_create(level, version); Model.unitDefinition(1:end) = []; Model.compartment = Compartment_create(level, version); Model.compartment(1:end) = []; Model.species = Species_create(level, version); Model.species(1:end) = []; Model.parameter = Parameter_create(level, version); Model.parameter(1:end) = []; Model.rule = Rule_create(level, version); Model.rule(1:end) = []; Model.reaction = Reaction_create(level, version); Model.reaction(1:end) = []; warning('off', 'Warn:InvalidLV'); t = FunctionDefinition_create(level, version); if ~isempty(t) Model.functionDefinition = t; Model.functionDefinition(1:end) = []; end; t = Event_create(level, version); if ~isempty(t) Model.event = t; Model.event(1:end) = []; end; warning('off', 'Warn:InvalidLV'); t = CompartmentType_create(level, version); if ~isempty(t) Model.compartmentType = t; Model.compartmentType(1:end) = []; end; t = SpeciesType_create(level, version); if ~isempty(t) Model.speciesType = t; Model.speciesType(1:end) = []; end; t = InitialAssignment_create(level, version); if ~isempty(t) Model.initialAssignment = t; Model.initialAssignment(1:end) = []; end; t = Constraint_create(level, version); if ~isempty(t) Model.constraint = t; Model.constraint(1:end) = []; end; if warnLV == 0 warning('on', 'Warn:InvalidLV'); else warning('off', 'Warn:InvalidLV'); end; if level > 1 Model.time_symbol = ''; Model.delay_symbol = ''; end; if level > 2 Model.avogadro_symbol = ''; end; ns = struct('prefix', [], 'uri', []); Model.namespaces = ns; Model.namespaces(1:end) = []; %check correct structure if ~isValidSBML_Model(Model) Model = struct(); warning('Warn:BadStruct', 'Failed to create Model'); end; else Model = []; warning('Warn:InvalidLV', 'Model not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addUnitDefinition.m0000644000000000000000000000447411703262276027647 0ustar rootrootfunction SBMLModel = Model_addUnitDefinition(SBMLModel, SBMLUnitDefinition) % SBMLModel = Model_addUnitDefinition(SBMLModel, SBMLUnitDefinition) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLUnitDefinition, an SBML UnitDefinition structure % % Returns % % 1. the SBML Model structure with the SBML UnitDefinition structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [unitDefinition_level, unitDefinition_version] = GetLevelVersion(SBMLUnitDefinition); if level ~= unitDefinition_level error('mismatch in levels'); elseif version ~= unitDefinition_version error('mismatch in versions'); end; if isfield(SBMLModel, 'unitDefinition') index = length(SBMLModel.unitDefinition); if index == 0 SBMLModel.unitDefinition = SBMLUnitDefinition; else if ~isfield(SBMLModel.unitDefinition(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.unitDefinition(index+1) = SBMLUnitDefinition; end; else error('unitDefinition not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addSpeciesType.m0000644000000000000000000000440011703262276027141 0ustar rootrootfunction SBMLModel = Model_addSpeciesType(SBMLModel, SBMLSpeciesType) % SBMLModel = Model_addSpeciesType(SBMLModel, SBMLSpeciesType) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLSpeciesType, an SBML SpeciesType structure % % Returns % % 1. the SBML Model structure with the SBML SpeciesType structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [speciesType_level, speciesType_version] = GetLevelVersion(SBMLSpeciesType); if level ~= speciesType_level error('mismatch in levels'); elseif version ~= speciesType_version error('mismatch in versions'); end; if isfield(SBMLModel, 'speciesType') index = length(SBMLModel.speciesType); if index == 0 SBMLModel.speciesType = SBMLSpeciesType; else if ~isfield(SBMLModel.speciesType(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.speciesType(index+1) = SBMLSpeciesType; end; else error('speciesType not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addSpecies.m0000644000000000000000000000426011703262276026303 0ustar rootrootfunction SBMLModel = Model_addSpecies(SBMLModel, SBMLSpecies) % SBMLModel = Model_addSpecies(SBMLModel, SBMLSpecies) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLSpecies, an SBML Species structure % % Returns % % 1. the SBML Model structure with the SBML Species structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [species_level, species_version] = GetLevelVersion(SBMLSpecies); if level ~= species_level error('mismatch in levels'); elseif version ~= species_version error('mismatch in versions'); end; if isfield(SBMLModel, 'species') index = length(SBMLModel.species); if index == 0 SBMLModel.species = SBMLSpecies; else if ~isfield(SBMLModel.species(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.species(index+1) = SBMLSpecies; end; else error('species not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addRule.m0000644000000000000000000000416411703262276025622 0ustar rootrootfunction SBMLModel = Model_addRule(SBMLModel, SBMLRule) % SBMLModel = Model_addRule(SBMLModel, SBMLRule) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLRule, an SBML Rule structure % % Returns % % 1. the SBML Model structure with the SBML Rule structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [rule_level, rule_version] = GetLevelVersion(SBMLRule); if level ~= rule_level error('mismatch in levels'); elseif version ~= rule_version error('mismatch in versions'); end; if isfield(SBMLModel, 'rule') index = length(SBMLModel.rule); if index == 0 SBMLModel.rule = SBMLRule; else if ~isfield(SBMLModel.rule(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.rule(index+1) = SBMLRule; end; else error('rule not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addReaction.m0000644000000000000000000000430411703262276026453 0ustar rootrootfunction SBMLModel = Model_addReaction(SBMLModel, SBMLReaction) % SBMLModel = Model_addReaction(SBMLModel, SBMLReaction) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the SBML Model structure with the SBML Reaction structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [reaction_level, reaction_version] = GetLevelVersion(SBMLReaction); if level ~= reaction_level error('mismatch in levels'); elseif version ~= reaction_version error('mismatch in versions'); end; if isfield(SBMLModel, 'reaction') index = length(SBMLModel.reaction); if index == 0 SBMLModel.reaction = SBMLReaction; else if ~isfield(SBMLModel.reaction(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.reaction(index+1) = SBMLReaction; end; else error('reaction not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addParameter.m0000644000000000000000000000433011703262300026612 0ustar rootrootfunction SBMLModel = Model_addParameter(SBMLModel, SBMLParameter) % SBMLModel = Model_addParameter(SBMLModel, SBMLParameter) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the SBML Model structure with the SBML Parameter structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [parameter_level, parameter_version] = GetLevelVersion(SBMLParameter); if level ~= parameter_level error('mismatch in levels'); elseif version ~= parameter_version error('mismatch in versions'); end; if isfield(SBMLModel, 'parameter') index = length(SBMLModel.parameter); if index == 0 SBMLModel.parameter = SBMLParameter; else if ~isfield(SBMLModel.parameter(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.parameter(index+1) = SBMLParameter; end; else error('parameter not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addInitialAssignment.m0000644000000000000000000000457011703262276030336 0ustar rootrootfunction SBMLModel = Model_addInitialAssignment(SBMLModel, SBMLInitialAssignment) % SBMLModel = Model_addInitialAssignment(SBMLModel, SBMLInitialAssignment) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. the SBML Model structure with the SBML InitialAssignment structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [initialAssignment_level, initialAssignment_version] = GetLevelVersion(SBMLInitialAssignment); if level ~= initialAssignment_level error('mismatch in levels'); elseif version ~= initialAssignment_version error('mismatch in versions'); end; if isfield(SBMLModel, 'initialAssignment') index = length(SBMLModel.initialAssignment); if index == 0 SBMLModel.initialAssignment = SBMLInitialAssignment; else if ~isfield(SBMLModel.initialAssignment(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.initialAssignment(index+1) = SBMLInitialAssignment; end; else error('initialAssignment not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addFunctionDefinition.m0000644000000000000000000000461711703262300030500 0ustar rootrootfunction SBMLModel = Model_addFunctionDefinition(SBMLModel, SBMLFunctionDefinition) % SBMLModel = Model_addFunctionDefinition(SBMLModel, SBMLFunctionDefinition) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the SBML Model structure with the SBML FunctionDefinition structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [functionDefinition_level, functionDefinition_version] = GetLevelVersion(SBMLFunctionDefinition); if level ~= functionDefinition_level error('mismatch in levels'); elseif version ~= functionDefinition_version error('mismatch in versions'); end; if isfield(SBMLModel, 'functionDefinition') index = length(SBMLModel.functionDefinition); if index == 0 SBMLModel.functionDefinition = SBMLFunctionDefinition; else if ~isfield(SBMLModel.functionDefinition(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.functionDefinition(index+1) = SBMLFunctionDefinition; end; else error('functionDefinition not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addEvent.m0000644000000000000000000000421011703262276025764 0ustar rootrootfunction SBMLModel = Model_addEvent(SBMLModel, SBMLEvent) % SBMLModel = Model_addEvent(SBMLModel, SBMLEvent) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Model structure with the SBML Event structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [event_level, event_version] = GetLevelVersion(SBMLEvent); if level ~= event_level error('mismatch in levels'); elseif version ~= event_version error('mismatch in versions'); end; if isfield(SBMLModel, 'event') index = length(SBMLModel.event); if index == 0 SBMLModel.event = SBMLEvent; else if ~isfield(SBMLModel.event(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.event(index+1) = SBMLEvent; end; else error('event not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addConstraint.m0000644000000000000000000000435411703262276027040 0ustar rootrootfunction SBMLModel = Model_addConstraint(SBMLModel, SBMLConstraint) % SBMLModel = Model_addConstraint(SBMLModel, SBMLConstraint) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. the SBML Model structure with the SBML Constraint structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [constraint_level, constraint_version] = GetLevelVersion(SBMLConstraint); if level ~= constraint_level error('mismatch in levels'); elseif version ~= constraint_version error('mismatch in versions'); end; if isfield(SBMLModel, 'constraint') index = length(SBMLModel.constraint); if index == 0 SBMLModel.constraint = SBMLConstraint; else if ~isfield(SBMLModel.constraint(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.constraint(index+1) = SBMLConstraint; end; else error('constraint not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addCompartmentType.m0000644000000000000000000000452011703262276030042 0ustar rootrootfunction SBMLModel = Model_addCompartmentType(SBMLModel, SBMLCompartmentType) % SBMLModel = Model_addCompartmentType(SBMLModel, SBMLCompartmentType) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. the SBML Model structure with the SBML CompartmentType structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [compartmentType_level, compartmentType_version] = GetLevelVersion(SBMLCompartmentType); if level ~= compartmentType_level error('mismatch in levels'); elseif version ~= compartmentType_version error('mismatch in versions'); end; if isfield(SBMLModel, 'compartmentType') index = length(SBMLModel.compartmentType); if index == 0 SBMLModel.compartmentType = SBMLCompartmentType; else if ~isfield(SBMLModel.compartmentType(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.compartmentType(index+1) = SBMLCompartmentType; end; else error('compartmentType not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Model_addCompartment.m0000644000000000000000000000440011703262276027175 0ustar rootrootfunction SBMLModel = Model_addCompartment(SBMLModel, SBMLCompartment) % SBMLModel = Model_addCompartment(SBMLModel, SBMLCompartment) % % Takes % % 1. SBMLModel, an SBML Model structure % 2. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Model structure with the SBML Compartment structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLModel); [compartment_level, compartment_version] = GetLevelVersion(SBMLCompartment); if level ~= compartment_level error('mismatch in levels'); elseif version ~= compartment_version error('mismatch in versions'); end; if isfield(SBMLModel, 'compartment') index = length(SBMLModel.compartment); if index == 0 SBMLModel.compartment = SBMLCompartment; else if ~isfield(SBMLModel.compartment(1), 'level') SBMLModel = propagateLevelVersion(SBMLModel); end; SBMLModel.compartment(index+1) = SBMLCompartment; end; else error('compartment not an element on SBML L%dV%d Model', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Model/Contents.m0000644000000000000000000011763211703262276024724 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Model % % The functions allow users to create and work with the SBML Model structure. % %============================================================== % SBMLModel = Model_addCompartment(SBMLModel, SBMLCompartment) %============================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Model structure with the SBML Compartment structure added % %====================================================================== % SBMLModel = Model_addCompartmentType(SBMLModel, SBMLCompartmentType) %====================================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. the SBML Model structure with the SBML CompartmentType structure added % %============================================================ % SBMLModel = Model_addConstraint(SBMLModel, SBMLConstraint) %============================================================ % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLConstraint, an SBML Constraint structure % Returns % 1. the SBML Model structure with the SBML Constraint structure added % %================================================== % SBMLModel = Model_addEvent(SBMLModel, SBMLEvent) %================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Model structure with the SBML Event structure added % %============================================================================ % SBMLModel = Model_addFunctionDefinition(SBMLModel, SBMLFunctionDefinition) %============================================================================ % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the SBML Model structure with the SBML FunctionDefinition structure added % %========================================================================== % SBMLModel = Model_addInitialAssignment(SBMLModel, SBMLInitialAssignment) %========================================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. the SBML Model structure with the SBML InitialAssignment structure added % %========================================================== % SBMLModel = Model_addParameter(SBMLModel, SBMLParameter) %========================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLParameter, an SBML Parameter structure % Returns % 1. the SBML Model structure with the SBML Parameter structure added % %======================================================== % SBMLModel = Model_addReaction(SBMLModel, SBMLReaction) %======================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLReaction, an SBML Reaction structure % Returns % 1. the SBML Model structure with the SBML Reaction structure added % %================================================ % SBMLModel = Model_addRule(SBMLModel, SBMLRule) %================================================ % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLRule, an SBML Rule structure % Returns % 1. the SBML Model structure with the SBML Rule structure added % %====================================================== % SBMLModel = Model_addSpecies(SBMLModel, SBMLSpecies) %====================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLSpecies, an SBML Species structure % Returns % 1. the SBML Model structure with the SBML Species structure added % %============================================================== % SBMLModel = Model_addSpeciesType(SBMLModel, SBMLSpeciesType) %============================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLSpeciesType, an SBML SpeciesType structure % Returns % 1. the SBML Model structure with the SBML SpeciesType structure added % %==================================================================== % SBMLModel = Model_addUnitDefinition(SBMLModel, SBMLUnitDefinition) %==================================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. SBMLUnitDefinition, an SBML UnitDefinition structure % Returns % 1. the SBML Model structure with the SBML UnitDefinition structure added % %=========================================================== % Model = Model_create(level(optional), version(optional) ) %=========================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Model structure of the appropriate level and version % %================================================ % SBMLModel = Model_createCompartment(SBMLModel) %================================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML Compartment structure added % %==================================================== % SBMLModel = Model_createCompartmentType(SBMLModel) %==================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML CompartmentType structure added % %=============================================== % SBMLModel = Model_createConstraint(SBMLModel) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML Constraint structure added % %========================================== % SBMLModel = Model_createEvent(SBMLModel) %========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML Event structure added % %======================================================= % SBMLModel = Model_createFunctionDefinition(SBMLModel) %======================================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML FunctionDefinition structure added % %====================================================== % SBMLModel = Model_createInitialAssignment(SBMLModel) %====================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML InitialAssignment structure added % %============================================== % SBMLModel = Model_createParameter(SBMLModel) %============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML Parameter structure added % %============================================= % SBMLModel = Model_createReaction(SBMLModel) %============================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML Reaction structure added % %========================================= % SBMLModel = Model_createRule(SBMLModel) %========================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML Rule structure added % %============================================ % SBMLModel = Model_createSpecies(SBMLModel) %============================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML Species structure added % %================================================ % SBMLModel = Model_createSpeciesType(SBMLModel) %================================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML SpeciesType structure added % %=================================================== % SBMLModel = Model_createUnitDefinition(SBMLModel) %=================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the SBML UnitDefinition structure added % %=========================================== % areaUnits = Model_getAreaUnits(SBMLModel) %=========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the areaUnits attribute % %========================================================================= % assignmentRule = Model_getAssignmentRuleByVariable(SBMLModel, variable) %========================================================================= % Takes % 1. SBMLModel, an SBML Model structure % 2. variable; a string representing the variable of SBML AssignmentRule structure % Returns % 1. the SBML AssignmentRule structure that has this variable % %====================================================== % compartment = Model_getCompartment(SBMLModel, index) %====================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Compartment structure % Returns % 1. the SBML Compartment structure at the indexed position % %======================================================= % compartment = Model_getCompartmentById(SBMLModel, id) %======================================================= % Takes % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML Compartment structure % Returns % 1. the SBML Compartment structure that has this id % %============================================================== % compartmentType = Model_getCompartmentType(SBMLModel, index) %============================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML CompartmentType structure % Returns % 1. the SBML CompartmentType structure at the indexed position % %=============================================================== % compartmentType = Model_getCompartmentTypeById(SBMLModel, id) %=============================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML CompartmentType structure % Returns % 1. the SBML CompartmentType structure that has this id % %==================================================== % constraint = Model_getConstraint(SBMLModel, index) %==================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Constraint structure % Returns % 1. the SBML Constraint structure at the indexed position % %========================================================= % conversionFactor = Model_getConversionFactor(SBMLModel) %========================================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the conversionFactor attribute % %========================================== % event = Model_getEvent(SBMLModel, index) %========================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Event structure % Returns % 1. the SBML Event structure at the indexed position % %=========================================== % event = Model_getEventById(SBMLModel, id) %=========================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML Event structure % Returns % 1. the SBML Event structure that has this id % %=============================================== % extentUnits = Model_getExtentUnits(SBMLModel) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the extentUnits attribute % %==================================================================== % functionDefinition = Model_getFunctionDefinition(SBMLModel, index) %==================================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML FunctionDefinition structure % Returns % 1. the SBML FunctionDefinition structure at the indexed position % %===================================================================== % functionDefinition = Model_getFunctionDefinitionById(SBMLModel, id) %===================================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML FunctionDefinition structure % Returns % 1. the SBML FunctionDefinition structure that has this id % %=============================================== % functionIds = Model_getFunctionIds(SBMLModel) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the functionIds attribute % %============================= % id = Model_getId(SBMLModel) %============================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the id attribute % %================================================================== % initialAssignment = Model_getInitialAssignment(SBMLModel, index) %================================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML InitialAssignment structure % Returns % 1. the SBML InitialAssignment structure at the indexed position % %=========================================================================== % initialAssignment = Model_getInitialAssignmentBySymbol(SBMLModel, symbol) %=========================================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. symbol; a string representing the symbol of SBML InitialAssignment structure % Returns % 1. the SBML InitialAssignment structure that has this symbol % %=============================================== % lengthUnits = Model_getLengthUnits(SBMLModel) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the lengthUnits attribute % %========================================================== % algebraicRule = Model_getListOfAlgebraicRules(SBMLModel) %========================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the algebraicRule structures % %============================================================ % assignmentRule = Model_getListOfAssignmentRules(SBMLModel) %============================================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the assignmentRule structures % %========================================================= % listOf = Model_getListOfByTypecode(SBMLModel, typecode) %========================================================= % Takes % 1. SBMLModel, an SBML Model structure % 2. typecode; a string representing the typecode of SBML ListOf structure % Returns % 1. the SBML ListOf structure that has this typecode % %============================================================== % compartmentType = Model_getListOfCompartmentTypes(SBMLModel) %============================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the compartmentType structures % %====================================================== % compartment = Model_getListOfCompartments(SBMLModel) %====================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the compartment structures % %==================================================== % constraint = Model_getListOfConstraints(SBMLModel) %==================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the constraint structures % %========================================== % event = Model_getListOfEvents(SBMLModel) %========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the event structures % %==================================================================== % functionDefinition = Model_getListOfFunctionDefinitions(SBMLModel) %==================================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the functionDefinition structures % %================================================================== % initialAssignment = Model_getListOfInitialAssignments(SBMLModel) %================================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the initialAssignment structures % %================================================== % parameter = Model_getListOfParameters(SBMLModel) %================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the parameter structures % %================================================ % rateRule = Model_getListOfRateRules(SBMLModel) %================================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the rateRule structures % %================================================ % reaction = Model_getListOfReactions(SBMLModel) %================================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the reaction structures % %======================================== % rule = Model_getListOfRules(SBMLModel) %======================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the rule structures % %============================================= % species = Model_getListOfSpecies(SBMLModel) %============================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the species structures % %====================================================== % speciesType = Model_getListOfSpeciesTypes(SBMLModel) %====================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the speciesType structures % %============================================== % species = Model_getListOfSpeciess(SBMLModel) %============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the species structures % %============================================================ % unitDefinition = Model_getListOfUnitDefinitions(SBMLModel) %============================================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of the unitDefinition structures % %===================================== % metaid = Model_getMetaid(SBMLModel) %===================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the metaid attribute % %================================= % name = Model_getName(SBMLModel) %================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the name attribute % %============================================= % num = Model_getNumAlgebraicRules(SBMLModel) %============================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML AlgebraicRule structures present in the Model % %============================================== % num = Model_getNumAssignmentRules(SBMLModel) %============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML AssignmentRule structures present in the Model % %=============================================== % num = Model_getNumCompartmentTypes(SBMLModel) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML CompartmentType structures present in the Model % %=========================================== % num = Model_getNumCompartments(SBMLModel) %=========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML Compartment structures present in the Model % %========================================== % num = Model_getNumConstraints(SBMLModel) %========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML Constraint structures present in the Model % %===================================== % num = Model_getNumEvents(SBMLModel) %===================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML Event structures present in the Model % %================================================== % num = Model_getNumFunctionDefinitions(SBMLModel) %================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML FunctionDefinition structures present in the Model % %================================================= % num = Model_getNumInitialAssignments(SBMLModel) %================================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML InitialAssignment structures present in the Model % %========================================= % num = Model_getNumParameters(SBMLModel) %========================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML Parameter structures present in the Model % %======================================== % num = Model_getNumRateRules(SBMLModel) %======================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML RateRule structures present in the Model % %======================================== % num = Model_getNumReactions(SBMLModel) %======================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML Reaction structures present in the Model % %==================================== % num = Model_getNumRules(SBMLModel) %==================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML Rule structures present in the Model % %====================================== % num = Model_getNumSpecies(SBMLModel) %====================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML Species structures present in the Model % %=========================================== % num = Model_getNumSpeciesTypes(SBMLModel) %=========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML SpeciesType structures present in the Model % %======================================= % num = Model_getNumSpeciess(SBMLModel) %======================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML Species structures present in the Model % %============================================== % num = Model_getNumUnitDefinitions(SBMLModel) %============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the number of SBML UnitDefinition structures present in the Model % %================================================== % parameter = Model_getParameter(SBMLModel, index) %================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Parameter structure % Returns % 1. the SBML Parameter structure at the indexed position % %=================================================== % parameter = Model_getParameterById(SBMLModel, id) %=================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML Parameter structure % Returns % 1. the SBML Parameter structure that has this id % %============================================================= % rateRule = Model_getRateRuleByVariable(SBMLModel, variable) %============================================================= % Takes % 1. SBMLModel, an SBML Model structure % 2. variable; a string representing the variable of SBML RateRule structure % Returns % 1. the SBML RateRule structure that has this variable % %================================================ % reaction = Model_getReaction(SBMLModel, index) %================================================ % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Reaction structure % Returns % 1. the SBML Reaction structure at the indexed position % %================================================= % reaction = Model_getReactionById(SBMLModel, id) %================================================= % Takes % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML Reaction structure % Returns % 1. the SBML Reaction structure that has this id % %======================================== % rule = Model_getRule(SBMLModel, index) %======================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Rule structure % Returns % 1. the SBML Rule structure at the indexed position % %============================================= % sBML_level = Model_getSBML_level(SBMLModel) %============================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the sBML_level attribute % %================================================= % sBML_version = Model_getSBML_version(SBMLModel) %================================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the sBML_version attribute % %======================================= % sboTerm = Model_getSBOTerm(SBMLModel) %======================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the sboTerm attribute % %============================================== % species = Model_getSpecies(SBMLModel, index) %============================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML Species structure % Returns % 1. the SBML Species structure at the indexed position % %=============================================== % species = Model_getSpeciesById(SBMLModel, id) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML Species structure % Returns % 1. the SBML Species structure that has this id % %====================================================== % speciesType = Model_getSpeciesType(SBMLModel, index) %====================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML SpeciesType structure % Returns % 1. the SBML SpeciesType structure at the indexed position % %======================================================= % speciesType = Model_getSpeciesTypeById(SBMLModel, id) %======================================================= % Takes % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML SpeciesType structure % Returns % 1. the SBML SpeciesType structure that has this id % %===================================================== % substanceUnits = Model_getSubstanceUnits(SBMLModel) %===================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the substanceUnits attribute % %=========================================== % timeUnits = Model_getTimeUnits(SBMLModel) %=========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the timeUnits attribute % %============================================================ % unitDefinition = Model_getUnitDefinition(SBMLModel, index) %============================================================ % Takes % 1. SBMLModel, an SBML Model structure % 2. index, an integer representing the index of SBML UnitDefinition structure % Returns % 1. the SBML UnitDefinition structure at the indexed position % %============================================================= % unitDefinition = Model_getUnitDefinitionById(SBMLModel, id) %============================================================= % Takes % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id of SBML UnitDefinition structure % Returns % 1. the SBML UnitDefinition structure that has this id % %=============================================== % volumeUnits = Model_getVolumeUnits(SBMLModel) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the value of the volumeUnits attribute % %========================================= % value = Model_isSetAreaUnits(SBMLModel) %========================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the areaUnits attribute is set % - 0 otherwise % %================================================ % value = Model_isSetConversionFactor(SBMLModel) %================================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the conversionFactor attribute is set % - 0 otherwise % %=========================================== % value = Model_isSetExtentUnits(SBMLModel) %=========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the extentUnits attribute is set % - 0 otherwise % %================================== % value = Model_isSetId(SBMLModel) %================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %=========================================== % value = Model_isSetLengthUnits(SBMLModel) %=========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the lengthUnits attribute is set % - 0 otherwise % %====================================== % value = Model_isSetMetaid(SBMLModel) %====================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %==================================== % value = Model_isSetName(SBMLModel) %==================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %========================================== % value = Model_isSetSBML_level(SBMLModel) %========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the sBML_level attribute is set % - 0 otherwise % %============================================ % value = Model_isSetSBML_version(SBMLModel) %============================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the sBML_version attribute is set % - 0 otherwise % %======================================= % value = Model_isSetSBOTerm(SBMLModel) %======================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %============================================== % value = Model_isSetSubstanceUnits(SBMLModel) %============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the substanceUnits attribute is set % - 0 otherwise % %========================================= % value = Model_isSetTimeUnits(SBMLModel) %========================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the timeUnits attribute is set % - 0 otherwise % %=========================================== % value = Model_isSetVolumeUnits(SBMLModel) %=========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. value = % - 1 if the volumeUnits attribute is set % - 0 otherwise % %====================================================== % SBMLModel = Model_setAreaUnits(SBMLModel, areaUnits) %====================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. areaUnits; a string representing the areaUnits to be set % Returns % 1. the SBML Model structure with the new value for the areaUnits attribute % %==================================================================== % SBMLModel = Model_setConversionFactor(SBMLModel, conversionFactor) %==================================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. conversionFactor; a string representing the conversionFactor to be set % Returns % 1. the SBML Model structure with the new value for the conversionFactor attribute % %========================================================== % SBMLModel = Model_setExtentUnits(SBMLModel, extentUnits) %========================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. extentUnits; a string representing the extentUnits to be set % Returns % 1. the SBML Model structure with the new value for the extentUnits attribute % %======================================== % SBMLModel = Model_setId(SBMLModel, id) %======================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. id; a string representing the id to be set % Returns % 1. the SBML Model structure with the new value for the id attribute % %========================================================== % SBMLModel = Model_setLengthUnits(SBMLModel, lengthUnits) %========================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. lengthUnits; a string representing the lengthUnits to be set % Returns % 1. the SBML Model structure with the new value for the lengthUnits attribute % %================================================ % SBMLModel = Model_setMetaid(SBMLModel, metaid) %================================================ % Takes % 1. SBMLModel, an SBML Model structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Model structure with the new value for the metaid attribute % %============================================ % SBMLModel = Model_setName(SBMLModel, name) %============================================ % Takes % 1. SBMLModel, an SBML Model structure % 2. name; a string representing the name to be set % Returns % 1. the SBML Model structure with the new value for the name attribute % %================================================== % SBMLModel = Model_setSBOTerm(SBMLModel, sboTerm) %================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Model structure with the new value for the sboTerm attribute % %================================================================ % SBMLModel = Model_setSubstanceUnits(SBMLModel, substanceUnits) %================================================================ % Takes % 1. SBMLModel, an SBML Model structure % 2. substanceUnits; a string representing the substanceUnits to be set % Returns % 1. the SBML Model structure with the new value for the substanceUnits attribute % %====================================================== % SBMLModel = Model_setTimeUnits(SBMLModel, timeUnits) %====================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. timeUnits; a string representing the timeUnits to be set % Returns % 1. the SBML Model structure with the new value for the timeUnits attribute % %========================================================== % SBMLModel = Model_setVolumeUnits(SBMLModel, volumeUnits) %========================================================== % Takes % 1. SBMLModel, an SBML Model structure % 2. volumeUnits; a string representing the volumeUnits to be set % Returns % 1. the SBML Model structure with the new value for the volumeUnits attribute % %============================================= % SBMLModel = Model_unsetAreaUnits(SBMLModel) %============================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the areaUnits attribute unset % %==================================================== % SBMLModel = Model_unsetConversionFactor(SBMLModel) %==================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the conversionFactor attribute unset % %=============================================== % SBMLModel = Model_unsetExtentUnits(SBMLModel) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the extentUnits attribute unset % %====================================== % SBMLModel = Model_unsetId(SBMLModel) %====================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the id attribute unset % %=============================================== % SBMLModel = Model_unsetLengthUnits(SBMLModel) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the lengthUnits attribute unset % %========================================== % SBMLModel = Model_unsetMetaid(SBMLModel) %========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the metaid attribute unset % %======================================== % SBMLModel = Model_unsetName(SBMLModel) %======================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the name attribute unset % %=========================================== % SBMLModel = Model_unsetSBOTerm(SBMLModel) %=========================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the sboTerm attribute unset % %================================================== % SBMLModel = Model_unsetSubstanceUnits(SBMLModel) %================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the substanceUnits attribute unset % %============================================= % SBMLModel = Model_unsetTimeUnits(SBMLModel) %============================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the timeUnits attribute unset % %=============================================== % SBMLModel = Model_unsetVolumeUnits(SBMLModel) %=============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the SBML Model structure with the volumeUnits attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/0000755000000000000000000000000011704572250024567 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_unsetValue.m0000644000000000000000000000350011703262354032051 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_unsetValue(SBMLLocalParameter) % SBMLLocalParameter = LocalParameter_unsetValue(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the SBML LocalParameter structure with the value attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'value') SBMLLocalParameter.value = NaN; SBMLLocalParameter.isSetValue = 0; else error('value not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_unsetUnits.m0000644000000000000000000000343211703262354032103 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_unsetUnits(SBMLLocalParameter) % SBMLLocalParameter = LocalParameter_unsetUnits(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the SBML LocalParameter structure with the units attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'units') SBMLLocalParameter.units = ''; else error('units not an attribute on SBML L%dV%d LocalParameter', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_unsetSBOTerm0000644000000000000000000000344611703262354032026 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_unsetSBOTerm(SBMLLocalParameter) % SBMLLocalParameter = LocalParameter_unsetSBOTerm(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the SBML LocalParameter structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'sboTerm') SBMLLocalParameter.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_unsetName.m0000644000000000000000000000342411703262354031662 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_unsetName(SBMLLocalParameter) % SBMLLocalParameter = LocalParameter_unsetName(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the SBML LocalParameter structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'name') SBMLLocalParameter.name = ''; else error('name not an attribute on SBML L%dV%d LocalParameter', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_unsetMetaid.0000644000000000000000000000344011703262354032026 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_unsetMetaid(SBMLLocalParameter) % SBMLLocalParameter = LocalParameter_unsetMetaid(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the SBML LocalParameter structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'metaid') SBMLLocalParameter.metaid = ''; else error('metaid not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_unsetId.m0000644000000000000000000000341011703262354031331 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_unsetId(SBMLLocalParameter) % SBMLLocalParameter = LocalParameter_unsetId(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the SBML LocalParameter structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'id') SBMLLocalParameter.id = ''; else error('id not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_setValue.m0000644000000000000000000000373511703262354031520 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_setValue(SBMLLocalParameter, value) % SBMLLocalParameter = LocalParameter_setValue(SBMLLocalParameter, value) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. value; number representing the value of value to be set % % Returns % % 1. the SBML LocalParameter structure with the new value for the value attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'value') if ~isnumeric(value) error('value must be numeric') ; else SBMLLocalParameter.value = value; SBMLLocalParameter.isSetValue = 1; end; else error('value not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_setUnits.m0000644000000000000000000000366411703262354031547 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_setUnits(SBMLLocalParameter, units) % SBMLLocalParameter = LocalParameter_setUnits(SBMLLocalParameter, units) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. units; a string representing the units to be set % % Returns % % 1. the SBML LocalParameter structure with the new value for the units attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'units') if ~ischar(units) error('units must be character array') ; else SBMLLocalParameter.units = units; end; else error('units not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_setSBOTerm.m0000644000000000000000000000372511703262354031716 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_setSBOTerm(SBMLLocalParameter, sboTerm) % SBMLLocalParameter = LocalParameter_setSBOTerm(SBMLLocalParameter, sboTerm) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML LocalParameter structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLLocalParameter.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_setName.m0000644000000000000000000000364711703262354031326 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_setName(SBMLLocalParameter, name) % SBMLLocalParameter = LocalParameter_setName(SBMLLocalParameter, name) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML LocalParameter structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'name') if ~ischar(name) error('name must be character array') ; else SBMLLocalParameter.name = name; end; else error('name not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_setMetaid.m0000644000000000000000000000370111703262354031640 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_setMetaid(SBMLLocalParameter, metaid) % SBMLLocalParameter = LocalParameter_setMetaid(SBMLLocalParameter, metaid) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML LocalParameter structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLLocalParameter.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_setId.m0000644000000000000000000000361511703262354030775 0ustar rootrootfunction SBMLLocalParameter = LocalParameter_setId(SBMLLocalParameter, id) % SBMLLocalParameter = LocalParameter_setId(SBMLLocalParameter, id) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML LocalParameter structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'id') if ~ischar(id) error('id must be character array') ; else SBMLLocalParameter.id = id; end; else error('id not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_isSetValue.m0000644000000000000000000000341311703262354032005 0ustar rootrootfunction value = LocalParameter_isSetValue(SBMLLocalParameter) % value = LocalParameter_isSetValue(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. value = % - 1 if the value attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'value') value = SBMLLocalParameter.isSetValue; else error('isSetValue not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_isSetUnits.m0000644000000000000000000000341311703262354032033 0ustar rootrootfunction value = LocalParameter_isSetUnits(SBMLLocalParameter) % value = LocalParameter_isSetUnits(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. value = % - 1 if the units attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'units') value = ~isempty(SBMLLocalParameter.units); else error('units not an attribute on SBML L%dV%d LocalParameter', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_isSetSBOTerm0000644000000000000000000000342211703262354031751 0ustar rootrootfunction value = LocalParameter_isSetSBOTerm(SBMLLocalParameter) % value = LocalParameter_isSetSBOTerm(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'sboTerm') value = (SBMLLocalParameter.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_isSetName.m0000644000000000000000000000340511703262354031612 0ustar rootrootfunction value = LocalParameter_isSetName(SBMLLocalParameter) % value = LocalParameter_isSetName(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'name') value = ~isempty(SBMLLocalParameter.name); else error('name not an attribute on SBML L%dV%d LocalParameter', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_isSetMetaid.0000644000000000000000000000342111703262354031756 0ustar rootrootfunction value = LocalParameter_isSetMetaid(SBMLLocalParameter) % value = LocalParameter_isSetMetaid(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'metaid') value = ~isempty(SBMLLocalParameter.metaid); else error('metaid not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_isSetId.m0000644000000000000000000000337111703262354031270 0ustar rootrootfunction value = LocalParameter_isSetId(SBMLLocalParameter) % value = LocalParameter_isSetId(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'id') value = ~isempty(SBMLLocalParameter.id); else error('id not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_getValue.m0000644000000000000000000000333711703262354031502 0ustar rootrootfunction value = LocalParameter_getValue(SBMLLocalParameter) % value = LocalParameter_getValue(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the value of the value attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'value') value = SBMLLocalParameter.value; else error('value not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_getUnits.m0000644000000000000000000000333711703262354031530 0ustar rootrootfunction units = LocalParameter_getUnits(SBMLLocalParameter) % units = LocalParameter_getUnits(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the value of the units attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'units') units = SBMLLocalParameter.units; else error('units not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_getSBOTerm.m0000644000000000000000000000336111703262354031676 0ustar rootrootfunction sboTerm = LocalParameter_getSBOTerm(SBMLLocalParameter) % sboTerm = LocalParameter_getSBOTerm(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'sboTerm') sboTerm = SBMLLocalParameter.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_getName.m0000644000000000000000000000332611703262354031304 0ustar rootrootfunction name = LocalParameter_getName(SBMLLocalParameter) % name = LocalParameter_getName(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'name') name = SBMLLocalParameter.name; else error('name not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_getMetaid.m0000644000000000000000000000335011703262354031624 0ustar rootrootfunction metaid = LocalParameter_getMetaid(SBMLLocalParameter) % metaid = LocalParameter_getMetaid(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'metaid') metaid = SBMLLocalParameter.metaid; else error('metaid not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_getId.m0000644000000000000000000000330411703262354030754 0ustar rootrootfunction id = LocalParameter_getId(SBMLLocalParameter) % id = LocalParameter_getId(SBMLLocalParameter) % % Takes % % 1. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLLocalParameter); if isfield(SBMLLocalParameter, 'id') id = SBMLLocalParameter.id; else error('id not an attribute on SBML L%dV%d LocalParameter', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/LocalParameter_create.m0000644000000000000000000000550211703262354031165 0ustar rootrootfunction LocalParameter = LocalParameter_create(varargin) % LocalParameter = LocalParameter_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML LocalParameter structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getLocalParameterFieldnames(level, version); if (num > 0) values = getLocalParameterDefaultValues(level, version); LocalParameter = cell2struct(values, fieldnames, 2); %add level and version LocalParameter.level = level; LocalParameter.version = version; %check correct structure if ~isSBML_LocalParameter(LocalParameter, level, version) LocalParameter = struct(); warning('Warn:BadStruct', 'Failed to create LocalParameter'); end; else LocalParameter = []; warning('Warn:InvalidLV', 'LocalParameter not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/LocalParameter/Contents.m0000644000000000000000000002367011703262354026552 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\LocalParameter % % The functions allow users to create and work with the SBML LocalParameter structure. % %============================================================================= % LocalParameter = LocalParameter_create(level(optional), version(optional) ) %============================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML LocalParameter structure of the appropriate level and version % %=============================================== % id = LocalParameter_getId(SBMLLocalParameter) %=============================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the value of the id attribute % %======================================================= % metaid = LocalParameter_getMetaid(SBMLLocalParameter) %======================================================= % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the value of the metaid attribute % %=================================================== % name = LocalParameter_getName(SBMLLocalParameter) %=================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the value of the name attribute % %========================================================= % sboTerm = LocalParameter_getSBOTerm(SBMLLocalParameter) %========================================================= % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the value of the sboTerm attribute % %===================================================== % units = LocalParameter_getUnits(SBMLLocalParameter) %===================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the value of the units attribute % %===================================================== % value = LocalParameter_getValue(SBMLLocalParameter) %===================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the value of the value attribute % %==================================================== % value = LocalParameter_isSetId(SBMLLocalParameter) %==================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %======================================================== % value = LocalParameter_isSetMetaid(SBMLLocalParameter) %======================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %====================================================== % value = LocalParameter_isSetName(SBMLLocalParameter) %====================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %========================================================= % value = LocalParameter_isSetSBOTerm(SBMLLocalParameter) %========================================================= % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %======================================================= % value = LocalParameter_isSetUnits(SBMLLocalParameter) %======================================================= % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. value = % - 1 if the units attribute is set % - 0 otherwise % %======================================================= % value = LocalParameter_isSetValue(SBMLLocalParameter) %======================================================= % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. value = % - 1 if the value attribute is set % - 0 otherwise % %=================================================================== % SBMLLocalParameter = LocalParameter_setId(SBMLLocalParameter, id) %=================================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. id; a string representing the id to be set % Returns % 1. the SBML LocalParameter structure with the new value for the id attribute % %=========================================================================== % SBMLLocalParameter = LocalParameter_setMetaid(SBMLLocalParameter, metaid) %=========================================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML LocalParameter structure with the new value for the metaid attribute % %======================================================================= % SBMLLocalParameter = LocalParameter_setName(SBMLLocalParameter, name) %======================================================================= % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. name; a string representing the name to be set % Returns % 1. the SBML LocalParameter structure with the new value for the name attribute % %============================================================================= % SBMLLocalParameter = LocalParameter_setSBOTerm(SBMLLocalParameter, sboTerm) %============================================================================= % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML LocalParameter structure with the new value for the sboTerm attribute % %========================================================================= % SBMLLocalParameter = LocalParameter_setUnits(SBMLLocalParameter, units) %========================================================================= % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. units; a string representing the units to be set % Returns % 1. the SBML LocalParameter structure with the new value for the units attribute % %========================================================================= % SBMLLocalParameter = LocalParameter_setValue(SBMLLocalParameter, value) %========================================================================= % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % 2. value; number representing the value of value to be set % Returns % 1. the SBML LocalParameter structure with the new value for the value attribute % %================================================================= % SBMLLocalParameter = LocalParameter_unsetId(SBMLLocalParameter) %================================================================= % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the SBML LocalParameter structure with the id attribute unset % %===================================================================== % SBMLLocalParameter = LocalParameter_unsetMetaid(SBMLLocalParameter) %===================================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the SBML LocalParameter structure with the metaid attribute unset % %=================================================================== % SBMLLocalParameter = LocalParameter_unsetName(SBMLLocalParameter) %=================================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the SBML LocalParameter structure with the name attribute unset % %====================================================================== % SBMLLocalParameter = LocalParameter_unsetSBOTerm(SBMLLocalParameter) %====================================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the SBML LocalParameter structure with the sboTerm attribute unset % %==================================================================== % SBMLLocalParameter = LocalParameter_unsetUnits(SBMLLocalParameter) %==================================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the SBML LocalParameter structure with the units attribute unset % %==================================================================== % SBMLLocalParameter = LocalParameter_unsetValue(SBMLLocalParameter) %==================================================================== % Takes % 1. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the SBML LocalParameter structure with the value attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/0000755000000000000000000000000011704572232023726 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_unsetTimeUnits.m0000644000000000000000000000340011703262326031212 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_unsetTimeUnits(SBMLKineticLaw) % SBMLKineticLaw = KineticLaw_unsetTimeUnits(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the SBML KineticLaw structure with the timeUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'timeUnits') SBMLKineticLaw.timeUnits = ''; else error('timeUnits not an attribute on SBML L%dV%d KineticLaw', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_unsetSubstanceUnits.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_unsetSubstanceUnits.0000644000000000000000000000343611703262326032077 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_unsetSubstanceUnits(SBMLKineticLaw) % SBMLKineticLaw = KineticLaw_unsetSubstanceUnits(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the SBML KineticLaw structure with the substanceUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'substanceUnits') SBMLKineticLaw.substanceUnits = ''; else error('substanceUnits not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_unsetSBOTerm.m0000644000000000000000000000336411703262326030555 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_unsetSBOTerm(SBMLKineticLaw) % SBMLKineticLaw = KineticLaw_unsetSBOTerm(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the SBML KineticLaw structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'sboTerm') SBMLKineticLaw.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_unsetMetaid.m0000644000000000000000000000335611703262326030506 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_unsetMetaid(SBMLKineticLaw) % SBMLKineticLaw = KineticLaw_unsetMetaid(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the SBML KineticLaw structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'metaid') SBMLKineticLaw.metaid = ''; else error('metaid not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_unsetMath.m0000644000000000000000000000334211703262326030167 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_unsetMath(SBMLKineticLaw) % SBMLKineticLaw = KineticLaw_unsetMath(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the SBML KineticLaw structure with the math attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'math') SBMLKineticLaw.math = ''; else error('math not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_unsetFormula.m0000644000000000000000000000336411703262326030707 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_unsetFormula(SBMLKineticLaw) % SBMLKineticLaw = KineticLaw_unsetFormula(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the SBML KineticLaw structure with the formula attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'formula') SBMLKineticLaw.formula = ''; else error('formula not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_setTimeUnits.m0000644000000000000000000000366611703262326030665 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_setTimeUnits(SBMLKineticLaw, timeUnits) % SBMLKineticLaw = KineticLaw_setTimeUnits(SBMLKineticLaw, timeUnits) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. timeUnits; a string representing the timeUnits to be set % % Returns % % 1. the SBML KineticLaw structure with the new value for the timeUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'timeUnits') if ~ischar(timeUnits) error('timeUnits must be character array') ; else SBMLKineticLaw.timeUnits = timeUnits; end; else error('timeUnits not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_setSubstanceUnits.m0000644000000000000000000000376711703262326031720 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_setSubstanceUnits(SBMLKineticLaw, substanceUnits) % SBMLKineticLaw = KineticLaw_setSubstanceUnits(SBMLKineticLaw, substanceUnits) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. substanceUnits; a string representing the substanceUnits to be set % % Returns % % 1. the SBML KineticLaw structure with the new value for the substanceUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'substanceUnits') if ~ischar(substanceUnits) error('substanceUnits must be character array') ; else SBMLKineticLaw.substanceUnits = substanceUnits; end; else error('substanceUnits not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_setSBOTerm.m0000644000000000000000000000364311703262326030212 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_setSBOTerm(SBMLKineticLaw, sboTerm) % SBMLKineticLaw = KineticLaw_setSBOTerm(SBMLKineticLaw, sboTerm) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML KineticLaw structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLKineticLaw.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_setMetaid.m0000644000000000000000000000361711703262326030143 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_setMetaid(SBMLKineticLaw, metaid) % SBMLKineticLaw = KineticLaw_setMetaid(SBMLKineticLaw, metaid) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML KineticLaw structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLKineticLaw.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_setMathFromFormula.m0000644000000000000000000000447711703262326032010 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_setMathFromFormula(SBMLKineticLaw) % SBMLKineticLaw = KineticLaw_setMathFromFormula(SBMLKineticLaw, mathFromFormula) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. mathFromFormula; string representing the math expression mathFromFormula to be set % % Returns % % 1. the SBML KineticLaw structure with the new value for the mathFromFormula attribute % % % check that input is correct if (~isstruct(SBMLKineticLaw)) error(sprintf('%s\n%s', ... 'KineticLaw_setMathFromFormula(SBMLKineticLaw)', ... 'first argument must be an SBML KineticLaw structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLKineticLaw); if (~isSBML_KineticLaw(SBMLKineticLaw, sbmlLevel, sbmlVersion)) error(sprintf('%s\n%s', 'KineticLaw_setMathFromFormula(SBMLKineticLaw)', 'argument must be an SBML kineticLaw structure')); elseif (sbmlLevel ~= 2) error(sprintf('%s\n%s', 'KineticLaw_setMathFromFormula(SBMLKineticLaw)', 'no math field in a level 1 model')); end; formula = KineticLaw_getFormula(SBMLKineticLaw); SBMLKineticLaw = KineticLaw_setMath(SBMLKineticLaw, formula); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_setMath.m0000644000000000000000000000360311703262326027624 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_setMath(SBMLKineticLaw, math) % SBMLKineticLaw = KineticLaw_setMath(SBMLKineticLaw, math) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. math; string representing the math expression math to be set % % Returns % % 1. the SBML KineticLaw structure with the new value for the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'math') if ~ischar(math) error('math must be character array') ; else SBMLKineticLaw.math = math; end; else error('math not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_setFormulaFromMath.m0000644000000000000000000000445311703262326032002 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_setFormulaFromMath(SBMLKineticLaw) % SBMLKineticLaw = KineticLaw_setFormulaFromMath(SBMLKineticLaw, formulaFromMath) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. formulaFromMath; a string representing the formulaFromMath to be set % % Returns % % 1. the SBML KineticLaw structure with the new value for the formulaFromMath attribute % % % check that input is correct if (~isstruct(SBMLKineticLaw)) error(sprintf('%s\n%s', ... 'KineticLaw_setFormulaFromMath(SBMLKineticLaw)', ... 'first argument must be an SBML KineticLaw structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLKineticLaw); if (~isSBML_KineticLaw(SBMLKineticLaw, sbmlLevel, sbmlVersion)) error(sprintf('%s\n%s', 'KineticLaw_setFormulaFromMath(SBMLKineticLaw)', 'argument must be an SBML kineticLaw structure')); elseif (sbmlLevel ~= 2) error(sprintf('%s\n%s', 'KineticLaw_setFormulaFromMath(SBMLKineticLaw)', 'no math field in a level 1 model')); end; math = KineticLaw_getMath(SBMLKineticLaw); SBMLKineticLaw = KineticLaw_setFormula(SBMLKineticLaw, math); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_setFormula.m0000644000000000000000000000363411703262326030344 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_setFormula(SBMLKineticLaw, formula) % SBMLKineticLaw = KineticLaw_setFormula(SBMLKineticLaw, formula) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. formula; a string representing the formula to be set % % Returns % % 1. the SBML KineticLaw structure with the new value for the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'formula') if ~ischar(formula) error('formula must be character array') ; else SBMLKineticLaw.formula = formula; end; else error('formula not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_isSetTimeUnits.m0000644000000000000000000000337511703262326031156 0ustar rootrootfunction value = KineticLaw_isSetTimeUnits(SBMLKineticLaw) % value = KineticLaw_isSetTimeUnits(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. value = % - 1 if the timeUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'timeUnits') value = ~isempty(SBMLKineticLaw.timeUnits); else error('timeUnits not an attribute on SBML L%dV%d KineticLaw', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_isSetSubstanceUnits.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_isSetSubstanceUnits.0000644000000000000000000000343311703262326032025 0ustar rootrootfunction value = KineticLaw_isSetSubstanceUnits(SBMLKineticLaw) % value = KineticLaw_isSetSubstanceUnits(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. value = % - 1 if the substanceUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'substanceUnits') value = ~isempty(SBMLKineticLaw.substanceUnits); else error('substanceUnits not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_isSetSBOTerm.m0000644000000000000000000000335411703262326030505 0ustar rootrootfunction value = KineticLaw_isSetSBOTerm(SBMLKineticLaw) % value = KineticLaw_isSetSBOTerm(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'sboTerm') value = (SBMLKineticLaw.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_isSetMetaid.m0000644000000000000000000000335311703262326030434 0ustar rootrootfunction value = KineticLaw_isSetMetaid(SBMLKineticLaw) % value = KineticLaw_isSetMetaid(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'metaid') value = ~isempty(SBMLKineticLaw.metaid); else error('metaid not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_isSetMath.m0000644000000000000000000000333711703262326030124 0ustar rootrootfunction value = KineticLaw_isSetMath(SBMLKineticLaw) % value = KineticLaw_isSetMath(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. value = % - 1 if the math attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'math') value = ~isempty(SBMLKineticLaw.math); else error('math not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_isSetFormula.m0000644000000000000000000000336111703262326030635 0ustar rootrootfunction value = KineticLaw_isSetFormula(SBMLKineticLaw) % value = KineticLaw_isSetFormula(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'formula') value = ~isempty(SBMLKineticLaw.formula); else error('formula not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getTimeUnits.m0000644000000000000000000000333511703262326030642 0ustar rootrootfunction timeUnits = KineticLaw_getTimeUnits(SBMLKineticLaw) % timeUnits = KineticLaw_getTimeUnits(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the value of the timeUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'timeUnits') timeUnits = SBMLKineticLaw.timeUnits; else error('timeUnits not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getSubstanceUnits.m0000644000000000000000000000341211703262326031667 0ustar rootrootfunction substanceUnits = KineticLaw_getSubstanceUnits(SBMLKineticLaw) % substanceUnits = KineticLaw_getSubstanceUnits(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the value of the substanceUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'substanceUnits') substanceUnits = SBMLKineticLaw.substanceUnits; else error('substanceUnits not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getSBOTerm.m0000644000000000000000000000331311703262326030170 0ustar rootrootfunction sboTerm = KineticLaw_getSBOTerm(SBMLKineticLaw) % sboTerm = KineticLaw_getSBOTerm(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'sboTerm') sboTerm = SBMLKineticLaw.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getParameter.m0000644000000000000000000000400611703262326030635 0ustar rootrootfunction parameter = KineticLaw_getParameter(SBMLKineticLaw, index) % parameter = KineticLaw_getParameter(SBMLKineticLaw, index) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. index, an integer representing the index of SBML Parameter structure % % Returns % % 1. the SBML Parameter structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'parameter') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLKineticLaw.parameter) parameter = SBMLKineticLaw.parameter(index); else error('index is out of range'); end; else error('parameter not an element on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getNumParameters.m0000644000000000000000000000336611703262326031510 0ustar rootrootfunction num = KineticLaw_getNumParameters(SBMLKineticLaw) % num = KineticLaw_getNumParameters(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the number of SBML Parameter structures present in the KineticLaw % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'parameter') num = length(SBMLKineticLaw.parameter); else error('parameter not an element on SBML L%dV%d KineticLaw', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getNumLocalParameters.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getNumLocalParameter0000644000000000000000000000342411703262326032040 0ustar rootrootfunction num = KineticLaw_getNumLocalParameters(SBMLKineticLaw) % num = KineticLaw_getNumLocalParameters(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the number of SBML LocalParameter structures present in the KineticLaw % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'localParameter') num = length(SBMLKineticLaw.localParameter); else error('localParameter not an element on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getMetaid.m0000644000000000000000000000330211703262326030116 0ustar rootrootfunction metaid = KineticLaw_getMetaid(SBMLKineticLaw) % metaid = KineticLaw_getMetaid(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'metaid') metaid = SBMLKineticLaw.metaid; else error('metaid not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getMath.m0000644000000000000000000000326011703262326027607 0ustar rootrootfunction math = KineticLaw_getMath(SBMLKineticLaw) % math = KineticLaw_getMath(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the value of the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'math') math = SBMLKineticLaw.math; else error('math not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getLocalParameter.m0000644000000000000000000000407511703262326031616 0ustar rootrootfunction localParameter = KineticLaw_getLocalParameter(SBMLKineticLaw, index) % localParameter = KineticLaw_getLocalParameter(SBMLKineticLaw, index) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. index, an integer representing the index of SBML LocalParameter structure % % Returns % % 1. the SBML LocalParameter structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'localParameter') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLKineticLaw.localParameter) localParameter = SBMLKineticLaw.localParameter(index); else error('index is out of range'); end; else error('localParameter not an element on SBML L%dV%d KineticLaw', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getListOfParameters.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getListOfParameters.0000644000000000000000000000335111703262326031766 0ustar rootrootfunction parameter = KineticLaw_getListOfParameters(SBMLKineticLaw) % parameter = KineticLaw_getListOfParameters(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. an array of the parameter structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'parameter') parameter = SBMLKineticLaw.parameter; else error('parameter not an element on SBML L%dV%d KineticLaw', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getListOfLocalParameters.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getListOfLocalParame0000644000000000000000000000342611703262326031770 0ustar rootrootfunction localParameter = KineticLaw_getListOfLocalParameters(SBMLKineticLaw) % localParameter = KineticLaw_getListOfLocalParameters(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. an array of the localParameter structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'localParameter') localParameter = SBMLKineticLaw.localParameter; else error('localParameter not an element on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_getFormula.m0000644000000000000000000000331311703262326030322 0ustar rootrootfunction formula = KineticLaw_getFormula(SBMLKineticLaw) % formula = KineticLaw_getFormula(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the value of the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'formula') formula = SBMLKineticLaw.formula; else error('formula not an attribute on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_createParameter.m0000644000000000000000000000370211703262326031323 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_createParameter(SBMLKineticLaw) % SBMLKineticLaw = KineticLaw_createParameter(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the SBML KineticLaw structure with a new SBML Parameter structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'parameter') index = length(SBMLKineticLaw.parameter); SBMLParameter = Parameter_create(level, version); if index == 0 SBMLKineticLaw.parameter = SBMLParameter; else SBMLKineticLaw.parameter(index+1) = SBMLParameter; end; else error('parameter not an element on SBML L%dV%d KineticLaw', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_createLocalParameter.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_createLocalParameter0000644000000000000000000000377611703262326032056 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_createLocalParameter(SBMLKineticLaw) % SBMLKineticLaw = KineticLaw_createLocalParameter(SBMLKineticLaw) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % % Returns % % 1. the SBML KineticLaw structure with a new SBML LocalParameter structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); if isfield(SBMLKineticLaw, 'localParameter') index = length(SBMLKineticLaw.localParameter); SBMLLocalParameter = LocalParameter_create(level, version); if index == 0 SBMLKineticLaw.localParameter = SBMLLocalParameter; else SBMLKineticLaw.localParameter(index+1) = SBMLLocalParameter; end; else error('localParameter not an element on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_create.m0000644000000000000000000000616111703262326027464 0ustar rootrootfunction KineticLaw = KineticLaw_create(varargin) % KineticLaw = KineticLaw_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML KineticLaw structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getKineticLawFieldnames(level, version); if (num > 0) values = getKineticLawDefaultValues(level, version); KineticLaw = cell2struct(values, fieldnames, 2); %add empty substructures warning('off', 'Warn:InvalidLV'); p = LocalParameter_create(level, version); if ~isempty(p) KineticLaw.localParameter = p; KineticLaw.localParameter(1:end) = []; else p = Parameter_create(level, version); KineticLaw.parameter = p; KineticLaw.parameter(1:end) = []; end; warning('on', 'Warn:InvalidLV'); %add level and version KineticLaw.level = level; KineticLaw.version = version; %check correct structure if ~isSBML_KineticLaw(KineticLaw, level, version) KineticLaw = struct(); warning('Warn:BadStruct', 'Failed to create KineticLaw'); end; else KineticLaw = []; warning('Warn:InvalidLV', 'KineticLaw not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_addParameter.m0000644000000000000000000000423711703262326030614 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_addParameter(SBMLKineticLaw, SBMLParameter) % SBMLKineticLaw = KineticLaw_addParameter(SBMLKineticLaw, SBMLParameter) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. SBMLParameter, an SBML Parameter structure % % Returns % % 1. the SBML KineticLaw structure with the SBML Parameter structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); [parameter_level, parameter_version] = GetLevelVersion(SBMLParameter); if level ~= parameter_level error('mismatch in levels'); elseif version ~= parameter_version error('mismatch in versions'); end; if isfield(SBMLKineticLaw, 'parameter') index = length(SBMLKineticLaw.parameter); if index == 0 SBMLKineticLaw.parameter = SBMLParameter; else SBMLKineticLaw.parameter(index+1) = SBMLParameter; end; else error('parameter not an element on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/KineticLaw_addLocalParameter.m0000644000000000000000000000437611703262326031573 0ustar rootrootfunction SBMLKineticLaw = KineticLaw_addLocalParameter(SBMLKineticLaw, SBMLLocalParameter) % SBMLKineticLaw = KineticLaw_addLocalParameter(SBMLKineticLaw, SBMLLocalParameter) % % Takes % % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. SBMLLocalParameter, an SBML LocalParameter structure % % Returns % % 1. the SBML KineticLaw structure with the SBML LocalParameter structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLKineticLaw); [localParameter_level, localParameter_version] = GetLevelVersion(SBMLLocalParameter); if level ~= localParameter_level error('mismatch in levels'); elseif version ~= localParameter_version error('mismatch in versions'); end; if isfield(SBMLKineticLaw, 'localParameter') index = length(SBMLKineticLaw.localParameter); if index == 0 SBMLKineticLaw.localParameter = SBMLLocalParameter; else SBMLKineticLaw.localParameter(index+1) = SBMLLocalParameter; end; else error('localParameter not an element on SBML L%dV%d KineticLaw', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/KineticLaw/Contents.m0000644000000000000000000003360711703262326025711 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\KineticLaw % % The functions allow users to create and work with the SBML KineticLaw structure. % %=================================================================================== % SBMLKineticLaw = KineticLaw_addLocalParameter(SBMLKineticLaw, SBMLLocalParameter) %=================================================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. SBMLLocalParameter, an SBML LocalParameter structure % Returns % 1. the SBML KineticLaw structure with the SBML LocalParameter structure added % %========================================================================= % SBMLKineticLaw = KineticLaw_addParameter(SBMLKineticLaw, SBMLParameter) %========================================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. SBMLParameter, an SBML Parameter structure % Returns % 1. the SBML KineticLaw structure with the SBML Parameter structure added % %===================================================================== % KineticLaw = KineticLaw_create(level(optional), version(optional) ) %===================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML KineticLaw structure of the appropriate level and version % %================================================================== % SBMLKineticLaw = KineticLaw_createLocalParameter(SBMLKineticLaw) %================================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the SBML KineticLaw structure with a new SBML LocalParameter structure added % %============================================================= % SBMLKineticLaw = KineticLaw_createParameter(SBMLKineticLaw) %============================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the SBML KineticLaw structure with a new SBML Parameter structure added % %================================================= % formula = KineticLaw_getFormula(SBMLKineticLaw) %================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the value of the formula attribute % %====================================================================== % localParameter = KineticLaw_getListOfLocalParameters(SBMLKineticLaw) %====================================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. an array of the localParameter structures % %============================================================ % parameter = KineticLaw_getListOfParameters(SBMLKineticLaw) %============================================================ % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. an array of the parameter structures % %====================================================================== % localParameter = KineticLaw_getLocalParameter(SBMLKineticLaw, index) %====================================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. index, an integer representing the index of SBML LocalParameter structure % Returns % 1. the SBML LocalParameter structure at the indexed position % %=========================================== % math = KineticLaw_getMath(SBMLKineticLaw) %=========================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the value of the math attribute % %=============================================== % metaid = KineticLaw_getMetaid(SBMLKineticLaw) %=============================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the value of the metaid attribute % %======================================================== % num = KineticLaw_getNumLocalParameters(SBMLKineticLaw) %======================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the number of SBML LocalParameter structures present in the KineticLaw % %=================================================== % num = KineticLaw_getNumParameters(SBMLKineticLaw) %=================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the number of SBML Parameter structures present in the KineticLaw % %============================================================ % parameter = KineticLaw_getParameter(SBMLKineticLaw, index) %============================================================ % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. index, an integer representing the index of SBML Parameter structure % Returns % 1. the SBML Parameter structure at the indexed position % %================================================= % sboTerm = KineticLaw_getSBOTerm(SBMLKineticLaw) %================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the value of the sboTerm attribute % %=============================================================== % substanceUnits = KineticLaw_getSubstanceUnits(SBMLKineticLaw) %=============================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the value of the substanceUnits attribute % %===================================================== % timeUnits = KineticLaw_getTimeUnits(SBMLKineticLaw) %===================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the value of the timeUnits attribute % %================================================= % value = KineticLaw_isSetFormula(SBMLKineticLaw) %================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % %============================================== % value = KineticLaw_isSetMath(SBMLKineticLaw) %============================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. value = % - 1 if the math attribute is set % - 0 otherwise % %================================================ % value = KineticLaw_isSetMetaid(SBMLKineticLaw) %================================================ % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %================================================= % value = KineticLaw_isSetSBOTerm(SBMLKineticLaw) %================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %======================================================== % value = KineticLaw_isSetSubstanceUnits(SBMLKineticLaw) %======================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. value = % - 1 if the substanceUnits attribute is set % - 0 otherwise % %=================================================== % value = KineticLaw_isSetTimeUnits(SBMLKineticLaw) %=================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. value = % - 1 if the timeUnits attribute is set % - 0 otherwise % %================================================================= % SBMLKineticLaw = KineticLaw_setFormula(SBMLKineticLaw, formula) %================================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. formula; a string representing the formula to be set % Returns % 1. the SBML KineticLaw structure with the new value for the formula attribute % %================================================================================= % SBMLKineticLaw = KineticLaw_setFormulaFromMath(SBMLKineticLaw, formulaFromMath) %================================================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. formulaFromMath; a string representing the formulaFromMath to be set % Returns % 1. the SBML KineticLaw structure with the new value for the formulaFromMath attribute % %=========================================================== % SBMLKineticLaw = KineticLaw_setMath(SBMLKineticLaw, math) %=========================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. math; string representing the math expression math to be set % Returns % 1. the SBML KineticLaw structure with the new value for the math attribute % %================================================================================= % SBMLKineticLaw = KineticLaw_setMathFromFormula(SBMLKineticLaw, mathFromFormula) %================================================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. mathFromFormula; string representing the math expression mathFromFormula to be set % Returns % 1. the SBML KineticLaw structure with the new value for the mathFromFormula attribute % %=============================================================== % SBMLKineticLaw = KineticLaw_setMetaid(SBMLKineticLaw, metaid) %=============================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML KineticLaw structure with the new value for the metaid attribute % %================================================================= % SBMLKineticLaw = KineticLaw_setSBOTerm(SBMLKineticLaw, sboTerm) %================================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML KineticLaw structure with the new value for the sboTerm attribute % %=============================================================================== % SBMLKineticLaw = KineticLaw_setSubstanceUnits(SBMLKineticLaw, substanceUnits) %=============================================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. substanceUnits; a string representing the substanceUnits to be set % Returns % 1. the SBML KineticLaw structure with the new value for the substanceUnits attribute % %===================================================================== % SBMLKineticLaw = KineticLaw_setTimeUnits(SBMLKineticLaw, timeUnits) %===================================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % 2. timeUnits; a string representing the timeUnits to be set % Returns % 1. the SBML KineticLaw structure with the new value for the timeUnits attribute % %========================================================== % SBMLKineticLaw = KineticLaw_unsetFormula(SBMLKineticLaw) %========================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the SBML KineticLaw structure with the formula attribute unset % %======================================================= % SBMLKineticLaw = KineticLaw_unsetMath(SBMLKineticLaw) %======================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the SBML KineticLaw structure with the math attribute unset % %========================================================= % SBMLKineticLaw = KineticLaw_unsetMetaid(SBMLKineticLaw) %========================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the SBML KineticLaw structure with the metaid attribute unset % %========================================================== % SBMLKineticLaw = KineticLaw_unsetSBOTerm(SBMLKineticLaw) %========================================================== % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the SBML KineticLaw structure with the sboTerm attribute unset % %================================================================= % SBMLKineticLaw = KineticLaw_unsetSubstanceUnits(SBMLKineticLaw) %================================================================= % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the SBML KineticLaw structure with the substanceUnits attribute unset % %============================================================ % SBMLKineticLaw = KineticLaw_unsetTimeUnits(SBMLKineticLaw) %============================================================ % Takes % 1. SBMLKineticLaw, an SBML KineticLaw structure % Returns % 1. the SBML KineticLaw structure with the timeUnits attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/0000755000000000000000000000000011704572230025314 5ustar rootroot././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_unsetSymbol.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_unsetS0000644000000000000000000000350711703262312032223 0ustar rootrootfunction SBMLInitialAssignment = InitialAssignment_unsetSymbol(SBMLInitialAssignment) % SBMLInitialAssignment = InitialAssignment_unsetSymbol(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. the SBML InitialAssignment structure with the symbol attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'symbol') SBMLInitialAssignment.symbol = ''; else error('symbol not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_unsetS0000644000000000000000000000351511703262312032222 0ustar rootrootfunction SBMLInitialAssignment = InitialAssignment_unsetSBOTerm(SBMLInitialAssignment) % SBMLInitialAssignment = InitialAssignment_unsetSBOTerm(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. the SBML InitialAssignment structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'sboTerm') SBMLInitialAssignment.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_unsetM0000644000000000000000000000350711703262312032215 0ustar rootrootfunction SBMLInitialAssignment = InitialAssignment_unsetMetaid(SBMLInitialAssignment) % SBMLInitialAssignment = InitialAssignment_unsetMetaid(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. the SBML InitialAssignment structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'metaid') SBMLInitialAssignment.metaid = ''; else error('metaid not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_unsetMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_unsetM0000644000000000000000000000347311703262312032217 0ustar rootrootfunction SBMLInitialAssignment = InitialAssignment_unsetMath(SBMLInitialAssignment) % SBMLInitialAssignment = InitialAssignment_unsetMath(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. the SBML InitialAssignment structure with the math attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'math') SBMLInitialAssignment.math = ''; else error('math not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_setSymbol.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_setSym0000644000000000000000000000375011703262312032226 0ustar rootrootfunction SBMLInitialAssignment = InitialAssignment_setSymbol(SBMLInitialAssignment, symbol) % SBMLInitialAssignment = InitialAssignment_setSymbol(SBMLInitialAssignment, symbol) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % 2. symbol; a string representing the symbol to be set % % Returns % % 1. the SBML InitialAssignment structure with the new value for the symbol attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'symbol') if ~ischar(symbol) error('symbol must be character array') ; else SBMLInitialAssignment.symbol = symbol; end; else error('symbol not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_setSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_setSBO0000644000000000000000000000377411703262312032107 0ustar rootrootfunction SBMLInitialAssignment = InitialAssignment_setSBOTerm(SBMLInitialAssignment, sboTerm) % SBMLInitialAssignment = InitialAssignment_setSBOTerm(SBMLInitialAssignment, sboTerm) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML InitialAssignment structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLInitialAssignment.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_setMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_setMet0000644000000000000000000000375011703262312032203 0ustar rootrootfunction SBMLInitialAssignment = InitialAssignment_setMetaid(SBMLInitialAssignment, metaid) % SBMLInitialAssignment = InitialAssignment_setMetaid(SBMLInitialAssignment, metaid) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML InitialAssignment structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLInitialAssignment.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_setMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_setMat0000644000000000000000000000373411703262312032201 0ustar rootrootfunction SBMLInitialAssignment = InitialAssignment_setMath(SBMLInitialAssignment, math) % SBMLInitialAssignment = InitialAssignment_setMath(SBMLInitialAssignment, math) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % 2. math; string representing the math expression math to be set % % Returns % % 1. the SBML InitialAssignment structure with the new value for the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'math') if ~ischar(math) error('math must be character array') ; else SBMLInitialAssignment.math = math; end; else error('math not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_isSetSymbol.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_isSetS0000644000000000000000000000345711703262312032160 0ustar rootrootfunction value = InitialAssignment_isSetSymbol(SBMLInitialAssignment) % value = InitialAssignment_isSetSymbol(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. value = % - 1 if the symbol attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'symbol') value = ~isempty(SBMLInitialAssignment.symbol); else error('symbol not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_isSetS0000644000000000000000000000346011703262312032152 0ustar rootrootfunction value = InitialAssignment_isSetSBOTerm(SBMLInitialAssignment) % value = InitialAssignment_isSetSBOTerm(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'sboTerm') value = (SBMLInitialAssignment.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_isSetM0000644000000000000000000000345711703262312032152 0ustar rootrootfunction value = InitialAssignment_isSetMetaid(SBMLInitialAssignment) % value = InitialAssignment_isSetMetaid(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'metaid') value = ~isempty(SBMLInitialAssignment.metaid); else error('metaid not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_isSetMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_isSetM0000644000000000000000000000344311703262312032145 0ustar rootrootfunction value = InitialAssignment_isSetMath(SBMLInitialAssignment) % value = InitialAssignment_isSetMath(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. value = % - 1 if the math attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'math') value = ~isempty(SBMLInitialAssignment.math); else error('math not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_getSymbol.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_getSym0000644000000000000000000000340611703262312032210 0ustar rootrootfunction symbol = InitialAssignment_getSymbol(SBMLInitialAssignment) % symbol = InitialAssignment_getSymbol(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. the value of the symbol attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'symbol') symbol = SBMLInitialAssignment.symbol; else error('symbol not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_getSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_getSBO0000644000000000000000000000341711703262312032065 0ustar rootrootfunction sboTerm = InitialAssignment_getSBOTerm(SBMLInitialAssignment) % sboTerm = InitialAssignment_getSBOTerm(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'sboTerm') sboTerm = SBMLInitialAssignment.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_getMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_getMet0000644000000000000000000000340611703262312032165 0ustar rootrootfunction metaid = InitialAssignment_getMetaid(SBMLInitialAssignment) % metaid = InitialAssignment_getMetaid(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'metaid') metaid = SBMLInitialAssignment.metaid; else error('metaid not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_getMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_getMat0000644000000000000000000000336411703262312032164 0ustar rootrootfunction math = InitialAssignment_getMath(SBMLInitialAssignment) % math = InitialAssignment_getMath(SBMLInitialAssignment) % % Takes % % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % % Returns % % 1. the value of the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLInitialAssignment); if isfield(SBMLInitialAssignment, 'math') math = SBMLInitialAssignment.math; else error('math not an attribute on SBML L%dV%d InitialAssignment', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_create.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/InitialAssignment_create0000644000000000000000000000556211703262312032210 0ustar rootrootfunction InitialAssignment = InitialAssignment_create(varargin) % InitialAssignment = InitialAssignment_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML InitialAssignment structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getInitialAssignmentFieldnames(level, version); if (num > 0) values = getInitialAssignmentDefaultValues(level, version); InitialAssignment = cell2struct(values, fieldnames, 2); %add level and version InitialAssignment.level = level; InitialAssignment.version = version; %check correct structure if ~isSBML_InitialAssignment(InitialAssignment, level, version) InitialAssignment = struct(); warning('Warn:BadStruct', 'Failed to create InitialAssignment'); end; else InitialAssignment = []; warning('Warn:InvalidLV', 'InitialAssignment not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/InitialAssignment/Contents.m0000644000000000000000000001747411703262312027300 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\InitialAssignment % % The functions allow users to create and work with the SBML InitialAssignment structure. % %=================================================================================== % InitialAssignment = InitialAssignment_create(level(optional), version(optional) ) %=================================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML InitialAssignment structure of the appropriate level and version % %========================================================= % math = InitialAssignment_getMath(SBMLInitialAssignment) %========================================================= % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. the value of the math attribute % %============================================================= % metaid = InitialAssignment_getMetaid(SBMLInitialAssignment) %============================================================= % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. the value of the metaid attribute % %=============================================================== % sboTerm = InitialAssignment_getSBOTerm(SBMLInitialAssignment) %=============================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. the value of the sboTerm attribute % %============================================================= % symbol = InitialAssignment_getSymbol(SBMLInitialAssignment) %============================================================= % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. the value of the symbol attribute % %============================================================ % value = InitialAssignment_isSetMath(SBMLInitialAssignment) %============================================================ % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. value = % - 1 if the math attribute is set % - 0 otherwise % %============================================================== % value = InitialAssignment_isSetMetaid(SBMLInitialAssignment) %============================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %=============================================================== % value = InitialAssignment_isSetSBOTerm(SBMLInitialAssignment) %=============================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %============================================================== % value = InitialAssignment_isSetSymbol(SBMLInitialAssignment) %============================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. value = % - 1 if the symbol attribute is set % - 0 otherwise % %================================================================================ % SBMLInitialAssignment = InitialAssignment_setMath(SBMLInitialAssignment, math) %================================================================================ % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % 2. math; string representing the math expression math to be set % Returns % 1. the SBML InitialAssignment structure with the new value for the math attribute % %==================================================================================== % SBMLInitialAssignment = InitialAssignment_setMetaid(SBMLInitialAssignment, metaid) %==================================================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML InitialAssignment structure with the new value for the metaid attribute % %====================================================================================== % SBMLInitialAssignment = InitialAssignment_setSBOTerm(SBMLInitialAssignment, sboTerm) %====================================================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML InitialAssignment structure with the new value for the sboTerm attribute % %==================================================================================== % SBMLInitialAssignment = InitialAssignment_setSymbol(SBMLInitialAssignment, symbol) %==================================================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % 2. symbol; a string representing the symbol to be set % Returns % 1. the SBML InitialAssignment structure with the new value for the symbol attribute % %============================================================================ % SBMLInitialAssignment = InitialAssignment_unsetMath(SBMLInitialAssignment) %============================================================================ % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. the SBML InitialAssignment structure with the math attribute unset % %============================================================================== % SBMLInitialAssignment = InitialAssignment_unsetMetaid(SBMLInitialAssignment) %============================================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. the SBML InitialAssignment structure with the metaid attribute unset % %=============================================================================== % SBMLInitialAssignment = InitialAssignment_unsetSBOTerm(SBMLInitialAssignment) %=============================================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. the SBML InitialAssignment structure with the sboTerm attribute unset % %============================================================================== % SBMLInitialAssignment = InitialAssignment_unsetSymbol(SBMLInitialAssignment) %============================================================================== % Takes % 1. SBMLInitialAssignment, an SBML InitialAssignment structure % Returns % 1. the SBML InitialAssignment structure with the symbol attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/GetLevelVersion.m0000644000000000000000000001117411703262340025126 0ustar rootrootfunction [level, version] = GetLevelVersion(SBMLStructure) % [level, version] = GetLevelVersion(SBMLStructure) % % Takes % % 1. SBMLStructure, any SBML structure % % Returns % % 1. the SBML level corresponding to this structure % 2. the SBML version corresponding to this structure % % *NOTE:* it is not always possible to uniquely determine the level/version from a % structure. The most recent SBML level/version that matches will be reported. % % check that input is correct if (~isValid(SBMLStructure)) error('%s\n%s', 'GetLevelVersion(SBMLStructure)', ... 'argument must be an SBML structure'); end; % if level and version explicilty declared if (isfield(SBMLStructure, 'level') && isfield(SBMLStructure, 'version')) level = SBMLStructure.level; version = SBMLStructure.version; return; end; typecode = SBMLStructure.typecode; if (strcmp(typecode, 'SBML_MODEL')) level = SBMLStructure.SBML_level; version = SBMLStructure.SBML_version; return; end; switch (typecode) case 'SBML_ALGEBRAIC_RULE' fhandle = str2func('isSBML_AlgebraicRule'); case 'SBML_ASSIGNMENT_RULE' fhandle = str2func('isSBML_AssignmentRule'); case 'SBML_COMPARTMENT' fhandle = str2func('isSBML_Compartment'); case 'SBML_COMPARTMENT_TYPE' fhandle = str2func('isSBML_CompartmentType'); case 'SBML_COMPARTMENT_VOLUME_RULE' fhandle = str2func('isSBML_CompartmentVolumeRule'); case 'SBML_CONSTRAINT' fhandle = str2func('isSBML_Constraint'); case 'SBML_DELAY' fhandle = str2func('isSBML_Delay'); case 'SBML_EVENT' fhandle = str2func('isSBML_Event'); case 'SBML_EVENT_ASSIGNMENT' fhandle = str2func('isSBML_EventAssignment'); case 'SBML_FUNCTION_DEFINITION' fhandle = str2func('isSBML_FunctionDefinition'); case 'SBML_INITIAL_ASSIGNMENT' fhandle = str2func('isSBML_InitialAssignment'); case 'SBML_KINETIC_LAW' fhandle = str2func('isSBML_KineticLaw'); case 'SBML_LOCAL_PARAMETER' fhandle = str2func('isSBML_LocalParameter'); case 'SBML_MODIFIER_SPECIES_REFERENCE' fhandle = str2func('isSBML_ModifierSpeciesReference'); case 'SBML_PARAMETER' fhandle = str2func('isSBML_Parameter'); case 'SBML_PARAMETER_RULE' fhandle = str2func('isSBML_ParameterRule'); case 'SBML_PRIORITY' fhandle = str2func('isSBML_Priority'); case 'SBML_RATE_RULE' fhandle = str2func('isSBML_RateRule'); case 'SBML_REACTION' fhandle = str2func('isSBML_Reaction'); case 'SBML_SPECIES' fhandle = str2func('isSBML_Species'); case 'SBML_SPECIES_CONCENTRATION_RULE' fhandle = str2func('isSBML_SpeciesConcentrationRule'); case 'SBML_SPECIES_REFERENCE' fhandle = str2func('isSBML_SpeciesReference'); case 'SBML_SPECIES_TYPE' fhandle = str2func('isSBML_SpeciesType'); case 'SBML_STOICHIOMETRY_MATH' fhandle = str2func('isSBML_StoichiometryMath'); case 'SBML_TRIGGER' fhandle = str2func('isSBML_Trigger'); case 'SBML_UNIT' fhandle = str2func('isSBML_Unit'); case 'SBML_UNIT_DEFINITION' fhandle = str2func('isSBML_UnitDefinition'); otherwise error('%s\n%s', 'GetLevelVersion(SBMLStructure)', ... 'argument must be an SBML structure'); end; % assume highest level/version level = 3; version = 1; if (~feval(fhandle, SBMLStructure, level, version)) level = 2; version = 4; end; while (version > 0) if (feval(fhandle, SBMLStructure, level, version)) break; else version = version - 1; end; end; if (version == 0) level = 1; version = 2; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/GetLevel.m0000644000000000000000000000313011703262336023556 0ustar rootrootfunction level = GetLevel(SBMLStructure) % level = GetLevel(SBMLStructure) % % Takes % % 1. SBMLStructure, any SBML structure % % Returns % % 1. the SBML level corresponding to this structure % % *NOTE:* it is not always possible to uniquely determine the level from a % structure. The most recent SBML level that matches will be reported. % [level, version] = GetLevelVersion(SBMLStructure); SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/0000755000000000000000000000000011704572230025470 5ustar rootroot././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_unse0000644000000000000000000000353211703262334032246 0ustar rootrootfunction SBMLFunctionDefinition = FunctionDefinition_unsetSBOTerm(SBMLFunctionDefinition) % SBMLFunctionDefinition = FunctionDefinition_unsetSBOTerm(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the SBML FunctionDefinition structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'sboTerm') SBMLFunctionDefinition.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_unsetName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_unse0000644000000000000000000000351011703262334032242 0ustar rootrootfunction SBMLFunctionDefinition = FunctionDefinition_unsetName(SBMLFunctionDefinition) % SBMLFunctionDefinition = FunctionDefinition_unsetName(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the SBML FunctionDefinition structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'name') SBMLFunctionDefinition.name = ''; else error('name not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_unse0000644000000000000000000000352411703262334032247 0ustar rootrootfunction SBMLFunctionDefinition = FunctionDefinition_unsetMetaid(SBMLFunctionDefinition) % SBMLFunctionDefinition = FunctionDefinition_unsetMetaid(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the SBML FunctionDefinition structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'metaid') SBMLFunctionDefinition.metaid = ''; else error('metaid not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_unsetMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_unse0000644000000000000000000000351011703262334032242 0ustar rootrootfunction SBMLFunctionDefinition = FunctionDefinition_unsetMath(SBMLFunctionDefinition) % SBMLFunctionDefinition = FunctionDefinition_unsetMath(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the SBML FunctionDefinition structure with the math attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'math') SBMLFunctionDefinition.math = ''; else error('math not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_unsetId.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_unse0000644000000000000000000000347411703262334032253 0ustar rootrootfunction SBMLFunctionDefinition = FunctionDefinition_unsetId(SBMLFunctionDefinition) % SBMLFunctionDefinition = FunctionDefinition_unsetId(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the SBML FunctionDefinition structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'id') SBMLFunctionDefinition.id = ''; else error('id not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_setSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_setS0000644000000000000000000000401111703262334032203 0ustar rootrootfunction SBMLFunctionDefinition = FunctionDefinition_setSBOTerm(SBMLFunctionDefinition, sboTerm) % SBMLFunctionDefinition = FunctionDefinition_setSBOTerm(SBMLFunctionDefinition, sboTerm) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML FunctionDefinition structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLFunctionDefinition.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_setName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_setN0000644000000000000000000000373311703262334032210 0ustar rootrootfunction SBMLFunctionDefinition = FunctionDefinition_setName(SBMLFunctionDefinition, name) % SBMLFunctionDefinition = FunctionDefinition_setName(SBMLFunctionDefinition, name) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML FunctionDefinition structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'name') if ~ischar(name) error('name must be character array') ; else SBMLFunctionDefinition.name = name; end; else error('name not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_setMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_setM0000644000000000000000000000376511703262334032214 0ustar rootrootfunction SBMLFunctionDefinition = FunctionDefinition_setMetaid(SBMLFunctionDefinition, metaid) % SBMLFunctionDefinition = FunctionDefinition_setMetaid(SBMLFunctionDefinition, metaid) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML FunctionDefinition structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLFunctionDefinition.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_setMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_setM0000644000000000000000000000375111703262334032207 0ustar rootrootfunction SBMLFunctionDefinition = FunctionDefinition_setMath(SBMLFunctionDefinition, math) % SBMLFunctionDefinition = FunctionDefinition_setMath(SBMLFunctionDefinition, math) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. math; string representing the math expression math to be set % % Returns % % 1. the SBML FunctionDefinition structure with the new value for the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'math') if ~ischar(math) error('math must be character array') ; else SBMLFunctionDefinition.math = math; end; else error('math not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_setId.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_setI0000644000000000000000000000370111703262334032176 0ustar rootrootfunction SBMLFunctionDefinition = FunctionDefinition_setId(SBMLFunctionDefinition, id) % SBMLFunctionDefinition = FunctionDefinition_setId(SBMLFunctionDefinition, id) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML FunctionDefinition structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'id') if ~ischar(id) error('id must be character array') ; else SBMLFunctionDefinition.id = id; end; else error('id not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_isSe0000644000000000000000000000347211703262334032202 0ustar rootrootfunction value = FunctionDefinition_isSetSBOTerm(SBMLFunctionDefinition) % value = FunctionDefinition_isSetSBOTerm(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'sboTerm') value = (SBMLFunctionDefinition.sboTerm >0); else error('sboTerm not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_isSetName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_isSe0000644000000000000000000000345511703262334032203 0ustar rootrootfunction value = FunctionDefinition_isSetName(SBMLFunctionDefinition) % value = FunctionDefinition_isSetName(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'name') value = ~isempty(SBMLFunctionDefinition.name); else error('name not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_isSe0000644000000000000000000000347111703262334032201 0ustar rootrootfunction value = FunctionDefinition_isSetMetaid(SBMLFunctionDefinition) % value = FunctionDefinition_isSetMetaid(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'metaid') value = ~isempty(SBMLFunctionDefinition.metaid); else error('metaid not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_isSetMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_isSe0000644000000000000000000000345511703262334032203 0ustar rootrootfunction value = FunctionDefinition_isSetMath(SBMLFunctionDefinition) % value = FunctionDefinition_isSetMath(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. value = % - 1 if the math attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'math') value = ~isempty(SBMLFunctionDefinition.math); else error('math not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_isSetId.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_isSe0000644000000000000000000000344111703262334032176 0ustar rootrootfunction value = FunctionDefinition_isSetId(SBMLFunctionDefinition) % value = FunctionDefinition_isSetId(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'id') value = ~isempty(SBMLFunctionDefinition.id); else error('id not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_getSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_getS0000644000000000000000000000343111703262334032174 0ustar rootrootfunction sboTerm = FunctionDefinition_getSBOTerm(SBMLFunctionDefinition) % sboTerm = FunctionDefinition_getSBOTerm(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'sboTerm') sboTerm = SBMLFunctionDefinition.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_getName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_getN0000644000000000000000000000337611703262334032177 0ustar rootrootfunction name = FunctionDefinition_getName(SBMLFunctionDefinition) % name = FunctionDefinition_getName(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'name') name = SBMLFunctionDefinition.name; else error('name not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_getMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_getM0000644000000000000000000000342011703262334032164 0ustar rootrootfunction metaid = FunctionDefinition_getMetaid(SBMLFunctionDefinition) % metaid = FunctionDefinition_getMetaid(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'metaid') metaid = SBMLFunctionDefinition.metaid; else error('metaid not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_getMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_getM0000644000000000000000000000337611703262334032176 0ustar rootrootfunction math = FunctionDefinition_getMath(SBMLFunctionDefinition) % math = FunctionDefinition_getMath(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the value of the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'math') math = SBMLFunctionDefinition.math; else error('math not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_getId.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_getI0000644000000000000000000000335411703262334032166 0ustar rootrootfunction id = FunctionDefinition_getId(SBMLFunctionDefinition) % id = FunctionDefinition_getId(SBMLFunctionDefinition) % % Takes % % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFunctionDefinition); if isfield(SBMLFunctionDefinition, 'id') id = SBMLFunctionDefinition.id; else error('id not an attribute on SBML L%dV%d FunctionDefinition', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_create.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/FunctionDefinition_crea0000644000000000000000000000560211703262334032206 0ustar rootrootfunction FunctionDefinition = FunctionDefinition_create(varargin) % FunctionDefinition = FunctionDefinition_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML FunctionDefinition structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getFunctionDefinitionFieldnames(level, version); if (num > 0) values = getFunctionDefinitionDefaultValues(level, version); FunctionDefinition = cell2struct(values, fieldnames, 2); %add level and version FunctionDefinition.level = level; FunctionDefinition.version = version; %check correct structure if ~isSBML_FunctionDefinition(FunctionDefinition, level, version) FunctionDefinition = struct(); warning('Warn:BadStruct', 'Failed to create FunctionDefinition'); end; else FunctionDefinition = []; warning('Warn:InvalidLV', 'FunctionDefinition not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/FunctionDefinition/Contents.m0000644000000000000000000002257411703262334027455 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\FunctionDefinition % % The functions allow users to create and work with the SBML FunctionDefinition structure. % %===================================================================================== % FunctionDefinition = FunctionDefinition_create(level(optional), version(optional) ) %===================================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML FunctionDefinition structure of the appropriate level and version % %======================================================= % id = FunctionDefinition_getId(SBMLFunctionDefinition) %======================================================= % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the value of the id attribute % %=========================================================== % math = FunctionDefinition_getMath(SBMLFunctionDefinition) %=========================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the value of the math attribute % %=============================================================== % metaid = FunctionDefinition_getMetaid(SBMLFunctionDefinition) %=============================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the value of the metaid attribute % %=========================================================== % name = FunctionDefinition_getName(SBMLFunctionDefinition) %=========================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the value of the name attribute % %================================================================= % sboTerm = FunctionDefinition_getSBOTerm(SBMLFunctionDefinition) %================================================================= % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the value of the sboTerm attribute % %============================================================ % value = FunctionDefinition_isSetId(SBMLFunctionDefinition) %============================================================ % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %============================================================== % value = FunctionDefinition_isSetMath(SBMLFunctionDefinition) %============================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. value = % - 1 if the math attribute is set % - 0 otherwise % %================================================================ % value = FunctionDefinition_isSetMetaid(SBMLFunctionDefinition) %================================================================ % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %============================================================== % value = FunctionDefinition_isSetName(SBMLFunctionDefinition) %============================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %================================================================= % value = FunctionDefinition_isSetSBOTerm(SBMLFunctionDefinition) %================================================================= % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %=============================================================================== % SBMLFunctionDefinition = FunctionDefinition_setId(SBMLFunctionDefinition, id) %=============================================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. id; a string representing the id to be set % Returns % 1. the SBML FunctionDefinition structure with the new value for the id attribute % %=================================================================================== % SBMLFunctionDefinition = FunctionDefinition_setMath(SBMLFunctionDefinition, math) %=================================================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. math; string representing the math expression math to be set % Returns % 1. the SBML FunctionDefinition structure with the new value for the math attribute % %======================================================================================= % SBMLFunctionDefinition = FunctionDefinition_setMetaid(SBMLFunctionDefinition, metaid) %======================================================================================= % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML FunctionDefinition structure with the new value for the metaid attribute % %=================================================================================== % SBMLFunctionDefinition = FunctionDefinition_setName(SBMLFunctionDefinition, name) %=================================================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. name; a string representing the name to be set % Returns % 1. the SBML FunctionDefinition structure with the new value for the name attribute % %========================================================================================= % SBMLFunctionDefinition = FunctionDefinition_setSBOTerm(SBMLFunctionDefinition, sboTerm) %========================================================================================= % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML FunctionDefinition structure with the new value for the sboTerm attribute % %============================================================================= % SBMLFunctionDefinition = FunctionDefinition_unsetId(SBMLFunctionDefinition) %============================================================================= % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the SBML FunctionDefinition structure with the id attribute unset % %=============================================================================== % SBMLFunctionDefinition = FunctionDefinition_unsetMath(SBMLFunctionDefinition) %=============================================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the SBML FunctionDefinition structure with the math attribute unset % %================================================================================= % SBMLFunctionDefinition = FunctionDefinition_unsetMetaid(SBMLFunctionDefinition) %================================================================================= % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the SBML FunctionDefinition structure with the metaid attribute unset % %=============================================================================== % SBMLFunctionDefinition = FunctionDefinition_unsetName(SBMLFunctionDefinition) %=============================================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the SBML FunctionDefinition structure with the name attribute unset % %================================================================================== % SBMLFunctionDefinition = FunctionDefinition_unsetSBOTerm(SBMLFunctionDefinition) %================================================================================== % Takes % 1. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. the SBML FunctionDefinition structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/0000755000000000000000000000000011704572230025004 5ustar rootroot././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_unsetVariable.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_unsetVaria0000644000000000000000000000347111703262340032244 0ustar rootrootfunction SBMLEventAssignment = EventAssignment_unsetVariable(SBMLEventAssignment) % SBMLEventAssignment = EventAssignment_unsetVariable(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. the SBML EventAssignment structure with the variable attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'variable') SBMLEventAssignment.variable = ''; else error('variable not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_unsetSBOTe0000644000000000000000000000346311703262340032117 0ustar rootrootfunction SBMLEventAssignment = EventAssignment_unsetSBOTerm(SBMLEventAssignment) % SBMLEventAssignment = EventAssignment_unsetSBOTerm(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. the SBML EventAssignment structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'sboTerm') SBMLEventAssignment.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_unsetMetai0000644000000000000000000000345511703262340032243 0ustar rootrootfunction SBMLEventAssignment = EventAssignment_unsetMetaid(SBMLEventAssignment) % SBMLEventAssignment = EventAssignment_unsetMetaid(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. the SBML EventAssignment structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'metaid') SBMLEventAssignment.metaid = ''; else error('metaid not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_unsetMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_unsetMath.0000644000000000000000000000344111703262340032146 0ustar rootrootfunction SBMLEventAssignment = EventAssignment_unsetMath(SBMLEventAssignment) % SBMLEventAssignment = EventAssignment_unsetMath(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. the SBML EventAssignment structure with the math attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'math') SBMLEventAssignment.math = ''; else error('math not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_setVariable.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_setVariabl0000644000000000000000000000375011703262340032217 0ustar rootrootfunction SBMLEventAssignment = EventAssignment_setVariable(SBMLEventAssignment, variable) % SBMLEventAssignment = EventAssignment_setVariable(SBMLEventAssignment, variable) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % 2. variable; a string representing the variable to be set % % Returns % % 1. the SBML EventAssignment structure with the new value for the variable attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'variable') if ~ischar(variable) error('variable must be character array') ; else SBMLEventAssignment.variable = variable; end; else error('variable not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_setSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_setSBOTerm0000644000000000000000000000374211703262340032113 0ustar rootrootfunction SBMLEventAssignment = EventAssignment_setSBOTerm(SBMLEventAssignment, sboTerm) % SBMLEventAssignment = EventAssignment_setSBOTerm(SBMLEventAssignment, sboTerm) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML EventAssignment structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLEventAssignment.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_setMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_setMetaid.0000644000000000000000000000371611703262340032122 0ustar rootrootfunction SBMLEventAssignment = EventAssignment_setMetaid(SBMLEventAssignment, metaid) % SBMLEventAssignment = EventAssignment_setMetaid(SBMLEventAssignment, metaid) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML EventAssignment structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLEventAssignment.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d EventAssignment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_setMath.m0000644000000000000000000000370211703262340031760 0ustar rootrootfunction SBMLEventAssignment = EventAssignment_setMath(SBMLEventAssignment, math) % SBMLEventAssignment = EventAssignment_setMath(SBMLEventAssignment, math) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % 2. math; string representing the math expression math to be set % % Returns % % 1. the SBML EventAssignment structure with the new value for the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'math') if ~ischar(math) error('math must be character array') ; else SBMLEventAssignment.math = math; end; else error('math not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_isSetVariable.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_isSetVaria0000644000000000000000000000344711703262340032200 0ustar rootrootfunction value = EventAssignment_isSetVariable(SBMLEventAssignment) % value = EventAssignment_isSetVariable(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. value = % - 1 if the variable attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'variable') value = ~isempty(SBMLEventAssignment.variable); else error('variable not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_isSetSBOTe0000644000000000000000000000343511703262340032047 0ustar rootrootfunction value = EventAssignment_isSetSBOTerm(SBMLEventAssignment) % value = EventAssignment_isSetSBOTerm(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'sboTerm') value = (SBMLEventAssignment.sboTerm > 0); else error('sboTerm not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_isSetMetai0000644000000000000000000000343311703262340032170 0ustar rootrootfunction value = EventAssignment_isSetMetaid(SBMLEventAssignment) % value = EventAssignment_isSetMetaid(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'metaid') value = ~isempty(SBMLEventAssignment.metaid); else error('metaid not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_isSetMath.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_isSetMath.0000644000000000000000000000341711703262340032102 0ustar rootrootfunction value = EventAssignment_isSetMath(SBMLEventAssignment) % value = EventAssignment_isSetMath(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. value = % - 1 if the math attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'math') value = ~isempty(SBMLEventAssignment.math); else error('math not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_getVariable.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_getVariabl0000644000000000000000000000340411703262340032177 0ustar rootrootfunction variable = EventAssignment_getVariable(SBMLEventAssignment) % variable = EventAssignment_getVariable(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. the value of the variable attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'variable') variable = SBMLEventAssignment.variable; else error('variable not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_getSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_getSBOTerm0000644000000000000000000000337311703262340032077 0ustar rootrootfunction sboTerm = EventAssignment_getSBOTerm(SBMLEventAssignment) % sboTerm = EventAssignment_getSBOTerm(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'sboTerm') sboTerm = SBMLEventAssignment.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d EventAssignment', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_getMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_getMetaid.0000644000000000000000000000336211703262340032103 0ustar rootrootfunction metaid = EventAssignment_getMetaid(SBMLEventAssignment) % metaid = EventAssignment_getMetaid(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'metaid') metaid = SBMLEventAssignment.metaid; else error('metaid not an attribute on SBML L%dV%d EventAssignment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_getMath.m0000644000000000000000000000334011703262340031742 0ustar rootrootfunction math = EventAssignment_getMath(SBMLEventAssignment) % math = EventAssignment_getMath(SBMLEventAssignment) % % Takes % % 1. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. the value of the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEventAssignment); if isfield(SBMLEventAssignment, 'math') math = SBMLEventAssignment.math; else error('math not an attribute on SBML L%dV%d EventAssignment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/EventAssignment_create.m0000644000000000000000000000552211703262340031620 0ustar rootrootfunction EventAssignment = EventAssignment_create(varargin) % EventAssignment = EventAssignment_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML EventAssignment structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getEventAssignmentFieldnames(level, version); if (num > 0) values = getEventAssignmentDefaultValues(level, version); EventAssignment = cell2struct(values, fieldnames, 2); %add level and version EventAssignment.level = level; EventAssignment.version = version; %check correct structure if ~isSBML_EventAssignment(EventAssignment, level, version) EventAssignment = struct(); warning('Warn:BadStruct', 'Failed to create EventAssignment'); end; else EventAssignment = []; warning('Warn:InvalidLV', 'EventAssignment not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/EventAssignment/Contents.m0000644000000000000000000001703211703262340026757 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\EventAssignment % % The functions allow users to create and work with the SBML EventAssignment structure. % %=============================================================================== % EventAssignment = EventAssignment_create(level(optional), version(optional) ) %=============================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML EventAssignment structure of the appropriate level and version % %===================================================== % math = EventAssignment_getMath(SBMLEventAssignment) %===================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. the value of the math attribute % %========================================================= % metaid = EventAssignment_getMetaid(SBMLEventAssignment) %========================================================= % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. the value of the metaid attribute % %=========================================================== % sboTerm = EventAssignment_getSBOTerm(SBMLEventAssignment) %=========================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. the value of the sboTerm attribute % %============================================================= % variable = EventAssignment_getVariable(SBMLEventAssignment) %============================================================= % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. the value of the variable attribute % %======================================================== % value = EventAssignment_isSetMath(SBMLEventAssignment) %======================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. value = % - 1 if the math attribute is set % - 0 otherwise % %========================================================== % value = EventAssignment_isSetMetaid(SBMLEventAssignment) %========================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %=========================================================== % value = EventAssignment_isSetSBOTerm(SBMLEventAssignment) %=========================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %============================================================ % value = EventAssignment_isSetVariable(SBMLEventAssignment) %============================================================ % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. value = % - 1 if the variable attribute is set % - 0 otherwise % %========================================================================== % SBMLEventAssignment = EventAssignment_setMath(SBMLEventAssignment, math) %========================================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % 2. math; string representing the math expression math to be set % Returns % 1. the SBML EventAssignment structure with the new value for the math attribute % %============================================================================== % SBMLEventAssignment = EventAssignment_setMetaid(SBMLEventAssignment, metaid) %============================================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML EventAssignment structure with the new value for the metaid attribute % %================================================================================ % SBMLEventAssignment = EventAssignment_setSBOTerm(SBMLEventAssignment, sboTerm) %================================================================================ % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML EventAssignment structure with the new value for the sboTerm attribute % %================================================================================== % SBMLEventAssignment = EventAssignment_setVariable(SBMLEventAssignment, variable) %================================================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % 2. variable; a string representing the variable to be set % Returns % 1. the SBML EventAssignment structure with the new value for the variable attribute % %====================================================================== % SBMLEventAssignment = EventAssignment_unsetMath(SBMLEventAssignment) %====================================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. the SBML EventAssignment structure with the math attribute unset % %======================================================================== % SBMLEventAssignment = EventAssignment_unsetMetaid(SBMLEventAssignment) %======================================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. the SBML EventAssignment structure with the metaid attribute unset % %========================================================================= % SBMLEventAssignment = EventAssignment_unsetSBOTerm(SBMLEventAssignment) %========================================================================= % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. the SBML EventAssignment structure with the sboTerm attribute unset % %========================================================================== % SBMLEventAssignment = EventAssignment_unsetVariable(SBMLEventAssignment) %========================================================================== % Takes % 1. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. the SBML EventAssignment structure with the variable attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/0000755000000000000000000000000011704572230022753 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_unsetTrigger.m0000644000000000000000000000337611703262310026757 0ustar rootrootfunction SBMLEvent = Event_unsetTrigger(SBMLEvent) % SBMLEvent = Event_unsetTrigger(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with the trigger field unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'trigger') if (level == 2 && version < 3) SBMLEvent.trigger = ''; else SBMLEvent.trigger = []; end; else error('trigger not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_unsetTimeUnits.m0000644000000000000000000000330111703262310027261 0ustar rootrootfunction SBMLEvent = Event_unsetTimeUnits(SBMLEvent) % SBMLEvent = Event_unsetTimeUnits(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with the timeUnits attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'timeUnits') SBMLEvent.timeUnits = ''; else error('timeUnits not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_unsetSBOTerm.m0000644000000000000000000000326511703262310026624 0ustar rootrootfunction SBMLEvent = Event_unsetSBOTerm(SBMLEvent) % SBMLEvent = Event_unsetSBOTerm(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'sboTerm') SBMLEvent.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_unsetPriority.m0000644000000000000000000000326711703262310027174 0ustar rootrootfunction SBMLEvent = Event_unsetPriority(SBMLEvent) % SBMLEvent = Event_unsetPriority(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with the priority field unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'priority') SBMLEvent.priority = []; else error('priority not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_unsetName.m0000644000000000000000000000324311703262310026225 0ustar rootrootfunction SBMLEvent = Event_unsetName(SBMLEvent) % SBMLEvent = Event_unsetName(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'name') SBMLEvent.name = ''; else error('name not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_unsetMetaid.m0000644000000000000000000000325711703262310026555 0ustar rootrootfunction SBMLEvent = Event_unsetMetaid(SBMLEvent) % SBMLEvent = Event_unsetMetaid(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'metaid') SBMLEvent.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_unsetId.m0000644000000000000000000000322711703262310025703 0ustar rootrootfunction SBMLEvent = Event_unsetId(SBMLEvent) % SBMLEvent = Event_unsetId(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'id') SBMLEvent.id = ''; else error('id not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_unsetDelay.m0000644000000000000000000000336011703262310026403 0ustar rootrootfunction SBMLEvent = Event_unsetDelay(SBMLEvent) % SBMLEvent = Event_unsetDelay(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with the delay field unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'delay') if (level == 2 && version < 3) SBMLEvent.delay = ''; else SBMLEvent.delay = []; end; else error('delay not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_setUseValuesFromTriggerTime.m0000644000000000000000000000423711703262310031711 0ustar rootrootfunction SBMLEvent = Event_setUseValuesFromTriggerTime(SBMLEvent, useValuesFromTriggerTime) % SBMLEvent = Event_setUseValuesFromTriggerTime(SBMLEvent, useValuesFromTriggerTime) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. useValuesFromTriggerTime, an integer (0/1) representing the value of useValuesFromTriggerTime to be set % % Returns % % 1. the SBML Event structure with the new value for the useValuesFromTriggerTime attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'useValuesFromTriggerTime') if (~isIntegralNumber(useValuesFromTriggerTime) || useValuesFromTriggerTime < 0 || useValuesFromTriggerTime > 1) error('useValuesFromTriggerTime must be an integer of value 0/1') ; else SBMLEvent.useValuesFromTriggerTime = useValuesFromTriggerTime; end; else error('useValuesFromTriggerTime not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_setTrigger.m0000644000000000000000000000436011703262310026406 0ustar rootrootfunction SBMLEvent = Event_setTrigger(SBMLEvent, trigger) % SBMLEvent = Event_setTrigger(SBMLEvent, SBMLTrigger) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. SBMLTrigger, an SBML Trigger structure % % Returns % % 1. the SBML Event structure with the new value for the trigger field % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isstruct(trigger) [trigger_level, trigger_version] = GetLevelVersion(trigger); if level ~= trigger_level error('mismatch in levels'); elseif version ~= trigger_version error('mismatch in versions'); end; end; if isfield(SBMLEvent, 'trigger') if (level == 2 && version < 3) && ~ischar(trigger) error('trigger must be character array') ; elseif (((level == 2 && version > 2) || level > 2) ... && ~isValid(trigger, level, version)) error('trigger must be an SBML Trigger structure'); else SBMLEvent.trigger = trigger; end; else error('trigger not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_setTimeUnits.m0000644000000000000000000000356711703262310026734 0ustar rootrootfunction SBMLEvent = Event_setTimeUnits(SBMLEvent, timeUnits) % SBMLEvent = Event_setTimeUnits(SBMLEvent, timeUnits) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. timeUnits; a string representing the timeUnits to be set % % Returns % % 1. the SBML Event structure with the new value for the timeUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'timeUnits') if ~ischar(timeUnits) error('timeUnits must be character array') ; else SBMLEvent.timeUnits = timeUnits; end; else error('timeUnits not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_setSBOTerm.m0000644000000000000000000000354411703262310026261 0ustar rootrootfunction SBMLEvent = Event_setSBOTerm(SBMLEvent, sboTerm) % SBMLEvent = Event_setSBOTerm(SBMLEvent, sboTerm) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Event structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLEvent.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_setPriority.m0000644000000000000000000000414311703262310026623 0ustar rootrootfunction SBMLEvent = Event_setPriority(SBMLEvent, priority) % SBMLEvent = Event_setPriority(SBMLEvent, SBMLPriority) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. SBMLPriority, an SBML Priority structure % % Returns % % 1. the SBML Event structure with the new value for the priority field % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isstruct(priority) [priority_level, priority_version] = GetLevelVersion(priority); if level ~= priority_level error('mismatch in levels'); elseif version ~= priority_version error('mismatch in versions'); end; end; if isfield(SBMLEvent, 'priority') if ~isValid(priority, level, version) error('priority must be an SBML Priority structure') ; else SBMLEvent.priority = priority; end; else error('priority not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_setName.m0000644000000000000000000000346611703262310025671 0ustar rootrootfunction SBMLEvent = Event_setName(SBMLEvent, name) % SBMLEvent = Event_setName(SBMLEvent, name) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML Event structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'name') if ~ischar(name) error('name must be character array') ; else SBMLEvent.name = name; end; else error('name not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_setMetaid.m0000644000000000000000000000352011703262310026203 0ustar rootrootfunction SBMLEvent = Event_setMetaid(SBMLEvent, metaid) % SBMLEvent = Event_setMetaid(SBMLEvent, metaid) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Event structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLEvent.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_setId.m0000644000000000000000000000343411703262310025340 0ustar rootrootfunction SBMLEvent = Event_setId(SBMLEvent, id) % SBMLEvent = Event_setId(SBMLEvent, id) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML Event structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'id') if ~ischar(id) error('id must be character array') ; else SBMLEvent.id = id; end; else error('id not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_setDelay.m0000644000000000000000000000430511703262310026040 0ustar rootrootfunction SBMLEvent = Event_setDelay(SBMLEvent, delay) % SBMLEvent = Event_setDelay(SBMLEvent, SBMLDelay) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. SBMLDelay, an SBML Delay structure % % Returns % % 1. the SBML Event structure with the new value for the delay field % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isstruct(delay) [delay_level, delay_version] = GetLevelVersion(delay); if level ~= delay_level error('mismatch in levels'); elseif version ~= delay_version error('mismatch in versions'); end; end; if isfield(SBMLEvent, 'delay') if (level == 2 && version < 3) && ~ischar(delay) error('delay must be character array') ; elseif (((level == 2 && version > 2) || level > 2) ... && ~isValid(delay, level, version)) error('delay must be an SBML Delay structure'); else SBMLEvent.delay = delay; end; else error('delay not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_isSetTrigger.m0000644000000000000000000000330111703262310026674 0ustar rootrootfunction value = Event_isSetTrigger(SBMLEvent) % value = Event_isSetTrigger(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. value = % - 1 if the trigger structure is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'trigger') value = ~isempty(SBMLEvent.trigger); else error('trigger not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_isSetTimeUnits.m0000644000000000000000000000331511703262310027217 0ustar rootrootfunction value = Event_isSetTimeUnits(SBMLEvent) % value = Event_isSetTimeUnits(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. value = % - 1 if the timeUnits attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'timeUnits') value = ~isempty(SBMLEvent.timeUnits); else error('timeUnits not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_isSetSBOTerm.m0000644000000000000000000000327511703262310026556 0ustar rootrootfunction value = Event_isSetSBOTerm(SBMLEvent) % value = Event_isSetSBOTerm(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'sboTerm') value = (SBMLEvent.sboTerm > 0); else error('sboTerm not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_isSetPriority.m0000644000000000000000000000330711703262310027120 0ustar rootrootfunction value = Event_isSetPriority(SBMLEvent) % value = Event_isSetPriority(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. value = % - 1 if the priority structure is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'priority') value = ~isempty(SBMLEvent.priority); else error('priority not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_isSetName.m0000644000000000000000000000325711703262310026163 0ustar rootrootfunction value = Event_isSetName(SBMLEvent) % value = Event_isSetName(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'name') value = ~isempty(SBMLEvent.name); else error('name not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_isSetMetaid.m0000644000000000000000000000327311703262310026504 0ustar rootrootfunction value = Event_isSetMetaid(SBMLEvent) % value = Event_isSetMetaid(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'metaid') value = ~isempty(SBMLEvent.metaid); else error('metaid not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_isSetId.m0000644000000000000000000000324311703262310025632 0ustar rootrootfunction value = Event_isSetId(SBMLEvent) % value = Event_isSetId(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'id') value = ~isempty(SBMLEvent.id); else error('id not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_isSetDelay.m0000644000000000000000000000326511703262310026340 0ustar rootrootfunction value = Event_isSetDelay(SBMLEvent) % value = Event_isSetDelay(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. value = % - 1 if the delay structure is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'delay') value = ~isempty(SBMLEvent.delay); else error('delay not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getUseValuesFromTriggerTime.m0000644000000000000000000000346411703262310031676 0ustar rootrootfunction useValuesFromTriggerTime = Event_getUseValuesFromTriggerTime(SBMLEvent) % useValuesFromTriggerTime = Event_getUseValuesFromTriggerTime(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the value of the useValuesFromTriggerTime attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'useValuesFromTriggerTime') useValuesFromTriggerTime = SBMLEvent.useValuesFromTriggerTime; else error('useValuesFromTriggerTime not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getTrigger.m0000644000000000000000000000322311703262310026367 0ustar rootrootfunction trigger = Event_getTrigger(SBMLEvent) % trigger = Event_getTrigger(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Trigger structure % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'trigger') trigger = SBMLEvent.trigger; else error('trigger not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getTimeUnits.m0000644000000000000000000000325511703262310026712 0ustar rootrootfunction timeUnits = Event_getTimeUnits(SBMLEvent) % timeUnits = Event_getTimeUnits(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the value of the timeUnits attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'timeUnits') timeUnits = SBMLEvent.timeUnits; else error('timeUnits not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getSBOTerm.m0000644000000000000000000000323311703262310026240 0ustar rootrootfunction sboTerm = Event_getSBOTerm(SBMLEvent) % sboTerm = Event_getSBOTerm(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'sboTerm') sboTerm = SBMLEvent.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getPriority.m0000644000000000000000000000323411703262310026607 0ustar rootrootfunction priority = Event_getPriority(SBMLEvent) % priority = Event_getPriority(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Priority structure % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'priority') priority = SBMLEvent.priority; else error('priority not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getNumEventAssignments.m0000644000000000000000000000334511703262310030746 0ustar rootrootfunction num = Event_getNumEventAssignments(SBMLEvent) % num = Event_getNumEventAssignments(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the number of SBML EventAssignment structures present in the Event % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'eventAssignment') num = length(SBMLEvent.eventAssignment); else error('eventAssignment not an element on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getName.m0000644000000000000000000000320011703262310025637 0ustar rootrootfunction name = Event_getName(SBMLEvent) % name = Event_getName(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'name') name = SBMLEvent.name; else error('name not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getMetaid.m0000644000000000000000000000322211703262310026166 0ustar rootrootfunction metaid = Event_getMetaid(SBMLEvent) % metaid = Event_getMetaid(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'metaid') metaid = SBMLEvent.metaid; else error('metaid not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getListOfEventAssignments.m0000644000000000000000000000335711703262310031412 0ustar rootrootfunction eventAssignment = Event_getListOfEventAssignments(SBMLEvent) % eventAssignment = Event_getListOfEventAssignments(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. an array of the eventAssignment structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'eventAssignment') eventAssignment = SBMLEvent.eventAssignment; else error('eventAssignment not an element on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getId.m0000644000000000000000000000315611703262310025325 0ustar rootrootfunction id = Event_getId(SBMLEvent) % id = Event_getId(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'id') id = SBMLEvent.id; else error('id not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getEventAssignment.m0000644000000000000000000000402211703262310030074 0ustar rootrootfunction eventAssignment = Event_getEventAssignment(SBMLEvent, index) % eventAssignment = Event_getEventAssignment(SBMLEvent, index) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. index, an integer representing the index of SBML EventAssignment structure % % Returns % % 1. the SBML EventAssignment structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'eventAssignment') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLEvent.eventAssignment) eventAssignment = SBMLEvent.eventAssignment(index); else error('index is out of range'); end; else error('eventAssignment not an element on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_getDelay.m0000644000000000000000000000320111703262310026016 0ustar rootrootfunction delay = Event_getDelay(SBMLEvent) % delay = Event_getDelay(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Delay structure % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'delay') delay = SBMLEvent.delay; else error('delay not an attribute on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_createTrigger.m0000644000000000000000000000342311703262310027055 0ustar rootrootfunction SBMLEvent = Event_createTrigger(SBMLEvent) % SBMLEvent = Event_createTrigger(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with a new SBML Trigger structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); SBMLTrigger = Trigger_create(level, version); if isfield(SBMLEvent, 'trigger') if ~isempty(SBMLTrigger) SBMLEvent.trigger = SBMLTrigger; end; else error('trigger not an element on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_createPriority.m0000644000000000000000000000343611703262310027277 0ustar rootrootfunction SBMLEvent = Event_createPriority(SBMLEvent) % SBMLEvent = Event_createPriority(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with a new SBML Priority structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'priority') SBMLPriority = Priority_create(level, version); if ~isempty(SBMLPriority) SBMLEvent.priority = SBMLPriority; end; else error('priority not an element on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_createEventAssignment.m0000644000000000000000000000367411703262310030574 0ustar rootrootfunction SBMLEvent = Event_createEventAssignment(SBMLEvent) % SBMLEvent = Event_acreateEventAssignment(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with a new SBML EventAssignment structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'eventAssignment') SBMLEventAssignment = EventAssignment_create(level, version); index = length(SBMLEvent.eventAssignment); if index == 0 SBMLEvent.eventAssignment = SBMLEventAssignment; else SBMLEvent.eventAssignment(index+1) = SBMLEventAssignment; end; else error('eventAssignment not an element on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_createDelay.m0000644000000000000000000000340011703262310026503 0ustar rootrootfunction SBMLEvent = Event_createDelay(SBMLEvent) % SBMLEvent = Event_createDelay(SBMLEvent) % % Takes % % 1. SBMLEvent, an SBML Event structure % % Returns % % 1. the SBML Event structure with a new SBML Delay structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); if isfield(SBMLEvent, 'delay') SBMLDelay = Delay_create(level, version); if ~isempty(SBMLDelay) SBMLEvent.delay = SBMLDelay; end; else error('delay not an element on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_create.m0000644000000000000000000000633511703262310025536 0ustar rootrootfunction Event = Event_create(varargin) % Event = Event_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Event structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getEventFieldnames(level, version); if (num > 0) values = getEventDefaultValues(level, version); Event = cell2struct(values, fieldnames, 2); %add empty substructures Event.eventAssignment = EventAssignment_create(level, version); Event.eventAssignment(1:end) = []; warning('off', 'Warn:InvalidLV'); t = Trigger_create(level, version); if ~isempty(t) Event.trigger = t; Event.trigger(1:end) = []; end; d = Delay_create(level, version); if ~isempty(d) Event.delay = d; Event.delay(1:end) = []; end; p = Priority_create(level, version); if ~isempty(p) Event.priority = p; Event.priority(1:end) = []; end; warning('on', 'Warn:InvalidLV'); %add level and version Event.level = level; Event.version = version; %check correct structure if ~isSBML_Event(Event, level, version) Event = struct(); warning('Warn:BadStruct', 'Failed to create Event'); end; else Event = []; warning('Warn:InvalidLV', 'Event not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Event_addEventAssignment.m0000644000000000000000000000431011703262310030045 0ustar rootrootfunction SBMLEvent = Event_addEventAssignment(SBMLEvent, SBMLEventAssignment) % SBMLEvent = Event_addEventAssignment(SBMLEvent, SBMLEventAssignment) % % Takes % % 1. SBMLEvent, an SBML Event structure % 2. SBMLEventAssignment, an SBML EventAssignment structure % % Returns % % 1. the SBML Event structure with the SBML EventAssignment structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLEvent); [eventAssignment_level, eventAssignment_version] = GetLevelVersion(SBMLEventAssignment); if level ~= eventAssignment_level error('mismatch in levels'); elseif version ~= eventAssignment_version error('mismatch in versions'); end; if isfield(SBMLEvent, 'eventAssignment') index = length(SBMLEvent.eventAssignment); if index == 0 SBMLEvent.eventAssignment = SBMLEventAssignment; else SBMLEvent.eventAssignment(index+1) = SBMLEventAssignment; end; else error('eventAssignment not an element on SBML L%dV%d Event', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Event/Contents.m0000644000000000000000000003225511703262310024727 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Event % % The functions allow users to create and work with the SBML Event structure. % %====================================================================== % SBMLEvent = Event_addEventAssignment(SBMLEvent, SBMLEventAssignment) %====================================================================== % Takes % 1. SBMLEvent, an SBML Event structure % 2. SBMLEventAssignment, an SBML EventAssignment structure % Returns % 1. the SBML Event structure with the SBML EventAssignment structure added % %=========================================================== % Event = Event_create(level(optional), version(optional) ) %=========================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Event structure of the appropriate level and version % %========================================== % SBMLEvent = Event_createDelay(SBMLEvent) %========================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with a new SBML Delay structure added % %===================================================== % SBMLEvent = Event_acreateEventAssignment(SBMLEvent) %===================================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with a new SBML EventAssignment structure added % %============================================= % SBMLEvent = Event_createPriority(SBMLEvent) %============================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with a new SBML Priority structure added % %============================================ % SBMLEvent = Event_createTrigger(SBMLEvent) %============================================ % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with a new SBML Trigger structure added % %=================================== % delay = Event_getDelay(SBMLEvent) %=================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Delay structure % %============================================================== % eventAssignment = Event_getEventAssignment(SBMLEvent, index) %============================================================== % Takes % 1. SBMLEvent, an SBML Event structure % 2. index, an integer representing the index of SBML EventAssignment structure % Returns % 1. the SBML EventAssignment structure at the indexed position % %============================= % id = Event_getId(SBMLEvent) %============================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the value of the id attribute % %============================================================== % eventAssignment = Event_getListOfEventAssignments(SBMLEvent) %============================================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. an array of the eventAssignment structures % %===================================== % metaid = Event_getMetaid(SBMLEvent) %===================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the value of the metaid attribute % %================================= % name = Event_getName(SBMLEvent) %================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the value of the name attribute % %=============================================== % num = Event_getNumEventAssignments(SBMLEvent) %=============================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the number of SBML EventAssignment structures present in the Event % %========================================= % priority = Event_getPriority(SBMLEvent) %========================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Priority structure % %======================================= % sboTerm = Event_getSBOTerm(SBMLEvent) %======================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the value of the sboTerm attribute % %=========================================== % timeUnits = Event_getTimeUnits(SBMLEvent) %=========================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the value of the timeUnits attribute % %======================================= % trigger = Event_getTrigger(SBMLEvent) %======================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Trigger structure % %========================================================================= % useValuesFromTriggerTime = Event_getUseValuesFromTriggerTime(SBMLEvent) %========================================================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the value of the useValuesFromTriggerTime attribute % %===================================== % value = Event_isSetDelay(SBMLEvent) %===================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. value = % - 1 if the delay structure is set % - 0 otherwise % %================================== % value = Event_isSetId(SBMLEvent) %================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %====================================== % value = Event_isSetMetaid(SBMLEvent) %====================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %==================================== % value = Event_isSetName(SBMLEvent) %==================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %======================================== % value = Event_isSetPriority(SBMLEvent) %======================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. value = % - 1 if the priority structure is set % - 0 otherwise % %======================================= % value = Event_isSetSBOTerm(SBMLEvent) %======================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %========================================= % value = Event_isSetTimeUnits(SBMLEvent) %========================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. value = % - 1 if the timeUnits attribute is set % - 0 otherwise % %======================================= % value = Event_isSetTrigger(SBMLEvent) %======================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. value = % - 1 if the trigger structure is set % - 0 otherwise % %================================================== % SBMLEvent = Event_setDelay(SBMLEvent, SBMLDelay) %================================================== % Takes % 1. SBMLEvent, an SBML Event structure % 2. SBMLDelay, an SBML Delay structure % Returns % 1. the SBML Event structure with the new value for the delay field % %======================================== % SBMLEvent = Event_setId(SBMLEvent, id) %======================================== % Takes % 1. SBMLEvent, an SBML Event structure % 2. id; a string representing the id to be set % Returns % 1. the SBML Event structure with the new value for the id attribute % %================================================ % SBMLEvent = Event_setMetaid(SBMLEvent, metaid) %================================================ % Takes % 1. SBMLEvent, an SBML Event structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Event structure with the new value for the metaid attribute % %============================================ % SBMLEvent = Event_setName(SBMLEvent, name) %============================================ % Takes % 1. SBMLEvent, an SBML Event structure % 2. name; a string representing the name to be set % Returns % 1. the SBML Event structure with the new value for the name attribute % %======================================================== % SBMLEvent = Event_setPriority(SBMLEvent, SBMLPriority) %======================================================== % Takes % 1. SBMLEvent, an SBML Event structure % 2. SBMLPriority, an SBML Priority structure % Returns % 1. the SBML Event structure with the new value for the priority field % %================================================== % SBMLEvent = Event_setSBOTerm(SBMLEvent, sboTerm) %================================================== % Takes % 1. SBMLEvent, an SBML Event structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Event structure with the new value for the sboTerm attribute % %====================================================== % SBMLEvent = Event_setTimeUnits(SBMLEvent, timeUnits) %====================================================== % Takes % 1. SBMLEvent, an SBML Event structure % 2. timeUnits; a string representing the timeUnits to be set % Returns % 1. the SBML Event structure with the new value for the timeUnits attribute % %====================================================== % SBMLEvent = Event_setTrigger(SBMLEvent, SBMLTrigger) %====================================================== % Takes % 1. SBMLEvent, an SBML Event structure % 2. SBMLTrigger, an SBML Trigger structure % Returns % 1. the SBML Event structure with the new value for the trigger field % %==================================================================================== % SBMLEvent = Event_setUseValuesFromTriggerTime(SBMLEvent, useValuesFromTriggerTime) %==================================================================================== % Takes % 1. SBMLEvent, an SBML Event structure % 2. useValuesFromTriggerTime, an integer (0/1) representing the value of useValuesFromTriggerTime to be set % Returns % 1. the SBML Event structure with the new value for the useValuesFromTriggerTime attribute % %========================================= % SBMLEvent = Event_unsetDelay(SBMLEvent) %========================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with the delay field unset % %====================================== % SBMLEvent = Event_unsetId(SBMLEvent) %====================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with the id attribute unset % %========================================== % SBMLEvent = Event_unsetMetaid(SBMLEvent) %========================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with the metaid attribute unset % %======================================== % SBMLEvent = Event_unsetName(SBMLEvent) %======================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with the name attribute unset % %============================================ % SBMLEvent = Event_unsetPriority(SBMLEvent) %============================================ % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with the priority field unset % %=========================================== % SBMLEvent = Event_unsetSBOTerm(SBMLEvent) %=========================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with the sboTerm attribute unset % %============================================= % SBMLEvent = Event_unsetTimeUnits(SBMLEvent) %============================================= % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with the timeUnits attribute unset % %=========================================== % SBMLEvent = Event_unsetTrigger(SBMLEvent) %=========================================== % Takes % 1. SBMLEvent, an SBML Event structure % Returns % 1. the SBML Event structure with the trigger field unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/0000755000000000000000000000000011704572226022735 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_unsetSBOTerm.m0000644000000000000000000000326111703262356026564 0ustar rootrootfunction SBMLDelay = Delay_unsetSBOTerm(SBMLDelay) % SBMLDelay = Delay_unsetSBOTerm(SBMLDelay) % % Takes % % 1. SBMLDelay, an SBML Delay structure % % Returns % % 1. the SBML Delay structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'sboTerm') SBMLDelay.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_unsetMetaid.m0000644000000000000000000000325311703262356026515 0ustar rootrootfunction SBMLDelay = Delay_unsetMetaid(SBMLDelay) % SBMLDelay = Delay_unsetMetaid(SBMLDelay) % % Takes % % 1. SBMLDelay, an SBML Delay structure % % Returns % % 1. the SBML Delay structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'metaid') SBMLDelay.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_unsetMath.m0000644000000000000000000000323711703262356026205 0ustar rootrootfunction SBMLDelay = Delay_unsetMath(SBMLDelay) % SBMLDelay = Delay_unsetMath(SBMLDelay) % % Takes % % 1. SBMLDelay, an SBML Delay structure % % Returns % % 1. the SBML Delay structure with the math attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'math') SBMLDelay.math = ''; else error('math not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_setSBOTerm.m0000644000000000000000000000354011703262356026221 0ustar rootrootfunction SBMLDelay = Delay_setSBOTerm(SBMLDelay, sboTerm) % SBMLDelay = Delay_setSBOTerm(SBMLDelay, sboTerm) % % Takes % % 1. SBMLDelay, an SBML Delay structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Delay structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLDelay.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_setMetaid.m0000644000000000000000000000351411703262356026152 0ustar rootrootfunction SBMLDelay = Delay_setMetaid(SBMLDelay, metaid) % SBMLDelay = Delay_setMetaid(SBMLDelay, metaid) % % Takes % % 1. SBMLDelay, an SBML Delay structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Delay structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLDelay.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_setMath.m0000644000000000000000000000350011703262356025633 0ustar rootrootfunction SBMLDelay = Delay_setMath(SBMLDelay, math) % SBMLDelay = Delay_setMath(SBMLDelay, math) % % Takes % % 1. SBMLDelay, an SBML Delay structure % 2. math; string representing the math expression math to be set % % Returns % % 1. the SBML Delay structure with the new value for the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'math') if ~ischar(math) error('math must be character array') ; else SBMLDelay.math = math; end; else error('math not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_isSetSBOTerm.m0000644000000000000000000000327111703262356026516 0ustar rootrootfunction value = Delay_isSetSBOTerm(SBMLDelay) % value = Delay_isSetSBOTerm(SBMLDelay) % % Takes % % 1. SBMLDelay, an SBML Delay structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'sboTerm') value = (SBMLDelay.sboTerm > 0); else error('sboTerm not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_isSetMetaid.m0000644000000000000000000000326711703262356026453 0ustar rootrootfunction value = Delay_isSetMetaid(SBMLDelay) % value = Delay_isSetMetaid(SBMLDelay) % % Takes % % 1. SBMLDelay, an SBML Delay structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'metaid') value = ~isempty(SBMLDelay.metaid); else error('metaid not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_isSetMath.m0000644000000000000000000000325311703262356026134 0ustar rootrootfunction value = Delay_isSetMath(SBMLDelay) % value = Delay_isSetMath(SBMLDelay) % % Takes % % 1. SBMLDelay, an SBML Delay structure % % Returns % % 1. value = % - 1 if the math attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'math') value = ~isempty(SBMLDelay.math); else error('math not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_getSBOTerm.m0000644000000000000000000000322711703262356026207 0ustar rootrootfunction sboTerm = Delay_getSBOTerm(SBMLDelay) % sboTerm = Delay_getSBOTerm(SBMLDelay) % % Takes % % 1. SBMLDelay, an SBML Delay structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'sboTerm') sboTerm = SBMLDelay.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_getMetaid.m0000644000000000000000000000321611703262356026135 0ustar rootrootfunction metaid = Delay_getMetaid(SBMLDelay) % metaid = Delay_getMetaid(SBMLDelay) % % Takes % % 1. SBMLDelay, an SBML Delay structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'metaid') metaid = SBMLDelay.metaid; else error('metaid not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_getMath.m0000644000000000000000000000317411703262356025626 0ustar rootrootfunction math = Delay_getMath(SBMLDelay) % math = Delay_getMath(SBMLDelay) % % Takes % % 1. SBMLDelay, an SBML Delay structure % % Returns % % 1. the value of the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLDelay); if isfield(SBMLDelay, 'math') math = SBMLDelay.math; else error('math not an attribute on SBML L%dV%d Delay', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Delay_create.m0000644000000000000000000000526211703262356025500 0ustar rootrootfunction Delay = Delay_create(varargin) % Delay = Delay_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Delay structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getDelayFieldnames(level, version); if (num > 0) values = getDelayDefaultValues(level, version); Delay = cell2struct(values, fieldnames, 2); %add level and version Delay.level = level; Delay.version = version; %check correct structure if ~isSBML_Delay(Delay, level, version) Delay = struct(); warning('Warn:BadStruct', 'Failed to create Delay'); end; else Delay = []; warning('Warn:InvalidLV', 'Delay not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Delay/Contents.m0000644000000000000000000001146111703262356024712 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Delay % % The functions allow users to create and work with the SBML Delay structure. % %=========================================================== % Delay = Delay_create(level(optional), version(optional) ) %=========================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Delay structure of the appropriate level and version % %================================= % math = Delay_getMath(SBMLDelay) %================================= % Takes % 1. SBMLDelay, an SBML Delay structure % Returns % 1. the value of the math attribute % %===================================== % metaid = Delay_getMetaid(SBMLDelay) %===================================== % Takes % 1. SBMLDelay, an SBML Delay structure % Returns % 1. the value of the metaid attribute % %======================================= % sboTerm = Delay_getSBOTerm(SBMLDelay) %======================================= % Takes % 1. SBMLDelay, an SBML Delay structure % Returns % 1. the value of the sboTerm attribute % %==================================== % value = Delay_isSetMath(SBMLDelay) %==================================== % Takes % 1. SBMLDelay, an SBML Delay structure % Returns % 1. value = % - 1 if the math attribute is set % - 0 otherwise % %====================================== % value = Delay_isSetMetaid(SBMLDelay) %====================================== % Takes % 1. SBMLDelay, an SBML Delay structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %======================================= % value = Delay_isSetSBOTerm(SBMLDelay) %======================================= % Takes % 1. SBMLDelay, an SBML Delay structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %============================================ % SBMLDelay = Delay_setMath(SBMLDelay, math) %============================================ % Takes % 1. SBMLDelay, an SBML Delay structure % 2. math; string representing the math expression math to be set % Returns % 1. the SBML Delay structure with the new value for the math attribute % %================================================ % SBMLDelay = Delay_setMetaid(SBMLDelay, metaid) %================================================ % Takes % 1. SBMLDelay, an SBML Delay structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Delay structure with the new value for the metaid attribute % %================================================== % SBMLDelay = Delay_setSBOTerm(SBMLDelay, sboTerm) %================================================== % Takes % 1. SBMLDelay, an SBML Delay structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Delay structure with the new value for the sboTerm attribute % %======================================== % SBMLDelay = Delay_unsetMath(SBMLDelay) %======================================== % Takes % 1. SBMLDelay, an SBML Delay structure % Returns % 1. the SBML Delay structure with the math attribute unset % %========================================== % SBMLDelay = Delay_unsetMetaid(SBMLDelay) %========================================== % Takes % 1. SBMLDelay, an SBML Delay structure % Returns % 1. the SBML Delay structure with the metaid attribute unset % %=========================================== % SBMLDelay = Delay_unsetSBOTerm(SBMLDelay) %=========================================== % Takes % 1. SBMLDelay, an SBML Delay structure % Returns % 1. the SBML Delay structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Contents.m0000644000000000000000000000521511703262354023652 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions % % General functions for working with MATLAB_SBML structures. % %================================== % level = GetLevel(SBMLStructure) %================================== % Takes % 1. SBMLStructure, any SBML structure % Returns % 1. the SBML level corresponding to this structure % %==================================================== % [level, version] = GetLevelVersion(SBMLStructure) %==================================================== % Takes % 1. SBMLStructure, any SBML structure % Returns % 1. the SBML level corresponding to this structure % 2. the SBML version corresponding to this structure % %========================================================= % SBMLStructure = Object_create(typecode, level, version) %========================================================= % Takes % 1. typecode; a string representing the type of object being queried % 2. level; an integer representing an SBML level % 3. version; an integer representing an SBML version % Returns % 1. an SBML structure representing the given typecode, level and version % %==================================================== % identical = areIdentical(SBMLStruct1, SBMLStruct2) %==================================================== % Takes % 1. SBMLStruct1, any SBML structure % 2. SBMLStruct2, any SBML structure % Returns % 1. identical = % - 1 if the structures are identical i.e. contain same fields and the same values % - 0 otherwise % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/0000755000000000000000000000000011704572226024023 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Contents.m0000644000000000000000000001526511703262352026002 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Constraint % % The functions allow users to create and work with the SBML Constraint structure. % %===================================================================== % Constraint = Constraint_create(level(optional), version(optional) ) %===================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Constraint structure of the appropriate level and version % %=========================================== % math = Constraint_getMath(SBMLConstraint) %=========================================== % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. the value of the math attribute % %================================================= % message = Constraint_getMessage(SBMLConstraint) %================================================= % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. the value of the message attribute % %=============================================== % metaid = Constraint_getMetaid(SBMLConstraint) %=============================================== % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. the value of the metaid attribute % %================================================= % sboTerm = Constraint_getSBOTerm(SBMLConstraint) %================================================= % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. the value of the sboTerm attribute % %============================================== % value = Constraint_isSetMath(SBMLConstraint) %============================================== % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. value = % - 1 if the math attribute is set % - 0 otherwise % %================================================= % value = Constraint_isSetMessage(SBMLConstraint) %================================================= % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. value = % - 1 if the message attribute is set % - 0 otherwise % %================================================ % value = Constraint_isSetMetaid(SBMLConstraint) %================================================ % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %================================================= % value = Constraint_isSetSBOTerm(SBMLConstraint) %================================================= % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %=========================================================== % SBMLConstraint = Constraint_setMath(SBMLConstraint, math) %=========================================================== % Takes % 1. SBMLConstraint, an SBML Constraint structure % 2. math; string representing the math expression math to be set % Returns % 1. the SBML Constraint structure with the new value for the math attribute % %================================================================= % SBMLConstraint = Constraint_setMessage(SBMLConstraint, message) %================================================================= % Takes % 1. SBMLConstraint, an SBML Constraint structure % 2. message; a string representing the message to be set % Returns % 1. the SBML Constraint structure with the new value for the message attribute % %=============================================================== % SBMLConstraint = Constraint_setMetaid(SBMLConstraint, metaid) %=============================================================== % Takes % 1. SBMLConstraint, an SBML Constraint structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Constraint structure with the new value for the metaid attribute % %================================================================= % SBMLConstraint = Constraint_setSBOTerm(SBMLConstraint, sboTerm) %================================================================= % Takes % 1. SBMLConstraint, an SBML Constraint structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Constraint structure with the new value for the sboTerm attribute % %======================================================= % SBMLConstraint = Constraint_unsetMath(SBMLConstraint) %======================================================= % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. the SBML Constraint structure with the math attribute unset % %========================================================== % SBMLConstraint = Constraint_unsetMessage(SBMLConstraint) %========================================================== % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. the SBML Constraint structure with the message attribute unset % %========================================================= % SBMLConstraint = Constraint_unsetMetaid(SBMLConstraint) %========================================================= % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. the SBML Constraint structure with the metaid attribute unset % %========================================================== % SBMLConstraint = Constraint_unsetSBOTerm(SBMLConstraint) %========================================================== % Takes % 1. SBMLConstraint, an SBML Constraint structure % Returns % 1. the SBML Constraint structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_unsetSBOTerm.m0000644000000000000000000000336211703262352030736 0ustar rootrootfunction SBMLConstraint = Constraint_unsetSBOTerm(SBMLConstraint) % SBMLConstraint = Constraint_unsetSBOTerm(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. the SBML Constraint structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'sboTerm') SBMLConstraint.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_unsetMetaid.m0000644000000000000000000000335411703262352030667 0ustar rootrootfunction SBMLConstraint = Constraint_unsetMetaid(SBMLConstraint) % SBMLConstraint = Constraint_unsetMetaid(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. the SBML Constraint structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'metaid') SBMLConstraint.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_unsetMessage.m0000644000000000000000000000336211703262352031047 0ustar rootrootfunction SBMLConstraint = Constraint_unsetMessage(SBMLConstraint) % SBMLConstraint = Constraint_unsetMessage(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. the SBML Constraint structure with the message attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'message') SBMLConstraint.message = ''; else error('message not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_unsetMath.m0000644000000000000000000000334011703262352030350 0ustar rootrootfunction SBMLConstraint = Constraint_unsetMath(SBMLConstraint) % SBMLConstraint = Constraint_unsetMath(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. the SBML Constraint structure with the math attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'math') SBMLConstraint.math = ''; else error('math not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_setSBOTerm.m0000644000000000000000000000364111703262352030373 0ustar rootrootfunction SBMLConstraint = Constraint_setSBOTerm(SBMLConstraint, sboTerm) % SBMLConstraint = Constraint_setSBOTerm(SBMLConstraint, sboTerm) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Constraint structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLConstraint.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_setMetaid.m0000644000000000000000000000361511703262352030324 0ustar rootrootfunction SBMLConstraint = Constraint_setMetaid(SBMLConstraint, metaid) % SBMLConstraint = Constraint_setMetaid(SBMLConstraint, metaid) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Constraint structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLConstraint.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_setMessage.m0000644000000000000000000000363211703262352030504 0ustar rootrootfunction SBMLConstraint = Constraint_setMessage(SBMLConstraint, message) % SBMLConstraint = Constraint_setMessage(SBMLConstraint, message) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % 2. message; a string representing the message to be set % % Returns % % 1. the SBML Constraint structure with the new value for the message attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'message') if ~ischar(message) error('message must be character array') ; else SBMLConstraint.message = message; end; else error('message not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_setMath.m0000644000000000000000000000360111703262352030005 0ustar rootrootfunction SBMLConstraint = Constraint_setMath(SBMLConstraint, math) % SBMLConstraint = Constraint_setMath(SBMLConstraint, math) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % 2. math; string representing the math expression math to be set % % Returns % % 1. the SBML Constraint structure with the new value for the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'math') if ~ischar(math) error('math must be character array') ; else SBMLConstraint.math = math; end; else error('math not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_isSetSBOTerm.m0000644000000000000000000000335311703262352030667 0ustar rootrootfunction value = Constraint_isSetSBOTerm(SBMLConstraint) % value = Constraint_isSetSBOTerm(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'sboTerm') value = (SBMLConstraint.sboTerm > 0); else error('sboTerm not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_isSetMetaid.m0000644000000000000000000000335111703262352030615 0ustar rootrootfunction value = Constraint_isSetMetaid(SBMLConstraint) % value = Constraint_isSetMetaid(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'metaid') value = ~isempty(SBMLConstraint.metaid); else error('metaid not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_isSetMessage.m0000644000000000000000000000335711703262352031004 0ustar rootrootfunction value = Constraint_isSetMessage(SBMLConstraint) % value = Constraint_isSetMessage(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. value = % - 1 if the message attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'message') value = ~isempty(SBMLConstraint.message); else error('message not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_isSetMath.m0000644000000000000000000000333511703262352030305 0ustar rootrootfunction value = Constraint_isSetMath(SBMLConstraint) % value = Constraint_isSetMath(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. value = % - 1 if the math attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'math') value = ~isempty(SBMLConstraint.math); else error('math not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_getSBOTerm.m0000644000000000000000000000331111703262352030351 0ustar rootrootfunction sboTerm = Constraint_getSBOTerm(SBMLConstraint) % sboTerm = Constraint_getSBOTerm(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'sboTerm') sboTerm = SBMLConstraint.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_getMetaid.m0000644000000000000000000000330011703262352030277 0ustar rootrootfunction metaid = Constraint_getMetaid(SBMLConstraint) % metaid = Constraint_getMetaid(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'metaid') metaid = SBMLConstraint.metaid; else error('metaid not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_getMessage.m0000644000000000000000000000331111703262352030462 0ustar rootrootfunction message = Constraint_getMessage(SBMLConstraint) % message = Constraint_getMessage(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. the value of the message attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'message') message = SBMLConstraint.message; else error('message not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_getMath.m0000644000000000000000000000325611703262352027777 0ustar rootrootfunction math = Constraint_getMath(SBMLConstraint) % math = Constraint_getMath(SBMLConstraint) % % Takes % % 1. SBMLConstraint, an SBML Constraint structure % % Returns % % 1. the value of the math attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLConstraint); if isfield(SBMLConstraint, 'math') math = SBMLConstraint.math; else error('math not an attribute on SBML L%dV%d Constraint', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Constraint/Constraint_create.m0000644000000000000000000000540211703262352027644 0ustar rootrootfunction Constraint = Constraint_create(varargin) % Constraint = Constraint_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Constraint structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getConstraintFieldnames(level, version); if (num > 0) values = getConstraintDefaultValues(level, version); Constraint = cell2struct(values, fieldnames, 2); %add level and version Constraint.level = level; Constraint.version = version; %check correct structure if ~isSBML_Constraint(Constraint, level, version) Constraint = struct(); warning('Warn:BadStruct', 'Failed to create Constraint'); end; else Constraint = []; warning('Warn:InvalidLV', 'Constraint not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/0000755000000000000000000000000011704572224026206 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/Contents.m0000644000000000000000000001565111703262364030171 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\CompartmentVolumeRule % % The functions allow users to create and work with the SBML CompartmentVolumeRule structure. % %=========================================================================================== % CompartmentVolumeRule = CompartmentVolumeRule_create(level(optional), version(optional) ) %=========================================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML CompartmentVolumeRule structure of the appropriate level and version % %=============================================================================== % compartment = CompartmentVolumeRule_getCompartment(SBMLCompartmentVolumeRule) %=============================================================================== % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % Returns % 1. the value of the compartment attribute % %======================================================================= % formula = CompartmentVolumeRule_getFormula(SBMLCompartmentVolumeRule) %======================================================================= % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % Returns % 1. the value of the formula attribute % %================================================================= % type = CompartmentVolumeRule_getType(SBMLCompartmentVolumeRule) %================================================================= % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % Returns % 1. the value of the type attribute % %=========================================================================== % value = CompartmentVolumeRule_isSetCompartment(SBMLCompartmentVolumeRule) %=========================================================================== % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % Returns % 1. value = % - 1 if the compartment attribute is set % - 0 otherwise % %======================================================================= % value = CompartmentVolumeRule_isSetFormula(SBMLCompartmentVolumeRule) %======================================================================= % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % Returns % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % %==================================================================== % value = CompartmentVolumeRule_isSetType(SBMLCompartmentVolumeRule) %==================================================================== % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % Returns % 1. value = % - 1 if the type attribute is set % - 0 otherwise % %========================================================================================================== % SBMLCompartmentVolumeRule = CompartmentVolumeRule_setCompartment(SBMLCompartmentVolumeRule, compartment) %========================================================================================================== % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % 2. compartment; a string representing the compartment to be set % Returns % 1. the SBML CompartmentVolumeRule structure with the new value for the compartment attribute % %================================================================================================== % SBMLCompartmentVolumeRule = CompartmentVolumeRule_setFormula(SBMLCompartmentVolumeRule, formula) %================================================================================================== % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % 2. formula; a string representing the formula to be set % Returns % 1. the SBML CompartmentVolumeRule structure with the new value for the formula attribute % %============================================================================================ % SBMLCompartmentVolumeRule = CompartmentVolumeRule_setType(SBMLCompartmentVolumeRule, type) %============================================================================================ % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % 2. type; a string representing the type to be set % Returns % 1. the SBML CompartmentVolumeRule structure with the new value for the type attribute % %=============================================================================================== % SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetCompartment(SBMLCompartmentVolumeRule) %=============================================================================================== % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % Returns % 1. the SBML CompartmentVolumeRule structure with the compartment attribute unset % %=========================================================================================== % SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetFormula(SBMLCompartmentVolumeRule) %=========================================================================================== % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % Returns % 1. the SBML CompartmentVolumeRule structure with the formula attribute unset % %======================================================================================== % SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetType(SBMLCompartmentVolumeRule) %======================================================================================== % Takes % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % Returns % 1. the SBML CompartmentVolumeRule structure with the type attribute unset % % ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_unsetType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000356511703262364032306 0ustar rootrootfunction SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetType(SBMLCompartmentVolumeRule) % SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetType(SBMLCompartmentVolumeRule) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % % Returns % % 1. the SBML CompartmentVolumeRule structure with the type attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'type') SBMLCompartmentVolumeRule.type = 'scalar'; else error('type not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_unsetFormula.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000360111703262364032275 0ustar rootrootfunction SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetFormula(SBMLCompartmentVolumeRule) % SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetFormula(SBMLCompartmentVolumeRule) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % % Returns % % 1. the SBML CompartmentVolumeRule structure with the formula attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'formula') SBMLCompartmentVolumeRule.formula = ''; else error('formula not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_unsetCompartment.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000363111703262364032300 0ustar rootrootfunction SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetCompartment(SBMLCompartmentVolumeRule) % SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetCompartment(SBMLCompartmentVolumeRule) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % % Returns % % 1. the SBML CompartmentVolumeRule structure with the compartment attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'compartment') SBMLCompartmentVolumeRule.compartment = ''; else error('compartment not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_setType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000400211703262364032271 0ustar rootrootfunction SBMLCompartmentVolumeRule = CompartmentVolumeRule_setType(SBMLCompartmentVolumeRule, type) % SBMLCompartmentVolumeRule = CompartmentVolumeRule_setType(SBMLCompartmentVolumeRule, type) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % 2. type; a string representing the type to be set % % Returns % % 1. the SBML CompartmentVolumeRule structure with the new value for the type attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'type') if ~ischar(type) error('type must be character array') ; else SBMLCompartmentVolumeRule.type = type; end; else error('type not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_setFormula.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000405111703262364032275 0ustar rootrootfunction SBMLCompartmentVolumeRule = CompartmentVolumeRule_setFormula(SBMLCompartmentVolumeRule, formula) % SBMLCompartmentVolumeRule = CompartmentVolumeRule_setFormula(SBMLCompartmentVolumeRule, formula) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % 2. formula; a string representing the formula to be set % % Returns % % 1. the SBML CompartmentVolumeRule structure with the new value for the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'formula') if ~ischar(formula) error('formula must be character array') ; else SBMLCompartmentVolumeRule.formula = formula; end; else error('formula not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_setCompartment.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000413511703262364032300 0ustar rootrootfunction SBMLCompartmentVolumeRule = CompartmentVolumeRule_setCompartment(SBMLCompartmentVolumeRule, compartment) % SBMLCompartmentVolumeRule = CompartmentVolumeRule_setCompartment(SBMLCompartmentVolumeRule, compartment) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % 2. compartment; a string representing the compartment to be set % % Returns % % 1. the SBML CompartmentVolumeRule structure with the new value for the compartment attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'compartment') if ~ischar(compartment) error('compartment must be character array') ; else SBMLCompartmentVolumeRule.compartment = compartment; end; else error('compartment not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_isSetType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000351311703262364032277 0ustar rootrootfunction value = CompartmentVolumeRule_isSetType(SBMLCompartmentVolumeRule) % value = CompartmentVolumeRule_isSetType(SBMLCompartmentVolumeRule) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % % Returns % % 1. value = % - 1 if the type attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'type') value = ~isempty(SBMLCompartmentVolumeRule.type); else error('type not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_isSetFormula.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000353511703262364032303 0ustar rootrootfunction value = CompartmentVolumeRule_isSetFormula(SBMLCompartmentVolumeRule) % value = CompartmentVolumeRule_isSetFormula(SBMLCompartmentVolumeRule) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % % Returns % % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'formula') value = ~isempty(SBMLCompartmentVolumeRule.formula); else error('formula not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_isSetCompartment.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000356511703262364032306 0ustar rootrootfunction value = CompartmentVolumeRule_isSetCompartment(SBMLCompartmentVolumeRule) % value = CompartmentVolumeRule_isSetCompartment(SBMLCompartmentVolumeRule) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % % Returns % % 1. value = % - 1 if the compartment attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'compartment') value = ~isempty(SBMLCompartmentVolumeRule.compartment); else error('compartment not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_getType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000343411703262364032301 0ustar rootrootfunction type = CompartmentVolumeRule_getType(SBMLCompartmentVolumeRule) % type = CompartmentVolumeRule_getType(SBMLCompartmentVolumeRule) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % % Returns % % 1. the value of the type attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'type') type = SBMLCompartmentVolumeRule.type; else error('type not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_getFormula.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000346711703262364032307 0ustar rootrootfunction formula = CompartmentVolumeRule_getFormula(SBMLCompartmentVolumeRule) % formula = CompartmentVolumeRule_getFormula(SBMLCompartmentVolumeRule) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % % Returns % % 1. the value of the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'formula') formula = SBMLCompartmentVolumeRule.formula; else error('formula not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_getCompartment.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000353311703262364032301 0ustar rootrootfunction compartment = CompartmentVolumeRule_getCompartment(SBMLCompartmentVolumeRule) % compartment = CompartmentVolumeRule_getCompartment(SBMLCompartmentVolumeRule) % % Takes % % 1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure % % Returns % % 1. the value of the compartment attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentVolumeRule); if isfield(SBMLCompartmentVolumeRule, 'compartment') compartment = SBMLCompartmentVolumeRule.compartment; else error('compartment not an attribute on SBML L%dV%d CompartmentVolumeRule', level, version); end; ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRule_create.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentVolumeRule/CompartmentVolumeRul0000644000000000000000000000566211703262364032306 0ustar rootrootfunction CompartmentVolumeRule = CompartmentVolumeRule_create(varargin) % CompartmentVolumeRule = CompartmentVolumeRule_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML CompartmentVolumeRule structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getCompartmentVolumeRuleFieldnames(level, version); if (num > 0) values = getCompartmentVolumeRuleDefaultValues(level, version); CompartmentVolumeRule = cell2struct(values, fieldnames, 2); %add level and version CompartmentVolumeRule.level = level; CompartmentVolumeRule.version = version; %check correct structure if ~isSBML_CompartmentVolumeRule(CompartmentVolumeRule, level, version) CompartmentVolumeRule = struct(); warning('Warn:BadStruct', 'Failed to create CompartmentVolumeRule'); end; else CompartmentVolumeRule = []; warning('Warn:InvalidLV', 'CompartmentVolumeRule not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/0000755000000000000000000000000011704572224025030 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/Contents.m0000644000000000000000000001657411703262354027017 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\CompartmentType % % The functions allow users to create and work with the SBML CompartmentType structure. % %=============================================================================== % CompartmentType = CompartmentType_create(level(optional), version(optional) ) %=============================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML CompartmentType structure of the appropriate level and version % %================================================= % id = CompartmentType_getId(SBMLCompartmentType) %================================================= % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. the value of the id attribute % %========================================================= % metaid = CompartmentType_getMetaid(SBMLCompartmentType) %========================================================= % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. the value of the metaid attribute % %===================================================== % name = CompartmentType_getName(SBMLCompartmentType) %===================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. the value of the name attribute % %=========================================================== % sboTerm = CompartmentType_getSBOTerm(SBMLCompartmentType) %=========================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. the value of the sboTerm attribute % %====================================================== % value = CompartmentType_isSetId(SBMLCompartmentType) %====================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %========================================================== % value = CompartmentType_isSetMetaid(SBMLCompartmentType) %========================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %======================================================== % value = CompartmentType_isSetName(SBMLCompartmentType) %======================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %=========================================================== % value = CompartmentType_isSetSBOTerm(SBMLCompartmentType) %=========================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %====================================================================== % SBMLCompartmentType = CompartmentType_setId(SBMLCompartmentType, id) %====================================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % 2. id; a string representing the id to be set % Returns % 1. the SBML CompartmentType structure with the new value for the id attribute % %============================================================================== % SBMLCompartmentType = CompartmentType_setMetaid(SBMLCompartmentType, metaid) %============================================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML CompartmentType structure with the new value for the metaid attribute % %========================================================================== % SBMLCompartmentType = CompartmentType_setName(SBMLCompartmentType, name) %========================================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % 2. name; a string representing the name to be set % Returns % 1. the SBML CompartmentType structure with the new value for the name attribute % %================================================================================ % SBMLCompartmentType = CompartmentType_setSBOTerm(SBMLCompartmentType, sboTerm) %================================================================================ % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML CompartmentType structure with the new value for the sboTerm attribute % %==================================================================== % SBMLCompartmentType = CompartmentType_unsetId(SBMLCompartmentType) %==================================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. the SBML CompartmentType structure with the id attribute unset % %======================================================================== % SBMLCompartmentType = CompartmentType_unsetMetaid(SBMLCompartmentType) %======================================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. the SBML CompartmentType structure with the metaid attribute unset % %====================================================================== % SBMLCompartmentType = CompartmentType_unsetName(SBMLCompartmentType) %====================================================================== % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. the SBML CompartmentType structure with the name attribute unset % %========================================================================= % SBMLCompartmentType = CompartmentType_unsetSBOTerm(SBMLCompartmentType) %========================================================================= % Takes % 1. SBMLCompartmentType, an SBML CompartmentType structure % Returns % 1. the SBML CompartmentType structure with the sboTerm attribute unset % % ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_unsetSBOTe0000644000000000000000000000346311703262354032166 0ustar rootrootfunction SBMLCompartmentType = CompartmentType_unsetSBOTerm(SBMLCompartmentType) % SBMLCompartmentType = CompartmentType_unsetSBOTerm(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. the SBML CompartmentType structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'sboTerm') SBMLCompartmentType.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d CompartmentType', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_unsetName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_unsetName.0000644000000000000000000000344111703262354032204 0ustar rootrootfunction SBMLCompartmentType = CompartmentType_unsetName(SBMLCompartmentType) % SBMLCompartmentType = CompartmentType_unsetName(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. the SBML CompartmentType structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'name') SBMLCompartmentType.name = ''; else error('name not an attribute on SBML L%dV%d CompartmentType', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_unsetMetai0000644000000000000000000000345511703262354032312 0ustar rootrootfunction SBMLCompartmentType = CompartmentType_unsetMetaid(SBMLCompartmentType) % SBMLCompartmentType = CompartmentType_unsetMetaid(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. the SBML CompartmentType structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'metaid') SBMLCompartmentType.metaid = ''; else error('metaid not an attribute on SBML L%dV%d CompartmentType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_unsetId.m0000644000000000000000000000342511703262354032037 0ustar rootrootfunction SBMLCompartmentType = CompartmentType_unsetId(SBMLCompartmentType) % SBMLCompartmentType = CompartmentType_unsetId(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. the SBML CompartmentType structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'id') SBMLCompartmentType.id = ''; else error('id not an attribute on SBML L%dV%d CompartmentType', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_setSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_setSBOTerm0000644000000000000000000000374211703262354032162 0ustar rootrootfunction SBMLCompartmentType = CompartmentType_setSBOTerm(SBMLCompartmentType, sboTerm) % SBMLCompartmentType = CompartmentType_setSBOTerm(SBMLCompartmentType, sboTerm) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML CompartmentType structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLCompartmentType.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d CompartmentType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_setName.m0000644000000000000000000000366411703262354032025 0ustar rootrootfunction SBMLCompartmentType = CompartmentType_setName(SBMLCompartmentType, name) % SBMLCompartmentType = CompartmentType_setName(SBMLCompartmentType, name) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML CompartmentType structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'name') if ~ischar(name) error('name must be character array') ; else SBMLCompartmentType.name = name; end; else error('name not an attribute on SBML L%dV%d CompartmentType', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_setMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_setMetaid.0000644000000000000000000000371611703262354032171 0ustar rootrootfunction SBMLCompartmentType = CompartmentType_setMetaid(SBMLCompartmentType, metaid) % SBMLCompartmentType = CompartmentType_setMetaid(SBMLCompartmentType, metaid) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML CompartmentType structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLCompartmentType.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d CompartmentType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_setId.m0000644000000000000000000000363211703262354031474 0ustar rootrootfunction SBMLCompartmentType = CompartmentType_setId(SBMLCompartmentType, id) % SBMLCompartmentType = CompartmentType_setId(SBMLCompartmentType, id) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML CompartmentType structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'id') if ~ischar(id) error('id must be character array') ; else SBMLCompartmentType.id = id; end; else error('id not an attribute on SBML L%dV%d CompartmentType', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_isSetSBOTe0000644000000000000000000000343511703262354032116 0ustar rootrootfunction value = CompartmentType_isSetSBOTerm(SBMLCompartmentType) % value = CompartmentType_isSetSBOTerm(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'sboTerm') value = (SBMLCompartmentType.sboTerm > 0); else error('sboTerm not an attribute on SBML L%dV%d CompartmentType', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_isSetName.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_isSetName.0000644000000000000000000000341711703262354032140 0ustar rootrootfunction value = CompartmentType_isSetName(SBMLCompartmentType) % value = CompartmentType_isSetName(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'name') value = ~isempty(SBMLCompartmentType.name); else error('name not an attribute on SBML L%dV%d CompartmentType', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_isSetMetai0000644000000000000000000000343311703262354032237 0ustar rootrootfunction value = CompartmentType_isSetMetaid(SBMLCompartmentType) % value = CompartmentType_isSetMetaid(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'metaid') value = ~isempty(SBMLCompartmentType.metaid); else error('metaid not an attribute on SBML L%dV%d CompartmentType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_isSetId.m0000644000000000000000000000340311703262354031764 0ustar rootrootfunction value = CompartmentType_isSetId(SBMLCompartmentType) % value = CompartmentType_isSetId(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'id') value = ~isempty(SBMLCompartmentType.id); else error('id not an attribute on SBML L%dV%d CompartmentType', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_getSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_getSBOTerm0000644000000000000000000000337311703262354032146 0ustar rootrootfunction sboTerm = CompartmentType_getSBOTerm(SBMLCompartmentType) % sboTerm = CompartmentType_getSBOTerm(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'sboTerm') sboTerm = SBMLCompartmentType.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d CompartmentType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_getName.m0000644000000000000000000000334011703262354032000 0ustar rootrootfunction name = CompartmentType_getName(SBMLCompartmentType) % name = CompartmentType_getName(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'name') name = SBMLCompartmentType.name; else error('name not an attribute on SBML L%dV%d CompartmentType', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_getMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_getMetaid.0000644000000000000000000000336211703262354032152 0ustar rootrootfunction metaid = CompartmentType_getMetaid(SBMLCompartmentType) % metaid = CompartmentType_getMetaid(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'metaid') metaid = SBMLCompartmentType.metaid; else error('metaid not an attribute on SBML L%dV%d CompartmentType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_getId.m0000644000000000000000000000331611703262354031457 0ustar rootrootfunction id = CompartmentType_getId(SBMLCompartmentType) % id = CompartmentType_getId(SBMLCompartmentType) % % Takes % % 1. SBMLCompartmentType, an SBML CompartmentType structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartmentType); if isfield(SBMLCompartmentType, 'id') id = SBMLCompartmentType.id; else error('id not an attribute on SBML L%dV%d CompartmentType', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/CompartmentType/CompartmentType_create.m0000644000000000000000000000552211703262354031667 0ustar rootrootfunction CompartmentType = CompartmentType_create(varargin) % CompartmentType = CompartmentType_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML CompartmentType structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getCompartmentTypeFieldnames(level, version); if (num > 0) values = getCompartmentTypeDefaultValues(level, version); CompartmentType = cell2struct(values, fieldnames, 2); %add level and version CompartmentType.level = level; CompartmentType.version = version; %check correct structure if ~isSBML_CompartmentType(CompartmentType, level, version) CompartmentType = struct(); warning('Warn:BadStruct', 'Failed to create CompartmentType'); end; else CompartmentType = []; warning('Warn:InvalidLV', 'CompartmentType not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/0000755000000000000000000000000011704572224024166 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Contents.m0000644000000000000000000005064011703262324026142 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\Compartment % % The functions allow users to create and work with the SBML Compartment structure. % %======================================================================= % Compartment = Compartment_create(level(optional), version(optional) ) %======================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML Compartment structure of the appropriate level and version % %=================================================================== % compartmentType = Compartment_getCompartmentType(SBMLCompartment) %=================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the compartmentType attribute % %===================================================== % constant = Compartment_getConstant(SBMLCompartment) %===================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the constant attribute % %========================================= % id = Compartment_getId(SBMLCompartment) %========================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the id attribute % %================================================= % metaid = Compartment_getMetaid(SBMLCompartment) %================================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the metaid attribute % %============================================= % name = Compartment_getName(SBMLCompartment) %============================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the name attribute % %=================================================== % outside = Compartment_getOutside(SBMLCompartment) %=================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the outside attribute % %=================================================== % sboTerm = Compartment_getSBOTerm(SBMLCompartment) %=================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the sboTerm attribute % %============================================= % size = Compartment_getSize(SBMLCompartment) %============================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the size attribute % %======================================================================= % spatialDimensions = Compartment_getSpatialDimensions(SBMLCompartment) %======================================================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the spatialDimensions attribute % %=============================================== % units = Compartment_getUnits(SBMLCompartment) %=============================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the units attribute % %================================================= % volume = Compartment_getVolume(SBMLCompartment) %================================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the value of the volume attribute % %================================================================== % y = Compartment_isAssignedByRateRule(SBMLCompartment, SBMLRules) %================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - the index of the rateRule used to assigned value to the Compartment % - 0 if the Compartment is not assigned by rateRule % % %============================================================== % y = Compartment_isAssignedByRule(SBMLCompartment, SBMLRules) %============================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - the index of the assignmentRule used to assigned value to the Compartment % - 0 if the Compartment is not assigned by assignmentRule % % %=============================================================== % y = Compartment_isInAlgebraicRule(SBMLCompartment, SBMLRules) %=============================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. SBMLRules; the array of rules from an SBML Model structure % Returns % y = % - an array of the indices of any algebraicRules the id of the Compartment appears in % - 0 if the Compartment appears in no algebraicRules % % %=========================================================== % value = Compartment_isSetCompartmentType(SBMLCompartment) %=========================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. value = % - 1 if the compartmentType attribute is set % - 0 otherwise % %============================================== % value = Compartment_isSetId(SBMLCompartment) %============================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. value = % - 1 if the id attribute is set % - 0 otherwise % %================================================== % value = Compartment_isSetMetaid(SBMLCompartment) %================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %================================================ % value = Compartment_isSetName(SBMLCompartment) %================================================ % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. value = % - 1 if the name attribute is set % - 0 otherwise % %=================================================== % value = Compartment_isSetOutside(SBMLCompartment) %=================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. value = % - 1 if the outside attribute is set % - 0 otherwise % %=================================================== % value = Compartment_isSetSBOTerm(SBMLCompartment) %=================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %================================================ % value = Compartment_isSetSize(SBMLCompartment) %================================================ % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. value = % - 1 if the size attribute is set % - 0 otherwise % %============================================================= % value = Compartment_isSetSpatialDimensions(SBMLCompartment) %============================================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. value = % - 1 if the spatialDimensions attribute is set % - 0 otherwise % %================================================= % value = Compartment_isSetUnits(SBMLCompartment) %================================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. value = % - 1 if the units attribute is set % - 0 otherwise % %================================================== % value = Compartment_isSetVolume(SBMLCompartment) %================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. value = % - 1 if the volume attribute is set % - 0 otherwise % %==================================================================================== % SBMLCompartment = Compartment_setCompartmentType(SBMLCompartment, compartmentType) %==================================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. compartmentType; a string representing the compartmentType to be set % Returns % 1. the SBML Compartment structure with the new value for the compartmentType attribute % %====================================================================== % SBMLCompartment = Compartment_setConstant(SBMLCompartment, constant) %====================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. constant, an integer (0/1) representing the value of constant to be set % Returns % 1. the SBML Compartment structure with the new value for the constant attribute % %========================================================== % SBMLCompartment = Compartment_setId(SBMLCompartment, id) %========================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. id; a string representing the id to be set % Returns % 1. the SBML Compartment structure with the new value for the id attribute % %================================================================== % SBMLCompartment = Compartment_setMetaid(SBMLCompartment, metaid) %================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML Compartment structure with the new value for the metaid attribute % %============================================================== % SBMLCompartment = Compartment_setName(SBMLCompartment, name) %============================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. name; a string representing the name to be set % Returns % 1. the SBML Compartment structure with the new value for the name attribute % %==================================================================== % SBMLCompartment = Compartment_setOutside(SBMLCompartment, outside) %==================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. outside; a string representing the outside to be set % Returns % 1. the SBML Compartment structure with the new value for the outside attribute % %==================================================================== % SBMLCompartment = Compartment_setSBOTerm(SBMLCompartment, sboTerm) %==================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML Compartment structure with the new value for the sboTerm attribute % %============================================================== % SBMLCompartment = Compartment_setSize(SBMLCompartment, size) %============================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. size; number representing the value of size to be set % Returns % 1. the SBML Compartment structure with the new value for the size attribute % %======================================================================================== % SBMLCompartment = Compartment_setSpatialDimensions(SBMLCompartment, spatialDimensions) %======================================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. spatialDimensions; number representing the value of spatialDimensions to be set % Returns % 1. the SBML Compartment structure with the new value for the spatialDimensions attribute % %================================================================ % SBMLCompartment = Compartment_setUnits(SBMLCompartment, units) %================================================================ % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. units; a string representing the units to be set % Returns % 1. the SBML Compartment structure with the new value for the units attribute % %================================================================== % SBMLCompartment = Compartment_setVolume(SBMLCompartment, volume) %================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % 2. volume; number representing the value of volume to be set % Returns % 1. the SBML Compartment structure with the new value for the volume attribute % %===================================================================== % SBMLCompartment = Compartment_unsetCompartmentType(SBMLCompartment) %===================================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Compartment structure with the compartmentType attribute unset % %======================================================== % SBMLCompartment = Compartment_unsetId(SBMLCompartment) %======================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Compartment structure with the id attribute unset % %============================================================ % SBMLCompartment = Compartment_unsetMetaid(SBMLCompartment) %============================================================ % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Compartment structure with the metaid attribute unset % %========================================================== % SBMLCompartment = Compartment_unsetName(SBMLCompartment) %========================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Compartment structure with the name attribute unset % %============================================================= % SBMLCompartment = Compartment_unsetOutside(SBMLCompartment) %============================================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Compartment structure with the outside attribute unset % %============================================================= % SBMLCompartment = Compartment_unsetSBOTerm(SBMLCompartment) %============================================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Compartment structure with the sboTerm attribute unset % %========================================================== % SBMLCompartment = Compartment_unsetSize(SBMLCompartment) %========================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Compartment structure with the size attribute unset % %======================================================================= % SBMLCompartment = Compartment_unsetSpatialDimensions(SBMLCompartment) %======================================================================= % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Compartment structure with the spatialDimensions attribute unset % %=========================================================== % SBMLCompartment = Compartment_unsetUnits(SBMLCompartment) %=========================================================== % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Compartment structure with the units attribute unset % %============================================================ % SBMLCompartment = Compartment_unsetVolume(SBMLCompartment) %============================================================ % Takes % 1. SBMLCompartment, an SBML Compartment structure % Returns % 1. the SBML Compartment structure with the volume attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetVolume.m0000644000000000000000000000365111703262324031244 0ustar rootrootfunction SBMLCompartment = Compartment_unsetVolume(SBMLCompartment) % SBMLCompartment = Compartment_unsetVolume(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Compartment structure with the volume attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'volume') if level == 1 SBMLCompartment.volume = 1; else SBMLCompartment.volume = NaN; end; if (isfield(SBMLCompartment, 'isSetVolume')) SBMLCompartment.isSetVolume = 0; end; else error('volume not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetUnits.m0000644000000000000000000000340711703262324031076 0ustar rootrootfunction SBMLCompartment = Compartment_unsetUnits(SBMLCompartment) % SBMLCompartment = Compartment_unsetUnits(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Compartment structure with the units attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'units') SBMLCompartment.units = ''; else error('units not an attribute on SBML L%dV%d Compartment', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetSpatialDimensions.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetSpatialDimens0000644000000000000000000000401611703262324032273 0ustar rootrootfunction SBMLCompartment = Compartment_unsetSpatialDimensions(SBMLCompartment) % SBMLCompartment = Compartment_unsetSpatialDimensions(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Compartment structure with the spatialDimensions attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'spatialDimensions') if (level > 2) SBMLCompartment.spatialDimensions = NaN; else SBMLCompartment.spatialDimensions = 3; end; if (isfield(SBMLCompartment, 'isSetSpatialDimensions')) SBMLCompartment.isSetSpatialDimensions = 0; end; else error('spatialDimensions not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetSize.m0000644000000000000000000000353711703262324030712 0ustar rootrootfunction SBMLCompartment = Compartment_unsetSize(SBMLCompartment) % SBMLCompartment = Compartment_unsetSize(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Compartment structure with the size attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'size') SBMLCompartment.size = NaN; if (isfield(SBMLCompartment, 'isSetSize')) SBMLCompartment.isSetSize = 0; end; else error('size not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetSBOTerm.m0000644000000000000000000000342311703262324031245 0ustar rootrootfunction SBMLCompartment = Compartment_unsetSBOTerm(SBMLCompartment) % SBMLCompartment = Compartment_unsetSBOTerm(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Compartment structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'sboTerm') SBMLCompartment.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetOutside.m0000644000000000000000000000342311703262324031406 0ustar rootrootfunction SBMLCompartment = Compartment_unsetOutside(SBMLCompartment) % SBMLCompartment = Compartment_unsetOutside(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Compartment structure with the outside attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'outside') SBMLCompartment.outside = ''; else error('outside not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetName.m0000644000000000000000000000340111703262324030646 0ustar rootrootfunction SBMLCompartment = Compartment_unsetName(SBMLCompartment) % SBMLCompartment = Compartment_unsetName(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Compartment structure with the name attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'name') SBMLCompartment.name = ''; else error('name not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetMetaid.m0000644000000000000000000000341511703262324031176 0ustar rootrootfunction SBMLCompartment = Compartment_unsetMetaid(SBMLCompartment) % SBMLCompartment = Compartment_unsetMetaid(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Compartment structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'metaid') SBMLCompartment.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetId.m0000644000000000000000000000336511703262324030333 0ustar rootrootfunction SBMLCompartment = Compartment_unsetId(SBMLCompartment) % SBMLCompartment = Compartment_unsetId(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Compartment structure with the id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'id') SBMLCompartment.id = ''; else error('id not an attribute on SBML L%dV%d Compartment', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetCompartmentType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_unsetCompartmentTy0000644000000000000000000000350311703262324032344 0ustar rootrootfunction SBMLCompartment = Compartment_unsetCompartmentType(SBMLCompartment) % SBMLCompartment = Compartment_unsetCompartmentType(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the SBML Compartment structure with the compartmentType attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'compartmentType') SBMLCompartment.compartmentType = ''; else error('compartmentType not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setVolume.m0000644000000000000000000000402111703262324030671 0ustar rootrootfunction SBMLCompartment = Compartment_setVolume(SBMLCompartment, volume) % SBMLCompartment = Compartment_setVolume(SBMLCompartment, volume) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. volume; number representing the value of volume to be set % % Returns % % 1. the SBML Compartment structure with the new value for the volume attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'volume') if ~isnumeric(volume) error('volume must be numeric') ; else SBMLCompartment.volume = volume; if (isfield(SBMLCompartment, 'isSetVolume')) SBMLCompartment.isSetVolume = 1; end; end; else error('volume not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setUnits.m0000644000000000000000000000364111703262324030533 0ustar rootrootfunction SBMLCompartment = Compartment_setUnits(SBMLCompartment, units) % SBMLCompartment = Compartment_setUnits(SBMLCompartment, units) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. units; a string representing the units to be set % % Returns % % 1. the SBML Compartment structure with the new value for the units attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'units') if ~ischar(units) error('units must be character array') ; else SBMLCompartment.units = units; end; else error('units not an attribute on SBML L%dV%d Compartment', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setSpatialDimensions.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setSpatialDimensio0000644000000000000000000000460511703262324032264 0ustar rootrootfunction SBMLCompartment = Compartment_setSpatialDimensions(SBMLCompartment, spatialDimensions) % SBMLCompartment = Compartment_setSpatialDimensions(SBMLCompartment, spatialDimensions) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. spatialDimensions; number representing the value of spatialDimensions to be set % % Returns % % 1. the SBML Compartment structure with the new value for the spatialDimensions attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'spatialDimensions') if (level > 2 && ~isnumeric(spatialDimensions)) error('spatialDimensions must be numeric') ; elseif (level < 3 && (~isIntegralNumber(spatialDimensions) ... || spatialDimensions < 0 || spatialDimensions > 3)) error('spatialDimensions must be integer values 0, 1, 2, or 3'); else SBMLCompartment.spatialDimensions = spatialDimensions; if (isfield(SBMLCompartment, 'isSetSpatialDimensions')) SBMLCompartment.isSetSpatialDimensions = 1; end; end; else error('spatialDimensions not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setSize.m0000644000000000000000000000376311703262324030350 0ustar rootrootfunction SBMLCompartment = Compartment_setSize(SBMLCompartment, size) % SBMLCompartment = Compartment_setSize(SBMLCompartment, size) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. size; number representing the value of size to be set % % Returns % % 1. the SBML Compartment structure with the new value for the size attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'size') if ~isnumeric(size) error('size must be numeric') ; else SBMLCompartment.size = size; if (isfield(SBMLCompartment, 'isSetSize')) SBMLCompartment.isSetSize = 1; end; end; else error('size not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setSBOTerm.m0000644000000000000000000000370211703262324030702 0ustar rootrootfunction SBMLCompartment = Compartment_setSBOTerm(SBMLCompartment, sboTerm) % SBMLCompartment = Compartment_setSBOTerm(SBMLCompartment, sboTerm) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML Compartment structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLCompartment.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setOutside.m0000644000000000000000000000367311703262324031052 0ustar rootrootfunction SBMLCompartment = Compartment_setOutside(SBMLCompartment, outside) % SBMLCompartment = Compartment_setOutside(SBMLCompartment, outside) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. outside; a string representing the outside to be set % % Returns % % 1. the SBML Compartment structure with the new value for the outside attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'outside') if ~ischar(outside) error('outside must be character array') ; else SBMLCompartment.outside = outside; end; else error('outside not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setName.m0000644000000000000000000000362411703262324030312 0ustar rootrootfunction SBMLCompartment = Compartment_setName(SBMLCompartment, name) % SBMLCompartment = Compartment_setName(SBMLCompartment, name) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. name; a string representing the name to be set % % Returns % % 1. the SBML Compartment structure with the new value for the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'name') if ~ischar(name) error('name must be character array') ; else SBMLCompartment.name = name; end; else error('name not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setMetaid.m0000644000000000000000000000365611703262324030642 0ustar rootrootfunction SBMLCompartment = Compartment_setMetaid(SBMLCompartment, metaid) % SBMLCompartment = Compartment_setMetaid(SBMLCompartment, metaid) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML Compartment structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLCompartment.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setId.m0000644000000000000000000000357211703262324027770 0ustar rootrootfunction SBMLCompartment = Compartment_setId(SBMLCompartment, id) % SBMLCompartment = Compartment_setId(SBMLCompartment, id) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. id; a string representing the id to be set % % Returns % % 1. the SBML Compartment structure with the new value for the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'id') if ~ischar(id) error('id must be character array') ; else SBMLCompartment.id = id; end; else error('id not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setConstant.m0000644000000000000000000000401511703262324031216 0ustar rootrootfunction SBMLCompartment = Compartment_setConstant(SBMLCompartment, constant) % SBMLCompartment = Compartment_setConstant(SBMLCompartment, constant) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. constant, an integer (0/1) representing the value of constant to be set % % Returns % % 1. the SBML Compartment structure with the new value for the constant attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'constant') if (~isIntegralNumber(constant) || constant < 0 || constant > 1) error('constant must be an integer of value 0/1') ; else SBMLCompartment.constant = constant; end; else error('constant not an attribute on SBML L%dV%d Compartment', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setCompartmentType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_setCompartmentType0000644000000000000000000000404311703262324032326 0ustar rootrootfunction SBMLCompartment = Compartment_setCompartmentType(SBMLCompartment, compartmentType) % SBMLCompartment = Compartment_setCompartmentType(SBMLCompartment, compartmentType) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. compartmentType; a string representing the compartmentType to be set % % Returns % % 1. the SBML Compartment structure with the new value for the compartmentType attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'compartmentType') if ~ischar(compartmentType) error('compartmentType must be character array') ; else SBMLCompartment.compartmentType = compartmentType; end; else error('compartmentType not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetVolume.m0000644000000000000000000000340711703262324031174 0ustar rootrootfunction value = Compartment_isSetVolume(SBMLCompartment) % value = Compartment_isSetVolume(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. value = % - 1 if the volume attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'volume') value = SBMLCompartment.isSetVolume; else error('isSetVolume not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetUnits.m0000644000000000000000000000340111703262324031021 0ustar rootrootfunction value = Compartment_isSetUnits(SBMLCompartment) % value = Compartment_isSetUnits(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. value = % - 1 if the units attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'units') value = ~isempty(SBMLCompartment.units); else error('units not an attribute on SBML L%dV%d Compartment', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetSpatialDimensions.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetSpatialDimens0000644000000000000000000000356511703262324032234 0ustar rootrootfunction value = Compartment_isSetSpatialDimensions(SBMLCompartment) % value = Compartment_isSetSpatialDimensions(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. value = % - 1 if the spatialDimensions attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'spatialDimensions') if (level < 3) value = 1; else value = SBMLCompartment.isSetSpatialDimensions; end; else error('spatialDimensions not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetSize.m0000644000000000000000000000337311703262324030641 0ustar rootrootfunction value = Compartment_isSetSize(SBMLCompartment) % value = Compartment_isSetSize(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. value = % - 1 if the size attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'size') value = SBMLCompartment.isSetSize; else error('isSetSize not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetSBOTerm.m0000644000000000000000000000341111703262324031173 0ustar rootrootfunction value = Compartment_isSetSBOTerm(SBMLCompartment) % value = Compartment_isSetSBOTerm(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'sboTerm') value = (SBMLCompartment.sboTerm > 0); else error('sboTerm not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetOutside.m0000644000000000000000000000341511703262324031340 0ustar rootrootfunction value = Compartment_isSetOutside(SBMLCompartment) % value = Compartment_isSetOutside(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. value = % - 1 if the outside attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'outside') value = ~isempty(SBMLCompartment.outside); else error('outside not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetName.m0000644000000000000000000000337311703262324030607 0ustar rootrootfunction value = Compartment_isSetName(SBMLCompartment) % value = Compartment_isSetName(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. value = % - 1 if the name attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'name') value = ~isempty(SBMLCompartment.name); else error('name not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetMetaid.m0000644000000000000000000000340711703262324031130 0ustar rootrootfunction value = Compartment_isSetMetaid(SBMLCompartment) % value = Compartment_isSetMetaid(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'metaid') value = ~isempty(SBMLCompartment.metaid); else error('metaid not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetId.m0000644000000000000000000000335711703262324030265 0ustar rootrootfunction value = Compartment_isSetId(SBMLCompartment) % value = Compartment_isSetId(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. value = % - 1 if the id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'id') value = ~isempty(SBMLCompartment.id); else error('id not an attribute on SBML L%dV%d Compartment', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetCompartmentType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isSetCompartmentTy0000644000000000000000000000347511703262324032305 0ustar rootrootfunction value = Compartment_isSetCompartmentType(SBMLCompartment) % value = Compartment_isSetCompartmentType(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. value = % - 1 if the compartmentType attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'compartmentType') value = ~isempty(SBMLCompartment.compartmentType); else error('compartmentType not an attribute on SBML L%dV%d Compartment', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isInAlgebraicRule.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isInAlgebraicRule.0000644000000000000000000000625311703262324032066 0ustar rootrootfunction y = Compartment_isInAlgebraicRule(SBMLCompartment, SBMLRules) % y = Compartment_isInAlgebraicRule(SBMLCompartment, SBMLRules) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - an array of the indices of any algebraicRules the id of the Compartment appears in % - 0 if the Compartment appears in no algebraicRules % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLCompartment)) error(sprintf('%s', ... 'argument must be an SBML Compartment structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLCompartment); if (~isSBML_Compartment(SBMLCompartment, sbmlLevel, sbmlVersion)) error('Compartment_isInAlgebraicRule(SBMLCompartment, SBMLRules)\n%s', ... 'first argument must be an SBMLCompartment structure'); end; NumRules = length(SBMLRules); if (NumRules < 1) error('Compartment_isInAlgebraicRule(SBMLCompartment, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('Compartment_isInAlgebraicRule(SBMLCompartment, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the Compartment occurs %determine the name or id of the Compartment if (sbmlLevel == 1) name = SBMLCompartment.name; else if (isempty(SBMLCompartment.id)) name = SBMLCompartment.name; else name = SBMLCompartment.id; end; end; y = []; for i = 1:NumRules index = matchName(SBMLRules(i).formula, name); if (~isempty(index) && strcmp(SBMLRules(i).typecode, 'SBML_ALGEBRAIC_RULE')) y = [y;i]; end; end; if isempty(y) y = 0; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isAssignedByRule.m0000644000000000000000000000667011703262324032136 0ustar rootrootfunction y = Compartment_isAssignedByRule(SBMLCompartment, SBMLRules) % y = Compartment_isAssignedByRule(SBMLCompartment, SBMLRules) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - the index of the assignmentRule used to assigned value to the Compartment % - 0 if the Compartment is not assigned by assignmentRule % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLCompartment)) error(sprintf('%s', ... 'argument must be an SBML Compartment structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLCompartment); if (~isSBML_Compartment(SBMLCompartment, sbmlLevel, sbmlVersion)) error('Compartment_isAssignedByRule(SBMLCompartment, SBMLRules)\n%s', ... 'first argument must be an SBMLCompartment structure'); end; NumRules = length(SBMLRules); if (NumRules < 1) error('Compartment_isAssignedByRule(SBMLCompartment, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('Compartment_isAssignedByRule(SBMLCompartment, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the species is assigned by it %determine the name or id of the species if (sbmlLevel == 1) name = SBMLCompartment.name; else if (isempty(SBMLCompartment.id)) name = SBMLCompartment.name; else name = SBMLCompartment.id; end; end; for i = 1:NumRules if (strcmp(SBMLRules(i).typecode, 'SBML_ASSIGNMENT_RULE')) if (strcmp(SBMLRules(i).variable, name)) % once found return as cannot occur more than once y = i; return; end; elseif ((strcmp(SBMLRules(i).typecode, 'SBML_COMPARTMENT_VOLUME_RULE')) ... && (strcmp(SBMLRules(i).type, 'scalar'))) if (strcmp(SBMLRules(i).compartment, name)) y = i; return; end; end; end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isAssignedByRateRule.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_isAssignedByRateRu0000644000000000000000000000670011703262324032170 0ustar rootrootfunction y = Compartment_isAssignedByRateRule(SBMLCompartment, SBMLRules) % y = Compartment_isAssignedByRateRule(SBMLCompartment, SBMLRules) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % 2. SBMLRules; the array of rules from an SBML Model structure % % Returns % % y = % - the index of the rateRule used to assigned value to the Compartment % - 0 if the Compartment is not assigned by rateRule % % y = 0; %------------------------------------------------------------------- % check input arguments are as expected if (~isstruct(SBMLCompartment)) error(sprintf('%s', ... 'argument must be an SBML Compartment structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLCompartment); if (~isSBML_Compartment(SBMLCompartment, sbmlLevel, sbmlVersion)) error('Compartment_isAssignedByRateRule(SBMLCompartment, SBMLRules)\n%s', ... 'first argument must be an SBMLCompartment structure'); end; NumRules = length(SBMLRules); if (NumRules < 1) error('Compartment_isAssignedByRateRule(SBMLCompartment, SBMLRules)\n%s', ... 'SBMLRule structure is empty'); else for i = 1:NumRules if (~isSBML_Rule(SBMLRules(i), sbmlLevel, sbmlVersion)) error('Compartment_isAssignedByRateRule(SBMLCompartment, SBMLRules)\n%s', ... 'second argument must be an array of SBMLRule structures'); end; end; end; %-------------------------------------------------------------------------- % loop through each rule and check whether the Compartment is assigned by it %determine the name or id of the Compartment if (sbmlLevel == 1) name = SBMLCompartment.name; else if (isempty(SBMLCompartment.id)) name = SBMLCompartment.name; else name = SBMLCompartment.id; end; end; for i = 1:NumRules if (strcmp(SBMLRules(i).typecode, 'SBML_RATE_RULE')) if (strcmp(SBMLRules(i).variable, name)) % once found return as cannot occur more than once y = i; return; end; elseif ((strcmp(SBMLRules(i).typecode, 'SBML_COMPARTMENT_VOLUME_RULE')) ... && (strcmp(SBMLRules(i).type, 'rate'))) if (strcmp(SBMLRules(i).Compartment, name)) y = i; return; end; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getVolume.m0000644000000000000000000000334611703262324030666 0ustar rootrootfunction volume = Compartment_getVolume(SBMLCompartment) % volume = Compartment_getVolume(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the volume attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'volume') volume = SBMLCompartment.volume; else error('volume not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getUnits.m0000644000000000000000000000333511703262324030517 0ustar rootrootfunction units = Compartment_getUnits(SBMLCompartment) % units = Compartment_getUnits(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the units attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'units') units = SBMLCompartment.units; else error('units not an attribute on SBML L%dV%d Compartment', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getSpatialDimensions.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getSpatialDimensio0000644000000000000000000000351111703262324032243 0ustar rootrootfunction spatialDimensions = Compartment_getSpatialDimensions(SBMLCompartment) % spatialDimensions = Compartment_getSpatialDimensions(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the spatialDimensions attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'spatialDimensions') spatialDimensions = SBMLCompartment.spatialDimensions; else error('spatialDimensions not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getSize.m0000644000000000000000000000332411703262324030325 0ustar rootrootfunction size = Compartment_getSize(SBMLCompartment) % size = Compartment_getSize(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the size attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'size') size = SBMLCompartment.size; else error('size not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getSBOTerm.m0000644000000000000000000000335711703262324030674 0ustar rootrootfunction sboTerm = Compartment_getSBOTerm(SBMLCompartment) % sboTerm = Compartment_getSBOTerm(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'sboTerm') sboTerm = SBMLCompartment.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getOutside.m0000644000000000000000000000335711703262324031035 0ustar rootrootfunction outside = Compartment_getOutside(SBMLCompartment) % outside = Compartment_getOutside(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the outside attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'outside') outside = SBMLCompartment.outside; else error('outside not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getName.m0000644000000000000000000000332411703262324030273 0ustar rootrootfunction name = Compartment_getName(SBMLCompartment) % name = Compartment_getName(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the name attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'name') name = SBMLCompartment.name; else error('name not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getMetaid.m0000644000000000000000000000334611703262324030622 0ustar rootrootfunction metaid = Compartment_getMetaid(SBMLCompartment) % metaid = Compartment_getMetaid(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'metaid') metaid = SBMLCompartment.metaid; else error('metaid not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getId.m0000644000000000000000000000330211703262324027743 0ustar rootrootfunction id = Compartment_getId(SBMLCompartment) % id = Compartment_getId(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'id') id = SBMLCompartment.id; else error('id not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getConstant.m0000644000000000000000000000337011703262324031205 0ustar rootrootfunction constant = Compartment_getConstant(SBMLCompartment) % constant = Compartment_getConstant(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the constant attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'constant') constant = SBMLCompartment.constant; else error('constant not an attribute on SBML L%dV%d Compartment', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getCompartmentType.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_getCompartmentType0000644000000000000000000000346711703262324032323 0ustar rootrootfunction compartmentType = Compartment_getCompartmentType(SBMLCompartment) % compartmentType = Compartment_getCompartmentType(SBMLCompartment) % % Takes % % 1. SBMLCompartment, an SBML Compartment structure % % Returns % % 1. the value of the compartmentType attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLCompartment); if isfield(SBMLCompartment, 'compartmentType') compartmentType = SBMLCompartment.compartmentType; else error('compartmentType not an attribute on SBML L%dV%d Compartment', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/Compartment/Compartment_create.m0000644000000000000000000000545611703262324030166 0ustar rootrootfunction Compartment = Compartment_create(varargin) % Compartment = Compartment_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML Compartment structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getCompartmentFieldnames(level, version); if (num > 0) values = getCompartmentDefaultValues(level, version); Compartment = cell2struct(values, fieldnames, 2); %add level and version Compartment.level = level; Compartment.version = version; %check correct structure if ~isSBML_Compartment(Compartment, level, version) Compartment = struct(); warning('Warn:BadStruct', 'Failed to create Compartment'); end; else Compartment = []; warning('Warn:InvalidLV', 'Compartment not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/0000755000000000000000000000000011704572222024633 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/Contents.m0000644000000000000000000001665311703262360026617 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\AssignmentRule % % The functions allow users to create and work with the SBML AssignmentRule structure. % %============================================================================= % AssignmentRule = AssignmentRule_create(level(optional), version(optional) ) %============================================================================= % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML AssignmentRule structure of the appropriate level and version % %========================================================= % formula = AssignmentRule_getFormula(SBMLAssignmentRule) %========================================================= % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. the value of the formula attribute % %======================================================= % metaid = AssignmentRule_getMetaid(SBMLAssignmentRule) %======================================================= % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. the value of the metaid attribute % %========================================================= % sboTerm = AssignmentRule_getSBOTerm(SBMLAssignmentRule) %========================================================= % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. the value of the sboTerm attribute % %=========================================================== % variable = AssignmentRule_getVariable(SBMLAssignmentRule) %=========================================================== % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. the value of the variable attribute % %========================================================= % value = AssignmentRule_isSetFormula(SBMLAssignmentRule) %========================================================= % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % %======================================================== % value = AssignmentRule_isSetMetaid(SBMLAssignmentRule) %======================================================== % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %========================================================= % value = AssignmentRule_isSetSBOTerm(SBMLAssignmentRule) %========================================================= % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %========================================================== % value = AssignmentRule_isSetVariable(SBMLAssignmentRule) %========================================================== % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. value = % - 1 if the variable attribute is set % - 0 otherwise % %============================================================================= % SBMLAssignmentRule = AssignmentRule_setFormula(SBMLAssignmentRule, formula) %============================================================================= % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % 2. formula; a string representing the formula to be set % Returns % 1. the SBML AssignmentRule structure with the new value for the formula attribute % %=========================================================================== % SBMLAssignmentRule = AssignmentRule_setMetaid(SBMLAssignmentRule, metaid) %=========================================================================== % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML AssignmentRule structure with the new value for the metaid attribute % %============================================================================= % SBMLAssignmentRule = AssignmentRule_setSBOTerm(SBMLAssignmentRule, sboTerm) %============================================================================= % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML AssignmentRule structure with the new value for the sboTerm attribute % %=============================================================================== % SBMLAssignmentRule = AssignmentRule_setVariable(SBMLAssignmentRule, variable) %=============================================================================== % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % 2. variable; a string representing the variable to be set % Returns % 1. the SBML AssignmentRule structure with the new value for the variable attribute % %====================================================================== % SBMLAssignmentRule = AssignmentRule_unsetFormula(SBMLAssignmentRule) %====================================================================== % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. the SBML AssignmentRule structure with the formula attribute unset % %===================================================================== % SBMLAssignmentRule = AssignmentRule_unsetMetaid(SBMLAssignmentRule) %===================================================================== % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. the SBML AssignmentRule structure with the metaid attribute unset % %====================================================================== % SBMLAssignmentRule = AssignmentRule_unsetSBOTerm(SBMLAssignmentRule) %====================================================================== % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. the SBML AssignmentRule structure with the sboTerm attribute unset % %======================================================================= % SBMLAssignmentRule = AssignmentRule_unsetVariable(SBMLAssignmentRule) %======================================================================= % Takes % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % Returns % 1. the SBML AssignmentRule structure with the variable attribute unset % % ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_unsetVariable.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_unsetVariabl0000644000000000000000000000345411703262356032246 0ustar rootrootfunction SBMLAssignmentRule = AssignmentRule_unsetVariable(SBMLAssignmentRule) % SBMLAssignmentRule = AssignmentRule_unsetVariable(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. the SBML AssignmentRule structure with the variable attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'variable') SBMLAssignmentRule.variable = ''; else error('variable not an attribute on SBML L%dV%d AssignmentRule', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_unsetSBOTerm0000644000000000000000000000344611703262360032135 0ustar rootrootfunction SBMLAssignmentRule = AssignmentRule_unsetSBOTerm(SBMLAssignmentRule) % SBMLAssignmentRule = AssignmentRule_unsetSBOTerm(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. the SBML AssignmentRule structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'sboTerm') SBMLAssignmentRule.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d AssignmentRule', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_unsetMetaid.0000644000000000000000000000344011703262360032135 0ustar rootrootfunction SBMLAssignmentRule = AssignmentRule_unsetMetaid(SBMLAssignmentRule) % SBMLAssignmentRule = AssignmentRule_unsetMetaid(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. the SBML AssignmentRule structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'metaid') SBMLAssignmentRule.metaid = ''; else error('metaid not an attribute on SBML L%dV%d AssignmentRule', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_unsetFormula.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_unsetFormula0000644000000000000000000000344611703262360032267 0ustar rootrootfunction SBMLAssignmentRule = AssignmentRule_unsetFormula(SBMLAssignmentRule) % SBMLAssignmentRule = AssignmentRule_unsetFormula(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. the SBML AssignmentRule structure with the formula attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'formula') SBMLAssignmentRule.formula = ''; else error('formula not an attribute on SBML L%dV%d AssignmentRule', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_setVariable.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_setVariable.0000644000000000000000000000373311703262360032121 0ustar rootrootfunction SBMLAssignmentRule = AssignmentRule_setVariable(SBMLAssignmentRule, variable) % SBMLAssignmentRule = AssignmentRule_setVariable(SBMLAssignmentRule, variable) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % 2. variable; a string representing the variable to be set % % Returns % % 1. the SBML AssignmentRule structure with the new value for the variable attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'variable') if ~ischar(variable) error('variable must be character array') ; else SBMLAssignmentRule.variable = variable; end; else error('variable not an attribute on SBML L%dV%d AssignmentRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_setSBOTerm.m0000644000000000000000000000372511703262360032025 0ustar rootrootfunction SBMLAssignmentRule = AssignmentRule_setSBOTerm(SBMLAssignmentRule, sboTerm) % SBMLAssignmentRule = AssignmentRule_setSBOTerm(SBMLAssignmentRule, sboTerm) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML AssignmentRule structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLAssignmentRule.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d AssignmentRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_setMetaid.m0000644000000000000000000000370111703262360031747 0ustar rootrootfunction SBMLAssignmentRule = AssignmentRule_setMetaid(SBMLAssignmentRule, metaid) % SBMLAssignmentRule = AssignmentRule_setMetaid(SBMLAssignmentRule, metaid) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML AssignmentRule structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLAssignmentRule.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d AssignmentRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_setFormula.m0000644000000000000000000000371611703262360032157 0ustar rootrootfunction SBMLAssignmentRule = AssignmentRule_setFormula(SBMLAssignmentRule, formula) % SBMLAssignmentRule = AssignmentRule_setFormula(SBMLAssignmentRule, formula) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % 2. formula; a string representing the formula to be set % % Returns % % 1. the SBML AssignmentRule structure with the new value for the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'formula') if ~ischar(formula) error('formula must be character array') ; else SBMLAssignmentRule.formula = formula; end; else error('formula not an attribute on SBML L%dV%d AssignmentRule', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_isSetVariable.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_isSetVariabl0000644000000000000000000000343511703262360032171 0ustar rootrootfunction value = AssignmentRule_isSetVariable(SBMLAssignmentRule) % value = AssignmentRule_isSetVariable(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. value = % - 1 if the variable attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'variable') value = ~isempty(SBMLAssignmentRule.variable); else error('variable not an attribute on SBML L%dV%d AssignmentRule', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_isSetSBOTerm0000644000000000000000000000342311703262360032061 0ustar rootrootfunction value = AssignmentRule_isSetSBOTerm(SBMLAssignmentRule) % value = AssignmentRule_isSetSBOTerm(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'sboTerm') value = (SBMLAssignmentRule.sboTerm > 0); else error('sboTerm not an attribute on SBML L%dV%d AssignmentRule', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_isSetMetaid.0000644000000000000000000000342111703262360032065 0ustar rootrootfunction value = AssignmentRule_isSetMetaid(SBMLAssignmentRule) % value = AssignmentRule_isSetMetaid(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'metaid') value = ~isempty(SBMLAssignmentRule.metaid); else error('metaid not an attribute on SBML L%dV%d AssignmentRule', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_isSetFormula.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_isSetFormula0000644000000000000000000000342711703262360032217 0ustar rootrootfunction value = AssignmentRule_isSetFormula(SBMLAssignmentRule) % value = AssignmentRule_isSetFormula(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'formula') value = ~isempty(SBMLAssignmentRule.formula); else error('formula not an attribute on SBML L%dV%d AssignmentRule', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_getVariable.mSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_getVariable.0000644000000000000000000000337211703262360032104 0ustar rootrootfunction variable = AssignmentRule_getVariable(SBMLAssignmentRule) % variable = AssignmentRule_getVariable(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. the value of the variable attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'variable') variable = SBMLAssignmentRule.variable; else error('variable not an attribute on SBML L%dV%d AssignmentRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_getSBOTerm.m0000644000000000000000000000336111703262356032012 0ustar rootrootfunction sboTerm = AssignmentRule_getSBOTerm(SBMLAssignmentRule) % sboTerm = AssignmentRule_getSBOTerm(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'sboTerm') sboTerm = SBMLAssignmentRule.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d AssignmentRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_getMetaid.m0000644000000000000000000000335011703262360031733 0ustar rootrootfunction metaid = AssignmentRule_getMetaid(SBMLAssignmentRule) % metaid = AssignmentRule_getMetaid(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'metaid') metaid = SBMLAssignmentRule.metaid; else error('metaid not an attribute on SBML L%dV%d AssignmentRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_getFormula.m0000644000000000000000000000336111703262356032144 0ustar rootrootfunction formula = AssignmentRule_getFormula(SBMLAssignmentRule) % formula = AssignmentRule_getFormula(SBMLAssignmentRule) % % Takes % % 1. SBMLAssignmentRule, an SBML AssignmentRule structure % % Returns % % 1. the value of the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAssignmentRule); if isfield(SBMLAssignmentRule, 'formula') formula = SBMLAssignmentRule.formula; else error('formula not an attribute on SBML L%dV%d AssignmentRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AssignmentRule/AssignmentRule_create.m0000644000000000000000000000550211703262360031274 0ustar rootrootfunction AssignmentRule = AssignmentRule_create(varargin) % AssignmentRule = AssignmentRule_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML AssignmentRule structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getAssignmentRuleFieldnames(level, version); if (num > 0) values = getAssignmentRuleDefaultValues(level, version); AssignmentRule = cell2struct(values, fieldnames, 2); %add level and version AssignmentRule.level = level; AssignmentRule.version = version; %check correct structure if ~isSBML_AssignmentRule(AssignmentRule, level, version) AssignmentRule = struct(); warning('Warn:BadStruct', 'Failed to create AssignmentRule'); end; else AssignmentRule = []; warning('Warn:InvalidLV', 'AssignmentRule not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/areIdentical.m0000644000000000000000000000510711703262346024442 0ustar rootrootfunction identical = areIdentical(struct1, struct2) % identical = areIdentical(SBMLStruct1, SBMLStruct2) % % Takes % % 1. SBMLStruct1, any SBML structure % 2. SBMLStruct2, any SBML structure % % Returns % % 1. identical = % - 1 if the structures are identical i.e. contain same fields and the same values % - 0 otherwise % if ~isValid(struct1) error('first argument must be an SBML Structure'); elseif ~isValid(struct2) error('second argument must be an SBML Structure'); end; identical = 1; fields1 = fieldnames(struct1); fields2 = fieldnames(struct2); if length(fields1) ~= length(fields2) identical = 0; end; % fieldnames the same if (identical) i = 1; while identical && i <= length(fields1) if ~strcmp(fields1{i}, fields2{i}) identical = 0; end; i = i + 1; end; end; %fieldvalues the same if (identical) i = 1; while identical && i < length(fields1) value1 = getfield(struct1, fields1{i}); value2 = getfield(struct2, fields1{i}); if isstruct(value1) if length(value1) > 0 && ~areIdentical(value1, value2) identical = 0; end; elseif isnan(value1) if ~isnan(value2) identical = 0; end; elseif isnumeric(value1) if value1 ~= value2 identical = 0; end; elseif ischar(value1) if ~strcmp(value1, value2) identical = 0; end; end; i = i + 1; end; end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/0000755000000000000000000000000011704572222024374 5ustar rootrootSBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/Contents.m0000644000000000000000000001356311703262334026356 0ustar rootroot% toolbox\MATLAB_SBML_Structure_Functions\AlgebraicRule % % The functions allow users to create and work with the SBML AlgebraicRule structure. % %=========================================================================== % AlgebraicRule = AlgebraicRule_create(level(optional), version(optional) ) %=========================================================================== % Takes % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % Returns % 1. a MATLAB_SBML AlgebraicRule structure of the appropriate level and version % %======================================================= % formula = AlgebraicRule_getFormula(SBMLAlgebraicRule) %======================================================= % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % Returns % 1. the value of the formula attribute % %===================================================== % metaid = AlgebraicRule_getMetaid(SBMLAlgebraicRule) %===================================================== % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % Returns % 1. the value of the metaid attribute % %======================================================= % sboTerm = AlgebraicRule_getSBOTerm(SBMLAlgebraicRule) %======================================================= % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % Returns % 1. the value of the sboTerm attribute % %======================================================= % value = AlgebraicRule_isSetFormula(SBMLAlgebraicRule) %======================================================= % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % Returns % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % %====================================================== % value = AlgebraicRule_isSetMetaid(SBMLAlgebraicRule) %====================================================== % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %======================================================= % value = AlgebraicRule_isSetSBOTerm(SBMLAlgebraicRule) %======================================================= % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %========================================================================== % SBMLAlgebraicRule = AlgebraicRule_setFormula(SBMLAlgebraicRule, formula) %========================================================================== % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % 2. formula; a string representing the formula to be set % Returns % 1. the SBML AlgebraicRule structure with the new value for the formula attribute % %======================================================================== % SBMLAlgebraicRule = AlgebraicRule_setMetaid(SBMLAlgebraicRule, metaid) %======================================================================== % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % 2. metaid; a string representing the metaid to be set % Returns % 1. the SBML AlgebraicRule structure with the new value for the metaid attribute % %========================================================================== % SBMLAlgebraicRule = AlgebraicRule_setSBOTerm(SBMLAlgebraicRule, sboTerm) %========================================================================== % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % 2. sboTerm, an integer representing the sboTerm to be set % Returns % 1. the SBML AlgebraicRule structure with the new value for the sboTerm attribute % %=================================================================== % SBMLAlgebraicRule = AlgebraicRule_unsetFormula(SBMLAlgebraicRule) %=================================================================== % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % Returns % 1. the SBML AlgebraicRule structure with the formula attribute unset % %================================================================== % SBMLAlgebraicRule = AlgebraicRule_unsetMetaid(SBMLAlgebraicRule) %================================================================== % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % Returns % 1. the SBML AlgebraicRule structure with the metaid attribute unset % %=================================================================== % SBMLAlgebraicRule = AlgebraicRule_unsetSBOTerm(SBMLAlgebraicRule) %=================================================================== % Takes % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % Returns % 1. the SBML AlgebraicRule structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_unsetSBOTerm.m0000644000000000000000000000343111703262334031665 0ustar rootrootfunction SBMLAlgebraicRule = AlgebraicRule_unsetSBOTerm(SBMLAlgebraicRule) % SBMLAlgebraicRule = AlgebraicRule_unsetSBOTerm(SBMLAlgebraicRule) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % % Returns % % 1. the SBML AlgebraicRule structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'sboTerm') SBMLAlgebraicRule.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_unsetMetaid.m0000644000000000000000000000342311703262334031616 0ustar rootrootfunction SBMLAlgebraicRule = AlgebraicRule_unsetMetaid(SBMLAlgebraicRule) % SBMLAlgebraicRule = AlgebraicRule_unsetMetaid(SBMLAlgebraicRule) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % % Returns % % 1. the SBML AlgebraicRule structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'metaid') SBMLAlgebraicRule.metaid = ''; else error('metaid not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_unsetFormula.m0000644000000000000000000000343111703262334032017 0ustar rootrootfunction SBMLAlgebraicRule = AlgebraicRule_unsetFormula(SBMLAlgebraicRule) % SBMLAlgebraicRule = AlgebraicRule_unsetFormula(SBMLAlgebraicRule) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % % Returns % % 1. the SBML AlgebraicRule structure with the formula attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'formula') SBMLAlgebraicRule.formula = ''; else error('formula not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_setSBOTerm.m0000644000000000000000000000371011703262334031322 0ustar rootrootfunction SBMLAlgebraicRule = AlgebraicRule_setSBOTerm(SBMLAlgebraicRule, sboTerm) % SBMLAlgebraicRule = AlgebraicRule_setSBOTerm(SBMLAlgebraicRule, sboTerm) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % 2. sboTerm, an integer representing the sboTerm to be set % % Returns % % 1. the SBML AlgebraicRule structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'sboTerm') if ~isIntegralNumber(sboTerm) error('sboTerm must be an integer') ; else SBMLAlgebraicRule.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_setMetaid.m0000644000000000000000000000366411703262334031262 0ustar rootrootfunction SBMLAlgebraicRule = AlgebraicRule_setMetaid(SBMLAlgebraicRule, metaid) % SBMLAlgebraicRule = AlgebraicRule_setMetaid(SBMLAlgebraicRule, metaid) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % 2. metaid; a string representing the metaid to be set % % Returns % % 1. the SBML AlgebraicRule structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLAlgebraicRule.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_setFormula.m0000644000000000000000000000370111703262334031454 0ustar rootrootfunction SBMLAlgebraicRule = AlgebraicRule_setFormula(SBMLAlgebraicRule, formula) % SBMLAlgebraicRule = AlgebraicRule_setFormula(SBMLAlgebraicRule, formula) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % 2. formula; a string representing the formula to be set % % Returns % % 1. the SBML AlgebraicRule structure with the new value for the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'formula') if ~ischar(formula) error('formula must be character array') ; else SBMLAlgebraicRule.formula = formula; end; else error('formula not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_isSetSBOTerm.m0000644000000000000000000000341311703262334031616 0ustar rootrootfunction value = AlgebraicRule_isSetSBOTerm(SBMLAlgebraicRule) % value = AlgebraicRule_isSetSBOTerm(SBMLAlgebraicRule) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'sboTerm') value = (SBMLAlgebraicRule.sboTerm > 0); else error('sboTerm not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_isSetMetaid.m0000644000000000000000000000341111703262334031544 0ustar rootrootfunction value = AlgebraicRule_isSetMetaid(SBMLAlgebraicRule) % value = AlgebraicRule_isSetMetaid(SBMLAlgebraicRule) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'metaid') value = ~isempty(SBMLAlgebraicRule.metaid); else error('metaid not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_isSetFormula.m0000644000000000000000000000341711703262334031754 0ustar rootrootfunction value = AlgebraicRule_isSetFormula(SBMLAlgebraicRule) % value = AlgebraicRule_isSetFormula(SBMLAlgebraicRule) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % % Returns % % 1. value = % - 1 if the formula attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'formula') value = ~isempty(SBMLAlgebraicRule.formula); else error('formula not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_getSBOTerm.m0000644000000000000000000000335111703262334031307 0ustar rootrootfunction sboTerm = AlgebraicRule_getSBOTerm(SBMLAlgebraicRule) % sboTerm = AlgebraicRule_getSBOTerm(SBMLAlgebraicRule) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'sboTerm') sboTerm = SBMLAlgebraicRule.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_getMetaid.m0000644000000000000000000000334011703262334031235 0ustar rootrootfunction metaid = AlgebraicRule_getMetaid(SBMLAlgebraicRule) % metaid = AlgebraicRule_getMetaid(SBMLAlgebraicRule) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'metaid') metaid = SBMLAlgebraicRule.metaid; else error('metaid not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_getFormula.m0000644000000000000000000000335111703262334031441 0ustar rootrootfunction formula = AlgebraicRule_getFormula(SBMLAlgebraicRule) % formula = AlgebraicRule_getFormula(SBMLAlgebraicRule) % % Takes % % 1. SBMLAlgebraicRule, an SBML AlgebraicRule structure % % Returns % % 1. the value of the formula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLAlgebraicRule); if isfield(SBMLAlgebraicRule, 'formula') formula = SBMLAlgebraicRule.formula; else error('formula not an attribute on SBML L%dV%d AlgebraicRule', level, version); end; SBMLToolbox-4.1.0/toolbox/MATLAB_SBML_Structure_Functions/AlgebraicRule/AlgebraicRule_create.m0000644000000000000000000000546411703262334030606 0ustar rootrootfunction AlgebraicRule = AlgebraicRule_create(varargin) % AlgebraicRule = AlgebraicRule_create(level(optional), version(optional) ) % % Takes % % 1. level, an integer representing an SBML level (optional) % 2. version, an integer representing an SBML version (optional) % % Returns % % 1. a MATLAB_SBML AlgebraicRule structure of the appropriate level and version % % *NOTE:* the optional level and version preserve backwards compatibility % a missing version argument will default to L1V2; L2V4 or L3V1 % missing both arguments will default to L3V1 % %check the input arguments are appropriate if (nargin > 2) error('too many input arguments'); end; switch (nargin) case 2 level = varargin{1}; version = varargin{2}; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; otherwise level = 3; version = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getAlgebraicRuleFieldnames(level, version); if (num > 0) values = getAlgebraicRuleDefaultValues(level, version); AlgebraicRule = cell2struct(values, fieldnames, 2); %add level and version AlgebraicRule.level = level; AlgebraicRule.version = version; %check correct structure if ~isSBML_AlgebraicRule(AlgebraicRule, level, version) AlgebraicRule = struct(); warning('Warn:BadStruct', 'Failed to create AlgebraicRule'); end; else AlgebraicRule = []; warning('Warn:InvalidLV', 'AlgebraicRule not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/isBindingInstalled.m0000644000000000000000000000572611703272000017732 0ustar rootrootfunction installed = isBindingInstalled() % installed = isBindingInstalled() % % Returns % % 1. installed = % - 1 if the libSBML executables are installed % - 0 otherwise % % % installed = 1; if (~exist('OCTAVE_VERSION')) filename = fullfile(tempdir, 'test.xml'); outFile = fullfile(tempdir, 'test-out.xml'); else if isWindows() filename = fullfile(pwd, 'test.xml'); outFile = [tempdir, 'temp', filesep, 'test-out.xml']; else filename = fullfile(pwd, 'test.xml'); outFile = [tempdir, 'test-out.xml']; end; end; writeTempFile(filename); try M = TranslateSBML(filename); catch installed = 0; return; end; if (installed == 1) try OutputSBML(M, outFile, 1); catch installed = 0; return; end; end; delete(filename); delete(outFile); % % % Is this windows % Mac OS X 10.7 Lion returns true for a call to ispc() % since we were using that to distinguish between windows and macs we need % to catch this % ------------------------------------------------------------------------ function y = isWindows() y = 1; if isunix() y = 0; return; end; if ismac() y = 0; return; end; if ~ispc() message = sprintf('\n%s\n%s\n', ... 'Unable to determine the type of operating system in use.', ... 'Please contact libsbml-team@caltech.edu to help resolve this problem.'); error(message); end; % write out a temporary file function writeTempFile(filename) fout = fopen(filename, 'w'); fprintf(fout, '\n'); fprintf(fout, '\n'); fprintf(fout, ' \n\n'); fclose(fout); SBMLToolbox-4.1.0/toolbox/install.m0000644000000000000000000002160011703265336015635 0ustar rootrootfunction install % install % % 1. reports whether the libsbml binding is installed % 2. adds the toolbox dirctories to the Path % % ========================================================================= % Main loop. % ========================================================================= disp(sprintf('\nInstalling the SBMLToolbox.\n')); [matlab_octave, bit64] = check_system(); disp(sprintf('\nChecking for libSBML %s binding\n', matlab_octave)); if isBindingInstalled() == 1 disp(sprintf('libSBML %s binding found and working\n', matlab_octave)); else disp(sprintf('libSBML %s binding not found\n\n%s\n%s\n%s', matlab_octave, ... 'NOTE: This is not a fatal error.', ... 'You will not be able to import or export SBML but can still use the toolbox', ... 'to create and manipulate MATLAB_SBML structures')); end; % add the current directory and all subdirectories to the MATLAB search % path ToolboxPath = genpath(pwd); addpath(ToolboxPath); s = savepath; if (s ~= 0) disp(sprintf('\nInstallation failed\n%s', ... 'The directories were not added to the Path')); else disp(sprintf('\nInstallation successful')); end; % ========================================================================= % Support functions. % ========================================================================= % % Assess our computing environment. % ------------------------------------------------------------------------- function [matlab_octave, bit64] = check_system() disp('* Doing preliminary checks of runtime environment ...'); if (~exist('OCTAVE_VERSION')) matlab_octave = 'MATLAB'; disp(' - This appears to be MATLAB and not Octave.'); else matlab_octave = 'Octave'; disp(' - This appears to be Octave and not MATLAB.'); end; bit64 = 32; if ispc() if strcmp(computer(), 'PCWIN64') == 1 bit64 = 64; disp(sprintf(' - %s reports the OS is Windows 64-bit.', matlab_octave)); else disp(sprintf(' - %s reports the OS is Windows 32-bit.', matlab_octave)); end; elseif ismac() if strcmp(computer(), 'MACI64') == 1 bit64 = 64; disp(sprintf(' - %s reports the OS is 64-bit MacOS.', matlab_octave)); else % Reading http://www.mathworks.com/help/techdoc/ref/computer.html % it is still not clear to me what a non-64-bit MacOS will report. % Let's not assume the only other alternative is 32-bit, since we % actually don't care here. Let's just say "macos". % disp(sprintf(' - %s reports the OS is MacOS.', matlab_octave)); end; elseif isunix() if strcmp(computer(), 'GLNXA64') == 1 bit64 = 64; disp(sprintf(' - %s reports the OS is 64-bit Linux.', matlab_octave)); else disp(sprintf(' - %s reports the OS is 32-bit Linux.', matlab_octave)); end; end; % % Assess our location in the file system. % ------------------------------------------------------------------------- % Possible values returned: % LOCATION: % 'installed' -> installation directory % 'source' -> libsbml source tree % % WRITEACCESS: % 1 -> we can write in this directory % 0 -> we can't write in this directory % function [location, writeAccess, in_installer] = check_location(matlab_octave, ... functioning) myDisp('* Trying to establish our location ...', functioning); % This is where things get iffy. There are a lot of possibilities, and % we have to resort to heuristics. % % Linux and Mac: we look for 2 possibilities % - installation dir ends in "libsbml/bindings/matlab" % Detect it by looking for ../../VERSION.txt. % Assume we're in .../share/libsbml/bindings/matlab and that our % library is in .../lib/ % % - source dir ends in "libsbml/src/bindings/matlab" % Detect it by looking for ../../../VERSION.txt. % Assume our library is in ../../ % in_installer = 0; [remain, first] = fileparts(pwd); if strcmpi(matlab_octave, 'matlab') if ~strcmp(first, 'matlab') if ~ispc() error_incorrect_dir('matlab'); else in_installer = 1; end; else myDisp(' - We are in the libSBML subdirectory for Matlab.', functioning); end; else if ~strcmp(first, 'octave') if ~ispc() error_incorrect_dir('octave'); else in_installer = 1; end; else myDisp(' - We are in the libSBML subdirectory for Octave.', functioning); end; end; location = ''; % if in_installer == 1 then we are in the windows installer but in % path provided by the user % checking further is pointless if (in_installer == 0) [above_bindings, bindings] = fileparts(remain); if exist(fullfile(above_bindings, 'VERSION.txt')) myDisp(' - We appear to be in the installation target directory.', functioning); in_installer = 1; if ispc() location = above_bindings; else location = 'installed'; end; else [libsbml_root, src] = fileparts(above_bindings); if exist(fullfile(libsbml_root, 'Makefile.in')) myDisp(' - We appear to be in the libSBML source tree.', functioning); if ispc() location = libsbml_root; else location = 'source'; end; else if ispc() % we might be in the windows installer but in a location the user chose % for the bindings % Makefile.in will not exist in this directory if (exist([pwd, filesep, 'Makefile.in']) == 0) in_installer = 1; else % We don't know where we are. if strcmpi(matlab_octave, 'MATLAB') error_incorrect_dir('matlab'); else error_incorrect_dir('octave'); end; end; else % We don't know where we are. if strcmpi(matlab_octave, 'MATLAB') error_incorrect_dir('matlab'); else error_incorrect_dir('octave'); end; end; end; end; end; % if we are in the windows installer but in a location the user chose % for the bindings % we need the user to tell use the root directory for the rest of libsbml % unless we are already functioning if (ispc() && functioning == 0 && in_installer == 1 && isempty(location)) count = 1; while(exist(location, 'dir') == 0 && count < 3) location = input(sprintf('%s: ', ... 'Please enter the location of the top-level libsbml directory'), 's'); count = count + 1; end; if (exist(location, 'dir') == 0) error('Failed to find libsbml directory'); end; end; % Test that it looks like we have the expected pieces in this directory. % We don't want to assume particular paths, because we might be % getting run from the libSBML source tree or the installed copy of % the matlab bindings sources. So, we test for just a couple of % things: the tail of the name of the directory in which this file is % located (should be either "matlab" or "octave") and the presence of % another file, "OutputSBML.c", which became part of libsbml at the % same time this new build scheme was introduced. our_name = sprintf('%s.m', mfilename); other_name = 'OutputSBML.c'; if ~exist(fullfile(pwd, our_name), 'file') ... || ~exist(fullfile(pwd, other_name), 'file') error_incorrect_dir('matlab'); end; % Check whether we have write access to this directory. fid = fopen('temp.txt', 'w'); writeAccess = 1; if fid == -1 myDisp(' - We do not have write access here -- will write elsewhere.', functioning); writeAccess = 0; else myDisp(' - We have write access here! That makes us happy.', functioning); fclose(fid); delete('temp.txt'); end; SBMLToolbox-4.1.0/toolbox/fbc_package/0000755000000000000000000000000011704572250016214 5ustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/0000755000000000000000000000000011704572250024045 5ustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/test/0000755000000000000000000000000011704572250025024 5ustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/test/test_fbc_valid.m0000644000000000000000000000700011703262374030151 0ustar rootrootfunction y = test_fbc_valid(varargin) % fbcBindingEnabled = 1; if (nargin == 0) if isBindingFbcEnabled() == 0 disp ('The libsbml binding for fbc is not enabled'); disp ('not all tests can be run'); fbcBindingEnabled = 0; end; else fbcBindingEnabled = varargin{1}; end; test = 0; Totalfail = 0; test = test + 44; fail = TestIsSBML_FBC_FluxBound; if (fail > 0) disp('isSBML_FBC_FluxBound failed'); end; Totalfail = Totalfail + fail; test = test + 66; fail = TestIsSBML_FBC_Objective; if (fail > 0) disp('isSBML_FBC_Objective failed'); end; Totalfail = Totalfail + fail; test = test + 44; fail = TestIsSBML_FBC_FluxObjective; if (fail > 0) disp('isSBML_FBC_FluxObjective failed'); end; Totalfail = Totalfail + fail; test = test + 42; fail = TestIsSBML_FBC_Species; if (fail > 0) disp('isSBML_FBC_Species failed'); end; Totalfail = Totalfail + fail; test = test + 22; fail = TestIsSBML_FBC_Model; if (fail > 0) disp('isSBML_FBC_Model failed'); end; Totalfail = Totalfail + fail; % tests that need fbc libsbml binding enabled if fbcBindingEnabled == 1 m = TranslateSBML('../../test/test-data/fbc.xml'); fb = m.fbc_fluxBound(1); o = m.fbc_objective(1); fo = o.fbc_fluxObjective(1); s = m.species(1); test = test + 7; fail = 0; pass = isValidSBML_Model(m); if (pass == 0) fail = fail + 1; disp('l3v1 Model failed'); end; pass = isSBML_FBC_Model(m, 3, 1, 1); if (pass == 0) fail = fail + 1; disp('l3v1 fbc Model failed'); end; pass = isSBML_FBC_FluxBound(fb,3, 1, 1); if (pass == 0) fail = fail + 1; disp('l3v1 FluxBound failed'); end; pass = isSBML_FBC_Objective(o,3, 1, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Objective failed'); end; pass = isSBML_FBC_FluxObjective(fo,3, 1, 1); if (pass == 0) fail = fail + 1; disp('l3v1 FluxObjective failed'); end; pass = isSBML_Species(s, 3, 1); if (pass == 0) fail = fail + 1; disp('l3v1 Species failed'); end; pass = isSBML_FBC_Species(s, 3, 1, 1); if (pass == 0) fail = fail + 1; disp('l3v1 FBC Species failed'); end; end; Totalfail = Totalfail + fail; disp(sprintf('Number tests: %d', test)); disp(sprintf('Number fails: %d', Totalfail)); disp(sprintf('Pass rate: %d%%', ((test-Totalfail)/test)*100)); y = Totalfail; SBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/test/TestIsSBML_FBC_Species.m0000644000000000000000000001255511703262374031232 0ustar rootrootfunction fail = TestIsSBML_FBC_Species % s_l3v1 = struct('typecode', {'SBML_SPECIES'}, 'metaid', {''}, 'notes', {''}, ... 'annotation', {''}, 'sboTerm', {''}, 'name', {''}, 'id', {''}, ... 'compartment', {''}, 'initialAmount', {''}, 'initialConcentration', {''}, ... 'substanceUnits', {''}, 'hasOnlySubstanceUnits', {''}, ... 'boundaryCondition', {''}, 'constant', {''}, 'conversionFactor', {''}, ... 'isSetInitialAmount', {''}, 'isSetInitialConcentration', {''}, ... 'fbc_charge', {''}, 'isSetfbc_charge', {0}, 'fbc_chemicalFormula', {''}, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); s_l3v1_incorrect = struct('typecode', {'SBML_SPECIES'}, 'metaid', {''}, 'notes', {''}, ... 'annotation', {''}, 'sboTerm', {''}, 'name', {''}, 'id', {''}, ... 'compartment', {''}, 'initialAmount', {''}, 'initialConcentration', {''}, ... 'substanceUnits', {''}, 'hasOnlySubstanceUnits', {''}, ... 'boundaryCondition', {''}, 'constant', {''}, 'conversionFactor', {''}, ... 'isSetInitialAmount', {''}, 'isSetInitialConcentration', {''}, ... 'fbc_charge', {''}, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); fail = TestFunction('isSBML_FBC_Species', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isSBML_FBC_Species', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isSBML_FBC_Species', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isSBML_FBC_Species', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isSBML_FBC_Species', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isSBML_FBC_Species', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValid', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValid', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isValid', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 2, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 3, 1, 2, 0); fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 2, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 3, 1, 2, 0); fail = fail + TestFunction('isSBML_FBC_Species', 4, 1, s_l3v1_incorrect, 3, 1, 1, 0); fail = fail + TestFunction('isSBML_FBC_Species', 3, 1, s_l3v1_incorrect, 3, 1, 0); fail = fail + TestFunction('isSBML_FBC_Species', 3, 1, s_l3v1_incorrect, 2, 4, 0); fail = fail + TestFunction('isSBML_FBC_Species', 2, 1, s_l3v1_incorrect, 3, 0); fail = fail + TestFunction('isSBML_FBC_Species', 2, 1, s_l3v1_incorrect, 2, 0); fail = fail + TestFunction('isSBML_FBC_Species', 1, 1, s_l3v1_incorrect, 0); fail = fail + TestFunction('isValid', 1, 1, s_l3v1_incorrect, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_incorrect, 3, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_incorrect, 2, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_incorrect, 3, 1, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_incorrect, 2, 4, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_incorrect, 3, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_incorrect, 2, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_incorrect, 3, 1, 2, 0); fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1_incorrect, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_incorrect, 3, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_incorrect, 2, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_incorrect, 3, 1, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_incorrect, 2, 4, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_incorrect, 3, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_incorrect, 2, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_incorrect, 3, 1, 2, 0); ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/test/TestIsSBML_FBC_Objective.mSBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/test/TestIsSBML_FBC_Objective.0000644000000000000000000001560311703262374031371 0ustar rootrootfunction fail = TestIsSBML_FBC_Objective % fo_l3v1 = struct('typecode', {'SBML_FBC_FLUXOBJECTIVE'}, 'metaid', {''}, ... 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, 'fbc_reaction', {''}, ... 'fbc_coefficient', {''}, 'isSetfbc_coefficient', {0}, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); fo_l3v1_bad = struct('typecode', {'SBML_FBC_FLUXOBJECTIVE'}, 'metaid', {''}, ... 'notes', {''}, 'annotation', {''}, 'fbc_reaction', {''}, ... 'fbc_coefficient', {''}, 'isSetfbc_coefficient', {0}, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); s_l3v1 = struct('typecode', {'SBML_FBC_OBJECTIVE'}, 'metaid', {''}, ... 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, 'fbc_id', {''}, ... 'fbc_type', {''}, 'fbc_fluxObjective', fo_l3v1, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); s_l3v1_bad = struct('typecode', {'SBML_FBC_OBJECTIVE'}, 'metaid', {''}, ... 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, 'fbc_id', {''}, ... 'fbc_type', {''}, 'fbc_fluxObjective', fo_l3v1_bad, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); s_l3v1_bad1 = struct('typecode', {'SBML_FBC_OBJECTIVE'}, 'metaid', {''}, ... 'notes', {''}, 'annotation', {''}, 'fbc_id', {''}, ... 'fbc_type', {''}, 'fbc_fluxObjective', fo_l3v1, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); fail = TestFunction('isSBML_FBC_Objective', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isSBML_FBC_Objective', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isSBML_FBC_Objective', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isSBML_FBC_Objective', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValid', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValid', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isValid', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 2, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 3, 1, 2, 0); fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 2, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 3, 1, 2, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 4, 1, s_l3v1_bad, 3, 1, 1, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 3, 1, s_l3v1_bad, 3, 1, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 3, 1, s_l3v1_bad, 2, 4, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 2, 1, s_l3v1_bad, 3, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 2, 1, s_l3v1_bad, 2, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 1, 1, s_l3v1_bad, 0); fail = fail + TestFunction('isValid', 1, 1, s_l3v1_bad, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_bad, 3, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_bad, 2, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_bad, 3, 1, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_bad, 2, 4, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad, 3, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad, 2, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad, 3, 1, 2, 0); fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1_bad, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_bad, 3, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_bad, 2, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_bad, 3, 1, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_bad, 2, 4, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad, 3, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad, 2, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad, 3, 1, 2, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 3, 1, s_l3v1_bad1, 3, 1, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 3, 1, s_l3v1_bad1, 2, 4, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 2, 1, s_l3v1_bad1, 3, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 2, 1, s_l3v1_bad1, 2, 0); fail = fail + TestFunction('isSBML_FBC_Objective', 1, 1, s_l3v1_bad1, 0); fail = fail + TestFunction('isValid', 1, 1, s_l3v1_bad1, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_bad1, 3, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_bad1, 2, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_bad1, 3, 1, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_bad1, 2, 4, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad1, 3, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad1, 2, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad1, 3, 1, 2, 0); fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1_bad1, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_bad1, 3, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_bad1, 2, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_bad1, 3, 1, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_bad1, 2, 4, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad1, 3, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad1, 2, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad1, 3, 1, 2, 0); SBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/test/TestIsSBML_FBC_Model.m0000644000000000000000000001061711703262374030674 0ustar rootrootfunction fail = TestIsSBML_FBC_Model % s_l3v1 = Model_create(3,1); s_l3v1_incorrect = Model_create(3,1); s_l3v1_incorrect.fbc_version = 1; fail = 0; % fail = TestFunction('isSBML_FBC_Model', 4, 1, s_l3v1, 3, 1, 1, 1); % fail = fail + TestFunction('isSBML_FBC_Model', 3, 1, s_l3v1, 3, 1, 1); % fail = fail + TestFunction('isSBML_FBC_Model', 3, 1, s_l3v1, 2, 4, 0); % fail = fail + TestFunction('isSBML_FBC_Model', 2, 1, s_l3v1, 3, 1); % fail = fail + TestFunction('isSBML_FBC_Model', 2, 1, s_l3v1, 2, 0); % fail = fail + TestFunction('isSBML_FBC_Model', 1, 1, s_l3v1, 1); % fail = fail + TestFunction('isValid', 1, 1, s_l3v1, 1); % fail = fail + TestFunction('isValid', 2, 1, s_l3v1, 3, 1); % fail = fail + TestFunction('isValid', 2, 1, s_l3v1, 2, 0); % fail = fail + TestFunction('isValid', 3, 1, s_l3v1, 3, 1, 1); % fail = fail + TestFunction('isValid', 3, 1, s_l3v1, 2, 4, 0); % fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 3, 1, 1, 1); % fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 2, 1, 1, 0); % fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 3, 1, 2, 0); % fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1, 1); % fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1, 3, 1); % fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1, 2, 0); % fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1, 3, 1, 1); % fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1, 2, 4, 0); % fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 3, 1, 1, 1); % fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 2, 1, 1, 0); % fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 3, 1, 2, 0); fail = fail + TestFunction('isSBML_FBC_Model', 4, 1, s_l3v1_incorrect, 3, 1, 1, 0); fail = fail + TestFunction('isSBML_FBC_Model', 3, 1, s_l3v1_incorrect, 3, 1, 0); fail = fail + TestFunction('isSBML_FBC_Model', 3, 1, s_l3v1_incorrect, 2, 4, 0); fail = fail + TestFunction('isSBML_FBC_Model', 2, 1, s_l3v1_incorrect, 3, 0); fail = fail + TestFunction('isSBML_FBC_Model', 2, 1, s_l3v1_incorrect, 2, 0); fail = fail + TestFunction('isSBML_FBC_Model', 1, 1, s_l3v1_incorrect, 0); fail = fail + TestFunction('isValid', 1, 1, s_l3v1_incorrect, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_incorrect, 3, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_incorrect, 2, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_incorrect, 3, 1, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_incorrect, 2, 4, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_incorrect, 3, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_incorrect, 2, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_incorrect, 3, 1, 2, 0); fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1_incorrect, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_incorrect, 3, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_incorrect, 2, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_incorrect, 3, 1, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_incorrect, 2, 4, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_incorrect, 3, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_incorrect, 2, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_incorrect, 3, 1, 2, 0); ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/test/TestIsSBML_FBC_FluxObjective.mSBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/test/TestIsSBML_FBC_FluxObject0000644000000000000000000001137611703262374031451 0ustar rootrootfunction fail = TestIsSBML_FBC_FluxObjective % s_l3v1_bad = struct('typecode', {'SBML_FBC_FLUXOBJETIVE'}, 'metaid', {''}, ... 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, 'fbc_reaction', {''}, ... 'fbc_coefficient', {''}, 'isSetfbc_coefficient', {0}, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); s_l3v1 = struct('typecode', {'SBML_FBC_FLUXOBJECTIVE'}, 'metaid', {''}, ... 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, 'fbc_reaction', {''}, ... 'fbc_coefficient', {''}, 'isSetfbc_coefficient', {0}, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); fail = TestFunction('isSBML_FBC_FluxObjective', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValid', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValid', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isValid', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 2, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 3, 1, 2, 0); fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 2, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 3, 1, 2, 0); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 4, 1, s_l3v1_bad, 3, 1, 1, 0); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 3, 1, s_l3v1_bad, 3, 1, 0); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 3, 1, s_l3v1_bad, 2, 4, 0); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 2, 1, s_l3v1_bad, 3, 0); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 2, 1, s_l3v1_bad, 2, 0); fail = fail + TestFunction('isSBML_FBC_FluxObjective', 1, 1, s_l3v1_bad, 0); fail = fail + TestFunction('isValid', 1, 1, s_l3v1_bad, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_bad, 3, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_bad, 2, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_bad, 3, 1, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_bad, 2, 4, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad, 3, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad, 2, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad, 3, 1, 2, 0); fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1_bad, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_bad, 3, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_bad, 2, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_bad, 3, 1, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_bad, 2, 4, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad, 3, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad, 2, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad, 3, 1, 2, 0); ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/test/TestIsSBML_FBC_FluxBound.mSBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/test/TestIsSBML_FBC_FluxBound.0000644000000000000000000001136611703262374031367 0ustar rootrootfunction fail = TestIsSBML_FBC_FluxBound % s_l3v1_bad = struct('typecode', {'SBML_FBC_FLUXBOUND'}, 'metaid', {''}, ... 'notes', {''}, 'sboTerm', {''}, 'fbc_id', {''}, ... 'fbc_reaction', {''}, 'fbc_operation', {''}, 'fbc_value', {''}, ... 'isSetfbc_value', {0}, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); s_l3v1 = struct('typecode', {'SBML_FBC_FLUXBOUND'}, 'metaid', {''}, ... 'notes', {''}, 'annotation', {''}, 'sboTerm', {''}, 'fbc_id', {''}, ... 'fbc_reaction', {''}, 'fbc_operation', {''}, 'fbc_value', {''}, ... 'isSetfbc_value', {0}, ... 'level', {3}, 'version', {1}, 'fbc_version', {1}); fail = TestFunction('isSBML_FBC_FluxBound', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isSBML_FBC_FluxBound', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isSBML_FBC_FluxBound', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isSBML_FBC_FluxBound', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isSBML_FBC_FluxBound', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isSBML_FBC_FluxBound', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValid', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValid', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isValid', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isValid', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 2, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1, 3, 1, 2, 0); fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1, 1); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1, 3, 1); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1, 2, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1, 3, 1, 1); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1, 2, 4, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 3, 1, 1, 1); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 2, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1, 3, 1, 2, 0); fail = fail + TestFunction('isSBML_FBC_FluxBound', 4, 1, s_l3v1_bad, 3, 1, 1, 0); fail = fail + TestFunction('isSBML_FBC_FluxBound', 3, 1, s_l3v1_bad, 3, 1, 0); fail = fail + TestFunction('isSBML_FBC_FluxBound', 3, 1, s_l3v1_bad, 2, 4, 0); fail = fail + TestFunction('isSBML_FBC_FluxBound', 2, 1, s_l3v1_bad, 3, 0); fail = fail + TestFunction('isSBML_FBC_FluxBound', 2, 1, s_l3v1_bad, 2, 0); fail = fail + TestFunction('isSBML_FBC_FluxBound', 1, 1, s_l3v1_bad, 0); fail = fail + TestFunction('isValid', 1, 1, s_l3v1_bad, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_bad, 3, 0); fail = fail + TestFunction('isValid', 2, 1, s_l3v1_bad, 2, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_bad, 3, 1, 0); fail = fail + TestFunction('isValid', 3, 1, s_l3v1_bad, 2, 4, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad, 3, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad, 2, 1, 1, 0); fail = fail + TestFunction('isValid', 4, 1, s_l3v1_bad, 3, 1, 2, 0); fail = fail + TestFunction('isValidFBC', 1, 1, s_l3v1_bad, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_bad, 3, 0); fail = fail + TestFunction('isValidFBC', 2, 1, s_l3v1_bad, 2, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_bad, 3, 1, 0); fail = fail + TestFunction('isValidFBC', 3, 1, s_l3v1_bad, 2, 4, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad, 3, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad, 2, 1, 1, 0); fail = fail + TestFunction('isValidFBC', 4, 1, s_l3v1_bad, 3, 1, 2, 0); SBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/isValidFBC.m0000644000000000000000000000644511703262374026144 0ustar rootrootfunction y = isValidFBC(varargin) % [valid, message] = isValidFBC(SBMLStruct, level, version, pkgVersion) % % Takes % % 1. SBMLStruct, an SBML structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing the FBC package version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* The fields present in a MATLAB_SBML structure of the appropriate % level and version can be found using getFieldnames(typecode, level, version) % % if (nargin < 1) error('need input argument'); end; switch nargin case 1 sbml_struct = varargin{1}; level = 3; version = 1; fbc_version = 1; case 2 sbml_struct = varargin{1}; level = varargin{2}; version = 1; fbc_version = 1; case 3 sbml_struct = varargin{1}; level = varargin{2}; version = varargin{3}; fbc_version = 1; case 4 sbml_struct = varargin{1}; level = varargin{2}; version = varargin{3}; fbc_version = varargin{4}; otherwise error('too many input arguments'); end; if (length(sbml_struct) > 1) error('cannot deal with arrays of structures'); end; if ~isstruct(sbml_struct) || isempty(fieldnames(sbml_struct)) y = 0; return; end; if isfield(sbml_struct, 'fbc_version') == 0 y = 0; return; end; isValidLevelVersionCombination(level, version); typecode = sbml_struct.typecode; switch (typecode) case 'SBML_SPECIES' fhandle = str2func('isSBML_FBC_Species'); case 'SBML_MODEL' fhandle = str2func('isSBML_FBC_Model'); case 'SBML_FBC_FLUXBOUND' fhandle = str2func('isSBML_FBC_FluxBound'); case 'SBML_FBC_FLUXOBJECTIVE' fhandle = str2func('isSBML_FBC_FluxObjective'); case 'SBML_FBC_OBJECTIVE' fhandle = str2func('isSBML_FBC_Objective'); otherwise y = 0; return; end; if strcmp(typecode, 'SBML_MODEL') y = feval(fhandle, sbml_struct); else y = feval(fhandle, sbml_struct, level, version, fbc_version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/isSBML_FBC_Species.m0000644000000000000000000001055011703262374027444 0ustar rootrootfunction [valid, message] = isSBML_FBC_Species(varargin) % [valid, message] = isSBML_FBC_Species(SBMLFBCSpecies, level, version, pkgVersion) % % Takes % % 1. SBMLStructure, an SBML FBC Species structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing an FBC package version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC Species structure of the appropriate % level, version and FBC version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* The fields present in a MATLAB_SBML FBC Species structure of the appropriate % level and version can be found using getSpeciesFieldnames(level, version, pkgVersion) % % switch (nargin) case 4 SBMLStructure = varargin{1}; level = varargin{2}; version = varargin{3}; pkgVersion = varargin{4}; case 3 SBMLStructure = varargin{1}; level = varargin{2}; version = varargin{3}; pkgVersion = 1; case 2 SBMLStructure = varargin{1}; level = varargin{2}; version = 1; pkgVersion = 1; case 1 SBMLStructure = varargin{1}; level = 3; version = 1; pkgVersion = 1; otherwise error('need at least one argument'); end; if (length(SBMLStructure) > 1) message = 'cannot deal with arrays of structures'; valid = 0; return; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_SPECIES'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'typecode field missing'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'fbc_version') && ~isempty(SBMLStructure)) if ~isequal(pkgVersion, SBMLStructure.fbc_version) valid = 0; message = 'FBC version mismatch'; end; end; if (valid == 1) [valid, message] = isSBML_Species(SBMLStructure, level, version); end; % check that structure contains all the fbc fields if (valid == 1) [SBMLfieldnames, numFields] = getFieldnames('SBML_FBC_SPECIES', level, ... version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; end; % report failure if (valid == 0) message = sprintf('Invalid FBC Species\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/isSBML_FBC_Objective.m0000644000000000000000000001113311703262374027761 0ustar rootrootfunction [valid, message] = isSBML_FBC_Objective(varargin) % [valid, message] = isSBML_FBC_Objective(SBMLFBCObjective, level, version, pkgVersion) % % Takes % % 1. SBMLStructure, an SBML FBC Objective structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing an FBC package version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC Objective structure of the appropriate % level, version and FBC version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* The fields present in a MATLAB_SBML FBC Objective structure of the appropriate % level and version can be found using getObjectiveFieldnames(level, version, pkgVersion) % % switch (nargin) case 4 SBMLStructure = varargin{1}; level = varargin{2}; version = varargin{3}; pkgVersion = varargin{4}; case 3 SBMLStructure = varargin{1}; level = varargin{2}; version = varargin{3}; pkgVersion = 1; case 2 SBMLStructure = varargin{1}; level = varargin{2}; version = 1; pkgVersion = 1; case 1 SBMLStructure = varargin{1}; level = 3; version = 1; pkgVersion = 1; otherwise error('need at least one argument'); end; if (length(SBMLStructure) > 1) message = 'cannot deal with arrays of structures'; valid = 0; return; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_FBC_OBJECTIVE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'typecode field missing'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'fbc_version') && ~isempty(SBMLStructure)) if ~isequal(pkgVersion, SBMLStructure.fbc_version) valid = 0; message = 'FBC version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_FBC_OBJECTIVE', level, ... version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % fluxObjective if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.fbc_fluxObjective)) [valid, message] = isSBML_FBC_FluxObjective(SBMLStructure.fbc_fluxObjective(index), ... level, version, pkgVersion); index = index + 1; end; end; % report failure if (valid == 0) message = sprintf('Invalid FBC Objective\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/isSBML_FBC_Model.m0000644000000000000000000001245011703262374027112 0ustar rootrootfunction [valid, message] = isSBML_FBC_Model(varargin) % [valid, message] = isSBML_FBC_Model(SBMLFBCModel, level, version, pkgVersion) % % Takes % % 1. SBMLStructure, an SBML FBC Model structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing an FBC package version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC Model structure of the appropriate % level, version and FBC version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* The fields present in a MATLAB_SBML FBC Model structure of the appropriate % level and version can be found using getModelFieldnames(level, version, pkgVersion) % % switch (nargin) case 4 SBMLStructure = varargin{1}; level = varargin{2}; version = varargin{3}; pkgVersion = varargin{4}; case 3 SBMLStructure = varargin{1}; level = varargin{2}; version = varargin{3}; pkgVersion = 1; case 2 SBMLStructure = varargin{1}; level = varargin{2}; version = 1; pkgVersion = 1; case 1 SBMLStructure = varargin{1}; level = 3; version = 1; pkgVersion = 1; otherwise error('need at least one argument'); end; if (length(SBMLStructure) > 1) message = 'cannot deal with arrays of structures'; valid = 0; return; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_MODEL'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'typecode field missing'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'SBML_level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.SBML_level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'SBML_version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.SBML_version) valid = 0; message = 'version mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'fbc_version') && ~isempty(SBMLStructure)) if ~isequal(pkgVersion, SBMLStructure.fbc_version) valid = 0; message = 'FBC version mismatch'; end; end; if (valid == 1) [valid, message] = isValidSBML_Model(SBMLStructure); end; % check that structure contains all the fbc fields if (valid == 1) [SBMLfieldnames, numFields] = getFieldnames('SBML_FBC_MODEL', level, ... version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; %check that any nested structures are appropriate % fluxBound if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.fbc_fluxBound)) [valid, message] = isSBML_FBC_FluxBound(SBMLStructure.fbc_fluxBound(index), ... level, version, pkgVersion); index = index + 1; end; end; % objective if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.fbc_objective)) [valid, message] = isSBML_FBC_Objective(SBMLStructure.fbc_objective(index), ... level, version, pkgVersion); index = index + 1; end; end; %species if (valid == 1) index = 1; while (valid == 1 && index <= length(SBMLStructure.species)) [valid, message] = isSBML_FBC_Species(SBMLStructure.species(index), ... level, version, pkgVersion); index = index + 1; end; end; end; % report failure if (valid == 0) message = sprintf('Invalid FBC Model\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/isSBML_FBC_FluxObjective.m0000644000000000000000000001043111703262374030620 0ustar rootrootfunction [valid, message] = isSBML_FBC_FluxObjective(varargin) % [valid, message] = isSBML_FBC_FluxObjective(SBMLFBCFluxObjective, level, version, pkgVersion) % % Takes % % 1. SBMLStructure, an SBML FBC FluxObjective structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing an FBC package version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC FluxObjective structure of the appropriate % level, version and FBC version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* The fields present in a MATLAB_SBML FBC FluxObjective structure of the appropriate % level and version can be found using getFluxObjectiveFieldnames(level, version, pkgVersion) % % switch (nargin) case 4 SBMLStructure = varargin{1}; level = varargin{2}; version = varargin{3}; pkgVersion = varargin{4}; case 3 SBMLStructure = varargin{1}; level = varargin{2}; version = varargin{3}; pkgVersion = 1; case 2 SBMLStructure = varargin{1}; level = varargin{2}; version = 1; pkgVersion = 1; case 1 SBMLStructure = varargin{1}; level = 3; version = 1; pkgVersion = 1; otherwise error('need at least one argument'); end; if (length(SBMLStructure) > 1) message = 'cannot deal with arrays of structures'; valid = 0; return; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_FBC_FLUXOBJECTIVE'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'typecode field missing'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'fbc_version') && ~isempty(SBMLStructure)) if ~isequal(pkgVersion, SBMLStructure.fbc_version) valid = 0; message = 'FBC version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_FBC_FLUXOBJECTIVE', level, ... version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid FBC FluxObjective\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/isSBML_FBC_FluxBound.m0000644000000000000000000001036111703262374027757 0ustar rootrootfunction [valid, message] = isSBML_FBC_FluxBound(varargin) % [valid, message] = isSBML_FBC_FluxBound(SBMLFBCFluxBound, level, version, pkgVersion) % % Takes % % 1. SBMLStructure, an SBML FBC FluxBound structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing an FBC package version % % Returns % % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC FluxBound structure of the appropriate % level, version and FBC version % - 0, otherwise % 2. a message explaining any failure % % *NOTE:* The fields present in a MATLAB_SBML FBC FluxBound structure of the appropriate % level and version can be found using getFluxBoundFieldnames(level, version, pkgVersion) % % switch (nargin) case 4 SBMLStructure = varargin{1}; level = varargin{2}; version = varargin{3}; pkgVersion = varargin{4}; case 3 SBMLStructure = varargin{1}; level = varargin{2}; version = varargin{3}; pkgVersion = 1; case 2 SBMLStructure = varargin{1}; level = varargin{2}; version = 1; pkgVersion = 1; case 1 SBMLStructure = varargin{1}; level = 3; version = 1; pkgVersion = 1; otherwise error('need at least one argument'); end; if (length(SBMLStructure) > 1) message = 'cannot deal with arrays of structures'; valid = 0; return; end; isValidLevelVersionCombination(level, version); message = ''; % check that argument is a structure valid = isstruct(SBMLStructure); % check the typecode typecode = 'SBML_FBC_FLUXBOUND'; if (valid == 1 && ~isempty(SBMLStructure)) if isfield(SBMLStructure, 'typecode') if (strcmp(typecode, SBMLStructure.typecode) ~= 1) valid = 0; message = 'typecode mismatch'; return; end; else valid = 0; message = 'typecode field missing'; return; end; end; % if the level and version fields exist they must match if (valid == 1 && isfield(SBMLStructure, 'level') && ~isempty(SBMLStructure)) if ~isequal(level, SBMLStructure.level) valid = 0; message = 'level mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'version') && ~isempty(SBMLStructure)) if ~isequal(version, SBMLStructure.version) valid = 0; message = 'version mismatch'; end; end; if (valid == 1 && isfield(SBMLStructure, 'fbc_version') && ~isempty(SBMLStructure)) if ~isequal(pkgVersion, SBMLStructure.fbc_version) valid = 0; message = 'FBC version mismatch'; end; end; % check that structure contains all the necessary fields [SBMLfieldnames, numFields] = getFieldnames('SBML_FBC_FLUXBOUND', level, ... version); if (numFields ==0) valid = 0; message = 'invalid level/version'; end; index = 1; while (valid == 1 && index <= numFields) valid = isfield(SBMLStructure, char(SBMLfieldnames(index))); if (valid == 0); message = sprintf('%s field missing', char(SBMLfieldnames(index))); end; index = index + 1; end; % report failure if (valid == 0) message = sprintf('Invalid FBC FluxBound\n%s\n', message); end; SBMLToolbox-4.1.0/toolbox/fbc_package/Validate_MATLAB_SBML_Structures/Contents.m0000644000000000000000000001310111703262374026016 0ustar rootroot% toolbox\fbc_package\Validate_MATLAB_SBML_Structures % % This folder contains tests that checks that the structure supplied as argument % is of the appropriate form to represent the intended element of an SBML model % that includes the fbc package. % %======================================================================================= % [valid, message] = isSBML_FBC_FluxBound(SBMLFBCFluxBound, level, version, pkgVersion) %======================================================================================= % Takes % 1. SBMLStructure, an SBML FBC FluxBound structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing an FBC package version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC FluxBound structure of the appropriate % level, version and FBC version % - 0, otherwise % 2. a message explaining any failure % %=============================================================================================== % [valid, message] = isSBML_FBC_FluxObjective(SBMLFBCFluxObjective, level, version, pkgVersion) %=============================================================================================== % Takes % 1. SBMLStructure, an SBML FBC FluxObjective structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing an FBC package version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC FluxObjective structure of the appropriate % level, version and FBC version % - 0, otherwise % 2. a message explaining any failure % %=============================================================================== % [valid, message] = isSBML_FBC_Model(SBMLFBCModel, level, version, pkgVersion) %=============================================================================== % Takes % 1. SBMLStructure, an SBML FBC Model structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing an FBC package version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC Model structure of the appropriate % level, version and FBC version % - 0, otherwise % 2. a message explaining any failure % %======================================================================================= % [valid, message] = isSBML_FBC_Objective(SBMLFBCObjective, level, version, pkgVersion) %======================================================================================= % Takes % 1. SBMLStructure, an SBML FBC Objective structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing an FBC package version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC Objective structure of the appropriate % level, version and FBC version % - 0, otherwise % 2. a message explaining any failure % %=================================================================================== % [valid, message] = isSBML_FBC_Species(SBMLFBCSpecies, level, version, pkgVersion) %=================================================================================== % Takes % 1. SBMLStructure, an SBML FBC Species structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing an FBC package version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC Species structure of the appropriate % level, version and FBC version % - 0, otherwise % 2. a message explaining any failure % %======================================================================= % [valid, message] = isValidFBC(SBMLStruct, level, version, pkgVersion) %======================================================================= % Takes % 1. SBMLStruct, an SBML structure % 2. level, an integer representing an SBML level % 3. version, an integer representing an SBML version % 4. pkgVersion, an integer representing the FBC package version % Returns % 1. valid = % - 1, if the structure represents % a MATLAB_SBML FBC structure of the appropriate % level and version % - 0, otherwise % 2. a message explaining any failure % % SBMLToolbox-4.1.0/toolbox/fbc_package/test/0000755000000000000000000000000011704572250017173 5ustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/test/test-data/0000755000000000000000000000000011704572250021061 5ustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/test/test-data/fbc.xml0000644000000000000000000000675111701333242022337 0ustar rootroot k S1 k S2 SBMLToolbox-4.1.0/toolbox/fbc_package/test/runFBCTest.m0000644000000000000000000000343011703262556021334 0ustar rootrootfunction y = runFBCTest % fbcBindingEnabled = 1; if isBindingFbcEnabled() == 0 disp ('The libsbml binding for fbc is not enabled'); disp ('not all tests can be run'); fbcBindingEnabled = 0; end; cd ..; cd MATLAB_SBML_Structures; cd test; disp('Performing tests in fbc_packages/MATLAB_SBML_Structures directory'); st = testFBCStructures(fbcBindingEnabled); cd ..; cd ..; cd Validate_MATLAB_SBML_Structures; cd test; disp('Performing tests in fbc_packages/Validate_MATLAB_SBML_Structures directory'); valid = test_fbc_valid(fbcBindingEnabled); cd ..; y = st + valid; cd ..; cd test; SBMLToolbox-4.1.0/toolbox/fbc_package/test/createFBCExample.m0000644000000000000000000001205211703262366022446 0ustar rootrootfunction m = createFBCExample % m = FBCModel_create(3, 1, 1); c = Compartment_create(3, 1); c = Compartment_setId(c, 'compartment'); c = Compartment_setSize(c, 1); c = Compartment_setConstant(c, 1); m = Model_addCompartment(m, c); s = FBCSpecies_create(3,1,1); s = Species_setCompartment(s, 'compartment'); s = Species_setHasOnlySubstanceUnits(s, 0); s = Species_setBoundaryCondition(s, 0); s = Species_setConstant(s, 0); s1 = Species_setId(s, 'Node1'); m = Model_addSpecies(m, s1); s2 = Species_setId(s, 'Node2'); m = Model_addSpecies(m, s2); s3 = Species_setId(s, 'Node3'); m = Model_addSpecies(m, s3); s4 = Species_setId(s, 'Node4'); m = Model_addSpecies(m, s4); s5 = Species_setId(s, 'Node5'); m = Model_addSpecies(m, s5); s6 = Species_setId(s, 'Node6'); m = Model_addSpecies(m, s6); s7 = Species_setId(s, 'Node7'); m = Model_addSpecies(m, s7); s8 = Species_setId(s, 'Node8'); m = Model_addSpecies(m, s8); s0 = Species_setId(s, 'Node0'); s0 = Species_setBoundaryCondition(s0, 1); m = Model_addSpecies(m, s0); s9 = Species_setId(s, 'Node9'); s9 = Species_setBoundaryCondition(s9, 1); m = Model_addSpecies(m, s9); sr = SpeciesReference_create(3,1); sr = SpeciesReference_setStoichiometry(sr, 1); sr = SpeciesReference_setConstant(sr, 1); sr0 = SpeciesReference_setSpecies(sr, 'Node0'); sr1 = SpeciesReference_setSpecies(sr, 'Node1'); sr2 = SpeciesReference_setSpecies(sr, 'Node2'); sr3 = SpeciesReference_setSpecies(sr, 'Node3'); sr4 = SpeciesReference_setSpecies(sr, 'Node4'); sr5 = SpeciesReference_setSpecies(sr, 'Node5'); sr6 = SpeciesReference_setSpecies(sr, 'Node6'); sr7 = SpeciesReference_setSpecies(sr, 'Node7'); sr8 = SpeciesReference_setSpecies(sr, 'Node8'); sr9 = SpeciesReference_setSpecies(sr, 'Node9'); r = Reaction_create(3, 1); r = Reaction_setFast(r, 0); r = Reaction_setReversible(r, 0); rj0 = Reaction_setId(r, 'J0'); rj0 = Reaction_addReactant(rj0, sr0); rj0 = Reaction_addProduct(rj0, sr1); m = Model_addReaction(m, rj0); rj1 = Reaction_setId(r, 'J1'); rj1 = Reaction_addReactant(rj1, sr1); rj1 = Reaction_addProduct(rj1, sr2); m = Model_addReaction(m, rj1); rj2 = Reaction_setId(r, 'J2'); rj2 = Reaction_addReactant(rj2, sr2); rj2 = Reaction_addProduct(rj2, sr3); m = Model_addReaction(m, rj2); rj3 = Reaction_setId(r, 'J3'); rj3 = Reaction_addReactant(rj3, sr1); rj3 = Reaction_addProduct(rj3, sr4); m = Model_addReaction(m, rj3); rj4 = Reaction_setId(r, 'J4'); rj4 = Reaction_addReactant(rj4, sr4); rj4 = Reaction_addProduct(rj4, sr3); m = Model_addReaction(m, rj4); rj5 = Reaction_setId(r, 'J5'); rj5 = Reaction_addReactant(rj5, sr3); rj5 = Reaction_addProduct(rj5, sr5); m = Model_addReaction(m, rj5); rj6 = Reaction_setId(r, 'J6'); rj6 = Reaction_addReactant(rj6, sr5); rj6 = Reaction_addProduct(rj6, sr6); m = Model_addReaction(m, rj6); rj7 = Reaction_setId(r, 'J7'); rj7 = Reaction_addReactant(rj7, sr6); rj7 = Reaction_addProduct(rj7, sr7); m = Model_addReaction(m, rj7); rj8 = Reaction_setId(r, 'J8'); rj8 = Reaction_addReactant(rj8, sr5); rj8 = Reaction_addProduct(rj8, sr8); m = Model_addReaction(m, rj8); rj9 = Reaction_setId(r, 'J9'); rj9 = Reaction_addReactant(rj9, sr8); rj9 = Reaction_addProduct(rj9, sr7); m = Model_addReaction(m, rj9); rj10 = Reaction_setId(r, 'J10'); rj10 = Reaction_addReactant(rj10, sr7); rj10 = Reaction_addProduct(rj10, sr9); m = Model_addReaction(m, rj10); fb = FluxBound_create(3, 1, 1); fb = FluxBound_setId(fb, 'bound1'); fb = FluxBound_setReaction(fb, 'J0'); fb = FluxBound_setOperation(fb, 'equal'); fb = FluxBound_setValue(fb, 10); m = FBCModel_addFluxBound(m, fb); fo = FluxObjective_create(3,1,1); fo = FluxObjective_setReaction(fo, 'J8'); fo = FluxObjective_setCoefficient(fo, 1); o = Objective_create(3, 1, 1); o = Objective_setId(o, 'obj1'); o = Objective_setType(o, 'maximize'); o = Objective_addFluxObjective(o, fo); m = FBCModel_addObjective(m, o); m = FBCModel_setActiveObjective(m, 'obj1'); OutputSBML(m, 'test_example.xml'); SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/0000755000000000000000000000000011704572220022231 5ustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/test/0000755000000000000000000000000011704572250023213 5ustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/test/testObjective.m0000644000000000000000000000577511703262366026224 0ustar rootrootfunction [fail, num, message] = testObjective() % % testObjective % % returns % the number of fails % the number of tests % and an array of any messages % Filename : % Description : % Author(s) : SBML Development Group % $Id: $ % $Source v $ % % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing Objective'); disp('Testing L1V1'); obj = Objective_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Objective', fail, num, message); disp('Testing L1V2'); obj = Objective_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Objective', fail, num, message); disp('Testing L2V1'); obj = Objective_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Objective', fail, num, message); disp('Testing L2V2'); obj = Objective_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Objective', fail, num, message); disp('Testing L2V3'); obj = Objective_create(2, 3); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Objective', fail, num, message); disp('Testing L2V4'); obj = Objective_create(2, 4); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'Objective', fail, num, message); disp('Testing L3V1'); obj = Objective_create(3, 1, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Fbc_id', 1}... {'Fbc_type', 1}... {'Fbc_fluxObjective', 9}... }; [fail, num, message] = testObject(obj, attributes, 'Objective', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/test/testFluxObjective.m0000644000000000000000000000604211703262366027047 0ustar rootrootfunction [fail, num, message] = testFluxObjective() % % testFluxObjective % % returns % the number of fails % the number of tests % and an array of any messages % Filename : % Description : % Author(s) : SBML Development Group % $Id: $ % $Source v $ % % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing FluxObjective'); disp('Testing L1V1'); obj = FluxObjective_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxObjective', fail, num, message); disp('Testing L1V2'); obj = FluxObjective_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxObjective', fail, num, message); disp('Testing L2V1'); obj = FluxObjective_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxObjective', fail, num, message); disp('Testing L2V2'); obj = FluxObjective_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxObjective', fail, num, message); disp('Testing L2V3'); obj = FluxObjective_create(2, 3); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxObjective', fail, num, message); disp('Testing L2V4'); obj = FluxObjective_create(2, 4); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxObjective', fail, num, message); disp('Testing L3V1'); obj = FluxObjective_create(3, 1, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Fbc_reaction', 1}... {'Fbc_coefficient', 3}... }; [fail, num, message] = testObject(obj, attributes, 'FluxObjective', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/test/testFluxBound.m0000644000000000000000000000603711703262366026210 0ustar rootrootfunction [fail, num, message] = testFluxBound() % % testFluxBound % % returns % the number of fails % the number of tests % and an array of any messages % Filename : % Description : % Author(s) : SBML Development Group % $Id: $ % $Source v $ % % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing FluxBound'); disp('Testing L1V1'); obj = FluxBound_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxBound', fail, num, message); disp('Testing L1V2'); obj = FluxBound_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxBound', fail, num, message); disp('Testing L2V1'); obj = FluxBound_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxBound', fail, num, message); disp('Testing L2V2'); obj = FluxBound_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxBound', fail, num, message); disp('Testing L2V3'); obj = FluxBound_create(2, 3); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxBound', fail, num, message); disp('Testing L2V4'); obj = FluxBound_create(2, 4); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FluxBound', fail, num, message); disp('Testing L3V1'); obj = FluxBound_create(3, 1, 1); attributes = {... {'Metaid', 1}... {'SBOTerm', 2}... {'Fbc_id', 1}... {'Fbc_reaction', 1}... {'Fbc_operation', 1}... {'Fbc_value', 3}... }; [fail, num, message] = testObject(obj, attributes, 'FluxBound', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/test/testFBCStructures.m0000644000000000000000000000324111703262366026772 0ustar rootrootfunction y = testFBCStructures(varargin) % fbcBindingEnabled = 1; if (nargin == 0) if isBindingFbcEnabled() == 0 disp ('The libsbml binding for fbc is not enabled'); disp ('not all tests can be run'); fbcBindingEnabled = 0; end; else fbcBindingEnabled = varargin{1}; end; fail = 0; fail = fail + testFluxBound(); fail = fail + testFluxObjective(); fail = fail + testObjective(); fail = fail + testFBCSpecies(); fail = fail + testFBCModel(); y = fail; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/test/testFBCSpecies.m0000644000000000000000000000566411703262366026215 0ustar rootrootfunction [fail, num, message] = testFBCSpecies() % % testFBCSpecies % % returns % the number of fails % the number of tests % and an array of any messages % Filename : % Description : % Author(s) : SBML Development Group % $Id: $ % $Source v $ % % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing FBCSpecies'); disp('Testing L1V1'); obj = FBCSpecies_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCSpecies', fail, num, message); disp('Testing L1V2'); obj = FBCSpecies_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCSpecies', fail, num, message); disp('Testing L2V1'); obj = FBCSpecies_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCSpecies', fail, num, message); disp('Testing L2V2'); obj = FBCSpecies_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCSpecies', fail, num, message); disp('Testing L2V3'); obj = FBCSpecies_create(2, 3); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCSpecies', fail, num, message); disp('Testing L2V4'); obj = FBCSpecies_create(2, 4); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCSpecies', fail, num, message); disp('Testing L3V1'); obj = FBCSpecies_create(3, 1, 1); attributes = {... {'Fbc_charge', 3}... {'Fbc_chemicalFormula', 1}... }; [fail, num, message] = testObject(obj, attributes, 'FBCSpecies', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/test/testFBCModel.m0000644000000000000000000000567311703262366025662 0ustar rootrootfunction [fail, num, message] = testFBCModel() % % testFBCModel % % returns % the number of fails % the number of tests % and an array of any messages % Filename : % Description : % Author(s) : SBML Development Group % $Id: $ % $Source v $ % % fail = 0; num = 0; message = {}; warning('off', 'Warn:InvalidLV'); disp('Testing FBCModel'); disp('Testing L1V1'); obj = FBCModel_create(1, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCModel', fail, num, message); disp('Testing L1V2'); obj = FBCModel_create(1, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCModel', fail, num, message); disp('Testing L2V1'); obj = FBCModel_create(2, 1); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCModel', fail, num, message); disp('Testing L2V2'); obj = FBCModel_create(2, 2); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCModel', fail, num, message); disp('Testing L2V3'); obj = FBCModel_create(2, 3); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCModel', fail, num, message); disp('Testing L2V4'); obj = FBCModel_create(2, 4); attributes = {}; [fail, num, message] = testObject(obj, attributes, 'FBCModel', fail, num, message); disp('Testing L3V1'); obj = FBCModel_create(3, 1, 1); attributes = {... {'Fbc_fluxBound', 9}... {'Fbc_objective', 9}... {'Fbc_activeObjective', 1}... }; [fail, num, message] = testObject(obj, attributes, 'FBCModel', fail, num, message); disp(sprintf('Number tests: %d', num)); disp(sprintf('Number fails: %d', fail)); disp(sprintf('Pass rate: %d%%', ((num-fail)/num)*100)); warning('on', 'Warn:InvalidLV'); SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/0000755000000000000000000000000011704572252025552 5ustar rootroot././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getObjectiveFieldnames.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getObjectiveFieldnames0000644000000000000000000000507411703262372032103 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getObjectiveFieldnames(level, ... version, pkgVersion) % [fieldnames, num] = getObjectiveFieldnames(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. an array of fieldnames for an SBML Objective structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; % need a check on package version if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 3) if (version == 1) if (pkgVersion == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'fbc_id', ... 'fbc_type', ... 'fbc_fluxObjective', ... 'level', ... 'version', ... 'fbc_version', ... }; nNumberFields = 11; end; end; end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getObjectiveDefaultValues.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getObjectiveDefaultVal0000644000000000000000000000476511703262372032071 0ustar rootrootfunction [defaultValues] = getObjectiveDefaultValues(level, version, pkgVersion) % [values] = getObjectiveDefaultValues(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. an array of default values for an SBML Objective structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML Objective structure can be found using % the function `getObjectiveFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) defaultValues = []; elseif (level == 3) if (version == 1) if (pkgVersion == 1) defaultValues = { 'SBML_FBC_OBJECTIVE', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... [], ... int32(3), ... int32(1), ... int32(1), ... }; end; end; end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFluxObjectiveFieldnames.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFluxObjectiveFieldn0000644000000000000000000000513011703262372032065 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getFluxObjectiveFieldnames(level, ... version, pkgVersion) % [fieldnames, num] = getFluxObjectiveFieldnames(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. an array of fieldnames for an SBML FluxObjective structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; % need a check on package version if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 3) if (version == 1) if (pkgVersion == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'fbc_reaction', ... 'fbc_coefficient', ... 'isSetfbc_coefficient', ... 'level', ... 'version', ... 'fbc_version', ... }; nNumberFields = 11; end; end; end; ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFluxObjectiveDefaultValues.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFluxObjectiveDefaul0000644000000000000000000000502511703262372032067 0ustar rootrootfunction [defaultValues] = getFluxObjectiveDefaultValues(level, version, pkgVersion) % [values] = getFluxObjectivesDefaultValues(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. an array of default values for an SBML FluxObjective structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML FluxObjective structure can be found using % the function `getFluxObjectiveFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) defaultValues = []; elseif (level == 3) if (version == 1) if (pkgVersion == 1) defaultValues = { 'SBML_FBC_FLUXOBJECTIVE', ... '', ... '', ... '', ... int32(-1), ... '', ... 0/0, ... int32(0), ... int32(3), ... int32(1), ... int32(1), ... }; end; end; end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFluxBoundFieldnames.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFluxBoundFieldnames0000644000000000000000000000522511703262372032075 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getFluxBoundFieldnames(level, ... version, pkgVersion) % [fieldnames, num] = getFluxBoundFieldnames(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. an array of fieldnames for an SBML FluxBound structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; % need a check on package version if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 3) if (version == 1) if (pkgVersion == 1) SBMLfieldnames = { 'typecode', ... 'metaid', ... 'notes', ... 'annotation', ... 'sboTerm', ... 'fbc_id', ... 'fbc_reaction', ... 'fbc_operation', ... 'fbc_value', ... 'isSetfbc_value', ... 'level', ... 'version', ... 'fbc_version', ... }; nNumberFields = 13; end; end; end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFluxBoundDefaultValues.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFluxBoundDefaultVal0000644000000000000000000000507311703262372032056 0ustar rootrootfunction [defaultValues] = getFluxBoundDefaultValues(level, version, pkgVersion) % [values] = getFluxBoundsDefaultValues(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. an array of default values for an SBML FluxBound structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML FluxBound structure can be found using % the function `getFluxBoundFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) defaultValues = []; elseif (level == 3) if (version == 1) if (pkgVersion == 1) defaultValues = { 'SBML_FBC_FLUXBOUND', ... '', ... '', ... '', ... int32(-1), ... '', ... '', ... '', ... 0/0, ... int32(0), ... int32(3), ... int32(1), ... int32(1), ... }; end; end; end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFBCSpeciesFieldnames.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFBCSpeciesFieldname0000644000000000000000000000446411703262372031716 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getFBCSpeciesFieldnames(level, ... version, pkgVersion) % [fieldnames, num] = getFBCSpeciesFieldnames(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. an array of fieldnames for an SBML FBCSpecies structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; % need a check on package version if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 3) if (version == 1) if (pkgVersion == 1) SBMLfieldnames = { 'fbc_charge', ... 'isSetfbc_charge', ... 'fbc_chemicalFormula', ... 'fbc_version', ... }; nNumberFields = 4; end; end; end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFBCSpeciesDefaultValues.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFBCSpeciesDefaultVa0000644000000000000000000000442611703262372031703 0ustar rootrootfunction [defaultValues] = getFBCSpeciesDefaultValues(level, version, pkgVersion) % [values] = getFBCSpeciesDefaultValues(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. an array of default values for teh FBC attributes SBML Species structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML FBC Species structure can be found using % the function `getFBCSpeciesFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; if (level == 1) defaultValues = []; elseif (level == 2) defaultValues = []; elseif (level == 3) if (version == 1) if (pkgVersion == 1) defaultValues = { int32(0), ... int32(0), ... '', ... int32(1), ... }; end; end; end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFBCModelFieldnames.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFBCModelFieldnames.0000644000000000000000000000445711703262372031626 0ustar rootrootfunction [SBMLfieldnames, nNumberFields] = getFBCModelFieldnames(level, ... version, pkgVersion) % [fieldnames, num] = getFBCModelFieldnames(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. an array of fieldnames for an SBML FBCModel structure of the given level and version % 2. the number of fieldnames % % if (~isValidLevelVersionCombination(level, version)) error ('invalid level/version combination'); end; % need a check on package version if (level == 1) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 2) SBMLfieldnames = []; nNumberFields = 0; elseif (level == 3) if (version == 1) if (pkgVersion == 1) SBMLfieldnames = { 'fbc_version', ... 'fbc_fluxBound', ... 'fbc_objective', ... 'fbc_activeObjective', ... }; nNumberFields = 4; end; end; end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFBCModelDefaultValues.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/getFBCModelDefaultValu0000644000000000000000000000457211703262372031713 0ustar rootrootfunction [defaultValues, prefix, ns] = getFBCModelDefaultValues(level, version, pkgVersion) % [values] = getFBCModelDefaultValues(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. an array of default values for teh FBC attributes SBML Model structure of the given level and version % % *NOTE:* The corresponding fields present in an SBML FBC Model structure can be found using % the function `getFBCModelFieldnames` % %check the input arguments are appropriate if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; prefix = ''; ns = ''; if (level == 1) defaultValues = []; elseif (level == 2) defaultValues = []; elseif (level == 3) if (version == 1) if (pkgVersion == 1) defaultValues = { int32(1), ... [], ... [], ... '', ... }; prefix = 'fbc'; ns = 'http://www.sbml.org/sbml/level3/version1/fbc/version1'; end; end; end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/structFieldnames/Contents.m0000644000000000000000000001462011703262372027526 0ustar rootroot% toolbox\fbc_package\MATLAB_SBML_Structures\structFieldnames % % These functions return the fieldnames and default values for the % MATLAB_SBML FBC structures. % %================================================================= % [values] = getFBCModelDefaultValues(level, version, pkgVersion) %================================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. an array of default values for teh FBC attributes SBML Model structure of the given level and version % %======================================================================= % [fieldnames, num] = getFBCModelFieldnames(level, version, pkgVersion) %======================================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. an array of fieldnames for an SBML FBCModel structure of the given level and version % 2. the number of fieldnames % %=================================================================== % [values] = getFBCSpeciesDefaultValues(level, version, pkgVersion) %=================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. an array of default values for teh FBC attributes SBML Species structure of the given level and version % %========================================================================= % [fieldnames, num] = getFBCSpeciesFieldnames(level, version, pkgVersion) %========================================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. an array of fieldnames for an SBML FBCSpecies structure of the given level and version % 2. the number of fieldnames % %=================================================================== % [values] = getFluxBoundsDefaultValues(level, version, pkgVersion) %=================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. an array of default values for an SBML FluxBound structure of the given level and version % %======================================================================== % [fieldnames, num] = getFluxBoundFieldnames(level, version, pkgVersion) %======================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. an array of fieldnames for an SBML FluxBound structure of the given level and version % 2. the number of fieldnames % %======================================================================= % [values] = getFluxObjectivesDefaultValues(level, version, pkgVersion) %======================================================================= % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. an array of default values for an SBML FluxObjective structure of the given level and version % %============================================================================ % [fieldnames, num] = getFluxObjectiveFieldnames(level, version, pkgVersion) %============================================================================ % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. an array of fieldnames for an SBML FluxObjective structure of the given level and version % 2. the number of fieldnames % %================================================================== % [values] = getObjectiveDefaultValues(level, version, pkgVersion) %================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. an array of default values for an SBML Objective structure of the given level and version % %======================================================================== % [fieldnames, num] = getObjectiveFieldnames(level, version, pkgVersion) %======================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. an array of fieldnames for an SBML Objective structure of the given level and version % 2. the number of fieldnames % % SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/0000755000000000000000000000000011704572252024150 5ustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_unsetType.m0000644000000000000000000000334111703262370030315 0ustar rootrootfunction SBMLObjective = Objective_unsetType(SBMLObjective) % SBMLObjective = Objective_unsetType(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. the SBML FBC Objective structure with the fbc_type attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_type') SBMLObjective.fbc_type = ''; else error('type not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_unsetSBOTerm.m0000644000000000000000000000335011703262370030647 0ustar rootrootfunction SBMLObjective = Objective_unsetSBOTerm(SBMLObjective) % SBMLObjective = Objective_unsetSBOTerm(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. the SBML FBC Objective structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'sboTerm') SBMLObjective.sboTerm = NaN; else error('sboTerm not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_unsetMetaid.m0000644000000000000000000000334111703262370030577 0ustar rootrootfunction SBMLObjective = Objective_unsetMetaid(SBMLObjective) % SBMLObjective = Objective_unsetMetaid(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. the SBML FBC Objective structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'metaid') SBMLObjective.metaid = ''; else error('metaid not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_unsetId.m0000644000000000000000000000332511703262370027732 0ustar rootrootfunction SBMLObjective = Objective_unsetId(SBMLObjective) % SBMLObjective = Objective_unsetId(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. the SBML FBC Objective structure with the fbc_id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_id') SBMLObjective.fbc_id = ''; else error('id not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_setType.m0000644000000000000000000000357011703262370027756 0ustar rootrootfunction SBMLObjective = Objective_setType(SBMLObjective, type) % SBMLObjective = Objective_setType(SBMLObjective, type) % % Takes % % 1. SBMLObjective, an SBML Objective structure % 2. type, a string representing the fbc_type to be set % % Returns % % 1. the SBML FBC Objective structure with the new value for the fbc_type attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_type') if ~ischar(type) error('type must be character array') ; else SBMLObjective.fbc_type = type; end; else error('type not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_setSBOTerm.m0000644000000000000000000000361211703262370030305 0ustar rootrootfunction SBMLObjective = Objective_setSBOTerm(SBMLObjective, sboTerm) % SBMLObjective = Objective_setSBOTerm(SBMLObjective, sboTerm) % % Takes % % 1. SBMLObjective, an SBML Objective structure % 2. sboTerm, a number representing the sboTerm to be set % % Returns % % 1. the SBML FBC Objective structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'sboTerm') if ~isnumeric(sboTerm) error('sboTerm must be numeric') ; else SBMLObjective.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_setMetaid.m0000644000000000000000000000360211703262370030234 0ustar rootrootfunction SBMLObjective = Objective_setMetaid(SBMLObjective, metaid) % SBMLObjective = Objective_setMetaid(SBMLObjective, metaid) % % Takes % % 1. SBMLObjective, an SBML Objective structure % 2. metaid, a string representing the metaid to be set % % Returns % % 1. the SBML FBC Objective structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLObjective.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_setId.m0000644000000000000000000000353611703262370027373 0ustar rootrootfunction SBMLObjective = Objective_setId(SBMLObjective, id) % SBMLObjective = Objective_setId(SBMLObjective, id) % % Takes % % 1. SBMLObjective, an SBML Objective structure % 2. id, a string representing the fbc_id to be set % % Returns % % 1. the SBML FBC Objective structure with the new value for the fbc_id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_id') if ~ischar(id) error('id must be character array') ; else SBMLObjective.fbc_id = id; end; else error('id not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_isSetType.m0000644000000000000000000000333411703262370030250 0ustar rootrootfunction value = Objective_isSetType(SBMLObjective) % type = Objective_isSetType(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. value = % - 1 if the fbc_type attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_type') value = ~isempty(SBMLObjective.fbc_type); else error('type not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_isSetSBOTerm.m0000644000000000000000000000334611703262370030605 0ustar rootrootfunction value = Objective_isSetSBOTerm(SBMLObjective) % sboTerm = Objective_isSetSBOTerm(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'sboTerm') value = (SBMLObjective.sboTerm > 0); else error('isSetSboTerm not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_isSetMetaid.m0000644000000000000000000000333611703262370030534 0ustar rootrootfunction value = Objective_isSetMetaid(SBMLObjective) % metaid = Objective_isSetMetaid(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'metaid') value = ~isempty(SBMLObjective.metaid); else error('metaid not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_isSetId.m0000644000000000000000000000331611703262370027663 0ustar rootrootfunction value = Objective_isSetId(SBMLObjective) % id = Objective_isSetId(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. value = % - 1 if the fbc_id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_id') value = ~isempty(SBMLObjective.fbc_id); else error('id not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_getType.m0000644000000000000000000000325611703262370027743 0ustar rootrootfunction type = Objective_getType(SBMLObjective) % type = Objective_getType(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. the value of the fbc_type attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_type') type = SBMLObjective.fbc_type; else error('type not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_getSBOTerm.m0000644000000000000000000000327511703262370030276 0ustar rootrootfunction sboTerm = Objective_getSBOTerm(SBMLObjective) % sboTerm = Objective_getSBOTerm(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'sboTerm') sboTerm = SBMLObjective.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d Objective', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_getNumFluxObjectives.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_getNumFluxObjective0000644000000000000000000000340711703262370032016 0ustar rootrootfunction num = Objective_getNumFluxObjectives(SBMLObjective) % num = Objective_getNumFluxObjectives(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. the number of SBML FluxObjective structures present in the Objective % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_fluxObjective') num = length(SBMLObjective.fbc_fluxObjective); else error('fluxObjective not an element on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_getMetaid.m0000644000000000000000000000326411703262370030224 0ustar rootrootfunction metaid = Objective_getMetaid(SBMLObjective) % metaid = Objective_getMetaid(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'metaid') metaid = SBMLObjective.metaid; else error('metaid not an attribute on SBML L%dV%d Objective', level, version); end; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_getListOfFluxObjectives.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_getListOfFluxObject0000644000000000000000000000340711703262370031753 0ustar rootrootfunction fluxObjective = Objective_getListOfFluxObjectives(SBMLObjective) % fluxObjective = Objective_getListOfFluxObjectives(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. an array of the fluxObjective structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_fluxObjective') fluxObjective = SBMLObjective.fbc_fluxObjective; else error('fluxObjective not an element on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_getId.m0000644000000000000000000000323411703262370027352 0ustar rootrootfunction id = Objective_getId(SBMLObjective) % id = Objective_getId(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. the value of the fbc_id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_id') id = SBMLObjective.fbc_id; else error('id not an attribute on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_getFluxObjective.m0000644000000000000000000000404711703262370031572 0ustar rootrootfunction fluxObjective = Objective_getFluxObjective(SBMLObjective, index) % fluxObjective = Objective_getFluxObjective(SBMLObjective, index) % % Takes % % 1. SBMLObjective, an SBML Objective structure % 2. index, an integer representing the index of SBML FluxObjective structure % % Returns % % 1. the SBML FluxObjective structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_fluxObjective') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLObjective.fbc_fluxObjective) fluxObjective = SBMLObjective.fbc_fluxObjective; else error('index is out of range'); end; else error('fluxObjective not an element on SBML L%dV%d Objective', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_createFluxObjective.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_createFluxObjective0000644000000000000000000000401211703262370032013 0ustar rootrootfunction SBMLObjective = Objective_createFluxObjective(SBMLObjective) % SBMLObjective = Objective_createFluxObjective(SBMLObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % % Returns % % 1. the SBML Objective structure with a new SBML FluxObjective structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); if isfield(SBMLObjective, 'fbc_fluxObjective') SBMLFluxObjective = FluxObjective_create(level, version, SBMLObjective.fbc_version); index = length(SBMLObjective.fbc_fluxObjective); if index == 0 SBMLObjective.fbc_fluxObjective = SBMLFluxObjective; else SBMLObjective.fbc_fluxObjective(index+1) = SBMLFluxObjective; end; else error('fluxObjective not an element on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_create.m0000644000000000000000000000572711703262370027572 0ustar rootrootfunction Objective = Objective_create(varargin) % Objective = Objective_create(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. a MATLAB_SBML FBC Objective structure of the appropriate level, version and pkgVersion % % %check the input arguments are appropriate if (nargin > 3) error('too many input arguments'); end; switch (nargin) case 3 level = varargin{1}; version = varargin{2}; pkgVersion = varargin{3}; case 2 level = varargin{1}; version = varargin{2}; pkgVersion = 1; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; pkgVersion = 1; otherwise level = 3; version = 1; pkgVersion = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getObjectiveFieldnames(level, version, pkgVersion); if (num > 0) values = getObjectiveDefaultValues(level, version, pkgVersion); Objective = cell2struct(values, fieldnames, 2); %add empty substructures Objective.fbc_fluxObjective = FluxObjective_create(level, version, pkgVersion); Objective.fbc_fluxObjective(1:end) = []; %add level and version Objective.level = level; Objective.version = version; Objective.fbc_version = pkgVersion; %check correct structure if ~isSBML_FBC_Objective(Objective, level, version) Objective = struct(); warning('Warn:BadStruct', 'Failed to create Objective'); end; else Objective = []; warning('Warn:InvalidLV', 'Objective not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Objective_addFluxObjective.m0000644000000000000000000000435011703262370031540 0ustar rootrootfunction SBMLObjective = Objective_addFluxObjective(SBMLObjective, SBMLFluxObjective) % SBMLObjective = Objective_addFluxObjective(SBMLObjective, SBMLFluxObjective) % % Takes % % 1. SBMLObjective, an SBML Objective structure % 2. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. the SBML Objective structure with the SBML FluxObjective structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLObjective); [fluxObjective_level, fluxObjective_version] = GetLevelVersion(SBMLFluxObjective); if level ~= fluxObjective_level error('mismatch in levels'); elseif version ~= fluxObjective_version error('mismatch in versions'); end; if isfield(SBMLObjective, 'fbc_fluxObjective') index = length(SBMLObjective.fbc_fluxObjective); if index == 0 SBMLObjective.fbc_fluxObjective = SBMLFluxObjective; else SBMLObjective.fbc_fluxObjective(index+1) = SBMLFluxObjective; end; else error('fluxObjective not an element on SBML L%dV%d Objective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/Objective/Contents.m0000644000000000000000000002040611703262370026121 0ustar rootroot% toolbox\fbc_package\MATLAB_SBML_Structures\Objective % % The functions allow users to create and work with the SBML FBC Objective structure. % %============================================================================== % SBMLObjective = Objective_addFluxObjective(SBMLObjective, SBMLFluxObjective) %============================================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % 2. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. the SBML Objective structure with the SBML FluxObjective structure added % %========================================================== % Objective = Objective_create(level, version, pkgVersion) %========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. a MATLAB_SBML FBC Objective structure of the appropriate level, version and pkgVersion % %============================================================== % SBMLObjective = Objective_createFluxObjective(SBMLObjective) %============================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. the SBML Objective structure with a new SBML FluxObjective structure added % %================================================================== % fluxObjective = Objective_getFluxObjective(SBMLObjective, index) %================================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % 2. index, an integer representing the index of SBML FluxObjective structure % Returns % 1. the SBML FluxObjective structure at the indexed position % %===================================== % id = Objective_getId(SBMLObjective) %===================================== % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. the value of the fbc_id attribute % %================================================================== % fluxObjective = Objective_getListOfFluxObjectives(SBMLObjective) %================================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. an array of the fluxObjective structures % %============================================= % metaid = Objective_getMetaid(SBMLObjective) %============================================= % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. the value of the metaid attribute % %===================================================== % num = Objective_getNumFluxObjectives(SBMLObjective) %===================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. the number of SBML FluxObjective structures present in the Objective % %=============================================== % sboTerm = Objective_getSBOTerm(SBMLObjective) %=============================================== % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. the value of the sboTerm attribute % %========================================= % type = Objective_getType(SBMLObjective) %========================================= % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. the value of the fbc_type attribute % %======================================= % id = Objective_isSetId(SBMLObjective) %======================================= % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. value = % - 1 if the fbc_id attribute is set % - 0 otherwise % %=============================================== % metaid = Objective_isSetMetaid(SBMLObjective) %=============================================== % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %================================================= % sboTerm = Objective_isSetSBOTerm(SBMLObjective) %================================================= % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %=========================================== % type = Objective_isSetType(SBMLObjective) %=========================================== % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. value = % - 1 if the fbc_type attribute is set % - 0 otherwise % %==================================================== % SBMLObjective = Objective_setId(SBMLObjective, id) %==================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % 2. id, a string representing the fbc_id to be set % Returns % 1. the SBML FBC Objective structure with the new value for the fbc_id attribute % %============================================================ % SBMLObjective = Objective_setMetaid(SBMLObjective, metaid) %============================================================ % Takes % 1. SBMLObjective, an SBML Objective structure % 2. metaid, a string representing the metaid to be set % Returns % 1. the SBML FBC Objective structure with the new value for the metaid attribute % %============================================================== % SBMLObjective = Objective_setSBOTerm(SBMLObjective, sboTerm) %============================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % 2. sboTerm, a number representing the sboTerm to be set % Returns % 1. the SBML FBC Objective structure with the new value for the sboTerm attribute % %======================================================== % SBMLObjective = Objective_setType(SBMLObjective, type) %======================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % 2. type, a string representing the fbc_type to be set % Returns % 1. the SBML FBC Objective structure with the new value for the fbc_type attribute % %================================================== % SBMLObjective = Objective_unsetId(SBMLObjective) %================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. the SBML FBC Objective structure with the fbc_id attribute unset % %====================================================== % SBMLObjective = Objective_unsetMetaid(SBMLObjective) %====================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. the SBML FBC Objective structure with the metaid attribute unset % %======================================================= % SBMLObjective = Objective_unsetSBOTerm(SBMLObjective) %======================================================= % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. the SBML FBC Objective structure with the sboTerm attribute unset % %==================================================== % SBMLObjective = Objective_unsetType(SBMLObjective) %==================================================== % Takes % 1. SBMLObjective, an SBML Objective structure % Returns % 1. the SBML FBC Objective structure with the fbc_type attribute unset % % SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/0000755000000000000000000000000011704572252025007 5ustar rootroot././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_unsetSBOTerm.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_unsetSBOTer0000644000000000000000000000343311703262366031744 0ustar rootrootfunction SBMLFluxObjective = FluxObjective_unsetSBOTerm(SBMLFluxObjective) % SBMLFluxObjective = FluxObjective_unsetSBOTerm(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. the SBML FBC FluxObjective structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'sboTerm') SBMLFluxObjective.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_unsetReaction.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_unsetReacti0000644000000000000000000000345511703262366032061 0ustar rootrootfunction SBMLFluxObjective = FluxObjective_unsetReaction(SBMLFluxObjective) % SBMLFluxObjective = FluxObjective_unsetReaction(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. the SBML FBC FluxObjective structure with the fbc_reaction attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'fbc_reaction') SBMLFluxObjective.fbc_reaction = ''; else error('reaction not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_unsetMetaid.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_unsetMetaid0000644000000000000000000000342511703262366032052 0ustar rootrootfunction SBMLFluxObjective = FluxObjective_unsetMetaid(SBMLFluxObjective) % SBMLFluxObjective = FluxObjective_unsetMetaid(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. the SBML FBC FluxObjective structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'metaid') SBMLFluxObjective.metaid = ''; else error('metaid not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_unsetCoefficient.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_unsetCoeffi0000644000000000000000000000355611703262366032047 0ustar rootrootfunction SBMLFluxObjective = FluxObjective_unsetCoefficient(SBMLFluxObjective) % SBMLFluxObjective = FluxObjective_unsetCoefficient(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. the SBML FBC FluxObjective structure with the fbc_coefficient attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'fbc_coefficient') SBMLFluxObjective.fbc_coefficient = NaN; SBMLFluxObjective.isSetfbc_coefficient = 0; else error('coefficient not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_setSBOTerm.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_setSBOTerm.0000644000000000000000000000367611703262366031645 0ustar rootrootfunction SBMLFluxObjective = FluxObjective_setSBOTerm(SBMLFluxObjective, sboTerm) % SBMLFluxObjective = FluxObjective_setSBOTerm(SBMLFluxObjective, sboTerm) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % 2. sboTerm, a number representing the sboTerm to be set % % Returns % % 1. the SBML FBC FluxObjective structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'sboTerm') if ~isnumeric(sboTerm) error('sboTerm must be numeric') ; else SBMLFluxObjective.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_setReaction.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_setReaction0000644000000000000000000000374011703262366032050 0ustar rootrootfunction SBMLFluxObjective = FluxObjective_setReaction(SBMLFluxObjective, reaction) % SBMLFluxObjective = FluxObjective_setReaction(SBMLFluxObjective, reaction) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % 2. reaction, a string representing the fbc_reaction to be set % % Returns % % 1. the SBML FBC FluxObjective structure with the new value for the fbc_reaction attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'fbc_reaction') if ~ischar(reaction) error('reaction must be character array') ; else SBMLFluxObjective.fbc_reaction = reaction; end; else error('reaction not an attribute on SBML L%dV%d FluxObjective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_setMetaid.m0000644000000000000000000000366611703262366031751 0ustar rootrootfunction SBMLFluxObjective = FluxObjective_setMetaid(SBMLFluxObjective, metaid) % SBMLFluxObjective = FluxObjective_setMetaid(SBMLFluxObjective, metaid) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % 2. metaid, a string representing the metaid to be set % % Returns % % 1. the SBML FBC FluxObjective structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLFluxObjective.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_setCoefficient.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_setCoeffici0000644000000000000000000000406011703262366032007 0ustar rootrootfunction SBMLFluxObjective = FluxObjective_setCoefficient(SBMLFluxObjective, coefficient) % SBMLFluxObjective = FluxObjective_setCoefficient(SBMLFluxObjective, coefficient) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % 2. coefficient, a number representing the fbc_coefficient to be set % % Returns % % 1. the SBML FBC FluxObjective structure with the new value for the fbc_coefficient attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'fbc_coefficient') if ~isnumeric(coefficient) error('coefficient must be numeric') ; else SBMLFluxObjective.fbc_coefficient = coefficient; SBMLFluxObjective.isSetfbc_coefficient = 1; end; else error('coefficient not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_isSetSBOTerm.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_isSetSBOTer0000644000000000000000000000341611703262366031676 0ustar rootrootfunction value = FluxObjective_isSetSBOTerm(SBMLFluxObjective) % sboTerm = FluxObjective_isSetSBOTerm(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'sboTerm') value = (SBMLFluxObjective.sboTerm) > 0; else error('isSetSBOTerm not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_isSetReaction.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_isSetReacti0000644000000000000000000000344011703262366032004 0ustar rootrootfunction value = FluxObjective_isSetReaction(SBMLFluxObjective) % reaction = FluxObjective_isSetReaction(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. value = % - 1 if the fbc_reaction attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'fbc_reaction') value = ~isempty(SBMLFluxObjective.fbc_reaction); else error('reaction not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_isSetMetaid.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_isSetMetaid0000644000000000000000000000340611703262366032002 0ustar rootrootfunction value = FluxObjective_isSetMetaid(SBMLFluxObjective) % metaid = FluxObjective_isSetMetaid(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'metaid') value = ~isempty(SBMLFluxObjective.metaid); else error('metaid not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_isSetCoefficient.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_isSetCoeffi0000644000000000000000000000347211703262366031775 0ustar rootrootfunction value = FluxObjective_isSetCoefficient(SBMLFluxObjective) % coefficient = FluxObjective_isSetCoefficient(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. value = % - 1 if the fbc_coefficient attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'isSetfbc_coefficient') value = SBMLFluxObjective.isSetfbc_coefficient; else error('isSetCoefficient not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_getSBOTerm.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_getSBOTerm.0000644000000000000000000000334511703262366031622 0ustar rootrootfunction sboTerm = FluxObjective_getSBOTerm(SBMLFluxObjective) % sboTerm = FluxObjective_getSBOTerm(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'sboTerm') sboTerm = SBMLFluxObjective.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_getReaction.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_getReaction0000644000000000000000000000337211703262366032035 0ustar rootrootfunction reaction = FluxObjective_getReaction(SBMLFluxObjective) % reaction = FluxObjective_getReaction(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. the value of the fbc_reaction attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'fbc_reaction') reaction = SBMLFluxObjective.fbc_reaction; else error('reaction not an attribute on SBML L%dV%d FluxObjective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_getMetaid.m0000644000000000000000000000333411703262366031725 0ustar rootrootfunction metaid = FluxObjective_getMetaid(SBMLFluxObjective) % metaid = FluxObjective_getMetaid(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'metaid') metaid = SBMLFluxObjective.metaid; else error('metaid not an attribute on SBML L%dV%d FluxObjective', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_getCoefficient.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_getCoeffici0000644000000000000000000000342511703262366031777 0ustar rootrootfunction coefficient = FluxObjective_getCoefficient(SBMLFluxObjective) % coefficient = FluxObjective_getCoefficient(SBMLFluxObjective) % % Takes % % 1. SBMLFluxObjective, an SBML FluxObjective structure % % Returns % % 1. the value of the fbc_coefficient attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxObjective); if isfield(SBMLFluxObjective, 'fbc_coefficient') coefficient = SBMLFluxObjective.fbc_coefficient; else error('coefficient not an attribute on SBML L%dV%d FluxObjective', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/FluxObjective_create.m0000644000000000000000000000561211703262366031266 0ustar rootrootfunction FluxObjective = FluxObjective_create(varargin) % FluxObjective = FluxObjective_create(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. a MATLAB_SBML FBC FluxObjective structure of the appropriate level, version and pkgVersion % % %check the input arguments are appropriate if (nargin > 3) error('too many input arguments'); end; switch (nargin) case 3 level = varargin{1}; version = varargin{2}; pkgVersion = varargin{3}; case 2 level = varargin{1}; version = varargin{2}; pkgVersion = 1; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; pkgVersion = 1; otherwise level = 3; version = 1; pkgVersion = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getFluxObjectiveFieldnames(level, version, pkgVersion); if (num > 0) values = getFluxObjectiveDefaultValues(level, version, pkgVersion); FluxObjective = cell2struct(values, fieldnames, 2); %add level and version FluxObjective.level = level; FluxObjective.version = version; FluxObjective.fbc_version = pkgVersion; %check correct structure if ~isSBML_FBC_FluxObjective(FluxObjective, level, version, pkgVersion) FluxObjective = struct(); warning('Warn:BadStruct', 'Failed to create FluxObjective'); end; else FluxObjective = []; warning('Warn:InvalidLV', 'FluxObjective not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxObjective/Contents.m0000644000000000000000000001676311703262366027000 0ustar rootroot% toolbox\fbc_package\MATLAB_SBML_Structures\FluxObjective % % The functions allow users to create and work with the SBML FBC FluxObjective structure. % %================================================================== % FluxObjective = FluxObjective_create(level, version, pkgVersion) %================================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. a MATLAB_SBML FBC FluxObjective structure of the appropriate level, version and pkgVersion % %=============================================================== % coefficient = FluxObjective_getCoefficient(SBMLFluxObjective) %=============================================================== % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. the value of the fbc_coefficient attribute % %===================================================== % metaid = FluxObjective_getMetaid(SBMLFluxObjective) %===================================================== % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. the value of the metaid attribute % %========================================================= % reaction = FluxObjective_getReaction(SBMLFluxObjective) %========================================================= % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. the value of the fbc_reaction attribute % %======================================================= % sboTerm = FluxObjective_getSBOTerm(SBMLFluxObjective) %======================================================= % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. the value of the sboTerm attribute % %================================================================= % coefficient = FluxObjective_isSetCoefficient(SBMLFluxObjective) %================================================================= % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. value = % - 1 if the fbc_coefficient attribute is set % - 0 otherwise % %======================================================= % metaid = FluxObjective_isSetMetaid(SBMLFluxObjective) %======================================================= % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %=========================================================== % reaction = FluxObjective_isSetReaction(SBMLFluxObjective) %=========================================================== % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. value = % - 1 if the fbc_reaction attribute is set % - 0 otherwise % %========================================================= % sboTerm = FluxObjective_isSetSBOTerm(SBMLFluxObjective) %========================================================= % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %================================================================================== % SBMLFluxObjective = FluxObjective_setCoefficient(SBMLFluxObjective, coefficient) %================================================================================== % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % 2. coefficient, a number representing the fbc_coefficient to be set % Returns % 1. the SBML FBC FluxObjective structure with the new value for the fbc_coefficient attribute % %======================================================================== % SBMLFluxObjective = FluxObjective_setMetaid(SBMLFluxObjective, metaid) %======================================================================== % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % 2. metaid, a string representing the metaid to be set % Returns % 1. the SBML FBC FluxObjective structure with the new value for the metaid attribute % %============================================================================ % SBMLFluxObjective = FluxObjective_setReaction(SBMLFluxObjective, reaction) %============================================================================ % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % 2. reaction, a string representing the fbc_reaction to be set % Returns % 1. the SBML FBC FluxObjective structure with the new value for the fbc_reaction attribute % %========================================================================== % SBMLFluxObjective = FluxObjective_setSBOTerm(SBMLFluxObjective, sboTerm) %========================================================================== % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % 2. sboTerm, a number representing the sboTerm to be set % Returns % 1. the SBML FBC FluxObjective structure with the new value for the sboTerm attribute % %======================================================================= % SBMLFluxObjective = FluxObjective_unsetCoefficient(SBMLFluxObjective) %======================================================================= % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. the SBML FBC FluxObjective structure with the fbc_coefficient attribute unset % %================================================================== % SBMLFluxObjective = FluxObjective_unsetMetaid(SBMLFluxObjective) %================================================================== % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. the SBML FBC FluxObjective structure with the metaid attribute unset % %==================================================================== % SBMLFluxObjective = FluxObjective_unsetReaction(SBMLFluxObjective) %==================================================================== % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. the SBML FBC FluxObjective structure with the fbc_reaction attribute unset % %=================================================================== % SBMLFluxObjective = FluxObjective_unsetSBOTerm(SBMLFluxObjective) %=================================================================== % Takes % 1. SBMLFluxObjective, an SBML FluxObjective structure % Returns % 1. the SBML FBC FluxObjective structure with the sboTerm attribute unset % % SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/0000755000000000000000000000000011704572252024144 5ustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_unsetValue.m0000644000000000000000000000341311703262366030445 0ustar rootrootfunction SBMLFluxBound = FluxBound_unsetValue(SBMLFluxBound) % SBMLFluxBound = FluxBound_unsetValue(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the SBML FBC FluxBound structure with the fbc_value attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_value') SBMLFluxBound.fbc_value = NaN; SBMLFluxBound.isSetfbc_value = 0; else error('value not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_unsetSBOTerm.m0000644000000000000000000000334711703262366030652 0ustar rootrootfunction SBMLFluxBound = FluxBound_unsetSBOTerm(SBMLFluxBound) % SBMLFluxBound = FluxBound_unsetSBOTerm(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the SBML FBC FluxBound structure with the sboTerm attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'sboTerm') SBMLFluxBound.sboTerm = -1; else error('sboTerm not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_unsetReaction.m0000644000000000000000000000337111703262366031140 0ustar rootrootfunction SBMLFluxBound = FluxBound_unsetReaction(SBMLFluxBound) % SBMLFluxBound = FluxBound_unsetReaction(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the SBML FBC FluxBound structure with the fbc_reaction attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_reaction') SBMLFluxBound.fbc_reaction = ''; else error('reaction not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_unsetOperation.m0000644000000000000000000000337711703262366031342 0ustar rootrootfunction SBMLFluxBound = FluxBound_unsetOperation(SBMLFluxBound) % SBMLFluxBound = FluxBound_unsetOperation(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the SBML FBC FluxBound structure with the fbc_operation attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_operation') SBMLFluxBound.fbc_operation = ''; else error('operation not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_unsetMetaid.m0000644000000000000000000000334111703262366030574 0ustar rootrootfunction SBMLFluxBound = FluxBound_unsetMetaid(SBMLFluxBound) % SBMLFluxBound = FluxBound_unsetMetaid(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the SBML FBC FluxBound structure with the metaid attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'metaid') SBMLFluxBound.metaid = ''; else error('metaid not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_unsetId.m0000644000000000000000000000332511703262366027727 0ustar rootrootfunction SBMLFluxBound = FluxBound_unsetId(SBMLFluxBound) % SBMLFluxBound = FluxBound_unsetId(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the SBML FBC FluxBound structure with the fbc_id attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_id') SBMLFluxBound.fbc_id = ''; else error('id not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_setValue.m0000644000000000000000000000364411703262366030110 0ustar rootrootfunction SBMLFluxBound = FluxBound_setValue(SBMLFluxBound, value) % SBMLFluxBound = FluxBound_setValue(SBMLFluxBound, value) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % 2. value, a number representing the fbc_value to be set % % Returns % % 1. the SBML FBC FluxBound structure with the new value for the fbc_value attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_value') if ~isnumeric(value) error('value must be numeric') ; else SBMLFluxBound.fbc_value = value; SBMLFluxBound.isSetfbc_value = 1; end; else error('value not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_setSBOTerm.m0000644000000000000000000000361211703262366030302 0ustar rootrootfunction SBMLFluxBound = FluxBound_setSBOTerm(SBMLFluxBound, sboTerm) % SBMLFluxBound = FluxBound_setSBOTerm(SBMLFluxBound, sboTerm) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % 2. sboTerm, a number representing the sboTerm to be set % % Returns % % 1. the SBML FBC FluxBound structure with the new value for the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'sboTerm') if ~isnumeric(sboTerm) error('sboTerm must be numeric') ; else SBMLFluxBound.sboTerm = sboTerm; end; else error('sboTerm not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_setReaction.m0000644000000000000000000000365411703262366030601 0ustar rootrootfunction SBMLFluxBound = FluxBound_setReaction(SBMLFluxBound, reaction) % SBMLFluxBound = FluxBound_setReaction(SBMLFluxBound, reaction) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % 2. reaction, a string representing the fbc_reaction to be set % % Returns % % 1. the SBML FBC FluxBound structure with the new value for the fbc_reaction attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_reaction') if ~ischar(reaction) error('reaction must be character array') ; else SBMLFluxBound.fbc_reaction = reaction; end; else error('reaction not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_setOperation.m0000644000000000000000000000367111703262366030774 0ustar rootrootfunction SBMLFluxBound = FluxBound_setOperation(SBMLFluxBound, operation) % SBMLFluxBound = FluxBound_setOperation(SBMLFluxBound, operation) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % 2. operation, a string representing the fbc_operation to be set % % Returns % % 1. the SBML FBC FluxBound structure with the new value for the fbc_operation attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_operation') if ~ischar(operation) error('operation must be character array') ; else SBMLFluxBound.fbc_operation = operation; end; else error('operation not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_setMetaid.m0000644000000000000000000000360211703262366030231 0ustar rootrootfunction SBMLFluxBound = FluxBound_setMetaid(SBMLFluxBound, metaid) % SBMLFluxBound = FluxBound_setMetaid(SBMLFluxBound, metaid) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % 2. metaid, a string representing the metaid to be set % % Returns % % 1. the SBML FBC FluxBound structure with the new value for the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'metaid') if ~ischar(metaid) error('metaid must be character array') ; else SBMLFluxBound.metaid = metaid; end; else error('metaid not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_setId.m0000644000000000000000000000353611703262366027370 0ustar rootrootfunction SBMLFluxBound = FluxBound_setId(SBMLFluxBound, id) % SBMLFluxBound = FluxBound_setId(SBMLFluxBound, id) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % 2. id, a string representing the fbc_id to be set % % Returns % % 1. the SBML FBC FluxBound structure with the new value for the fbc_id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_id') if ~ischar(id) error('id must be character array') ; else SBMLFluxBound.fbc_id = id; end; else error('id not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_isSetValue.m0000644000000000000000000000335011703262366030376 0ustar rootrootfunction value = FluxBound_isSetValue(SBMLFluxBound) % value = FluxBound_isSetValue(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. value = % - 1 if the fbc_value attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'isSetfbc_value') value = SBMLFluxBound.isSetfbc_value; else error('isSetValue not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_isSetSBOTerm.m0000644000000000000000000000334611703262366030602 0ustar rootrootfunction value = FluxBound_isSetSBOTerm(SBMLFluxBound) % sboTerm = FluxBound_isSetSBOTerm(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'sboTerm') value = (SBMLFluxBound.sboTerm > 0); else error('isSetSboTerm not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_isSetReaction.m0000644000000000000000000000337011703262366031070 0ustar rootrootfunction value = FluxBound_isSetReaction(SBMLFluxBound) % reaction = FluxBound_isSetReaction(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. value = % - 1 if the fbc_reaction attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_reaction') value = ~isempty(SBMLFluxBound.fbc_reaction); else error('reaction not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_isSetOperation.m0000644000000000000000000000337711703262366031273 0ustar rootrootfunction value = FluxBound_isSetOperation(SBMLFluxBound) % operation = FluxBound_isSetOperation(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. value = % - 1 if the fbc_operation attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_operation') value = ~isempty(SBMLFluxBound.fbc_operation); else error('operation not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_isSetMetaid.m0000644000000000000000000000333611703262366030531 0ustar rootrootfunction value = FluxBound_isSetMetaid(SBMLFluxBound) % metaid = FluxBound_isSetMetaid(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'metaid') value = ~isempty(SBMLFluxBound.metaid); else error('metaid not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_isSetId.m0000644000000000000000000000331611703262366027660 0ustar rootrootfunction value = FluxBound_isSetId(SBMLFluxBound) % id = FluxBound_isSetId(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. value = % - 1 if the fbc_id attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_id') value = ~isempty(SBMLFluxBound.fbc_id); else error('id not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_getValue.m0000644000000000000000000000326711703262366030075 0ustar rootrootfunction value = FluxBound_getValue(SBMLFluxBound) % value = FluxBound_getValue(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the value of the fbc_value attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_value') value = SBMLFluxBound.fbc_value; else error('value not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_getSBOTerm.m0000644000000000000000000000327511703262366030273 0ustar rootrootfunction sboTerm = FluxBound_getSBOTerm(SBMLFluxBound) % sboTerm = FluxBound_getSBOTerm(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the value of the sboTerm attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'sboTerm') sboTerm = SBMLFluxBound.sboTerm; else error('sboTerm not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_getReaction.m0000644000000000000000000000332211703262366030555 0ustar rootrootfunction reaction = FluxBound_getReaction(SBMLFluxBound) % reaction = FluxBound_getReaction(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the value of the fbc_reaction attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_reaction') reaction = SBMLFluxBound.fbc_reaction; else error('reaction not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_getOperation.m0000644000000000000000000000333311703262366030753 0ustar rootrootfunction operation = FluxBound_getOperation(SBMLFluxBound) % operation = FluxBound_getOperation(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the value of the fbc_operation attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_operation') operation = SBMLFluxBound.fbc_operation; else error('operation not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_getMetaid.m0000644000000000000000000000326411703262366030221 0ustar rootrootfunction metaid = FluxBound_getMetaid(SBMLFluxBound) % metaid = FluxBound_getMetaid(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the value of the metaid attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'metaid') metaid = SBMLFluxBound.metaid; else error('metaid not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_getId.m0000644000000000000000000000323411703262366027347 0ustar rootrootfunction id = FluxBound_getId(SBMLFluxBound) % id = FluxBound_getId(SBMLFluxBound) % % Takes % % 1. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the value of the fbc_id attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFluxBound); if isfield(SBMLFluxBound, 'fbc_id') id = SBMLFluxBound.fbc_id; else error('id not an attribute on SBML L%dV%d FluxBound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/FluxBound_create.m0000644000000000000000000000550711703262366027563 0ustar rootrootfunction FluxBound = FluxBound_create(varargin) % FluxBound = FluxBound_create(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. a MATLAB_SBML FBC FluxBound structure of the appropriate level, version and pkgVersion % % %check the input arguments are appropriate if (nargin > 3) error('too many input arguments'); end; switch (nargin) case 3 level = varargin{1}; version = varargin{2}; pkgVersion = varargin{3}; case 2 level = varargin{1}; version = varargin{2}; pkgVersion = 1; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; pkgVersion = 1; otherwise level = 3; version = 1; pkgVersion = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure [fieldnames, num] = getFluxBoundFieldnames(level, version, pkgVersion); if (num > 0) values = getFluxBoundDefaultValues(level, version, pkgVersion); FluxBound = cell2struct(values, fieldnames, 2); %add level and version FluxBound.level = level; FluxBound.version = version; FluxBound.fbc_version = pkgVersion; %check correct structure if ~isSBML_FBC_FluxBound(FluxBound, level, version, pkgVersion) FluxBound = struct(); warning('Warn:BadStruct', 'Failed to create FluxBound'); end; else FluxBound = []; warning('Warn:InvalidLV', 'FluxBound not an element in SBML L%dV%d', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FluxBound/Contents.m0000644000000000000000000002211611703262366026122 0ustar rootroot% toolbox\fbc_package\MATLAB_SBML_Structures\FluxBound % % The functions allow users to create and work with the SBML FBC FluxBound structure. % %========================================================== % FluxBound = FluxBound_create(level, version, pkgVersion) %========================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. a MATLAB_SBML FBC FluxBound structure of the appropriate level, version and pkgVersion % %===================================== % id = FluxBound_getId(SBMLFluxBound) %===================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the value of the fbc_id attribute % %============================================= % metaid = FluxBound_getMetaid(SBMLFluxBound) %============================================= % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the value of the metaid attribute % %=================================================== % operation = FluxBound_getOperation(SBMLFluxBound) %=================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the value of the fbc_operation attribute % %================================================= % reaction = FluxBound_getReaction(SBMLFluxBound) %================================================= % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the value of the fbc_reaction attribute % %=============================================== % sboTerm = FluxBound_getSBOTerm(SBMLFluxBound) %=============================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the value of the sboTerm attribute % %=========================================== % value = FluxBound_getValue(SBMLFluxBound) %=========================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the value of the fbc_value attribute % %======================================= % id = FluxBound_isSetId(SBMLFluxBound) %======================================= % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. value = % - 1 if the fbc_id attribute is set % - 0 otherwise % %=============================================== % metaid = FluxBound_isSetMetaid(SBMLFluxBound) %=============================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. value = % - 1 if the metaid attribute is set % - 0 otherwise % %===================================================== % operation = FluxBound_isSetOperation(SBMLFluxBound) %===================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. value = % - 1 if the fbc_operation attribute is set % - 0 otherwise % %=================================================== % reaction = FluxBound_isSetReaction(SBMLFluxBound) %=================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. value = % - 1 if the fbc_reaction attribute is set % - 0 otherwise % %================================================= % sboTerm = FluxBound_isSetSBOTerm(SBMLFluxBound) %================================================= % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. value = % - 1 if the sboTerm attribute is set % - 0 otherwise % %============================================= % value = FluxBound_isSetValue(SBMLFluxBound) %============================================= % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. value = % - 1 if the fbc_value attribute is set % - 0 otherwise % %==================================================== % SBMLFluxBound = FluxBound_setId(SBMLFluxBound, id) %==================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % 2. id, a string representing the fbc_id to be set % Returns % 1. the SBML FBC FluxBound structure with the new value for the fbc_id attribute % %============================================================ % SBMLFluxBound = FluxBound_setMetaid(SBMLFluxBound, metaid) %============================================================ % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % 2. metaid, a string representing the metaid to be set % Returns % 1. the SBML FBC FluxBound structure with the new value for the metaid attribute % %================================================================== % SBMLFluxBound = FluxBound_setOperation(SBMLFluxBound, operation) %================================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % 2. operation, a string representing the fbc_operation to be set % Returns % 1. the SBML FBC FluxBound structure with the new value for the fbc_operation attribute % %================================================================ % SBMLFluxBound = FluxBound_setReaction(SBMLFluxBound, reaction) %================================================================ % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % 2. reaction, a string representing the fbc_reaction to be set % Returns % 1. the SBML FBC FluxBound structure with the new value for the fbc_reaction attribute % %============================================================== % SBMLFluxBound = FluxBound_setSBOTerm(SBMLFluxBound, sboTerm) %============================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % 2. sboTerm, a number representing the sboTerm to be set % Returns % 1. the SBML FBC FluxBound structure with the new value for the sboTerm attribute % %========================================================== % SBMLFluxBound = FluxBound_setValue(SBMLFluxBound, value) %========================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % 2. value, a number representing the fbc_value to be set % Returns % 1. the SBML FBC FluxBound structure with the new value for the fbc_value attribute % %================================================== % SBMLFluxBound = FluxBound_unsetId(SBMLFluxBound) %================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the SBML FBC FluxBound structure with the fbc_id attribute unset % %====================================================== % SBMLFluxBound = FluxBound_unsetMetaid(SBMLFluxBound) %====================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the SBML FBC FluxBound structure with the metaid attribute unset % %========================================================= % SBMLFluxBound = FluxBound_unsetOperation(SBMLFluxBound) %========================================================= % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the SBML FBC FluxBound structure with the fbc_operation attribute unset % %======================================================== % SBMLFluxBound = FluxBound_unsetReaction(SBMLFluxBound) %======================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the SBML FBC FluxBound structure with the fbc_reaction attribute unset % %======================================================= % SBMLFluxBound = FluxBound_unsetSBOTerm(SBMLFluxBound) %======================================================= % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the SBML FBC FluxBound structure with the sboTerm attribute unset % %===================================================== % SBMLFluxBound = FluxBound_unsetValue(SBMLFluxBound) %===================================================== % Takes % 1. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the SBML FBC FluxBound structure with the fbc_value attribute unset % % SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/0000755000000000000000000000000011704572250024142 5ustar rootroot././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_unsetChemicalFormula.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_unsetChemicalForm0000644000000000000000000000346011703262366031471 0ustar rootrootfunction SBMLFBCSpecies = FBCSpecies_unsetChemicalFormula(SBMLFBCSpecies) % SBMLFBCSpecies = FBCSpecies_unsetChemicalFormula(SBMLFBCSpecies) % % Takes % % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % % Returns % % 1. the SBML FBC FBCSpecies structure with the fbc_chemicalFormula attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCSpecies); if isfield(SBMLFBCSpecies, 'fbc_chemicalFormula') SBMLFBCSpecies.fbc_chemicalFormula = ''; else error('chemicalFormula not an attribute on SBML L%dV%d FBCSpecies', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_unsetCharge.m0000644000000000000000000000343611703262366030567 0ustar rootrootfunction SBMLFBCSpecies = FBCSpecies_unsetCharge(SBMLFBCSpecies) % SBMLFBCSpecies = FBCSpecies_unsetCharge(SBMLFBCSpecies) % % Takes % % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % % Returns % % 1. the SBML FBC FBCSpecies structure with the fbc_charge attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCSpecies); if isfield(SBMLFBCSpecies, 'fbc_charge') SBMLFBCSpecies.fbc_charge = 0; SBMLFBCSpecies.isSetfbc_charge = 0; else error('charge not an attribute on SBML L%dV%d FBCSpecies', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_setChemicalFormula.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_setChemicalFormul0000644000000000000000000000402411703262366031464 0ustar rootrootfunction SBMLFBCSpecies = FBCSpecies_setChemicalFormula(SBMLFBCSpecies, chemicalFormula) % SBMLFBCSpecies = FBCSpecies_setChemicalFormula(SBMLFBCSpecies, chemicalFormula) % % Takes % % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % 2. chemicalFormula, a string representing the fbc_chemicalFormula to be set % % Returns % % 1. the SBML FBC FBCSpecies structure with the new value for the fbc_chemicalFormula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCSpecies); if isfield(SBMLFBCSpecies, 'fbc_chemicalFormula') if ~ischar(chemicalFormula) error('chemicalFormula must be character array') ; else SBMLFBCSpecies.fbc_chemicalFormula = chemicalFormula; end; else error('chemicalFormula not an attribute on SBML L%dV%d FBCSpecies', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_setCharge.m0000644000000000000000000000370011703262366030216 0ustar rootrootfunction SBMLFBCSpecies = FBCSpecies_setCharge(SBMLFBCSpecies, charge) % SBMLFBCSpecies = FBCSpecies_setCharge(SBMLFBCSpecies, charge) % % Takes % % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % 2. charge, a number representing the fbc_charge to be set % % Returns % % 1. the SBML FBC FBCSpecies structure with the new value for the fbc_charge attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCSpecies); if isfield(SBMLFBCSpecies, 'fbc_charge') if ~isnumeric(charge) error('charge must be numeric') ; else SBMLFBCSpecies.fbc_charge = charge; SBMLFBCSpecies.isSetfbc_charge = 1; end; else error('charge not an attribute on SBML L%dV%d FBCSpecies', level, version); end; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_isSetChemicalFormula.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_isSetChemicalForm0000644000000000000000000000346311703262366031425 0ustar rootrootfunction value = FBCSpecies_isSetChemicalFormula(SBMLFBCSpecies) % chemicalFormula = FBCSpecies_isSetChemicalFormula(SBMLFBCSpecies) % % Takes % % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % % Returns % % 1. value = % - 1 if the fbc_chemicalFormula attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCSpecies); if isfield(SBMLFBCSpecies, 'fbc_chemicalFormula') value = ~isempty(SBMLFBCSpecies.fbc_chemicalFormula); else error('chemicalFormula not an attribute on SBML L%dV%d FBCSpecies', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_isSetCharge.m0000644000000000000000000000337111703262366030516 0ustar rootrootfunction value = FBCSpecies_isSetCharge(SBMLFBCSpecies) % charge = FBCSpecies_isSetCharge(SBMLFBCSpecies) % % Takes % % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % % Returns % % 1. value = % - 1 if the fbc_charge attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCSpecies); if isfield(SBMLFBCSpecies, 'isSetfbc_charge') value = SBMLFBCSpecies.isSetfbc_charge; else error('isSetCharge not an attribute on SBML L%dV%d FBCSpecies', level, version); end; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_getChemicalFormula.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_getChemicalFormul0000644000000000000000000000343311703262366031453 0ustar rootrootfunction chemicalFormula = FBCSpecies_getChemicalFormula(SBMLFBCSpecies) % chemicalFormula = FBCSpecies_getChemicalFormula(SBMLFBCSpecies) % % Takes % % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % % Returns % % 1. the value of the fbc_chemicalFormula attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCSpecies); if isfield(SBMLFBCSpecies, 'fbc_chemicalFormula') chemicalFormula = SBMLFBCSpecies.fbc_chemicalFormula; else error('chemicalFormula not an attribute on SBML L%dV%d FBCSpecies', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_getCharge.m0000644000000000000000000000331211703262366030201 0ustar rootrootfunction charge = FBCSpecies_getCharge(SBMLFBCSpecies) % charge = FBCSpecies_getCharge(SBMLFBCSpecies) % % Takes % % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % % Returns % % 1. the value of the fbc_charge attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCSpecies); if isfield(SBMLFBCSpecies, 'fbc_charge') charge = SBMLFBCSpecies.fbc_charge; else error('charge not an attribute on SBML L%dV%d FBCSpecies', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/FBCSpecies_create.m0000644000000000000000000000551611703262366027563 0ustar rootrootfunction FBCSpecies = FBCSpecies_create(varargin) % FBCSpecies = FBCSpecies_create(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. a MATLAB_SBML FBC FBCSpecies structure of the appropriate level, version and pkgVersion % % %check the input arguments are appropriate if (nargin > 3) error('too many input arguments'); end; switch (nargin) case 3 level = varargin{1}; version = varargin{2}; pkgVersion = varargin{3}; case 2 level = varargin{1}; version = varargin{2}; pkgVersion = 1; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; pkgVersion = 1; otherwise level = 3; version = 1; pkgVersion = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure FBCSpecies = Species_create(level, version); if ~isempty(FBCSpecies) [fieldnames, num] = getFBCSpeciesFieldnames(level, version, pkgVersion); if (num > 0) values = getFBCSpeciesDefaultValues(level, version, pkgVersion); for i=1:num FBCSpecies = setfield(FBCSpecies, fieldnames{i}, values{i}); end; %check correct structure if ~isSBML_FBC_Species(FBCSpecies, level, version, pkgVersion) FBCSpecies = struct(); warning('Warn:BadStruct', 'Failed to create FBCSpecies'); end; else FBCSpecies = []; warning('Warn:InvalidLV', 'FBCSpecies not an element in SBML L%dV%d', level, version); end; end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCSpecies/Contents.m0000644000000000000000000001112011703262366026113 0ustar rootroot% toolbox\fbc_package\MATLAB_SBML_Structures\FBCSpecies % % The functions allow users to create and work with the FBC elements % and attributes of an SBML FBC Species structure. % %============================================================ % FBCSpecies = FBCSpecies_create(level, version, pkgVersion) %============================================================ % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. a MATLAB_SBML FBC FBCSpecies structure of the appropriate level, version and pkgVersion % %=============================================== % charge = FBCSpecies_getCharge(SBMLFBCSpecies) %=============================================== % Takes % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % Returns % 1. the value of the fbc_charge attribute % %================================================================= % chemicalFormula = FBCSpecies_getChemicalFormula(SBMLFBCSpecies) %================================================================= % Takes % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % Returns % 1. the value of the fbc_chemicalFormula attribute % %================================================= % charge = FBCSpecies_isSetCharge(SBMLFBCSpecies) %================================================= % Takes % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % Returns % 1. value = % - 1 if the fbc_charge attribute is set % - 0 otherwise % %=================================================================== % chemicalFormula = FBCSpecies_isSetChemicalFormula(SBMLFBCSpecies) %=================================================================== % Takes % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % Returns % 1. value = % - 1 if the fbc_chemicalFormula attribute is set % - 0 otherwise % %=============================================================== % SBMLFBCSpecies = FBCSpecies_setCharge(SBMLFBCSpecies, charge) %=============================================================== % Takes % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % 2. charge, a number representing the fbc_charge to be set % Returns % 1. the SBML FBC FBCSpecies structure with the new value for the fbc_charge attribute % %================================================================================= % SBMLFBCSpecies = FBCSpecies_setChemicalFormula(SBMLFBCSpecies, chemicalFormula) %================================================================================= % Takes % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % 2. chemicalFormula, a string representing the fbc_chemicalFormula to be set % Returns % 1. the SBML FBC FBCSpecies structure with the new value for the fbc_chemicalFormula attribute % %========================================================= % SBMLFBCSpecies = FBCSpecies_unsetCharge(SBMLFBCSpecies) %========================================================= % Takes % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % Returns % 1. the SBML FBC FBCSpecies structure with the fbc_charge attribute unset % %================================================================== % SBMLFBCSpecies = FBCSpecies_unsetChemicalFormula(SBMLFBCSpecies) %================================================================== % Takes % 1. SBMLFBCSpecies, an SBML FBCSpecies structure % Returns % 1. the SBML FBC FBCSpecies structure with the fbc_chemicalFormula attribute unset % % SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/0000755000000000000000000000000011704572250023607 5ustar rootroot././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_unsetActiveObjective.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_unsetActiveObjective.0000644000000000000000000000342611703262372031375 0ustar rootrootfunction SBMLFBCModel = FBCModel_unsetActiveObjective(SBMLFBCModel) % SBMLFBCModel = FBCModel_unsetActiveObjective(SBMLFBCModel) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % % Returns % % 1. the SBML FBC FBCModel structure with the fbc_activeObjective attribute unset % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); if isfield(SBMLFBCModel, 'fbc_activeObjective') SBMLFBCModel.fbc_activeObjective = ''; else error('activeObjective not an attribute on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_setActiveObjective.m0000644000000000000000000000377211703262372031213 0ustar rootrootfunction SBMLFBCModel = FBCModel_setActiveObjective(SBMLFBCModel, activeObjective) % SBMLFBCModel = FBCModel_setActiveObjective(SBMLFBCModel, activeObjective) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % 2. activeObjective, a string representing the fbc_activeObjective to be set % % Returns % % 1. the SBML FBC FBCModel structure with the new value for the fbc_activeObjective attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); if isfield(SBMLFBCModel, 'fbc_activeObjective') if ~ischar(activeObjective) error('activeObjective must be character array') ; else SBMLFBCModel.fbc_activeObjective = activeObjective; end; else error('activeObjective not an attribute on SBML L%dV%d FBCModel', level, version); end; ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_isSetActiveObjective.mSBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_isSetActiveObjective.0000644000000000000000000000343711703262372031330 0ustar rootrootfunction value = FBCModel_isSetActiveObjective(SBMLFBCModel) % activeObjective = FBCModel_isSetActiveObjective(SBMLFBCModel) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % % Returns % % 1. value = % - 1 if the fbc_activeObjective attribute is set % - 0 otherwise % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); if isfield(SBMLFBCModel, 'fbc_activeObjective') value = ~isempty(SBMLFBCModel.fbc_activeObjective); else error('activeObjective not an attribute on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_getObjective.m0000644000000000000000000000376011703262372030040 0ustar rootrootfunction objective = FBCModel_getObjective(SBMLFBCModel, index) % objective = FBCModel_getObjective(SBMLFBCModel, index) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % 2. index, an integer representing the index of SBML Objective structure % % Returns % % 1. the SBML Objective structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); if isfield(SBMLFBCModel, 'fbc_objective') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLFBCModel.fbc_objective) objective = SBMLFBCModel.fbc_objective; else error('index is out of range'); end; else error('objective not an element on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_getNumObjectives.m0000644000000000000000000000334411703262372030701 0ustar rootrootfunction num = FBCModel_getNumObjectives(SBMLFBCModel) % num = FBCModel_getNumObjectives(SBMLFBCModel) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % % Returns % % 1. the number of SBML Objective structures present in the FBCModel % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); if isfield(SBMLFBCModel, 'fbc_objective') num = length(SBMLFBCModel.fbc_objective); else error('objective not an element on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_getNumFluxBounds.m0000644000000000000000000000334411703262372030675 0ustar rootrootfunction num = FBCModel_getNumFluxBounds(SBMLFBCModel) % num = FBCModel_getNumFluxBounds(SBMLFBCModel) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % % Returns % % 1. the number of SBML FluxBound structures present in the FBCModel % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); if isfield(SBMLFBCModel, 'fbc_fluxBound') num = length(SBMLFBCModel.fbc_fluxBound); else error('fluxBound not an element on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_getListOfObjectives.m0000644000000000000000000000333111703262372031336 0ustar rootrootfunction objective = FBCModel_getListOfObjectives(SBMLFBCModel) % objective = FBCModel_getListOfObjectives(SBMLFBCModel) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % % Returns % % 1. an array of the objective structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); if isfield(SBMLFBCModel, 'fbc_objective') objective = SBMLFBCModel.fbc_objective; else error('objective not an element on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_getListOfFluxBounds.m0000644000000000000000000000333111703262372031332 0ustar rootrootfunction fluxBound = FBCModel_getListOfFluxBounds(SBMLFBCModel) % fluxBound = FBCModel_getListOfFluxBounds(SBMLFBCModel) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % % Returns % % 1. an array of the fluxBound structures % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); if isfield(SBMLFBCModel, 'fbc_fluxBound') fluxBound = SBMLFBCModel.fbc_fluxBound; else error('fluxBound not an element on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_getFluxBound.m0000644000000000000000000000376011703262372030034 0ustar rootrootfunction fluxBound = FBCModel_getFluxBound(SBMLFBCModel, index) % fluxBound = FBCModel_getFluxBound(SBMLFBCModel, index) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % 2. index, an integer representing the index of SBML FluxBound structure % % Returns % % 1. the SBML FluxBound structure at the indexed position % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); if isfield(SBMLFBCModel, 'fbc_fluxBound') if (~isIntegralNumber(index) || index <= 0) error('index must be a positive integer'); elseif index <= length(SBMLFBCModel.fbc_fluxBound) fluxBound = SBMLFBCModel.fbc_fluxBound; else error('index is out of range'); end; else error('fluxBound not an element on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_getActiveObjective.m0000644000000000000000000000340711703262372031172 0ustar rootrootfunction activeObjective = FBCModel_getActiveObjective(SBMLFBCModel) % activeObjective = FBCModel_getActiveObjective(SBMLFBCModel) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % % Returns % % 1. the value of the fbc_activeObjective attribute % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); if isfield(SBMLFBCModel, 'fbc_activeObjective') activeObjective = SBMLFBCModel.fbc_activeObjective; else error('activeObjective not an attribute on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_createObjective.m0000644000000000000000000000364311703262372030524 0ustar rootrootfunction FBCModel = FBCModel_createObjective(FBCModel) % SBMLFBCModel = FBCModel_createObjective(SBMLFBCModel) % % Takes % % 1. FBCModel, an SBML FBCModel structure % % Returns % % 1. the SBML FBCModel structure with a new SBML Objective structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(FBCModel); if isfield(FBCModel, 'fbc_objective') SBMLObjective = Objective_create(level, version, FBCModel.fbc_version); index = length(FBCModel.fbc_objective); if index == 0 FBCModel.fbc_objective = SBMLObjective; else FBCModel.fbc_objective(index+1) = SBMLObjective; end; else error('objective not an element on SBML L%dV%d Bound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_createFluxBound.m0000644000000000000000000000364311703262372030520 0ustar rootrootfunction FBCModel = FBCModel_createFluxBound(FBCModel) % SBMLFBCModel = FBCModel_createFluxBound(SBMLFBCModel) % % Takes % % 1. FBCModel, an SBML FBCModel structure % % Returns % % 1. the SBML FBCModel structure with a new SBML FluxBound structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(FBCModel); if isfield(FBCModel, 'fbc_fluxBound') SBMLFluxBound = FluxBound_create(level, version, FBCModel.fbc_version); index = length(FBCModel.fbc_fluxBound); if index == 0 FBCModel.fbc_fluxBound = SBMLFluxBound; else FBCModel.fbc_fluxBound(index+1) = SBMLFluxBound; end; else error('fluxBound not an element on SBML L%dV%d Bound', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_create.m0000644000000000000000000000630711703262372026671 0ustar rootrootfunction FBCModel = FBCModel_create(varargin) % FBCModel = FBCModel_create(level, version, pkgVersion) % % Takes % % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % % Returns % % 1. a MATLAB_SBML FBC FBCModel structure of the appropriate level, version and pkgVersion % % %check the input arguments are appropriate if (nargin > 3) error('too many input arguments'); end; switch (nargin) case 3 level = varargin{1}; version = varargin{2}; pkgVersion = varargin{3}; case 2 level = varargin{1}; version = varargin{2}; pkgVersion = 1; case 1 level = varargin{1}; if (level == 1) version = 2; elseif (level == 2) version = 4; else version = 1; end; pkgVersion = 1; otherwise level = 3; version = 1; pkgVersion = 1; end; if ~isValidLevelVersionCombination(level, version) error('invalid level/version combination'); end; %get fields and values and create the structure FBCModel = Model_create(level, version); if ~isempty(FBCModel) [fieldnames, num] = getFBCModelFieldnames(level, version, pkgVersion); if (num > 0) [values, prefix, ns] = getFBCModelDefaultValues(level, version, pkgVersion); for i=1:num FBCModel = setfield(FBCModel, fieldnames{i}, values{i}); end; %add empty substructures FBCModel.fbc_fluxBound = FluxBound_create(level, version, pkgVersion); FBCModel.fbc_fluxBound(1:end) = []; FBCModel.fbc_objective = Objective_create(level, version, pkgVersion); FBCModel.fbc_objective(1:end) = []; if length(prefix) > 0 namespace.prefix = prefix; namespace.uri = ns; FBCModel = setfield(FBCModel, 'namespaces', namespace); end; %check correct structure if ~isSBML_FBC_Model(FBCModel, level, version, pkgVersion) FBCModel = struct(); warning('Warn:BadStruct', 'Failed to create FBCModel'); end; else FBCModel = []; warning('Warn:InvalidLV', 'FBCModel not an element in SBML L%dV%d', level, version); end; end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_addObjective.m0000644000000000000000000000421511703262372030005 0ustar rootrootfunction SBMLFBCModel = FBCModel_addObjective(SBMLFBCModel, SBMLObjective) % SBMLFBCModel = FBCModel_addObjective(SBMLFBCModel, SBMLObjective) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % 2. SBMLObjective, an SBML Objective structure % % Returns % % 1. the SBML FBCModel structure with the SBML Objective structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); [objective_level, objective_version] = GetLevelVersion(SBMLObjective); if level ~= objective_level error('mismatch in levels'); elseif version ~= objective_version error('mismatch in versions'); end; if isfield(SBMLFBCModel, 'fbc_objective') index = length(SBMLFBCModel.fbc_objective); if index == 0 SBMLFBCModel.fbc_objective = SBMLObjective; else SBMLFBCModel.fbc_objective(index+1) = SBMLObjective; end; else error('objective not an element on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/FBCModel_addFluxBound.m0000644000000000000000000000421511703262372030001 0ustar rootrootfunction SBMLFBCModel = FBCModel_addFluxBound(SBMLFBCModel, SBMLFluxBound) % SBMLFBCModel = FBCModel_addFluxBound(SBMLFBCModel, SBMLFluxBound) % % Takes % % 1. SBMLFBCModel, an SBML FBCModel structure % 2. SBMLFluxBound, an SBML FluxBound structure % % Returns % % 1. the SBML FBCModel structure with the SBML FluxBound structure added % % %get level and version and check the input arguments are appropriate [level, version] = GetLevelVersion(SBMLFBCModel); [fluxBound_level, fluxBound_version] = GetLevelVersion(SBMLFluxBound); if level ~= fluxBound_level error('mismatch in levels'); elseif version ~= fluxBound_version error('mismatch in versions'); end; if isfield(SBMLFBCModel, 'fbc_fluxBound') index = length(SBMLFBCModel.fbc_fluxBound); if index == 0 SBMLFBCModel.fbc_fluxBound = SBMLFluxBound; else SBMLFBCModel.fbc_fluxBound(index+1) = SBMLFluxBound; end; else error('fluxBound not an element on SBML L%dV%d FBCModel', level, version); end; SBMLToolbox-4.1.0/toolbox/fbc_package/MATLAB_SBML_Structures/FBCModel/Contents.m0000644000000000000000000001465211703262372025572 0ustar rootroot% toolbox\fbc_package\MATLAB_SBML_Structures\FBCModel % % The functions allow users to create and work with the FBC elements % and attributes of an SBML FBC Model structure. % %=================================================================== % SBMLFBCModel = FBCModel_addFluxBound(SBMLFBCModel, SBMLFluxBound) %=================================================================== % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % 2. SBMLFluxBound, an SBML FluxBound structure % Returns % 1. the SBML FBCModel structure with the SBML FluxBound structure added % %=================================================================== % SBMLFBCModel = FBCModel_addObjective(SBMLFBCModel, SBMLObjective) %=================================================================== % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % 2. SBMLObjective, an SBML Objective structure % Returns % 1. the SBML FBCModel structure with the SBML Objective structure added % %======================================================== % FBCModel = FBCModel_create(level, version, pkgVersion) %======================================================== % Takes % 1. level, an integer representing an SBML level % 2. version, an integer representing an SBML version % 3. pkgVersion, an integer representing an SBML package version % Returns % 1. a MATLAB_SBML FBC FBCModel structure of the appropriate level, version and pkgVersion % %======================================================= % SBMLFBCModel = FBCModel_createFluxBound(SBMLFBCModel) %======================================================= % Takes % 1. FBCModel, an SBML FBCModel structure % Returns % 1. the SBML FBCModel structure with a new SBML FluxBound structure added % %======================================================= % SBMLFBCModel = FBCModel_createObjective(SBMLFBCModel) %======================================================= % Takes % 1. FBCModel, an SBML FBCModel structure % Returns % 1. the SBML FBCModel structure with a new SBML Objective structure added % %============================================================= % activeObjective = FBCModel_getActiveObjective(SBMLFBCModel) %============================================================= % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % Returns % 1. the value of the fbc_activeObjective attribute % %======================================================== % fluxBound = FBCModel_getFluxBound(SBMLFBCModel, index) %======================================================== % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % 2. index, an integer representing the index of SBML FluxBound structure % Returns % 1. the SBML FluxBound structure at the indexed position % %======================================================== % fluxBound = FBCModel_getListOfFluxBounds(SBMLFBCModel) %======================================================== % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % Returns % 1. an array of the fluxBound structures % %======================================================== % objective = FBCModel_getListOfObjectives(SBMLFBCModel) %======================================================== % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % Returns % 1. an array of the objective structures % %=============================================== % num = FBCModel_getNumFluxBounds(SBMLFBCModel) %=============================================== % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % Returns % 1. the number of SBML FluxBound structures present in the FBCModel % %=============================================== % num = FBCModel_getNumObjectives(SBMLFBCModel) %=============================================== % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % Returns % 1. the number of SBML Objective structures present in the FBCModel % %======================================================== % objective = FBCModel_getObjective(SBMLFBCModel, index) %======================================================== % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % 2. index, an integer representing the index of SBML Objective structure % Returns % 1. the SBML Objective structure at the indexed position % %=============================================================== % activeObjective = FBCModel_isSetActiveObjective(SBMLFBCModel) %=============================================================== % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % Returns % 1. value = % - 1 if the fbc_activeObjective attribute is set % - 0 otherwise % %=========================================================================== % SBMLFBCModel = FBCModel_setActiveObjective(SBMLFBCModel, activeObjective) %=========================================================================== % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % 2. activeObjective, a string representing the fbc_activeObjective to be set % Returns % 1. the SBML FBC FBCModel structure with the new value for the fbc_activeObjective attribute % %============================================================ % SBMLFBCModel = FBCModel_unsetActiveObjective(SBMLFBCModel) %============================================================ % Takes % 1. SBMLFBCModel, an SBML FBCModel structure % Returns % 1. the SBML FBC FBCModel structure with the fbc_activeObjective attribute unset % % SBMLToolbox-4.1.0/toolbox/fbc_package/isBindingFbcEnabled.m0000644000000000000000000000433111703266144022170 0ustar rootrootfunction fbcEnabled = isBindingFbcEnabled() % fbcEnabled = isBindingFbcEnabled() % % Returns % % 1. fbcEnabled = % - 1 if the executables are enabled with fbc support % - 0 otherwise % % % % assume not enabled fbcEnabled = 0; if isBindingInstalled() == 0 return; end; if (isoctave() == '0') filename = fullfile(tempdir, 'fbc.xml'); else filename = fullfile(pwd, 'fbc.xml'); end; writeTempFile(filename); try [m, e] = TranslateSBML(filename, 1, 0); if (length(e) == 0 && isfield(m, 'fbc_version') == 1 ) fbcEnabled = 1; end; delete(filename); catch delete(filename); return end; function writeTempFile(filename) fout = fopen(filename, 'w'); fprintf(fout, '\n'); fprintf(fout, '\n'); fprintf(fout, ' \n\n'); fclose(fout); SBMLToolbox-4.1.0/toolbox/fbc_package/Contents.m0000644000000000000000000000303211703263056020165 0ustar rootroot% toolbox\fbc_package % % Functions for using the SBML L3V1 fbc package % %=========================================================== % fbcEnabled = isBindingFbcEnabled() %=========================================================== % Returns % 1. fbcEnabled = % - 1 if the executables are enabled with fbc support % - 0 otherwise % % SBMLToolbox-4.1.0/toolbox/Convenience/0000755000000000000000000000000011704572220016240 5ustar rootrootSBMLToolbox-4.1.0/toolbox/Convenience/testmember.m0000644000000000000000000000325411703262406020572 0ustar rootrootfunction y = testmember (num, array) % y = testmember(value, array) % % Takes % % 1. value, any number/string % 2. array, an array of objects % % Returns % % 1. y = % - 1 if value is a member of the array % - 0 otherwise % % *NOTE:* this function is necessary for octave to emulate the MATLAB % functionality of the 'ismember' function % % y = 0; [m, n] = size(array); for i=1:m for j=1:n if (num == array(m,n)) y = 1; return; end; end; end; SBMLToolbox-4.1.0/toolbox/Convenience/Test/0000755000000000000000000000000011704572220017157 5ustar rootrootSBMLToolbox-4.1.0/toolbox/Convenience/Test/test_fbc_conv.m0000644000000000000000000000303511703262404022153 0ustar rootrootfunction y = test_fbc_conv() % fbcBindingEnabled = 1; if isBindingFbcEnabled() == 0 fbcBindingEnabled = 0; end; if (fbcBindingEnabled == 0) y = 0; else fail = 0; m = TranslateSBML('../../fbc_package/test/test-data/fbc.xml'); formula = 'S1*2'; fail = fail + TestFunction('Substitute', 2, 1, formula, m, 2); y = fail; end; SBMLToolbox-4.1.0/toolbox/Convenience/Test/test_conv.m0000644000000000000000000000612311703266772021356 0ustar rootrootfunction y = test_conv() % test = 0; Totalfail = 0; if isBindingInstalled() == 1 test = test + 4; fail = TestisValidUnitKind; if (fail > 0) disp('isValidUnitKind failed'); end; Totalfail = Totalfail + fail; test = test + 9; fail = TestSubstituteFunction; if (fail > 0) disp('SubstituteFunction failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestSubstitute; if (fail > 0) disp('Substitute failed'); end; Totalfail = Totalfail + fail; test = test + 4; fail = TestSubstituteConstants; if (fail > 0) disp('Substitute failed'); end; Totalfail = Totalfail + fail; test = test + 1; fail = test_fbc_conv; if (fail > 0) disp('test_fbc_conv failed'); end; Totalfail = Totalfail + fail; else disp('LibSBML binding not installed - some tests could not be run'); end; test = test + 22; fail = TestRearrange; if (fail > 0) disp('Rearrange failed'); end; Totalfail = Totalfail + fail; test = test + 12; fail = TestMatchName; if (fail > 0) disp('matchName failed'); end; Totalfail = Totalfail + fail; test = test + 12; fail = TestMatchFunctionName; if (fail > 0) disp('matchFunctionName failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestisIntegralNumber; if (fail > 0) disp('isIntegralNumber failed'); end; Totalfail = Totalfail + fail; test = test + 1; fail = TestLoseWhiteSpace; if (fail > 0) disp('LoseWhiteSpace failed'); end; Totalfail = Totalfail + fail; test = test + 1; fail = TestPairBrackets; if (fail > 0) disp('PairBrackets failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestRemoveDuplicates; if (fail > 0) disp('RemoveDuplicates failed'); end; Totalfail = Totalfail + fail; disp(sprintf('Number tests: %d', test)); disp(sprintf('Number fails: %d', Totalfail)); disp(sprintf('Pass rate: %d%%', ((test-Totalfail)/test)*100)); y = Totalfail; SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestSubstituteFunction.m0000644000000000000000000000460411703262404024061 0ustar rootrootfunction fail = TestSubstituteFunction % m = TranslateSBML('../../Test/test-data/species.xml'); fd = m.functionDefinition; formula = 'f(a, b)'; result = '(a*b)'; fail = TestFunction('SubstituteFunction', 2, 1, formula, fd, result); formula = 'f(x, d)'; result = '(x*d)'; fail = fail + TestFunction('SubstituteFunction', 2, 1, formula, fd, result); formula = 'f(d, y)'; result = '(d*y)'; fail = fail + TestFunction('SubstituteFunction', 2, 1, formula, fd, result); formula = 'f(y, z)'; result = '(y*z)'; fail = fail + TestFunction('SubstituteFunction', 2, 1, formula, fd, result); formula = 'f1(a, b)'; result = ''; fail = fail + TestFunction('SubstituteFunction', 2, 1, formula, fd, result); formula = 's+f(a, b)'; result = 's+(a*b)'; fail = fail + TestFunction('SubstituteFunction', 2, 1, formula, fd, result); formula = 'f(a, f1(b))'; result = '(a*f1(b))'; fail = fail + TestFunction('SubstituteFunction', 2, 1, formula, fd, result); formula = 'f1(a, f(b, c))'; result = 'f1(a,(b*c))'; fail = fail + TestFunction('SubstituteFunction', 2, 1, formula, fd, result); formula = 'f(x, f(a,d))'; result = '(x*(a*d))'; fail = fail + TestFunction('SubstituteFunction', 2, 1, formula, fd, result); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestSubstituteConstants.m0000644000000000000000000000353011703262404024245 0ustar rootrootfunction fail = TestSubstituteConstants % m = TranslateSBML('../../Test/test-data/initialAssignments.xml'); formula = 'S1*2'; output = 'S1*2'; fail = TestFunction('SubstituteConstants', 2, 1, formula, m, output); formula = 'k * S1'; output = '6 * S1'; fail = fail + TestFunction('SubstituteConstants', 2, 1, formula, m, output); formula = 'compartment * S1'; output = '3 * S1'; fail = fail + TestFunction('SubstituteConstants', 2, 1, formula, m, output); m = TranslateSBML('../../Test/test-data/l1v1.xml'); formula = '(x0 + vm) * (km*2)'; output = '(x0 + 2) * (2*2)'; fail = fail + TestFunction('SubstituteConstants', 2, 1, formula, m, output); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestSubstitute.m0000644000000000000000000000302211703262404022344 0ustar rootrootfunction fail = TestSubstitute % m = TranslateSBML('../../Test/test-data/initialAssignments.xml'); formula = 'S1*2'; fail = TestFunction('Substitute', 2, 1, formula, m, 6); m = TranslateSBML('../../Test/test-data/l1v1.xml'); formula = '(x0 + vm) * (km*2)'; fail = fail + TestFunction('Substitute', 2, 1, formula, m, 12); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestRemoveDuplicates.m0000644000000000000000000000272611703262404023456 0ustar rootrootfunction fail = TestRemoveDuplicates % input1 = [1, 3, 4, 3, 1, 5]; output1 = [1, 3, 4, 5]; input2 = 'adasfeds'; output2 = 'adsfe'; fail = TestFunction('RemoveDuplicates', 1, 1, input1, output1); fail = fail + TestFunction('RemoveDuplicates', 1, 1, input2, output2); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestRearrange.m0000644000000000000000000000765011703262404022112 0ustar rootrootfunction fail = TestRearrange % formula = 'a+b'; var = 'c'; output = 'a+b'; fail = TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'a+b'; var = 'b'; output = '-a'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'a+b-c'; var = 'b'; output = '-a+c'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'b/a'; var = 'b'; output = '0'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = '3b/a'; var = 'b'; output = '0'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'a/b'; var = 'b'; output = ''; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'b + c/a'; var = 'b'; output = '-c/a'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c + a/b'; var = 'b'; output = '(a/1)*(1/(-c))'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c + a/b'; var = 'a'; output = '-c*(b/1)'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c + 3*a/b'; var = 'a'; output = '-c*(b/3)'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c + a/4*b'; var = 'a'; output = '-c*(4/(1*b))'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c + 2*a/5*b'; var = 'a'; output = '-c*(5/(2*b))'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c + 3*a/b'; var = 'b'; output = '((3*a)/1)*(1/(-c))'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c + a/4*b'; var = 'b'; output = '-c*(4/a)'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c + 2*a/5*b'; var = 'b'; output = '-c*(5/(2*a))'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'a+b-c+2*c'; var = 'c'; output = '(-a-b)/(-1+2)'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'a+ 2/c +d'; var = 'c'; output = '(1/0.5)*(1/(-a-d))'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = '(a+b) -c'; var = 'c'; output = '-(-(a+b))'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c/(a+b) + d'; var = 'c'; output = '-d*((a+b)/1)'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = '(a+b)/c + d'; var = 'c'; output = '((a+b)/1)*(1/(-d))'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c/a + c/d -e'; var = 'c'; output = '(+e)/(1/a+1/d)'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); formula = 'c/a + c/d'; var = 'c'; output = '0'; fail = fail + TestFunction('Rearrange', 2, 1, formula, var, output); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestPairBrackets.m0000644000000000000000000000255311703262404022553 0ustar rootrootfunction fail = TestPairBrackets % input = '(a+((b*c)/(a+b)))'; output = [1, 17; 4, 16; 5, 9; 11, 15]; fail = TestFunction('PairBrackets', 1, 1, input, output); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestMatchName.m0000644000000000000000000000511711703262404022035 0ustar rootrootfunction fail = TestMatchName % formula = 'a+b+c'; var = 'c'; output = 5; fail = TestFunction('matchName', 2, 1, formula, var, output); formula = 'a+b+c'; var = 'b'; output = 3; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); formula = 'a+b-c'; var = 'a'; output = 1; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); formula = 'a+b-(b*c)'; var = 'b'; output = [3, 6]; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); formula = 'b2/a'; var = 'b'; output = []; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); formula = 'a/b2'; var = 'b'; output = []; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); formula = 'b + c1/a'; var = 'c1'; output = 5; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); formula = 'b1/a + a/b'; var = 'b'; output = 10; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); formula = 'c + a/b'; var = 'a1'; output = []; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); formula = 'c + 3*a2/b'; var = 'a1'; output = []; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); formula = 'a(4*b)'; var = 'a'; output = []; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); formula = 'a(4*b)'; var = 'b'; output = 5; fail = fail + TestFunction('matchName', 2, 1, formula, var, output); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestMatchFunctionName.m0000644000000000000000000000536111703262404023544 0ustar rootrootfunction fail = TestMatchFunctionName % formula = 'a+b+c'; var = 'c'; output = []; fail = TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'a+f(b,c)'; var = 'b'; output = []; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'a+f(b,c)'; var = 'f'; output = 3; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'a+b(2,3)'; var = 'b'; output = 3; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'b(a)/b(c)'; var = 'b'; output = [1, 6]; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'a/b2(f)'; var = 'b'; output = []; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'b2(hhh) + c1/a'; var = 'b2'; output = 1; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'b(b(a,3),b(1,2))'; var = 'b'; output = [1, 3, 10]; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'b(b(a,3),b1(1,2))'; var = 'b'; output = [1, 3]; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'b(b(a,3),b1(1,2))'; var = 'b1'; output = [10]; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'a(4*b)'; var = 'a'; output = [1]; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); formula = 'a(4*b)'; var = 'b'; output = []; fail = fail + TestFunction('matchFunctionName', 2, 1, formula, var, output); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestLoseWhiteSpace.m0000644000000000000000000000253211703262404023055 0ustar rootrootfunction fail = TestLoseWhiteSpace % input = ' exa mp le '; output = 'example'; fail = TestFunction('LoseWhiteSpace', 1, 1, input, output); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestisValidUnitKind.m0000644000000000000000000000326711703262404023245 0ustar rootrootfunction fail = TestisValidUnitKind % m = TranslateSBML('../../Test/test-data/l1v1.xml'); kind1 = m.unitDefinition(1).unit.kind; kind2 = m.unitDefinition(2).unit(2).kind; kind3 = m.unitDefinition(2).unit(3).kind; kind4 = m.unitDefinition(3).name; fail = TestFunction('isValidUnitKind', 1, 1, kind1, 1); fail = fail + TestFunction('isValidUnitKind', 1, 1, kind2, 1); fail = fail + TestFunction('isValidUnitKind', 1, 1, kind3, 1); fail = fail + TestFunction('isValidUnitKind', 1, 1, kind4, 0); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestisIntegralNumber.m0000644000000000000000000000256211703262404023453 0ustar rootrootfunction fail = TestisIntegralNumber % a = 2; b = 3.5; fail = TestFunction('isIntegralNumber', 1, 1, a, 1); fail = fail + TestFunction('isIntegralNumber', 1, 1, b, 0); SBMLToolbox-4.1.0/toolbox/Convenience/Test/TestCheckValidUnitKind.m0000644000000000000000000000330411703262404023637 0ustar rootrootfunction fail = TestCheckValidUnitKind % m = TranslateSBML('../../Test/test-data/l1v1.xml'); kind1 = m.unitDefinition(1).unit.kind; kind2 = m.unitDefinition(2).unit(2).kind; kind3 = m.unitDefinition(2).unit(3).kind; kind4 = m.unitDefinition(3).id; fail = TestFunction('CheckValidUnitKind', 1, 1, kind1, 1); fail = fail + TestFunction('CheckValidUnitKind', 1, 1, kind2, 1); fail = fail + TestFunction('CheckValidUnitKind', 1, 1, kind3, 1); fail = fail + TestFunction('CheckValidUnitKind', 1, 1, kind4, 0); SBMLToolbox-4.1.0/toolbox/Convenience/SubstituteFunction.m0000644000000000000000000001204311703262406022300 0ustar rootrootfunction Formula = SubstituteFunction(OriginalFormula, SBMLFunctionDefinition) % newExpression = SubstituteFunction(expression, SBMLFunctionDefinition) % % Takes % % 1. expression, a string representation of a math expression % 2. SBMLFunctionDefinition, an SBML FunctionDefinition structure % % Returns % % 1. newExpression % - the string representation of the expression when any instances of the % functionDefinition have been substituted % - an empty string if the functiondefinition is not in the original % expression % % *EXAMPLE:* % % Consider fD to be an SBMLFunctionDefinition % with id = 'g' and math = 'lambda(x,x+0.5)' % % formula = SubstituteFormula('g(y)', fD) % % formula = 'y+0.5' % % % formula = SubstituteFormula('h(y)', fD) % % formula = '' % % %check arguments are appropriate if (~isstruct(SBMLFunctionDefinition)) error(sprintf('%s', ... 'first argument must be an SBML functionDefinition structure')); end; [sbmlLevel, sbmlVersion] = GetLevelVersion(SBMLFunctionDefinition); if (~ischar(OriginalFormula)) error('SubstituteFunction(OriginalFormula, SBMLFunctionDefinition)\n%s', 'first argument must be a character array containing the id of the function definition'); elseif (~isSBML_FunctionDefinition(SBMLFunctionDefinition, sbmlLevel, sbmlVersion)) error('SubstituteFunction(OriginalFormula, SBMLFunctionDefinition)\n%s', 'second argument must be an SBML function definition structure'); end; OriginalFormula = LoseWhiteSpace(OriginalFormula); startPoint = matchFunctionName(OriginalFormula, SBMLFunctionDefinition.id); if (isempty(startPoint)) Formula = ''; return; end; ElementsOfFuncDef = GetArgumentsFromLambdaFunction(SBMLFunctionDefinition.math); % get the arguments of the application of the formula Formula = ''; index = length(startPoint); StartFunctionInFormula = startPoint(index); j = StartFunctionInFormula + length(SBMLFunctionDefinition.id); pairs = PairBrackets(OriginalFormula); for i=1:length(pairs) if (pairs(i, 1) == j) endPt = pairs(i, 2); break; end; end; [NoElements, ElementsInFormula] = GetElementsOfFunction(OriginalFormula(j:endPt)); OriginalFunction = ''; for i = StartFunctionInFormula:endPt OriginalFunction = strcat(OriginalFunction, OriginalFormula(i)); end; % check got right number if (NoElements ~= length(ElementsOfFuncDef) - 1) error('SubstituteFunction(OriginalFormula, SBMLFunctionDefinition)\n%s', 'mismatch in number of arguments between formula and function'); end; % check that same arguments have not been used for i = 1:NoElements for j = 1:NoElements if (strcmp(ElementsInFormula{i}, ElementsOfFuncDef{j})) newElem = strcat(ElementsInFormula{i}, '_new'); ElementsOfFuncDef{j} = newElem; ElementsOfFuncDef{end} = strrep(ElementsOfFuncDef{end}, ElementsInFormula{i}, newElem); end; end; end; % replace the arguments in function definition with those in the formula FuncFormula = '('; FuncFormula = strcat(FuncFormula, ElementsOfFuncDef{end}); FuncFormula = strcat(FuncFormula, ')'); for i = 1:NoElements FuncFormula = strrep(FuncFormula, ElementsOfFuncDef{i}, ElementsInFormula{i}); end; Formula = strrep(OriginalFormula, OriginalFunction, FuncFormula); % if the function occurred more than once if (index - 1) > 0 Formula = SubstituteFunction(Formula, SBMLFunctionDefinition); end; function [NoElements, ElementsInFormula] = GetElementsOfFunction(OriginalFormula); j = 2; c = OriginalFormula(j); element = ''; NoElements = 1; ElementsInFormula = {}; while (j < length(OriginalFormula)) if (strcmp(c, ',')) ElementsInFormula{NoElements} = element; element = ''; NoElements = NoElements + 1; else element = strcat(element, c); end; j = j + 1; c = OriginalFormula(j); end; ElementsInFormula{NoElements} = element; SBMLToolbox-4.1.0/toolbox/Convenience/SubstituteConstants.m0000644000000000000000000000667711703262406022507 0ustar rootrootfunction subsFormula = SubstituteConstants(OriginalFormula, SBMLModel) % newExpression = SubstituteConstants(expression, SBMLModel) % % Takes % % 1. expression, a string representation of a math expression % 2. SBMLModel, an SBML Model structure % % Returns % % 1. the string representation of the expression when all constants within the % model have been substituted % % *EXAMPLE:* % % Consider m to be an SBMLModel containing a parameter % with id = 'g', constant = '1' and value = 3' % % newExpression = SubstituteConstants('2 * g * S1', SBMLModel) % % newExpression = '2 * 3 * S1' % % %check arguments are appropriate if (~ischar(OriginalFormula)) error('SubstituteConstants(OriginalFormula, SBMLModel)\n%s', 'first argument must be a character array representing a formula'); elseif (~isValidSBML_Model(SBMLModel)) error('SubstituteConstants(OriginalFormula, SBMLModel)\n%s', 'second argument must be an SBML model structure'); end; subsFormula = OriginalFormula; [Comp, comp_values] = GetCompartments(SBMLModel); for i=1:length(SBMLModel.compartment) if (SBMLModel.SBML_level == 1) if (~isnan(comp_values(i))) subsFormula = strrep(subsFormula, SBMLModel.compartment(i).name, sprintf('%g', comp_values(i))); end; elseif (SBMLModel.compartment(i).constant == 1) if (~isnan(comp_values(i))) subsFormula = strrep(subsFormula, SBMLModel.compartment(i).id, sprintf('%g', comp_values(i))); end; end; end; [Param, param_values] = GetGlobalParameters(SBMLModel); for i=1:length(SBMLModel.parameter) if (SBMLModel.SBML_level == 1) if (~isnan(param_values(i))) subsFormula = strrep(subsFormula, SBMLModel.parameter(i).name, sprintf('%g', param_values(i))); end; elseif (SBMLModel.parameter(i).constant == 1) if (~isnan(param_values(i))) subsFormula = strrep(subsFormula, SBMLModel.parameter(i).id, sprintf('%g', param_values(i))); end; end; end; [Species, species_values] = GetSpecies(SBMLModel); for i=1:length(SBMLModel.species) if (SBMLModel.SBML_level > 1 && SBMLModel.species(i).constant == 1) if (~isnan(species_values(i))) subsFormula = strrep(subsFormula, SBMLModel.species(i).id, sprintf('%g', species_values(i))); end; end; end; SBMLToolbox-4.1.0/toolbox/Convenience/Substitute.m0000644000000000000000000001171311703262406020575 0ustar rootrootfunction value = Substitute(original_formula, model) % value = Substitute(expression, SBMLModel) % % Takes % % 1. expression, a string representation of a math expression % 2. SBMLModel, an SBML Model structure % % Returns % % 1. the value of the expression when all variables within the model have % been substituted % % *EXAMPLE:* % % Consider m to be an SBMLModel containing a species with % id = 'g' and initialConcentration = '3' % % value = Substitute('g*2', m) % % value = 6 % % % This function was radically improved by Pieter Pareit if (model.SBML_level > 1 && ~isempty(model.time_symbol)) assert(exist(model.time_symbol,'var')==false); assignin('caller',model.time_symbol,0); end % handle easy case where formula can be calculated without variables value = str2double(original_formula); if ~isnan(value) return; else try value = evalin('caller', original_formula); if ~isnan(value) return; end; catch end; end % put everything in MATLAB and evaluate the formule [Species, speciesValues] = GetSpecies(model); [Parameters, paramValues] = GetAllParametersUnique(model); [Compartments, compValues] = GetCompartments(model); % if (model.SBML_level > 1 && ~isempty(model.time_symbol)) % assert(exist(model.time_symbol,'var')==false); % assignin('caller',model.time_symbol,0); % end for i = 1:length(Species) assert(exist(Species{i},'var')==false); assignin('caller',Species{i}, speciesValues(i)); end; for i = 1:length(Parameters) assert(exist(Parameters{i},'var')==false); assignin('caller',Parameters{i}, paramValues(i)); end; for i = 1:length(Compartments) assert(exist(Compartments{i},'var')==false); assignin('caller',Compartments{i}, compValues(i)); end; % this replaces all rules in the original formula formula = original_formula; rule_applied = 1; iterations_left = Model_getNumAssignmentRules(model) + 1; while rule_applied > 0 && iterations_left > 0 rule_applied = 0; for rule = model.rule if (strcmp(rule.typecode, 'SBML_ASSIGNMENT_RULE') ... || (isfield(rule, 'type') && strcmp(rule.type, 'scalar'))) str = formula; exp = strcat('\<',rule.variable,'\>'); repstr = rule.formula; formula = regexprep(str,exp,repstr); for fd = 1:Model_getNumFunctionDefinitions(model) newFormula = SubstituteFunction(formula, Model_getFunctionDefinition(model, fd)); if ~isempty(newFormula) formula = newFormula; end; end; rule_applied = rule_applied + strcmp(str, formula)==false; end; end iterations_left = iterations_left - 1; end assert(rule_applied == 0, ... 'Substitute(): Cyclic dependency of rules dedected'); if model.SBML_level > 2 || (model.SBML_level == 2 && model.SBML_version > 1) ia_applied = 1; iterations_left = Model_getNumInitialAssignments(model) + 1; while ia_applied > 0 && iterations_left > 0 ia_applied = 0; for rule = model.initialAssignment str = formula; exp = strcat('\<',rule.symbol,'\>'); repstr = rule.math; formula = regexprep(str,exp,repstr); for fd = 1:Model_getNumFunctionDefinitions(model) newFormula = SubstituteFunction(formula, Model_getFunctionDefinition(model, fd)); if ~isempty(newFormula) formula = newFormula; end; end; ia_applied = ia_applied + strcmp(str, formula)==false; end iterations_left = iterations_left - 1; end assert(ia_applied == 0, ... 'Substitute(): Cyclic dependency of rules dedected'); end; try value = evalin('caller',formula); catch error('Substitute(): Ill formed formula'); end end SBMLToolbox-4.1.0/toolbox/Convenience/RemoveDuplicates.m0000644000000000000000000000552211703262406021676 0ustar rootrootfunction y = RemoveDuplicates(FullArray) % newArray = RemoveDuplicates(array) % % Takes % % 1. array, any array % % Returns % % 1. the array with any duplicate entries removed % % *EXAMPLE:* % % newArray = RemoveDuplicates([2, 3, 4, 3, 2, 5]) % newArray = [2, 3, 4, 5] % % % check whether array is a column vector [size_x, size_y] = size(FullArray); if (size_y == 1 && size_x ~= 1) y = RemoveDuplicatesColumn(FullArray); return; end; %------------------------------------------------------------- % find number of elements in existing array NoElements = length(FullArray); if (NoElements == 0) y = []; return; end; % copy first element of the array to the new array newArrayIndex = 1; NewArray(1) = FullArray(1); %loop through all elements % if they do not already exist in new array copy them into it for i = 2:NoElements element = FullArray(i); if (~ismember(element, NewArray)) newArrayIndex = newArrayIndex + 1; NewArray(newArrayIndex) = element; end; end; y = NewArray; function y = RemoveDuplicatesColumn(FullArray) % RemoveDuplicatesCell takes column vector % and returns it with any duplicates removed % find number of elements in existing array [NoElements, x] = size(FullArray); % copy first element of the array to the new array newArrayIndex = 1; NewArray(1,x) = FullArray(1); %loop through all elements % if they already exist in new array do not copy for i = 2:NoElements element = FullArray(i); if (~ismember(element, NewArray)) newArrayIndex = newArrayIndex + 1; NewArray(newArrayIndex,x) = element; end; end; y = NewArray; SBMLToolbox-4.1.0/toolbox/Convenience/Rearrange.m0000644000000000000000000002632711703262406020337 0ustar rootrootfunction output = Rearrange(formula, x) % output = Rearrange(expression, name) % % Takes % % 1. expression, a string representation of a math expression % 2. name, a string representing the name of a variable % % Returns % % 1. the expression rearranged in terms of the variable % % *EXAMPLE:* % % output = Rearrange('X + Y - Z', 'X') % % output = '-Y+Z' % % f = LoseWhiteSpace(formula); if (~isempty(strfind(f, '+-'))) f = strrep(f, '+-', '-'); end; if (~isempty(strfind(f, '-+'))) f = strrep(f, '-+', '-'); end; % if x is not in the formula just return the formula if (~ismember(f, x)) output = f; return; end; % if there are brackets these need to switch sides of the equation % "intact" ie x+(y+z) rearranges to x = -(y+z) brackets = PairBrackets(f); num = 0; if (length(brackets)>1) [num, m] = size(brackets); for b=1:num group{b} = f(brackets(1): brackets(2)); if (sum(ismember(group{b}, x)) > 0) error('Cannot deal with formula in this form: %s', f); end; newvar{b} = strcat('var', num2str(b)); f = strrep(f, group{b}, newvar{b}); end; end; ops = '+-'; operators = ismember(f, ops); OpIndex = find(operators == 1); if(~isempty(OpIndex)) %-------------------------------------------------- % divide formula up into elements seperated by +/- if (OpIndex(1) == 1) % leading sign i.e. +x-y NumElements = length(OpIndex); j = 2; index = 2; else NumElements = length(OpIndex) + 1; j = 1; index = 1; end; for i = 1:NumElements-1 element = ''; while (j < OpIndex(index)) element = strcat(element, f(j)); j = j+1; end; Elements{i} = element; j = j + 1; index = index + 1; end; % get last element j = OpIndex(end)+1; element = ''; while (j <= length(f)) element = strcat(element, f(j)); j = j+1; end; Elements{NumElements} = element; else NumElements = 0; LHSElements{1} = f; LHSOps(1) = '+'; end; %-------------------------------------------------- % check whether element contains x % if does keep on lhs else move to rhs changing sign output = ''; lhs = 1; for i = 1:NumElements if (matchName(Elements{i}, x)) % element contains x LHSElements{lhs} = Elements{i}; if (OpIndex(1) == 1) LHSOps(lhs) = f(OpIndex(i)); elseif (i == 1) LHSOps(lhs) = '+'; else LHSOps(lhs) = f(OpIndex(i-1)); end; lhs = lhs + 1; elseif (i == 1) % first element does not contain x if (OpIndex(1) == 1) if (strcmp(f(1), '-')) output = strcat(output, '+'); else output = strcat(output, '-'); end; else % no sign so + output = strcat(output, '-'); end; output = strcat(output, Elements{i}); else % element not first and does not contain x if (OpIndex(1) == 1) if (strcmp(f(OpIndex(i)), '-')) output = strcat(output, '+'); else output = strcat(output, '-'); end; else if (strcmp(f(OpIndex(i-1)), '-')) output = strcat(output, '+'); else output = strcat(output, '-'); end; end; output = strcat(output, Elements{i}); end; end; %------------------------------------------------------ % look at remaining LHS for i = 1:length(LHSElements) [Mult{i}, invert(i)] = ParseElement(LHSElements{i}, x); end; operators = '+-/*^'; if (length(LHSElements) == 1) % only one element with x % check signs and multipliers if (strcmp(LHSOps(1), '-')) output = strcat('-(', output, ')'); end; if (~strcmp(Mult{1}, '1')) if (isempty(output)) if (invert(1) == 0) output = '0'; end; else if (sum(ismember(Mult{1}, '/')) > 0) if (invert(1) == 0) output = strcat(output, '*(', Invert(Mult{1}, x), ')'); else output = strcat('(', Mult{1}, ')*(', Invert(output, x), ')'); end; else output = strcat(output, '/', Mult{1}); end; end; end; else if (isempty(output)) if (invert == 0) output = '0'; end; else divisor = ''; if (strcmp(LHSOps(1), '+')) divisor = strcat(divisor, '(', Mult{1}); else divisor = strcat(divisor, '(-', Mult{1}); end; for i = 2:length(LHSElements) divisor = strcat(divisor, LHSOps(i), Mult{i}); end; divisor = strcat(divisor, ')'); if (sum(ismember(output, operators)) > 0) output = strcat('(', output, ')/', divisor); else output = strcat(output, '/', divisor); end; end; end; % replaced substituted vars for b=1:num output = strrep(output, newvar{b}, group{b}); end; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [multiplier, invert] = ParseElement(element, x) if (strcmp(element, x)) multiplier = '1'; invert = 0; return; end; multipliers = strfind(element, '*'); if (length(multipliers) > 2) error('Too many multipliers'); end; VarIndex = matchName(element, x); if (isempty(multipliers)) MultIndex = 1; else if (length(multipliers) == 1) MultIndex = multipliers(1); else if (VarIndex > multipliers(2)) MultIndex = multipliers(2); else MultIndex = multipliers(1); end; end; end; DivIndex = strfind(element, '/'); if (isempty(DivIndex)) DivIndex = length(element); end; % if we have x/5*b if (DivIndex < MultIndex) MultIndex = 1; end; % if we have b/x if (VarIndex > DivIndex) [element, noinvert] = Invert(element, x); multiplier = ParseElement(element, x); if (noinvert == 0) multiplier = Invert(multiplier, x); invert = 1; else invert = 0; end; return; end; % if we have x*c if (VarIndex < MultIndex) element = SwapMultiplier(element, x); [multiplier, invert] = ParseElement(element, x); return; end; if ((DivIndex < MultIndex) ||(VarIndex < MultIndex) || (VarIndex > DivIndex)) error('Cannot deal with formula in this form: %s', element); end; n = ''; m = ''; for i = 1:MultIndex-1 if (element(i) ~= '(' && element(i) ~= ')') n = strcat(n, element(i)); end; end; if (isempty(n)) n = '1'; end; for i = DivIndex+1:length(element) m = strcat(m, element(i)); end; if (isempty(m)) m = '1'; end; % if both m and n represenet numbers then they can be simplified Num_n = str2num(n); Num_m = str2num(m); if (~isempty(Num_n) && ~isempty(Num_m)) multiplier = num2str(Num_n/Num_m); else if (strcmp(m, '1')) multiplier = n; else multiplier = strcat(n, '/', m); end; end; invert = 0; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [y, noinvert] = Invert(formula, x) % need to consider a/x*b % which is really (b*a)/x operators = '+-/*^'; noinvert = 0; divider = strfind(formula, '/'); if (length(divider) > 1) error('Too many divide signs'); end; if (isempty(divider)) nominator = formula; denominator = '1'; else nominator = formula(1:divider-1); denominator = formula(divider+1:end); end; if (~IsSingleBracketed(denominator)) multiplier = strfind(denominator, '*'); if (length(multiplier) > 1) error('Too may multiplication signs'); end; if (~isempty(multiplier)) lhs = denominator(1:multiplier-1); rhs = denominator(multiplier+1:end); if (sum(ismember(nominator, operators)) > 0) if (IsSingleBracketed(nominator)) nominator = strcat(nominator, '*', rhs); else nominator = strcat('(', nominator, ')*', rhs); end; else nominator = strcat(nominator, '*', rhs); end; denominator = lhs; end; end; % if x is now part of the nominator dont invert if (matchName(nominator, x)) if (sum(ismember(nominator, operators)) > 0) if (IsSingleBracketed(nominator)) y = strcat(nominator, '/'); else y = strcat ('(', nominator, ')/'); end; else y = strcat(nominator, '/'); end; if (sum(ismember(denominator, operators)) > 0) if (IsSingleBracketed(denominator)) y = strcat(y, denominator); else y = strcat(y, '(', denominator, ')'); end; else y = strcat(y, denominator); end; noinvert = 1; else if (sum(ismember(denominator, operators)) > 0) if (IsSingleBracketed(denominator)) y = strcat(denominator, '/'); else y = strcat ('(', denominator, ')/'); end; else y = strcat(denominator, '/'); end; if (sum(ismember(nominator, operators)) > 0) if (IsSingleBracketed(nominator)) y = strcat(y, nominator); else y = strcat(y, '(', nominator, ')'); end; else y = strcat(y, nominator); end; end; %y = strcat('(', denominator, ')/(', nominator, ')'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function y = IsSingleBracketed(formula) y = 0; Open = strfind(formula, '('); if (isempty(Open) || length(Open)> 1) return; end; if (Open ~= 1) return; end; len = length(formula); Close = strfind(formula, ')'); if (length(Close)> 1) return; end; if (Close ~= len) return; end; y = 1; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function y = SwapMultiplier(formula, x) % formula will have only * and / % x will occur before both % * will occur before / index = matchName(formula, x); start = index(1); index = strfind(formula, '*'); multiplier = index(1); nextop = 0; if (length(index) > 1) nextop = index(2); end; index = strfind(formula, '/'); if (length(index) > 0) end_after = index(1)-1; else if (nextop > 0) end_after = nextop-1; else end_after = length(formula); end; end; replace = ''; for i = multiplier+1:end_after replace = strcat(replace, formula(i)); end; newformula = replace; newformula = strcat(newformula, '*'); newformula = strcat(newformula, x); for i = end_after+1:length(formula) newformula = strcat(newformula, formula(i)); end; y = newformula; SBMLToolbox-4.1.0/toolbox/Convenience/piecewise.m0000644000000000000000000000361711703262406020403 0ustar rootrootfunction value = piecewise(val1, test, val2) % value = piecewise(value1, test, value2) % % Takes % % 1. value1, the value to return if the test is true % 2. test, a boolean test that will return true or false % 3. value2, the value to return if the test is false % % Returns % % 1. value = % - value1, if test returns true % - value2, if test returns false % % *EXAMPLE:* % % value = piecewise(3, 1<2, 4) % value = 3 % % value = piecewise(3, 1>2, 4) % value = 4 % % *NOTE:* This function provides the functionality of the MathML 'piecewise' function. % % if test == 1 value = val1; else value = val2; end; SBMLToolbox-4.1.0/toolbox/Convenience/PairBrackets.m0000644000000000000000000000562411703262406021000 0ustar rootrootfunction pairs = PairBrackets(formula) % pairs = PairBrackets(expression) % % Takes % % 1. expression, a string representation of a math expression % % Returns % % 1. an array of the indices of each pair of brackets ordered from % the opening bracket index % % *EXAMPLE:* % % pairs = PairBrackets('(a+((b*c)/(a+b)))') % % pairs = % 1 17 % 4 16 % 5 9 % 11 15 % % if (~ischar(formula)) error(sprintf('%s\n%s', 'PairBrackets(formula)', 'first argument must be a string')); end; OpeningBracketIndex = strfind(formula, '('); ClosingBracketIndex = strfind(formula, ')'); % check that the number of brackets matches if (length(OpeningBracketIndex) ~= length(ClosingBracketIndex)) error('Bracket mismatch'); end; if (isempty(OpeningBracketIndex)) pairs = 0; return; end; for i = 1:length(OpeningBracketIndex) j = length(OpeningBracketIndex); while(j > 0) if (OpeningBracketIndex(j) < ClosingBracketIndex(i)) pairs(i,1) = OpeningBracketIndex(j); pairs(i,2) = ClosingBracketIndex(i); OpeningBracketIndex(j) = max(ClosingBracketIndex); j = 0; else j = j - 1; end; end; end; % order the pairs so that the opening bracket index is in ascending order OriginalPairs = pairs; % function 'sort' changes in version 7.0.1 v = version; v_num = str2num(v(1)); if (v_num < 7) TempPairs = sort(pairs, 1); else TempPairs = sort(pairs, 1, 'ascend'); end; for i = 1:length(OpeningBracketIndex) pairs(i, 1) = TempPairs(i, 1); j = find(OriginalPairs == pairs(i, 1)); pairs(i, 2) = OriginalPairs(j, 2); end; SBMLToolbox-4.1.0/toolbox/Convenience/matchName.m0000644000000000000000000000445011703262406020317 0ustar rootrootfunction index = matchName(expr, name) % index = matchName(expression, name) % % Takes % % 1. expression, a string representation of a math expression % 2. name, a string representing the name of a variable % % Returns % % 1. the index of the starting point of 'name' in the 'expression' % % % *EXAMPLE:* % % index = matchName('f*g', 'g') % % index = 3 % % % index = matchName('f*g_1', 'g') % % index = [] % % % index = matchName('f*g(a,g)', 'g') % % index = 7 % % % *NOTE:* This differs from the 'strfind' function in that it checks % that the name is used as a variable. % operators = '+-*/^,)'; maxSize = length(expr); tempIndex = strfind(expr, name); index = []; if ~isempty(tempIndex) % we found name - but is is followed by a math symbol for i=1:length(tempIndex) followIndex = tempIndex(i) + length(name); if (followIndex <= maxSize) followChar = expr(followIndex); if ismember(followChar, operators) index = [index, tempIndex(i)]; end; else index = [index, tempIndex(i)]; end; end; end; SBMLToolbox-4.1.0/toolbox/Convenience/matchFunctionName.m0000644000000000000000000000451511703262406022027 0ustar rootrootfunction index = matchFunctionName(expr, name) % index = matchFunctionName(expression, name) % % Takes % % 1. expression, a string representation of a math expression % 2. name, a string representing the name of a function % % Returns % % 1. the index of the starting point of 'name' in the 'expression' % % *EXAMPLE:* % % index = matchFunctionName('f*g', 'g') % % index = [] % % % index = matchFunctionName('add(d,g_1)', 'add') % % index = 0 % % % index = matchFunctionName('add(add(a,b), c)', 'add') % % index = [1, 5] % % % % *NOTE:* This differs from the 'strfind' function in that it checks % that the name is used as a function call. % % operators = '('; maxSize = length(expr); tempIndex = strfind(expr, name); index = []; if ~isempty(tempIndex) % we found name - but is is followed by a math symbol for i=1:length(tempIndex) followIndex = tempIndex(i) + length(name); if (followIndex < maxSize) followChar = expr(followIndex); if ismember(followChar, operators) index = [index, tempIndex(i)]; end; end; end; end; SBMLToolbox-4.1.0/toolbox/Convenience/LoseWhiteSpace.m0000644000000000000000000000475311703262406021307 0ustar rootrootfunction y = LoseWhiteSpace(charArray) % newArray = LoseWhiteSpace(charArray) % % Takes % % 1. charArray, an array of characters % % Returns % % 1. the array with any white space removed % % *EXAMPLE:* % % newArray = LoseWhiteSpace(' exa mp le') % % newArray = 'example' % % %------------------------------------------------------------ % check input is an array of characters if (~ischar(charArray)) error('LoseWhiteSpace(input)\n%s', 'input must be an array of characters'); end; %------------------------------------------------------------- % get the length of the array NoChars = length(charArray); %------------------------------------------------------------- % create an array that indicates whether the elements of charArray are % spaces % e.g. WSpace = isspace(' v b') = [1, 1, 0, 1, 0] % and determine how many WSpace = isspace(charArray); NoSpaces = sum(WSpace); %----------------------------------------------------------- % rewrite the array to leaving out any spaces % remove any numbers from the array of symbols if (NoSpaces > 0) NewArrayCount = 1; for i = 1:NoChars if (~isspace(charArray(i))) y(NewArrayCount) = charArray(i); NewArrayCount = NewArrayCount + 1; end; end; else y = charArray; end; SBMLToolbox-4.1.0/toolbox/Convenience/isValidUnitKind.m0000644000000000000000000000370111703262406021461 0ustar rootrootfunction value = isValidUnitKind(kind)% % y = isValidUnitKind(kind) % % Takes % % 1. kind, a string representing a unit kind % % returns % % 1. y = % - 1 if the string represents a valid unit kind % - 0 otherwise % % *NOTE:* This is identical to the function CheckValidUnitKind % % UNIT_KIND_STRINGS = {'ampere', 'becquerel', 'candela', 'Celsius', 'coulomb', 'dimensionless', 'farad',... 'gram', 'gray', 'henry', 'hertz', 'item', 'joule', 'katal', 'kelvin', 'kilogram', 'liter', 'litre',... 'lumen', 'lux', 'meter', 'metre', 'mole', 'newton', 'ohm', 'pascal', 'radian', 'second', 'siemens',... 'sievert', 'steradian', 'tesla', 'volt', 'watt', 'weber', '(Invalid UnitKind)'}; value = 0; if (ismember(kind, UNIT_KIND_STRINGS)) value = 1; end; SBMLToolbox-4.1.0/toolbox/Convenience/isIntegralNumber.m0000644000000000000000000000447511703262406021703 0ustar rootrootfunction value = isIntegralNumber(number) % y = isIntegralNumber(number) % % Takes % % 1. number, any number % % Returns % % 1. y = % - 1 if the number represents an integer % - 0 otherwise % % *EXAMPLE:* % % y = isIntegralNumber(int32(3)) % y = 1 % % y = isIntegralNumber(double(3.2)) % y = 0 % % y = isIntegralNumber(double(3)) % y = 1 % % *NOTE:* The inbuilt 'isinteger' function only returns true if the number % has been declared as having an integer type, whereas the default type for numbers % in MATLAB is double. This function will return '1' if the number % represents an integer. % % value = 0; integerClasses = {'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'}; % since the function isinteger does not exist in MATLAB Rel 13 % this is not used %if (isinteger(number)) if (ismember(class(number), integerClasses)) value = 1; elseif (isnumeric(number)) % if it is an integer if (number == fix(number)) value = 1; end; end; SBMLToolbox-4.1.0/toolbox/Convenience/Contents.m0000644000000000000000000001322311703262406020215 0ustar rootroot% toolbox\Convenience % % The Convenience folder contains a number of convenience functions for % checking information or manipulating math expressions. % %============================== % y = CheckValidUnitKind(kind) %============================== % Takes % 1. kind, a string representing a unit kind % Returns % 1. y = % - 1 if the string represents a valid unit kind % - 0 otherwise % %====================================== % newArray = LoseWhiteSpace(charArray) %====================================== % Takes % 1. charArray, an array of characters % Returns % 1. the array with any white space removed % %=================================== % pairs = PairBrackets(expression) %=================================== % Takes % 1. expression, a string representation of a math expression % Returns % 1. an array of the indices of each pair of brackets ordered from % the opening bracket index % %====================================== % output = Rearrange(expression, name) %====================================== % Takes % 1. expression, a string representation of a math expression % 2. name, a string representing the name of a variable % Returns % 1. the expression rearranged in terms of the variable % %===================================== % newArray = RemoveDuplicates(array) %===================================== % Takes % 1. array, any array % Returns % 1. the array with any duplicate entries removed % %============================================ % value = Substitute(expression, SBMLModel) %============================================ % Takes % 1. expression, a string representation of a math expression % 2. SBMLModel, an SBML Model structure % Returns % 1. the value of the expression when all variables within the model have % been substituted % %============================================================= % newExpression = SubstituteConstants(expression, SBMLModel) %============================================================= % Takes % 1. expression, a string representation of a math expression % 2. SBMLModel, an SBML Model structure % Returns % 1. the string representation of the expression when all constants within the % model have been substituted % %========================================================================= % newExpression = SubstituteFunction(expression, SBMLFunctionDefinition) %========================================================================= % Takes % 1. expression, a string representation of a math expression % 2. SBMLFunctionDefinition, an SBML FunctionDefinition structure % Returns % 1. newExpression % - the string representation of the expression when any instances of the % functionDefinition have been substituted % - an empty string if the functiondefinition is not in the original % expression % %============================== % y = isIntegralNumber(number) %============================== % Takes % 1. number, any number % Returns % 1. y = % - 1 if the number represents an integer % - 0 otherwise % %=========================== % y = isValidUnitKind(kind) %=========================== % Takes % 1. kind, a string representing a unit kind % returns % 1. y = % - 1 if the string represents a valid unit kind % - 0 otherwise % %============================================= % index = matchFunctionName(expression, name) %============================================= % Takes % 1. expression, a string representation of a math expression % 2. name, a string representing the name of a function % Returns % 1. the index of the starting point of 'name' in the 'expression' % %===================================== % index = matchName(expression, name) %===================================== % Takes % 1. expression, a string representation of a math expression % 2. name, a string representing the name of a variable % Returns % 1. the index of the starting point of 'name' in the 'expression' % %========================================= % value = piecewise(value1, test, value2) %========================================= % Takes % 1. value1, the value to return if the test is true % 2. test, a boolean test that will return true or false % 3. value2, the value to return if the test is false % Returns % 1. value = % - value1, if test returns true % - value2, if test returns false % % %============================== % y = testmember(value, array) %============================== % Takes % 1. value, any number/string % 2. array, an array of objects % Returns % 1. y = % - 1 if value is a member of the array % - 0 otherwise % % SBMLToolbox-4.1.0/toolbox/Convenience/CheckValidUnitKind.m0000644000000000000000000000301311703262406022057 0ustar rootrootfunction value = CheckValidUnitKind(kind) % y = CheckValidUnitKind(kind) % % Takes % % 1. kind, a string representing a unit kind % % Returns % % 1. y = % - 1 if the string represents a valid unit kind % - 0 otherwise % % *NOTE:* This is identical to the function isValidUnitKind % % value = isValidUnitKind(kind); SBMLToolbox-4.1.0/toolbox/Contents.m0000644000000000000000000000553111703275674015777 0ustar rootroot% toolbox\ % % SBMLToolbox is an open-source MATLAB/Octave toolbox that % provides both MATLAB and Octave users with functions for % reading, writing and manipulation data expressed in the % Systems Biology Markup Language (SBML). % % It works on Windows, Linux, and MacOS systems. % % The SBMLToolbox supports reading and writing of all levels % and versions of SBML up to Level 3 Version 1 Core. % % % FUNCTIONS include: % %=========================================================== % installed = isBindingInstalled() %=========================================================== % Returns % 1. installed % - 1 if the libSBML executables are installed % - 0 otherwise % % % toolbox\AccessModel % % This directory contains functions that allow the user to % derive information from an SBML Model. % % toolbox\Convenience % % This directory contains a number of convenience functions % for checking information or manipulating math expressions. % % toolbox\fbc_package % % This directory contains functions that allow the user to % manipulate the additional elements of a MATLAB_SBML Model % structure introduced to support the SBML L3 'fbc' package. % % toolbox\MATLAB_SBML_Structure_Functions % % This directory contains functions that allow the user to % manipulate a MATLAB_SBML Model structure. The majority of % functions mimic their equivalent within the libSBML C API. % % toolbox\Simulation % % This directory contains functions to simulate an SBML model. % % toolbox\Validate_MATLAB_SBML_Structures % % This directory contains functions to validate the MATLAB_SBML % structures. % % SBMLToolbox-4.1.0/toolbox/AccessModel/0000755000000000000000000000000011704572220016166 5ustar rootrootSBMLToolbox-4.1.0/toolbox/AccessModel/Test/0000755000000000000000000000000011704572220017105 5ustar rootrootSBMLToolbox-4.1.0/toolbox/AccessModel/Test/test_fbc.m0000644000000000000000000000371711703262254021066 0ustar rootrootfunction y = test_fbc() % fbcBindingEnabled = 1; if isBindingFbcEnabled() == 0 fbcBindingEnabled = 0; end; if (fbcBindingEnabled == 0) y = 0; else fail = 0; m = TranslateSBML('../../fbc_package/test/test-data/fbc.xml'); s1 = m.species(2); r1 = m.reaction(1); names = {'k', 'k'}; names_unique = {'k_R1', 'k_R2'}; values = [0.1, 0.1]; sp_names = {'S', 'S1', 'S2', 'S3', 'S4'}; sp_values = [1,1,1,1,1]; fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s1, r1, [0,1,0,0,1]); fail = fail + TestFunction('GetAllParameters', 1, 2, m, names, values); fail = fail + TestFunction('GetAllParametersUnique', 1, 2, m, names_unique, values); fail = fail + TestFunction('GetSpecies', 1, 2, m, sp_names, sp_values); y = fail; end; SBMLToolbox-4.1.0/toolbox/AccessModel/Test/test_am.m0000644000000000000000000001155511703266706020736 0ustar rootrootfunction y = test_am() % test = 0; Totalfail = 0; if (isBindingInstalled() == 1) test = test + 11; fail = TestDetermineSpeciesRoleInReaction; if (fail > 0) disp('DetermineSpeciesRoleInReaction failed'); end; Totalfail = Totalfail + fail; test = test + 3; fail = TestGetAllParameters; if (fail > 0) disp('GetAllParameters failed'); end; Totalfail = Totalfail + fail; test = test + 3; fail = TestGetAllParametersUnique; if (fail > 0) disp('GetAllParametersUnique failed'); end; Totalfail = Totalfail + fail; test = test + 4; fail = TestGetGlobalParameters; if (fail > 0) disp('GetGlobalParameters failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestGetParameterFromReaction; if (fail > 0) disp('GetParameterFromReaction failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestGetParameterFromReactionUnique; if (fail > 0) disp('GetParameterFromReactionUnique failed'); end; Totalfail = Totalfail + fail; test = test + 4; fail = TestGetRateLawsFromReactions; if (fail > 0) disp('GetRateLawsFromReactions failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestGetRateLawsFromRules; if (fail > 0) disp('GetRateLawsFromRules failed'); end; Totalfail = Totalfail + fail; test = test + 3; fail = TestGetSpecies; if (fail > 0) disp('GetSpecies failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestGetSpeciesAlgebraicRules; if (fail > 0) disp('GetSpeciesAlgebraicRules failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestGetSpeciesAssignmentRules; if (fail > 0) disp('GetSpeciesAssignmentRules failed'); end; Totalfail = Totalfail + fail; test = test + 3; fail = TestGetStoichiometryMatrix; if (fail > 0) disp('GetStoichiometryMatrix failed'); end; Totalfail = Totalfail + fail; test = test + 5; fail = TestIsSpeciesInReaction; if (fail > 0) disp('IsSpeciesInReaction failed'); end; Totalfail = Totalfail + fail; test = test + 5; fail = TestGetCompartments; if (fail > 0) disp('GetCompartments failed'); end; Totalfail = Totalfail + fail; test = test + 1; fail = TestGetCompartmentTypes; if (fail > 0) disp('GetCompartmentTypes failed'); end; Totalfail = Totalfail + fail; test = test + 1; fail = TestGetSpeciesTypes; if (fail > 0) disp('GetSpeciesTypes failed'); end; Totalfail = Totalfail + fail; test = test + 4; fail = TestGetStoichiometrySparse; if (fail > 0) disp('GetStoichiometrySparse failed'); end; Totalfail = Totalfail + fail; test = test + 4; fail = TestGetVaryingParameters; if (fail > 0) disp('GetVaryingParameters failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestGetParameterAssignmentRules; if (fail > 0) disp('GetParametersAssignmentRules failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestGetParameterRateRules; if (fail > 0) disp('GetParametersRateRules failed'); end; Totalfail = Totalfail + fail; test = test + 2; fail = TestGetParameterAlgebraicRules; if (fail > 0) disp('GetParametersAlgebraicRules failed'); end; Totalfail = Totalfail + fail; test = test + 5; fail = test_fbc; if (fail > 0) disp('test_fbc in AccessModel failed'); end; Totalfail = Totalfail + fail; disp(sprintf('Number tests: %d', test)); disp(sprintf('Number fails: %d', Totalfail)); disp(sprintf('Pass rate: %d%%', ((test-Totalfail)/test)*100)); else disp('LibSBML binding not installed - no tests could be run'); end; y = Totalfail; SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestIsSpeciesInReaction.m0000644000000000000000000000351211703262254023771 0ustar rootrootfunction fail = TestIsSpeciesInReaction % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); r1 = m.reaction(1); s1 = m.species(1); s2 = m.species(3); fail = TestFunction('IsSpeciesInReaction', 2, 1, s1, r1, 1); fail = fail + TestFunction('IsSpeciesInReaction', 2, 1, s2, r1, 0); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); r1 = m.reaction(1); s1 = m.species(1); s2 = m.species(2); s3 = m.species(3); fail = fail + TestFunction('IsSpeciesInReaction', 2, 1, s1, r1, 1); fail = fail + TestFunction('IsSpeciesInReaction', 2, 1, s2, r1, 0); fail = fail + TestFunction('IsSpeciesInReaction', 2, 1, s2, r1, 0); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetVaryingParameters.m0000644000000000000000000000351411703262254024233 0ustar rootrootfunction fail = TestGetVaryingParameters % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); names = {'s2'}; values = [4]; fail = 0; fail = TestFunction('GetVaryingParameters', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/functionDefinition.xml'); names = {'p', 'c', 'c1', 'x', 'x1', 't', 'k_s'}; values = [2, 3, 18, 3, 3, 3, 3 ]; fail = fail + TestFunction('GetVaryingParameters', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); names = {'p', 'p1', 'p2', 'p3'}; values = [2, 4, 4, 2 ]; fail = fail + TestFunction('GetVaryingParameters', 1, 2, m, names, values); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetStoichiometrySparse.m0000644000000000000000000000426211703262254024611 0ustar rootrootfunction fail = TestGetStoichiometrySparse % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); matrix = sparse(zeros(5,2)); matrix(1,1) = -1; matrix(2,1) = 1; matrix(2,2) = -1; matrix(5,2) = 1; fail = TestFunction('GetStoichiometrySparse', 1, 1, m, matrix); m = TranslateSBML('../../Test/test-data/initialAssignments.xml'); matrix1 = sparse(zeros(5,2)); matrix1(1,1) = -1; matrix1(2,1) = 1; matrix1(2,2) = -1; matrix1(5,2) = 1; fail = fail + TestFunction('GetStoichiometrySparse', 1, 1, m, matrix1); m = TranslateSBML('../../Test/test-data/sparseStoichiometry.xml'); matrix2 = sparse(zeros(12,4)); matrix2(1,1) = -1; matrix2(2,2) = -1; matrix2(11,3) = -1; matrix2(5,4) = -1; matrix2(2,1) = 1; matrix2(3,2) = 1; matrix2(12,3) = 1; matrix2(6,4) = 1; fail = fail + TestFunction('GetStoichiometrySparse', 1, 1, m, matrix2); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); matrix3 = [NaN; 0; 1]; fail = fail + TestFunction('GetStoichiometrySparse', 1, 1, m, matrix3); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetStoichiometryMatrix.m0000644000000000000000000000354711703262254024625 0ustar rootrootfunction fail = TestGetStoichiometryMatrix % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); matrix = [-1, 0; 1, -1; 0, 1; 0, 0]; species = {'S1', 'S2', 'S3', 'X'}; fail = TestFunction('GetStoichiometryMatrix', 1, 2, m, matrix, species); m = TranslateSBML('../../Test/test-data/initialAssignments.xml'); matrix = [-1, 0; 1, -1; 0, 0; 0, 0; 0, 1]; species = {'S1', 'S2', 'S3', 'X', 'S4'}; fail = TestFunction('GetStoichiometryMatrix', 1, 2, m, matrix, species); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); matrix = [NaN; 0; 1]; species = {'s', 's1', 's2'}; fail = TestFunction('GetStoichiometryMatrix', 1, 2, m, matrix, species); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetSpeciesTypes.m0000644000000000000000000000261011703262254023204 0ustar rootrootfunction fail = TestGetSpeciesTypes % m = TranslateSBML('../../Test/test-data/l2v2-newComponents.xml'); names = {'Glucose'}; fail = TestFunction('GetSpeciesTypes', 1, 1, m, names); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetSpeciesAssignmentRules.m0000644000000000000000000000323511703262254025227 0ustar rootrootfunction fail = TestGetSpeciesAssignmentRules % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); species = {'S1', 'S2', 'S3', 'X', 'S4'}; rules = {'0', '0', 's1+s2', '0', '0'}; fail = TestFunction('GetSpeciesAssignmentRules', 1, 2, m, species, rules); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); species = {'s', 's1', 's2'}; rules = {'0', '0', '0'}; fail = fail + TestFunction('GetSpeciesAssignmentRules', 1, 2, m, species, rules); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetSpeciesAlgebraicRules.m0000644000000000000000000000330311703262254024764 0ustar rootrootfunction fail = TestGetSpeciesAlgebraicRules % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); species = {'S1', 'S2', 'S3', 'X', 'S4'}; rules = {{'X+S1-S3'}, {'S2+S3-s2'}, {'X+S1-S3', 'S2+S3-s2'}, {'X+S1-S3'}, '0'}; fail = TestFunction('GetSpeciesAlgebraicRules', 1, 2, m, species, rules); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); species = {'s', 's1', 's2'}; rules = {'0', '0', '0'}; fail = fail + TestFunction('GetSpeciesAlgebraicRules', 1, 2, m, species, rules); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetSpecies.m0000644000000000000000000000375611703262254022173 0ustar rootrootfunction fail = TestGetSpecies % m = TranslateSBML('../../Test/test-data/l1v1.xml'); names = {'S1', 'S2', 'x0'}; values = [1.5, 1.45, 1]; fail = TestFunction('GetSpecies', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/initialAssignments.xml'); names = {'S1', 'S2', 'S3', 'X', 'S4'}; values = [3, 6, 7, 9, 0]; fail = fail + TestFunction('GetSpecies', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/funcDefsWithInitialAssignments.xml'); names = {'S1', 'S2', 'S3', 'X', 'S4'}; values = [3, 6, 0, 9, 0]; fail = fail + TestFunction('GetSpecies', 1, 2, m, names, values); % m = TranslateSBML('../../Test/test-data/l3v1core.xml'); % % names = {'s', 's1', 's2'}; % values = [0, 2.2, NaN]; % % fail = fail + TestFunction('GetSpecies', 1, 2, m, names, values); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetRateLawsFromRules.m0000644000000000000000000000314711703262254024153 0ustar rootrootfunction fail = TestGetRateLawsFromRules % m = TranslateSBML('../../Test/test-data/rateRules.xml'); species = {'s1', 's2'}; rules = {'k', '0'}; fail = TestFunction('GetRateLawsFromRules', 1, 2, m, species, rules); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); species = {'s', 's1', 's2'}; rules = {'0', '0', '0'}; fail = fail + TestFunction('GetRateLawsFromRules', 1, 2, m, species, rules); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetRateLawsFromReactions.m0000644000000000000000000000451311703262254025006 0ustar rootrootfunction fail = TestGetRateLawsFromReactions % fail = 0; m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); species = {'S1', 'S2', 'S3', 'X', 'S4'}; rateLaws = {' - (k*S1)', ' + (k*S1) - (k_R2*S2)', '0', '0', ' + (k_R2*S2)'}; fail = fail + TestFunction('GetRateLawsFromReactions', 1, 2, m, species, rateLaws); m = TranslateSBML('../../Test/test-data/l2v2-newComponents.xml'); species = {'X0', 'X1'}; rateLaws = {' - (v_in*X0/t_in)', '0'}; fail = fail + TestFunction('GetRateLawsFromReactions', 1, 2, m, species, rateLaws); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); species = {'s', 's1', 's2'}; rateLaws = {' - (s*p) * (s*k_r/p)', '0', ' + (s*k_r/p)'}; fail = fail + TestFunction('GetRateLawsFromReactions', 1, 2, m, species, rateLaws); m = TranslateSBML('../../Test/test-data/testNegativeLocalParameter.xml'); species = {'E', 'ES', 'S', 'P'}; rateLaws = {' - (cell*(k1_R1*E*S-k2_R1*ES)) + (cell*k3_R2*ES)', ... ' + (cell*(k1_R1*E*S-k2_R1*ES)) - (cell*k3_R2*ES)', ... ' - (cell*(k1_R1*E*S-k2_R1*ES))', ' + (cell*k3_R2*ES)'}; fail = fail + TestFunction('GetRateLawsFromReactions', 1, 2, m, species, rateLaws); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetParameterRateRules.m0000644000000000000000000000330211703262254024332 0ustar rootrootfunction fail = TestGetParameterRateRules % m = TranslateSBML('../../Test/test-data/varyingParameters.xml'); Parameter = {'t', 'k', 'k1', 'v1', 'v2', 'v3'}; rules = {'0', '0', '0', '0', 'v1/t', '0'}; fail = TestFunction('GetParameterRateRules', 1, 2, m, Parameter, rules); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); names = {'p', 'p1', 'p2', 'p3', 'x', 'd'}; values = {'0', '0', '0', 'p1/p', '0', '0'}; fail = fail + TestFunction('GetParameterRateRules', 1, 2, m, names, values); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetParameterFromReactionUnique.m0000644000000000000000000000320711703262254026207 0ustar rootrootfunction fail = TestGetParameterFromReactionUnique % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); r = m.reaction(2); names = {'k_R2'}; values = 0.1; fail = TestFunction('GetParameterFromReactionUnique', 1, 2, r, names, values); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); r = m.reaction(1); names = {'k_r'}; values = 9; fail = fail + TestFunction('GetParameterFromReactionUnique', 1, 2, r, names, values); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetParameterFromReaction.m0000644000000000000000000000316011703262254025016 0ustar rootrootfunction fail = TestGetParameterFromReaction % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); r = m.reaction(2); names = {'k'}; values = 0.1; fail = TestFunction('GetParameterFromReaction', 1, 2, r, names, values); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); r = m.reaction(1); names = {'k'}; values = 9; fail = fail + TestFunction('GetParameterFromReaction', 1, 2, r, names, values); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetParameterAssignmentRules.m0000644000000000000000000000332411703262254025553 0ustar rootrootfunction fail = TestGetParameterAssignmentRules % m = TranslateSBML('../../Test/test-data/varyingParameters.xml'); Parameter = {'t', 'k', 'k1', 'v1', 'v2', 'v3'}; rules = {'0', '0', '0', 'k1+k', '0', '0'}; fail = TestFunction('GetParameterAssignmentRules', 1, 2, m, Parameter, rules); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); names = {'p', 'p1', 'p2', 'p3', 'x', 'd'}; values = {'0', '0', 'x*p3', '0', '0', '0'}; fail = fail + TestFunction('GetParameterAssignmentRules', 1, 2, m, names, values); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetParameterAlgebraicRules.m0000644000000000000000000000336011703262254025314 0ustar rootrootfunction fail = TestGetParameterAlgebraicRules % m = TranslateSBML('../../Test/test-data/varyingParameters.xml'); Parameter = {'t', 'k', 'k1', 'v1', 'v2', 'v3'}; rules = {'0', '0', {'v3+k1-v2'}, '0', {'v3+k1-v2'}, {'v3+k1-v2'}}; fail = TestFunction('GetParameterAlgebraicRules', 1, 2, m, Parameter, rules); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); Parameter = {'p', 'p1', 'p2', 'p3', 'x', 'd'}; rules = {'0', '0', '0', '0', {'x-2'}, '0'}; fail = fail + TestFunction('GetParameterAlgebraicRules', 1, 2, m, Parameter, rules); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetGlobalParameters.m0000644000000000000000000000411511703262254024012 0ustar rootrootfunction fail = TestGetGlobalParameters % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); names = {'k', 's1', 's2'}; values = [1, 3, 4]; fail = TestFunction('GetGlobalParameters', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/initialAssignments.xml'); names = {'k', 'k1', 's1', 's2', 's3', 'c', 'c1'}; values = [6, 2, 3, 4, 1, 6, 2]; fail = fail + TestFunction('GetGlobalParameters', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/funcDefsWithInitialAssignments.xml'); names = {'k', 'k1', 's1', 's2', 's3', 'c', 'c1'}; values = [6, 2, 3, 4, 1, 6, 2]; fail = fail + TestFunction('GetGlobalParameters', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); names = {'p', 'p1', 'p2', 'p3', 'x', 'd'}; values = [2, 4, 4, 2, 2, NaN]; fail = fail + TestFunction('GetGlobalParameters', 1, 2, m, names, values); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetCompartmentTypes.m0000644000000000000000000000262511703262254024110 0ustar rootrootfunction fail = TestGetCompartmentTypes % m = TranslateSBML('../../Test/test-data/l2v2-newComponents.xml'); names = {'mitochondria'}; fail = TestFunction('GetCompartmentTypes', 1, 1, m, names); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetCompartments.m0000644000000000000000000000413511703262254023244 0ustar rootrootfunction fail = TestGetCompartments % m = TranslateSBML('../../Test/test-data/l1v1.xml'); names = {'compartment'}; values = [1]; fail = TestFunction('GetCompartments', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/l2v1-all.xml'); names = {'a', 'c', 'c1'}; values = [1, 2, 1]; fail = fail + TestFunction('GetCompartments', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/initialAssignments.xml'); names = {'compartment'}; values = [3]; fail = fail + TestFunction('GetCompartments', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/funcDefsWithInitialAssignments.xml'); names = {'compartment'}; values = [3]; fail = fail + TestFunction('GetCompartments', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); names = {'a', 'a1'}; values = [1, 3]; fail = fail + TestFunction('GetCompartments', 1, 2, m, names, values); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetAllParametersUnique.m0000644000000000000000000000361711703262254024517 0ustar rootrootfunction fail = TestGetAllParametersUnique % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); names = {'k', 's1', 's2', 'k_R2'}; values = [1, 3, 4, 0.1]; fail = TestFunction('GetAllParametersUnique', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/initialAssignments.xml'); names = {'k', 'k1', 's1', 's2', 's3', 'c', 'c1', 'k_R2'}; values = [6, 2, 3, 4, 1, 6, 2, 0.1]; fail = fail + TestFunction('GetAllParametersUnique', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); names = {'p', 'p1', 'p2', 'p3', 'x', 'd', 'k_r'}; values = [2, 4, 4, 2, 2, NaN, 9]; fail = fail + TestFunction('GetAllParametersUnique', 1, 2, m, names, values); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestGetAllParameters.m0000644000000000000000000000355711703262254023333 0ustar rootrootfunction fail = TestGetAllParameters % m = TranslateSBML('../../Test/test-data/algebraicRules.xml'); names = {'k', 's1', 's2', 'k'}; values = [1, 3, 4, 0.1]; fail = TestFunction('GetAllParameters', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/initialAssignments.xml'); names = {'k', 'k1', 's1', 's2', 's3', 'c', 'c1', 'k'}; values = [6, 2, 3, 4, 1, 6, 2, 0.1]; fail = fail + TestFunction('GetAllParameters', 1, 2, m, names, values); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); names = {'p', 'p1', 'p2', 'p3', 'x', 'd', 'k'}; values = [2, 4, 4, 2, 2, NaN, 9]; fail = fail + TestFunction('GetAllParameters', 1, 2, m, names, values); SBMLToolbox-4.1.0/toolbox/AccessModel/Test/TestDetermineSpeciesRoleInReaction.m0000644000000000000000000000546111703262254026161 0ustar rootrootfunction fail = TestDetermineSpeciesRoleInReaction % m = TranslateSBML('../../Test/test-data/species.xml'); s1 = m.species(1); s2 = m.species(2); s4 = m.species(4); r1 = m.reaction(1); r2 = m.reaction(2); r3 = m.reaction(3); fail = TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s4, r1, 0); fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s2, r2, [1,0,0,2,0]); fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s1, r1, [0,1,0,0,1]); fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s4, r3, [0,0,1,0,0]); fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s2, r3, [1,1,0,1,2]); m = TranslateSBML('../../Test/test-data/l1v2-all.xml'); s1 = m.species(1); s4 = m.species(4); r1 = m.reaction(1); fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s4, r1, 0); fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s1, r1, [0,1,0,0,1]); m = TranslateSBML('../../Test/test-data/initialAssignments.xml'); s1 = m.species(1); s2 = m.species(3); r1 = m.reaction(1); fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s2, r1, 0); fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s1, r1, [0,1,0,0, 1]); m = TranslateSBML('../../Test/test-data/l2v2-newComponents.xml'); s1 = m.species(1); r1 = m.reaction(1); fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s1, r1, [0,1,0,0, 1]); m = TranslateSBML('../../Test/test-data/l3v1core.xml'); s1 = m.species(1); r1 = m.reaction(1); fail = fail + TestFunction('DetermineSpeciesRoleInReaction', 2, 1, s1, r1, [0,1,0,0, 1]); SBMLToolbox-4.1.0/toolbox/AccessModel/IsSpeciesInReaction.m0000644000000000000000000000664211703262254022221 0ustar rootrootfunction y = IsSpeciesInReaction(SBMLSpecies, SBMLReaction) % num = IsSpeciesInReaction(SBMLSpecies, SBMLReaction) % % Takes % % 1. SBMLSpecies, an SBML Species structure % 2. SBMLReaction, an SBML Reaction structure % % Returns % % 1. the number of times the species occurs within the reaction % Filename : IsSpeciesInReaction.m % Description : IsSpeciesInReaction(SBMLSpecies, SBMLReaction)takes a SBML species and reaction % and determines where the species takes part in the reaction % Author(s) : SBML Development Group % Organization: University of Hertfordshire STRC % Created : 2004-02-02 % Revision : $Id: IsSpeciesInReaction.m 15207 2012-01-10 18:07:47Z mhucka $ % Source : $Source $ % % % check that input is valid if (~isValid(SBMLSpecies)) error('IsSpeciesInReaction(SBMLSpecies, SBMLReaction)\n%s', 'first input must be an SBML Species structure'); end; if(~isValid(SBMLReaction)) error('IsSpeciesInReaction(SBMLSpecies, SBMLReaction)\n%s', 'second input must be an SBML Reaction structure'); end; SBMLLevel = GetLevel(SBMLSpecies); %-------------------------------------------------------------------------- % determine the name of the species % this will match to the speciesreference within the reaction if (SBMLLevel == 1) name = SBMLSpecies.name; else if (isempty(SBMLSpecies.id)) name = SBMLSpecies.name; else name = SBMLSpecies.id; end; end; %-------------------------------------------------------------------------- %determine number of each type of species included within this reaction NumProducts = length(SBMLReaction.product); NumReactants = length(SBMLReaction.reactant); if (SBMLLevel > 1) NumModifiers = length(SBMLReaction.modifier); else NumModifiers = 0; end; %------------------------------------------------------------------------- % find species in this reaction y = 0; for c = 1:NumProducts if (strcmp(name, SBMLReaction.product(c).species)) y = y + 1; end; end; for c = 1:NumReactants if (strcmp(name, SBMLReaction.reactant(c).species)) y = y + 1; end; end; for c = 1:NumModifiers if (strcmp(name, SBMLReaction.modifier(c).species)) y = y + 1; end; end; SBMLToolbox-4.1.0/toolbox/AccessModel/GetVaryingParameters.m0000644000000000000000000001002711606041610022442 0ustar rootrootfunction varargout = GetVaryingParameters(SBMLModel) % [names, values] = GetVaryingParameters(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of any non-constant parameters % within the model % 2. an array of the values of each of these parameter % % *NOTE:* the value returned will be (in order) % % - determined from assignmentRules/initialAssignments where appropriate % - the attribute 'value' for the given parameter % - NaN; if the value is not specified in any way within the model % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetVaryingParameters(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %------------------------------------------------------------ % determine the number of parameters within the model NumParams = length(SBMLModel.parameter); count = 1; %------------------------------------------------------------ % loop through the list of parameters for i = 1:NumParams %determine the name or id of the parameter if (SBMLModel.SBML_level == 1) name = SBMLModel.parameter(i).name; else if (isempty(SBMLModel.parameter(i).id)) name = SBMLModel.parameter(i).name; else name = SBMLModel.parameter(i).id; end; end; % if the parameter is not constant add to arrays if SBMLModel.parameter(i).constant == 0 % save into an array of character names CharArray{count} = name; % put the value into the array Values(count) = SBMLModel.parameter(i).value; % might be set by assignment rule AR = Model_getAssignmentRuleByVariable(SBMLModel, name); if (~isempty(AR)) newSBMLModel = SBMLModel; newSBMLModel.parameter(i) = []; for fd = 1:Model_getNumFunctionDefinitions(SBMLModel) newFormula = SubstituteFunction(AR.formula, Model_getFunctionDefinition(SBMLModel, fd)); if (~isempty(newFormula)) AR.formula = newFormula; end; end; Values(count) = Substitute(AR.formula, newSBMLModel); end; % might be an initial assignment in l2v2 if ((SBMLModel.SBML_level == 2 && SBMLModel.SBML_version > 1) ... || SBMLModel.SBML_level == 3) IA = Model_getInitialAssignmentBySymbol(SBMLModel, name); if (~isempty(IA)) % remove this from the substtution newSBMLModel = SBMLModel; newSBMLModel.parameter(i) = []; for fd = 1:Model_getNumFunctionDefinitions(SBMLModel) newFormula = SubstituteFunction(IA.math, Model_getFunctionDefinition(SBMLModel, fd)); if (~isempty(newFormula)) IA.math = newFormula; end; end; Values(count) = Substitute(IA.math, newSBMLModel); end; end; count = count + 1; end; end; %-------------------------------------------------------------------------- % assign output if (count ~= 1) varargout{1} = CharArray; varargout{2} = Values; else varargout{1} = []; varargout{2} = []; end; SBMLToolbox-4.1.0/toolbox/AccessModel/GetStoichiometrySparse.m0000644000000000000000000001002211606041610023012 0ustar rootrootfunction S=GetStoichiometrySparse(model) % S = GetStoichiometrySparse(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. a sparse stoichiometry matrix produced from the reactions/species % % *NOTE:* This function was contributed by: Arsen Batagov (2006) % % check input is an SBML model if (~isValidSBML_Model(model)) error('GetStoichiometrySparse(model)\n%s', 'input must be an SBMLModel structure'); end; if (model.SBML_level > 1) SpeciesID={model.species.id}; ReactionID={model.reaction.id}; else SpeciesID={model.species.name}; ReactionID={model.reaction.name}; end; NS=length(SpeciesID); NR=length(ReactionID); LNS=zeros(NS,1); S=sparse(zeros(NS,NR)); for i=1:NS LNS(i)=length(SpeciesID{i}); end % Create a hash-table for the future search MaxLNS=max(LNS); InitialApprox=cell(MaxLNS); LIA=zeros(MaxLNS); for i=min(LNS):MaxLNS InitialApprox{i}=find(LNS==i); LIA(i)=length(InitialApprox{i}); end % Search for i=1:NR t={model.reaction(i).reactant.species}; if ((model.SBML_level == 2) && (~isempty(model.reaction(i).reactant.stoichiometryMath))) error('GetStoichiometrySparse(SBMLModel)\n%s', 'stoichiometry has been entered as a formula'); end; if ((model.SBML_level == 2 && model.SBML_version > 1) ... || model.SBML_level == 3) denominator = 1.0; else denominator = [model.reaction(i).reactant.denominator]; end; s=[model.reaction(i).reactant.stoichiometry]./double(denominator); rl=length(t); if ~isempty(s) if rl>1 for j=1:rl lt=length(t{j}); for k=1:LIA(lt) if cell2mat(SpeciesID(InitialApprox{lt}(k)))==t{j} S(InitialApprox{lt}(k),i)=-s(j); end end end else t=cell2mat(t); lt=length(t); for k=1:LIA(lt) if cell2mat(SpeciesID(InitialApprox{lt}(k)))==t S(InitialApprox{lt}(k),i)=-s; end end end end t={model.reaction(i).product.species}; if ((model.SBML_level == 2) && (~isempty(model.reaction(i).product.stoichiometryMath))) error('GetStoichiometrySparse(SBMLModel)\n%s', 'stoichiometry has been entered as a formula'); end; if ((model.SBML_level == 2 && model.SBML_version > 1) ... || model.SBML_level == 3) denominator = 1.0; else denominator = [model.reaction(i).product.denominator]; end; s=[model.reaction(i).product.stoichiometry]./double(denominator); rl=length(t); if ~isempty(s) if rl>1 for j=1:rl lt=length(t{j}); for k=1:LIA(lt) if cell2mat(SpeciesID(InitialApprox{lt}(k)))==t{j} S(InitialApprox{lt}(k),i)=s(j); end end end else t=cell2mat(t); lt=length(t); for k=1:LIA(lt) if cell2mat(SpeciesID(InitialApprox{lt}(k)))==t S(InitialApprox{lt}(k),i)=s; end end end end end SBMLToolbox-4.1.0/toolbox/AccessModel/GetStoichiometryMatrix.m0000644000000000000000000001426611703262254023046 0ustar rootrootfunction varargout = GetStoichiometryMatrix(SBMLModel) % [matrix, species] = GetStoichiometryMatrix(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. the stoichiometry matrix produced from the reactions/species % 2. an array of strings representing the identifiers of all species within the model % (in the order in which the matrix deals with them) % % *EXAMPLE:* % % model has 5 species (s1, s2, s3, s4, s5) % and 3 reactions: s1 -> s2 % s3 -> s5 % 2s1 -> s5 % % [matrix, species] = GetRateLawsFromReactions(model) % % matrix = -1 0 -2 % 1 0 0 % 0 -1 0 % 0 1 1 % species = ['s1', 's2', 's3', 's5'] % % (species s4 does not play a role in any reaction) % %-------------------------------------------------------------------------- % % Filename : GetStoichiometryMatrix.m % Description : takes 1. SBMLModel; an SBML Model structure and returns the stoichiometry matrix % and an array of strings representing the ids of all species % Author(s) : SBML Development Group % Organization: University of Hertfordshire STRC % Created : 2004-02-02 % Revision : $Id: GetStoichiometryMatrix.m 15207 2012-01-10 18:07:47Z mhucka $ % Source : $Source $ % % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetStoichiometryMatrix(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %------------------------------------------------------------ % determine the number of species and reactions NumSpecies = length(SBMLModel.species); NumReactions = length(SBMLModel.reaction); %-------------------------------------------------------------------------- % for each species loop through each reaction and determine whether the species % takes part and in what capacity for i = 1:NumSpecies %determine which reactions it occurs within for j = 1:NumReactions SpeciesRole = DetermineSpeciesRoleInReaction(SBMLModel.species(i), SBMLModel.reaction(j)); if (sum(SpeciesRole) == 0) % not in this reaction StoichiometryMatrix(i,j) = 0; TotalOccurences = 0; else % record numbers of occurences of species as reactant/product % and check that we can deal with reaction NoReactants = SpeciesRole(2); NoProducts = SpeciesRole(1); TotalOccurences = NoReactants + NoProducts; %-------------------------------------------------------------- % check that a species does not occur twice on one side of the % reaction if (NoReactants > 1 || NoProducts > 1) error('GetStoichiometryMatrix(SBMLModel)\n%s', 'SPECIES OCCURS MORE THAN ONCE ON ONE SIDE OF REACTION'); end; end; % species has been found in this reaction while (TotalOccurences > 0) % if(NoProducts > 0) if ((SBMLModel.SBML_level == 2) && (~isempty(SBMLModel.reaction(j).product(SpeciesRole(4)).stoichiometryMath))) error('GetStoichiometryMatrix(SBMLModel)\n%s', 'stoichiometry has been entered as a formula'); end; if ((SBMLModel.SBML_level == 2 && SBMLModel.SBML_version > 1) ... || SBMLModel.SBML_level == 3) denominator = 1.0; else denominator = double(SBMLModel.reaction(j).product(SpeciesRole(4)).denominator); end; stoichiometry = SBMLModel.reaction(j).product(SpeciesRole(4)).stoichiometry/denominator; StoichiometryMatrix(i,j) = stoichiometry; NoProducts = NoProducts - 1; elseif (NoReactants > 0) if ((SBMLModel.SBML_level == 2) && (~isempty(SBMLModel.reaction(j).reactant(SpeciesRole(5)).stoichiometryMath))) error('GetStoichiometryMatrix(SBMLModel)\n%s', 'stoichiometry has been entered as a formula'); end; if ((SBMLModel.SBML_level == 2 && SBMLModel.SBML_version > 1) ... || SBMLModel.SBML_level == 3) denominator = 1.0; else denominator = double(SBMLModel.reaction(j).reactant(SpeciesRole(5)).denominator); end; stoichiometry = SBMLModel.reaction(j).reactant(SpeciesRole(5)).stoichiometry/denominator; StoichiometryMatrix(i,j) = - stoichiometry; NoReactants = NoReactants - 1; end; TotalOccurences = TotalOccurences - 1; end; % while found > 0 end; % for NumReactions end; % for NumSpecies %-------------------------------------------------------------------------- % assign outputs varargout{1} = StoichiometryMatrix; varargout{2} = GetSpecies(SBMLModel); SBMLToolbox-4.1.0/toolbox/AccessModel/GetSpeciesTypes.m0000644000000000000000000000504611703262254021433 0ustar rootrootfunction varargout = GetSpeciesTypes(SBMLModel) % names = GetSpeciesTypes(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all SpeciesTypes within the model % %-------------------------------------------------------------------------- % % Filename : GetSpeciesTypes.m % Description : returns SpeciesTypes % Author(s) : SBML Development Group % Organization: University of Hertfordshire STRC % Created : 2004-02-02 % Revision : $Id: GetSpeciesTypes.m 15207 2012-01-10 18:07:47Z mhucka $ % Source : $Source $ % % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetSpeciesTypes(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %------------------------------------------------------------ % determine the number of SpeciesTypes within the model NumSpeciesTypes = length(SBMLModel.speciesType); %------------------------------------------------------------ % loop through the list of Speciess for i = 1:NumSpeciesTypes % and array of the character names CharArray{i} = SBMLModel.speciesType(i).id; end; %-------------------------------------------------------------------------- % assign output if (NumSpeciesTypes ~= 0) varargout{1} = CharArray; else varargout{1} = []; end; SBMLToolbox-4.1.0/toolbox/AccessModel/GetSpeciesAssignmentRules.m0000644000000000000000000000615511703262254023454 0ustar rootrootfunction [Species, AssignmentRules] = GetSpeciesAssignmentRules(SBMLModel) % [species, assignmentRules] = GetSpeciesAssignmentRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all species % 2. an array of % % - the character representation of the assignment rule used to % assign value to a given species % - '0' if the species is not assigned by a rule % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetSpeciesAssignmentRules(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %-------------------------------------------------------------- % get information from the model Species = GetSpecies(SBMLModel); NumberSpecies = length(SBMLModel.species); AssignRules = Model_getListOfAssignmentRules(SBMLModel); NumAssignRules = Model_getNumAssignmentRules(SBMLModel); % for each species loop through each reaction and determine whether the species % takes part and in what capacity for i = 1:NumberSpecies output = ''; % if species is constant in level 2 % concentration cannot be changed by a rule boundary = SBMLModel.species(i).boundaryCondition; if (SBMLModel.SBML_level > 1) constant = SBMLModel.species(i).constant; else constant = -1; end; if (constant == 1) output = '0'; else if (NumAssignRules > 0) %determine which rules it occurs within RuleNo = Species_isAssignedByRule(SBMLModel.species(i), AssignRules); if (RuleNo > 0) output = AssignRules(RuleNo).formula; end; end; end; % if constant % finished looking for this species % record rate law and loop to next species % rate = 0 if no law found if (isempty(output)) AssignmentRules{i} = '0'; else AssignmentRules{i} = output; end; end; % for NumSpecies SBMLToolbox-4.1.0/toolbox/AccessModel/GetSpeciesAlgebraicRules.m0000644000000000000000000000576411703262254023222 0ustar rootrootfunction [Species, AlgebraicRules] = GetSpeciesAlgebraicRules(SBMLModel) % [names, values] = GetSpeciesAlgebraicRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all species % 2. an array of % % - the character representation of each algebraic % rule the species appears in % - '0' if the particular species is not in an algebraic rule % % *EXAMPLE:* % % model has 3 species (s1, s2, s3) % and 2 algebraic rules with formula 's2+7' and 's2-s3' % % [species, algebraicRules] = GetSpeciesAlgebraicRules(model) % % species = ['s1', 's2', 's3'] % algebraicRules = {'0', ['s2+7', 's2-s3'], ['k2-k3']} % % % % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetSpeciesAlgebraicRules(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %-------------------------------------------------------------- % get information from the model Species = GetSpecies(SBMLModel); NumberSpecies = length(SBMLModel.species); Rules = Model_getListOfAlgebraicRules(SBMLModel); NumRules = Model_getNumAlgebraicRules(SBMLModel); for i = 1:NumberSpecies output = ''; if (NumRules > 0) %determine which rules it occurs within RuleNo = Species_isInAlgebraicRule(SBMLModel.species(i), Rules); for j = 1:length(RuleNo) if (RuleNo(j) > 0) output{j} = Rules(RuleNo(j)).formula; end; end; end; % finished looking for this species % record rate law and loop to next species % rate = 0 if no law found if (isempty(output)) AlgebraicRules{i} = '0'; else AlgebraicRules{i} = output; end; end; % for NumSpecies SBMLToolbox-4.1.0/toolbox/AccessModel/GetSpecies.m0000644000000000000000000001042511703262254020403 0ustar rootrootfunction varargout = GetSpecies(SBMLModel) % [names, values] = GetSpecies(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all species within the model % 2. an array of the initial concentration/amount values of each species % % *NOTE:* the value returned will be (in order) % % - determined from assignmentRules/initialAssignments where appropriate % - the attribute 'initialAmount' or 'initialConcentration' for the given parameter % - NaN, if the value is not specified in any way within the model % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetSpecies(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %------------------------------------------------------------ % determine the number of species within the model NumSpecies = length(SBMLModel.species); %------------------------------------------------------------ % loop through the list of species for i = 1:NumSpecies %determine the name or id of the species if (SBMLModel.SBML_level == 1) name = SBMLModel.species(i).name; else if (isempty(SBMLModel.species(i).id)) name = SBMLModel.species(i).name; else name = SBMLModel.species(i).id; end; end; % and array of the character names CharArray{i} = name; % get the initial concentration values % add to an array Values(i) = SBMLModel.species(i).initialAmount; if (SBMLModel.SBML_level > 1) if (SBMLModel.species(i).isSetInitialConcentration) Values(i) = SBMLModel.species(i).initialConcentration; end; end; % might be set by assignment rule AR = Model_getAssignmentRuleByVariable(SBMLModel, name); if (~isempty(AR)) newSBMLModel = SBMLModel; newSBMLModel.species(i) = []; for fd = 1:Model_getNumFunctionDefinitions(SBMLModel) newFormula = SubstituteFunction(AR.formula, Model_getFunctionDefinition(SBMLModel, fd)); if (~isempty(newFormula)) AR.formula = newFormula; end; end; Values(i) = Substitute(AR.formula, newSBMLModel); end; % might be an initial assignment in l2v2 if ((SBMLModel.SBML_level == 2 && SBMLModel.SBML_version > 1) ... || SBMLModel.SBML_level == 3) IA = Model_getInitialAssignmentBySymbol(SBMLModel, name); if (~isempty(IA)) % remove this from the substtution newSBMLModel = SBMLModel; newSBMLModel.species(i) = []; for fd = 1:Model_getNumFunctionDefinitions(SBMLModel) newFormula = SubstituteFunction(IA.math, Model_getFunctionDefinition(SBMLModel, fd)); if (~isempty(newFormula)) IA.math = newFormula; end; end; Values(i) = Substitute(IA.math, newSBMLModel); end; end; end; %-------------------------------------------------------------------------- % assign output if (NumSpecies ~= 0) varargout{1} = CharArray; varargout{2} = Values; else varargout{1} = []; varargout{2} = []; end; SBMLToolbox-4.1.0/toolbox/AccessModel/GetRateLawsFromRules.m0000644000000000000000000000641111703262254022371 0ustar rootrootfunction [Species, RateLaws] = GetRateLawsFromRules(SBMLModel) % [species, rateLaws] = GetRateLawsFromRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all species % 2. an array of % % - the character representation of the rateRule that determines % the particular species % - '0' if the particular species is not assigned by a rateRule % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetRateLawsFromRules(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %-------------------------------------------------------------- % get information from the model Species = GetSpecies(SBMLModel); NumberSpecies = length(SBMLModel.species); RateRules = Model_getListOfRateRules(SBMLModel); NumRateRules = Model_getNumRateRules(SBMLModel); % for each species loop through each reaction and determine whether the species % takes part and in what capacity for i = 1:NumberSpecies output = ''; % if species is constant in level 2 % concentration cannot be changed by a rate rule boundary = SBMLModel.species(i).boundaryCondition; if (SBMLModel.SBML_level > 1) constant = SBMLModel.species(i).constant; else constant = -1; end; if (constant == 1) output = '0'; else %determine which rules it occurs within j = 0; while (j s2 with kineticLaw 'k1*s1' % s2 -> s3 with kineticLaw 'k2*s2' % % [species, rateLaws] = GetRateLawsFromReactions(model) % % species = ['s1', 's2', 's3', 's4'] % rateLaws = {'-k1*s1', 'k1*s1-k2*s2', 'k2*s2', '0'} % % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetRateLawsFromReactions(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %-------------------------------------------------------------- % get information from the model Species = GetSpecies(SBMLModel); NumberSpecies = length(SBMLModel.species); NumReactions = length(SBMLModel.reaction); % for each species loop through each reaction and determine whether the species % takes part and in what capacity for i = 1:NumberSpecies output = ''; % if species is a boundary condition (or constant in level 2 % no rate law is required boundary = SBMLModel.species(i).boundaryCondition; if (SBMLModel.SBML_level > 1) constant = SBMLModel.species(i).constant; else constant = -1; end; if (boundary == 1) output = '0'; elseif (constant ==1) output = '0'; else %determine which reactions it occurs within for j = 1:NumReactions SpeciesRole = DetermineSpeciesRoleInReaction(SBMLModel.species(i), SBMLModel.reaction(j)); %-------------------------------------------------------------- % check that reaction has a kinetic law if (isempty(SBMLModel.reaction(j).kineticLaw)) error('GetRateLawsFromReactions(SBMLModel)\n%s', 'NO KINETIC LAW SUPPLIED'); end; %-------------------------------------------------------------- if (SBMLModel.SBML_level < 3) kineticLawMath = SBMLModel.reaction(j).kineticLaw.formula; else kineticLawMath = SBMLModel.reaction(j).kineticLaw.math; end; TotalOccurences = 0; % record numbers of occurences of species as reactant/product % and check that we can deal with reaction if (sum(SpeciesRole)>0) NoReactants = SpeciesRole(2); NoProducts = SpeciesRole(1); TotalOccurences = NoReactants + NoProducts; %-------------------------------------------------------------- % check that a species does not occur twice on one side of the % reaction if (NoReactants > 1 || NoProducts > 1) error('GetRateLawsFromReactions(SBMLModel)\n%s', 'SPECIES OCCURS MORE THAN ONCE ON ONE SIDE OF REACTION'); end; %-------------------------------------------------------------- % check that reaction has a kinetic law formula if (isempty(SBMLModel.reaction(j).kineticLaw)) error('GetRateLawsFromReactions(SBMLModel)\n%s', 'NO KINETIC LAW SUPPLIED'); end; %-------------------------------------------------------------- end; % species has been found in this reaction while (TotalOccurences > 0) % % add the kinetic law to the output for this species if(NoProducts > 0) % Deal with case where parameter is defined within the reaction % and thus the reaction name has been appended to the parameter % name in the list in case of repeated use of same name Param_Name = GetParameterFromReaction(SBMLModel.reaction(j)); if (~isempty(Param_Name)) ReviseParam_Name = GetParameterFromReactionUnique(SBMLModel.reaction(j)); formula = Substitute(Param_Name, ReviseParam_Name, kineticLawMath); else formula = kineticLawMath; end; % put in stoichiometry if ((SBMLModel.SBML_level == 2 && SBMLModel.SBML_version > 1) ... || SBMLModel.SBML_level == 3) stoichiometry = SBMLModel.reaction(j).product(SpeciesRole(4)).stoichiometry; else stoichiometry = SBMLModel.reaction(j).product(SpeciesRole(4)).stoichiometry/double(SBMLModel.reaction(j).product(SpeciesRole(4)).denominator); end; if ((SBMLModel.SBML_level == 2) && (~isempty(SBMLModel.reaction(j).product(SpeciesRole(4)).stoichiometryMath))) if (SBMLModel.SBML_version < 3) output = sprintf('%s + (%s) * (%s)', output, SBMLModel.reaction(j).product(SpeciesRole(4)).stoichiometryMath, formula); else output = sprintf('%s + (%s) * (%s)', output, SBMLModel.reaction(j).product(SpeciesRole(4)).stoichiometryMath.math, formula); end; elseif (SBMLModel.SBML_level == 3) % level 3 stoichiometry may be assigned by % rule/initialAssignment which will override any % stoichiometry value if (~isempty(SBMLModel.reaction(j).product(SpeciesRole(4)).id)) rule = Model_getAssignmentRuleByVariable(SBMLModel, SBMLModel.reaction(j).product(SpeciesRole(4)).id); rrule = Model_getRateRuleByVariable(SBMLModel, SBMLModel.reaction(j).product(SpeciesRole(4)).id); ia = Model_getInitialAssignmentBySymbol(SBMLModel, SBMLModel.reaction(j).product(SpeciesRole(4)).id); if ~isempty(rule) output = sprintf('%s + (%s) * (%s)', output, rule.formula, formula); elseif ~isempty(ia) output = sprintf('%s + (%s) * (%s)', output, ia.math, formula); elseif ~isempty(rrule) error('Cannot deal with stoichiometry in a rate rule'); elseif ~isnan(stoichiometry) if (stoichiometry == 1) output = sprintf('%s + (%s)', output, formula); else output = sprintf('%s + %g * (%s)', output, stoichiometry, formula); end; else error('Cannot determine stoichiometry'); end; elseif isnan(stoichiometry) error ('Cannot determine stoichiometry'); else if (stoichiometry == 1) output = sprintf('%s + (%s)', output, formula); else output = sprintf('%s + %g * (%s)', output, stoichiometry, formula); end; end; else % if stoichiometry = 1 no need to include it in formula if (stoichiometry == 1) output = sprintf('%s + (%s)', output, formula); else output = sprintf('%s + %g * (%s)', output, stoichiometry, formula); end; end; NoProducts = NoProducts - 1; elseif (NoReactants > 0) % Deal with case where parameter is defined within the reaction % and thus the reaction name has been appended to the parameter % name in the list in case of repeated use of same name Param_Name = GetParameterFromReaction(SBMLModel.reaction(j)); if (~isempty(Param_Name)) ReviseParam_Name = GetParameterFromReactionUnique(SBMLModel.reaction(j)); formula = Substitute(Param_Name, ReviseParam_Name, kineticLawMath); else formula = kineticLawMath; end; % put in stoichiometry if ((SBMLModel.SBML_level == 2 && SBMLModel.SBML_version > 1) ... || SBMLModel.SBML_level == 3) stoichiometry = SBMLModel.reaction(j).reactant(SpeciesRole(5)).stoichiometry; else stoichiometry = SBMLModel.reaction(j).reactant(SpeciesRole(5)).stoichiometry/double(SBMLModel.reaction(j).reactant(SpeciesRole(5)).denominator); end; if ((SBMLModel.SBML_level == 2) && (~isempty(SBMLModel.reaction(j).reactant(SpeciesRole(5)).stoichiometryMath))) if (SBMLModel.SBML_version < 3) output = sprintf('%s - (%s) * (%s)', output, SBMLModel.reaction(j).reactant(SpeciesRole(5)).stoichiometryMath, formula); else output = sprintf('%s - (%s) * (%s)', output, SBMLModel.reaction(j).reactant(SpeciesRole(5)).stoichiometryMath.math, formula); end; elseif (SBMLModel.SBML_level == 3) % level 3 stoichiometry may be assigned by % rule/initialAssignment which will override any % stoichiometry value if (~isempty(SBMLModel.reaction(j).reactant(SpeciesRole(5)).id)) rule = Model_getAssignmentRuleByVariable(SBMLModel, SBMLModel.reaction(j).reactant(SpeciesRole(5)).id); rrule = Model_getRateRuleByVariable(SBMLModel, SBMLModel.reaction(j).reactant(SpeciesRole(5)).id); ia = Model_getInitialAssignmentBySymbol(SBMLModel, SBMLModel.reaction(j).reactant(SpeciesRole(5)).id); if ~isempty(rule) output = sprintf('%s - (%s) * (%s)', output, rule.formula, formula); elseif ~isempty(ia) output = sprintf('%s - (%s) * (%s)', output, ia.math, formula); elseif ~isempty(rrule) error('Cannot deal with stoichiometry in a rate rule'); elseif ~isnan(stoichiometry) if (stoichiometry == 1) output = sprintf('%s - (%s)', output, formula); else output = sprintf('%s - %g * (%s)', output, stoichiometry, formula); end; else error('Cannot determine stoichiometry'); end; elseif isnan(stoichiometry) error ('Cannot determine stoichiometry'); else if (stoichiometry == 1) output = sprintf('%s - (%s)', output, formula); else output = sprintf('%s - %g * (%s)', output, stoichiometry, formula); end; end; else % if stoichiometry = 1 no need to include it in formula if (stoichiometry == 1) output = sprintf('%s - (%s)', output, formula); else output = sprintf('%s - %g * (%s)', output, stoichiometry, formula); end; end; NoReactants = NoReactants - 1; end; TotalOccurences = TotalOccurences - 1; end; % while found > 0 end; % for NumReactions end; % if boundary condition % finished looking for this species % record rate law and loop to next species % rate = 0 if no law found if (isempty(output)) RateLaws{i} = '0'; else RateLaws{i} = output; end; end; % for NumberSpecies if NumberSpecies == 0 RateLaws = {}; end; function y = Substitute(InitialCharArray, ReplacementParams, Formula) % Allowed = {'(',')','*','/','+','-','^', ' ', ','}; if exist('OCTAVE_VERSION') [g,b,c,e] = regexp(Formula, '[,+/*\^()-]'); len = length(Formula); a{1} = Formula(1:b(1)-1); for i=2:length(b) a{i} = Formula(b(i-1)+1:b(i)-1); end; i = length(b)+1; a{i} = Formula(b(i-1)+1:len); else [a,b,c,d,e] = regexp(Formula, '[,+*/()-]', 'split'); end; num = length(a); for i=1:length(InitialCharArray) for j=1:num if strcmp(a(j), InitialCharArray{i}) a(j) = regexprep(a(j), a(j), ReplacementParams{i}); end; end; end; Formula = ''; for i=1:num-1 Formula = strcat(Formula, char(a(i)), char(e(i))); end; Formula = strcat(Formula, char(a(num))); y = Formula; % % get the number of parameters to be replced % NumberParams = length(InitialCharArray); % % % % want these in order of shortest to longest % % since shorter may be subsets of longer % % ie. 'alpha' is a subset of 'alpha1' % % % determine length of each parameter % for i = 1:NumberParams % NoCharsInParam(i) = length(InitialCharArray{i}); % end; % % % create an array of the index of the shortest to longest % [NoCharsInParam, Index] = sort(NoCharsInParam); % % % rewrite the arrays of parameters from shortest to longest % for i = 1:NumberParams % OrderedCharArray{i} = InitialCharArray{Index(i)}; % OrderedReplacements{i} = ReplacementParams{Index(i)}; % end; % % RevisedFormula = Formula; % % for i = NumberParams:-1:1 % % before replacing a character need to check that it is not part of a % % word etc % NumOccurences = length(findstr(OrderedCharArray{i}, RevisedFormula)); % for j = 1:NumOccurences % k = findstr(OrderedCharArray{i}, RevisedFormula); % if (k(j) == 1) % before = ' '; % else % before = RevisedFormula(k(j)-1); % end; % if ((k(j)+length(OrderedCharArray{i})) < length(RevisedFormula)) % after = RevisedFormula(k(j)+length(OrderedCharArray{i})); % else % after = ' '; % end; % % octave does not match ' ' using ismember % if ((ismember(after, Allowed) || (after == Allowed{8})) ... % && (ismember(before, Allowed) || (before == Allowed{8}))) % RevisedFormula = regexprep(RevisedFormula, OrderedCharArray{i}, ... % OrderedReplacements{i}, j); % end; % end; % end; % % y = RevisedFormula; % SBMLToolbox-4.1.0/toolbox/AccessModel/GetParameterRateRules.m0000644000000000000000000000605711703262254022565 0ustar rootrootfunction [Parameter, RateRules] = GetParameterRateRules(SBMLModel) % [parameters, raterules] = GetParameterRateRules((SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all parameters % 2. an array of % % - the character representation of the rate rule used to % assign value to a given parameter % - '0' if the parameter is not assigned by a rule % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetParameterRateRules(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %-------------------------------------------------------------- % get information from the model Parameter = GetGlobalParameters(SBMLModel); NumberParameter = length(SBMLModel.parameter); AssignRules = Model_getListOfRateRules(SBMLModel); NumAssignRules = Model_getNumRateRules(SBMLModel); % for each Parameter loop through each rule and determine whether the Parameter % takes part and in what capacity for i = 1:NumberParameter output = ''; % if Parameter is constant in level 2 % concentration cannot be changed by a rule if (SBMLModel.SBML_level > 1) constant = SBMLModel.parameter(i).constant; else constant = -1; end; if (constant == 1) output = '0'; else if (NumAssignRules > 0) %determine which rules it occurs within RuleNo = Parameter_isAssignedByRateRule(SBMLModel.parameter(i), AssignRules); if (RuleNo > 0) output = AssignRules(RuleNo).formula; end; end; end; % if constant % finished looking for this Parameter % record rate law and loop to next Parameter % rate = 0 if no law found if (isempty(output)) RateRules{i} = '0'; else RateRules{i} = output; end; end; % for NumParameter SBMLToolbox-4.1.0/toolbox/AccessModel/GetParameterFromReactionUnique.m0000644000000000000000000000761411703262254024436 0ustar rootrootfunction varargout = GetParameterFromReactionUnique(SBMLReaction) % [names, values] = GetParameterFromReactionUnique(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. an array of strings representing the identifiers of all parameters defined % within the kinetic law of the reaction, with the reaction % name appended % 2. an array of the values of each parameter % % *EXAMPLE:* % % reaction with id R1 has 2 parameters k1 and k2 % % [names, values] = GetParameterFromReactionUnique(reaction) % % names = [k1_R1, k2_R1] % values = [2, 1.5] % % % check input is an SBML reaction and determine level if (~isValid(SBMLReaction)) error('GetParameterFromReaction(SBMLReaction)\n%s', 'input must be an SBMLReaction structure'); end; Level = GetLevel(SBMLReaction); %------------------------------------------------------------ % determine the name of the reaction if (Level == 1) Reaction_name = SBMLReaction.name; else if (isempty(SBMLReaction.id)) Reaction_name = SBMLReaction.name; else Reaction_name = SBMLReaction.id; end; end; %------------------------------------------------------------ % determine the number of parameters within the reaction % catch case with no kinetic law if (isempty(SBMLReaction.kineticLaw)) NumParams = 0; else if (Level < 3) NumParams = length(SBMLReaction.kineticLaw.parameter); else NumParams = length(SBMLReaction.kineticLaw.localParameter); end; end; %------------------------------------------------------------ % loop through the list of parameters for i = 1:NumParams %determine the name or id of the parameter if (Level == 1) name = SBMLReaction.kineticLaw.parameter(i).name; elseif (Level == 2) if (isempty(SBMLReaction.kineticLaw.parameter(i).id)) name = SBMLReaction.kineticLaw.parameter(i).name; else name = SBMLReaction.kineticLaw.parameter(i).id; end; else name = SBMLReaction.kineticLaw.localParameter(i).id; end; % append the reaction name name = strcat(name, '_', Reaction_name); % save into an array of character names CharArray{i} = name; % put the value into the array if (Level < 3) Values(i) = SBMLReaction.kineticLaw.parameter(i).value; else Values(i) = SBMLReaction.kineticLaw.localParameter(i).value; end; end; %-------------------------------------------------------------------------- % assign output if (NumParams ~= 0) varargout{1} = CharArray; varargout{2} = Values; else varargout{1} = []; varargout{2} = []; end; SBMLToolbox-4.1.0/toolbox/AccessModel/GetParameterFromReaction.m0000644000000000000000000000632711703262254023247 0ustar rootrootfunction varargout = GetParameterFromReaction(SBMLReaction) % [names, values] = GetParameterFromReaction(SBMLReaction) % % Takes % % 1. SBMLReaction, an SBML Reaction structure % % Returns % % 1. an array of strings representing the identifiers of all parameters defined % within the kinetic law of the reaction % 2. an array of the values of each parameter % % % check input is an SBML reaction and determine level if (~isValid(SBMLReaction)) error('GetParameterFromReaction(SBMLReaction)\n%s', 'input must be an SBMLReaction structure'); end; Level = GetLevel(SBMLReaction); %------------------------------------------------------------ % determine the number of parameters within the reaction % catch case with no kinetic law if (isempty(SBMLReaction.kineticLaw)) NumParams = 0; else if (Level < 3) NumParams = length(SBMLReaction.kineticLaw.parameter); else NumParams = length(SBMLReaction.kineticLaw.localParameter); end; end; %------------------------------------------------------------ % loop through the list of parameters for i = 1:NumParams %determine the name or id of the parameter if (Level == 1) name = SBMLReaction.kineticLaw.parameter(i).name; elseif (Level == 2) if (isempty(SBMLReaction.kineticLaw.parameter(i).id)) name = SBMLReaction.kineticLaw.parameter(i).name; else name = SBMLReaction.kineticLaw.parameter(i).id; end; else name = SBMLReaction.kineticLaw.localParameter(i).id; end; % save into an array of character names CharArray{i} = name; % put the value into the array if (Level < 3) Values(i) = SBMLReaction.kineticLaw.parameter(i).value; else Values(i) = SBMLReaction.kineticLaw.localParameter(i).value; end; end; %-------------------------------------------------------------------------- % assign output if (NumParams ~= 0) varargout{1} = CharArray; varargout{2} = Values; else varargout{1} = []; varargout{2} = []; end; SBMLToolbox-4.1.0/toolbox/AccessModel/GetParameterAssignmentRules.m0000644000000000000000000000616411703262254024001 0ustar rootrootfunction [Parameter, AssignmentRules] = GetParameterAssignmentRules(SBMLModel) % [parameters, assignmentRules] = GetParameterAssignmentRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all parameters % 2. an array of % % - the character representation of the assignment rule used to % assign value to a given parameter % - '0' if the parameter is not assigned by a rule % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetParameterAssignmentRules(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %-------------------------------------------------------------- % get information from the model Parameter = GetGlobalParameters(SBMLModel); NumberParameter = length(SBMLModel.parameter); AssignRules = Model_getListOfAssignmentRules(SBMLModel); NumAssignRules = Model_getNumAssignmentRules(SBMLModel); % for each Parameter loop through each rule and determine whether the Parameter % takes part and in what capacity for i = 1:NumberParameter output = ''; % if Parameter is constant in level 2 % concentration cannot be changed by a rule if (SBMLModel.SBML_level > 1) constant = SBMLModel.parameter(i).constant; else constant = -1; end; if (constant == 1) output = '0'; else if (NumAssignRules > 0) %determine which rules it occurs within RuleNo = Parameter_isAssignedByRule(SBMLModel.parameter(i), AssignRules); if (RuleNo > 0) output = AssignRules(RuleNo).formula; end; end; end; % if constant % finished looking for this Parameter % record Assignment law and loop to next Parameter % Assignment = 0 if no law found if (isempty(output)) AssignmentRules{i} = '0'; else AssignmentRules{i} = output; end; end; % for NumParameter SBMLToolbox-4.1.0/toolbox/AccessModel/GetParameterAlgebraicRules.m0000644000000000000000000000606311703262254023540 0ustar rootrootfunction [Parameter, AlgebraicRules] = GetParameterAlgebraicRules(SBMLModel) % [parameters, algebraicRules] = GetParameterAlgebraicRules(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all parameters % 2. an array of % % - the character representation of each algebraic % rule the parameter appears in % - '0' if the particular parameter is not in an algebraic rule % % *EXAMPLE:* % % model has 3 parameters (k1, k2, k3) % and 2 algebraic rules with formula 'k2+7' and 'k2-k3' % % [parameters, algebraicRules] = GetParameterAlgebraicRules(model) % % parameters = ['k1', 'k2', 'k3'] % algebraicRules = {'0', ['k2+7', 'k2-k3'], ['k2-k3']} % % % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetParameterAlgebraicRules(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %-------------------------------------------------------------- % get information from the model Parameter = GetGlobalParameters(SBMLModel); NumberParameter = length(SBMLModel.parameter); Rules = Model_getListOfAlgebraicRules(SBMLModel); NumRules = Model_getNumAlgebraicRules(SBMLModel); for i = 1:NumberParameter output = ''; if (NumRules > 0) %determine which rules it occurs within RuleNo = Parameter_isInAlgebraicRule(SBMLModel.parameter(i), Rules); for j = 1:length(RuleNo) if (RuleNo(j) > 0) output{j} = Rules(RuleNo(j)).formula; end; end; end; % finished looking for this Parameter % record rate law and loop to next Parameter % rate = 0 if no law found if (isempty(output)) AlgebraicRules{i} = '0'; else AlgebraicRules{i} = output; end; end; % for NumParameter SBMLToolbox-4.1.0/toolbox/AccessModel/GetGlobalParameters.m0000644000000000000000000001012011703262254022224 0ustar rootrootfunction varargout = GetGlobalParameters(SBMLModel) % [names, values] = GetGlobalParameters(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of % all global parameters within the model % 2. an array of the values of each parameter % % *NOTE:* the value returned will be (in order) % % - determined from assignmentRules/initialAssignments where appropriate % - the attribute 'value' for the given parameter % - NaN, if the value is not specified in any way within the model % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetGlobalParameters(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %------------------------------------------------------------ % determine the number of parameters within the model NumParams = length(SBMLModel.parameter); %------------------------------------------------------------ % loop through the list of parameters for i = 1:NumParams %determine the name or id of the parameter if (SBMLModel.SBML_level == 1) name = SBMLModel.parameter(i).name; else if (isempty(SBMLModel.parameter(i).id)) name = SBMLModel.parameter(i).name; else name = SBMLModel.parameter(i).id; end; end; % save into an array of character names CharArray{i} = name; % put the value into the array Values(i) = SBMLModel.parameter(i).value; % might be an initial assignment in l2v2 if ((SBMLModel.SBML_level == 2 && SBMLModel.SBML_version > 1) ... || SBMLModel.SBML_level == 3) IA = Model_getInitialAssignmentBySymbol(SBMLModel, name); if (~isempty(IA)) % remove this from the substtution newSBMLModel = SBMLModel; newSBMLModel.parameter(i) = []; for fd = 1:Model_getNumFunctionDefinitions(SBMLModel) newFormula = SubstituteFunction(IA.math, Model_getFunctionDefinition(SBMLModel, fd)); if (~isempty(newFormula)) IA.math = newFormula; end; end; Values(i) = Substitute(IA.math, newSBMLModel); end; end; % might be set by assignment rule AR = Model_getAssignmentRuleByVariable(SBMLModel, name); if (~isempty(AR)) newSBMLModel = SBMLModel; newSBMLModel.parameter(i) = []; for fd = 1:Model_getNumFunctionDefinitions(SBMLModel) newFormula = SubstituteFunction(AR.formula, Model_getFunctionDefinition(SBMLModel, fd)); if (~isempty(newFormula)) AR.formula = newFormula; end; end; Values(i) = Substitute(AR.formula, newSBMLModel); end; end; %-------------------------------------------------------------------------- % assign output if (NumParams ~= 0) varargout{1} = CharArray; varargout{2} = Values; else varargout{1} = []; varargout{2} = []; end; SBMLToolbox-4.1.0/toolbox/AccessModel/GetCompartmentTypes.m0000644000000000000000000000430311703262254022324 0ustar rootrootfunction varargout = GetCompartmentTypes(SBMLModel) % names = GetCompartmentTypes(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all compartmentTypes within the model % % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetCompartmentTypes(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %------------------------------------------------------------ % determine the number of compartmentTypes within the model NumCompartmentTypes = length(SBMLModel.compartmentType); %------------------------------------------------------------ % loop through the list of compartments for i = 1:NumCompartmentTypes % and array of the character names CharArray{i} = SBMLModel.compartmentType(i).id; end; %-------------------------------------------------------------------------- % assign output if (NumCompartmentTypes ~= 0) varargout{1} = CharArray; else varargout{1} = []; end; SBMLToolbox-4.1.0/toolbox/AccessModel/GetCompartments.m0000644000000000000000000001027311703262254021465 0ustar rootrootfunction varargout = GetCompartments(SBMLModel) % [names, values] = GetCompartments(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all compartments within the model % 2. an array of the size/volume values of each compartment % % *NOTE:* the value returned will be (in order) % % - determined from assignmentRules/initialAssignments where appropriate % - the attribute 'size' ('volume' in L1) for the given compartment % - NaN, if the value is not specified in any way within the model % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetCompartments(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %------------------------------------------------------------ % determine the number of compartments within the model NumCompartments = length(SBMLModel.compartment); %------------------------------------------------------------ % loop through the list of compartments for i = 1:NumCompartments %determine the name or id of the compartment if (SBMLModel.SBML_level == 1) name = SBMLModel.compartment(i).name; else if (isempty(SBMLModel.compartment(i).id)) name = SBMLModel.compartment(i).name; else name = SBMLModel.compartment(i).id; end; end; % and array of the character names CharArray{i} = name; % get the volume/size % add to an array if (SBMLModel.SBML_level == 1) Values(i) = SBMLModel.compartment(i).volume; else Values(i) = SBMLModel.compartment(i).size; end; AR = Model_getAssignmentRuleByVariable(SBMLModel, name); if (~isempty(AR)) newSBMLModel = SBMLModel; newSBMLModel.compartment(i) = []; for fd = 1:Model_getNumFunctionDefinitions(SBMLModel) newFormula = SubstituteFunction(AR.formula, Model_getFunctionDefinition(SBMLModel, fd)); if (~isempty(newFormula)) AR.formula = newFormula; end; end; Values(i) = Substitute(AR.formula, newSBMLModel); end; % might be an initial assignment in l2v2 if ((SBMLModel.SBML_level == 2 && SBMLModel.SBML_version > 1) ... || SBMLModel.SBML_level == 3) IA = Model_getInitialAssignmentBySymbol(SBMLModel, name); if (~isempty(IA)) % remove this from the substtution newSBMLModel = SBMLModel; newSBMLModel.compartment(i) = []; for fd = 1:Model_getNumFunctionDefinitions(SBMLModel) newFormula = SubstituteFunction(IA.math, Model_getFunctionDefinition(SBMLModel, fd)); if (~isempty(newFormula)) IA.math = newFormula; end; end; Values(i) = Substitute(IA.math, newSBMLModel); end; end; end; %-------------------------------------------------------------------------- % assign output if (NumCompartments ~= 0) varargout{1} = CharArray; varargout{2} = Values; else varargout{1} = []; varargout{2} = []; end; SBMLToolbox-4.1.0/toolbox/AccessModel/GetAllParametersUnique.m0000644000000000000000000000642511703262254022740 0ustar rootrootfunction varargout = GetAllParametersUnique(SBMLModel) % [names, values] = GetAllParametersUnique(SBMLModel) % % Takes % % 1. SBMLModel, an SBML model structure % % Returns % % 1. an array of strings representing the identifiers of all parameters % (both global and embedded) within the model. % _Note:_ reaction names are appended to the names of parameters % declared within a reaction % 2. an array of the values of each parameter % % *NOTE:* the value returned will be (in order) % % - determined from assignmentRules/initialAssignments where appropriate % - the attribute 'value' for the given parameter % - NaN, if the value is not specified in any way within the model % % *EXAMPLE:* % % model has 1 parameter k1 % and reaction R1 that lists a local parameter k1 % % [names, values] = GetAllParametersUnique(model) % % names = [k1, k1_R1] % values = [2, 1.5] % % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetAllParametersUnique(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %------------------------------------------------------------ % get the global parameters [ParamChar, ParamValues] = GetGlobalParameters(SBMLModel); % get number of parameters NumParams = length(ParamChar); %------------------------------------------------------------ % get the number of reactions within the model NumReactions = length(SBMLModel.reaction); %------------------------------------------------------------ % loop through the list of reactions for i = 1:NumReactions % get parameters within each reaction [Char, Value] = GetParameterFromReactionUnique(SBMLModel.reaction(i)); % add to existing arrays for j = 1:length(Char) NumParams = NumParams + 1; ParamValues(NumParams) = Value(j); ParamChar{NumParams} = Char{j}; end; end; %-------------------------------------------------------------------------- % assign output varargout{1} = ParamChar; varargout{2} = ParamValues; SBMLToolbox-4.1.0/toolbox/AccessModel/GetAllParameters.m0000644000000000000000000000555411703262254021553 0ustar rootrootfunction varargout = GetAllParameters(SBMLModel) % [names, values] = GetAllParameters(SBMLModel) % % Takes % % 1. SBMLModel, an SBML Model structure % % Returns % % 1. an array of strings representing the identifiers of all parameters % (both global and embedded) within the model % 2. an array of the values of each parameter % % *NOTE:* the value returned will be (in order) % % - determined from assignmentRules/initialAssignments where appropriate % - the attribute 'value' for the given parameter % - NaN, if the value is not specified in any way within the model % % check input is an SBML model if (~isValidSBML_Model(SBMLModel)) error('GetAllParameters(SBMLModel)\n%s', 'input must be an SBMLModel structure'); end; %------------------------------------------------------------ % get the global parameters [ParamChar, ParamValues] = GetGlobalParameters(SBMLModel); % get number of parameters NumParams = length(ParamChar); %------------------------------------------------------------ % get the number of reactions within the model NumReactions = length(SBMLModel.reaction); %------------------------------------------------------------ % loop through the list of reactions for i = 1:NumReactions % get parameters within each reaction [Char, Value] = GetParameterFromReaction(SBMLModel.reaction(i)); % add to existing arrays for j = 1:length(Char) NumParams = NumParams + 1; ParamValues(NumParams) = Value(j); ParamChar{NumParams} = Char{j}; end; end; %-------------------------------------------------------------------------- % assign output varargout{1} = ParamChar; varargout{2} = ParamValues; SBMLToolbox-4.1.0/toolbox/AccessModel/DetermineSpeciesRoleInReaction.m0000644000000000000000000001122711703262254024377 0ustar rootrootfunction y = DetermineSpeciesRoleInReaction(SBMLSpecies, SBMLReaction) % array = DetermineSpeciesRoleInReaction(SBMLSpecies, SBMLReaction) % % Takes % % 1. SBMLSpecies, an SBML species structure % 2. SBMLReaction, an SBML reaction structure % % Returns % % 1. an array with five elements `[isProduct, isReactant, isModifier, % positionInProductList, positionInReactantList]` indicating % whether the species is a product, reactant or modifier and recording % the position in the list of products/reactants % % or % % 1. array = 0 if the species is NOT part of the reaction % % % *EXAMPLE:* % % y = DetermineSpeciesRoleInReaction(s, r) % = 0 if s is not in r % = [1, 0, 0, 2, 0] if s is product number 2 in rb % = [0, 1, 0, 0, 1] if s is reactant number 1 in r % = [0, 0, 1, 0, 0] if s is a modifier in r % = [1, 1, 0, 1, 2] if s is product number 1 and reactant number 2 in r % if ~isValid(SBMLSpecies) error('DetermineSpeciesRoleInReaction(SBMLSpecies, SBMLReaction)\n%s', ... 'first input must be an SBML Species structure'); elseif ~isValid(SBMLReaction) error('DetermineSpeciesRoleInReaction(SBMLSpecies, SBMLReaction)\n%s', ... 'second input must be an SBML Reaction structure'); end; Number = IsSpeciesInReaction(SBMLSpecies, SBMLReaction); if (Number == 0) y = 0; return; end; SBMLLevel = GetLevel(SBMLSpecies); %-------------------------------------------------------------------------- % determine the name of the species % this will match to the speciesreference within the reaction if (SBMLLevel == 1) name = SBMLSpecies.name; reactionName = SBMLReaction.name; else if (isempty(SBMLSpecies.id)) name = SBMLSpecies.name; else name = SBMLSpecies.id; end; if (isempty(SBMLReaction.id)) reactionName = SBMLReaction.name; else reactionName = SBMLReaction.id; end; end; %-------------------------------------------------------------------------- %determine number of each type of species included within this reaction NumProducts = length(SBMLReaction.product); NumReactants = length(SBMLReaction.reactant); if (SBMLLevel > 1) NumModifiers = length(SBMLReaction.modifier); else NumModifiers = 0; end; %------------------------------------------------------------------------- % find species in this reaction % zero all flags ProductNo = 0; ReactantNo = 0; ModifierNo = 0; ReactantPosition = 0; ProductPosition = 0; %look for reference to this species for c = 1:NumProducts if (strcmp(name, SBMLReaction.product(c).species)) ProductNo = ProductNo + 1; ProductPosition(ProductNo) = c; end; end; for c = 1:NumReactants if (strcmp(name, SBMLReaction.reactant(c).species)) ReactantNo = ReactantNo + 1; ReactantPosition(ReactantNo) = c; end; end; for c = 1:NumModifiers if (strcmp(name, SBMLReaction.modifier(c).species)) ModifierNo = ModifierNo + 1; end; end; %-------------------------------------------------------------------------- % assign output if ((ReactantNo > 1) || (ProductNo > 1)) error('DetermineSpeciesRoleInReaction(SBMLSpecies, SBMLReaction)\nspecies %s %s %s\n%s', name,'occurs more than once as a reactant/product in reaction', reactionName, 'this code does not deal with that situation'); end; y = [ProductNo, ReactantNo, ModifierNo, ProductPosition, ReactantPosition]; SBMLToolbox-4.1.0/toolbox/AccessModel/Contents.m0000644000000000000000000002434011703262254020146 0ustar rootroot% toolbox\AccessModel % % The AccessModel folder contains a number of functions that derive % information from the MATLAB_SBML structures. % %=================================================================== % array = DetermineSpeciesRoleInReaction(SBMLSpecies, SBMLReaction) %=================================================================== % Takes % 1. SBMLSpecies, an SBML species structure % 2. SBMLReaction, an SBML reaction structure % Returns % 1. an array with five elements `[isProduct, isReactant, isModifier, % positionInProductList, positionInReactantList]` indicating % whether the species is a product, reactant or modifier and recording % the position in the list of products/reactants % or % 1. array = 0 if the species is NOT part of the reaction % %================================================ % [names, values] = GetAllParameters(SBMLModel) %================================================ % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all parameters % (both global and embedded) within the model % 2. an array of the values of each parameter % %===================================================== % [names, values] = GetAllParametersUnique(SBMLModel) %===================================================== % Takes % 1. SBMLModel, an SBML model structure % Returns % 1. an array of strings representing the identifiers of all parameters % (both global and embedded) within the model. % _Note:_ reaction names are appended to the names of parameters % declared within a reaction % 2. an array of the values of each parameter % %======================================== % names = GetCompartmentTypes(SBMLModel) %======================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all compartmentTypes within the model % %============================================== % [names, values] = GetCompartments(SBMLModel) %============================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all compartments within the model % 2. an array of the size/volume values of each compartment % %================================================== % [names, values] = GetGlobalParameters(SBMLModel) %================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of % all global parameters within the model % 2. an array of the values of each parameter % %====================================================================== % [parameters, algebraicRules] = GetParameterAlgebraicRules(SBMLModel) %====================================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all parameters % 2. an array of % - the character representation of each algebraic % rule the parameter appears in % - '0' if the particular parameter is not in an algebraic rule % %========================================================================= % [parameters, assignmentRules] = GetParameterAssignmentRules(SBMLModel) %========================================================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all parameters % 2. an array of % - the character representation of the assignment rule used to % assign value to a given parameter % - '0' if the parameter is not assigned by a rule % %========================================================== % [names, values] = GetParameterFromReaction(SBMLReaction) %========================================================== % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. an array of strings representing the identifiers of all parameters defined % within the kinetic law of the reaction % 2. an array of the values of each parameter % %================================================================ % [names, values] = GetParameterFromReactionUnique(SBMLReaction) %================================================================ % Takes % 1. SBMLReaction, an SBML Reaction structure % Returns % 1. an array of strings representing the identifiers of all parameters defined % within the kinetic law of the reaction, with the reaction % name appended % 2. an array of the values of each parameter % %============================================================= % [parameters, raterules] = GetParameterRateRules((SBMLModel) %============================================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all parameters % 2. an array of % - the character representation of the rate rule used to % assign value to a given parameter % - '0' if the parameter is not assigned by a rule % %=========================================================== % [species, rateLaws] = GetRateLawsFromReactions(SBMLModel) %=========================================================== % Takes % 1. SBMLModel; an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all species % 2. an array of % - the character representation of the rate law established from any reactions % that determines the particular species % - '0' if the particular species is not a reactant/product in any reaction % %======================================================= % [species, rateLaws] = GetRateLawsFromRules(SBMLModel) %======================================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all species % 2. an array of % - the character representation of the rateRule that determines % the particular species % - '0' if the particular species is not assigned by a rateRule % %========================================= % [names, values] = GetSpecies(SBMLModel) %========================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all species within the model % 2. an array of the initial concentration/amount values of each species % %======================================================= % [names, values] = GetSpeciesAlgebraicRules(SBMLModel) %======================================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all species % 2. an array of % - the character representation of each algebraic % rule the species appears in % - '0' if the particular species is not in an algebraic rule % %==================================================================== % [species, assignmentRules] = GetSpeciesAssignmentRules(SBMLModel) %==================================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all species % 2. an array of % - the character representation of the assignment rule used to % assign value to a given species % - '0' if the species is not assigned by a rule % %==================================== % names = GetSpeciesTypes(SBMLModel) %==================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. an array of strings representing the identifiers of all SpeciesTypes within the model % %======================================================= % [matrix, species] = GetStoichiometryMatrix(SBMLModel) %======================================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. the stoichiometry matrix produced from the reactions/species % 2. an array of strings representing the identifiers of all species within the model % (in the order in which the matrix deals with them) % %======================================= % S = GetStoichiometrySparse(SBMLModel) %======================================= % Takes % 1. SBMLModel, an SBML Model structure % Returns % 1. a sparse stoichiometry matrix produced from the reactions/species % %=================================================== % [names, values] = GetVaryingParameters(SBMLModel) %=================================================== % Takes % 1. SBMLModel, an SBML Model structure % Returns % % 1. an array of strings representing the identifiers of any non-constant parameters % within the model % 2. an array of the values of each of these parameter % %====================================================== % num = IsSpeciesInReaction(SBMLSpecies, SBMLReaction) %====================================================== % Takes % 1. SBMLSpecies, an SBML Species structure % 2. SBMLReaction, an SBML Reaction structure % Returns % 1. the number of times the species occurs within the reaction % % SBMLToolbox-4.1.0/README.txt0000644000000000000000000000425211610745474014030 0ustar rootroot SBMLToolbox Sarah Keating http://www.sbml.org mailto:sbml-team@caltech.edu ---------------- 1. Introduction ---------------- SBMLToolbox is an open-source MATLAB/Octave toolbox that provides both MATLAB and Octave users with functions for reading, writing and manipulation data expressed in the Systems Biology Markup Language (SBML). It works on Windows, Linux, and MacOS systems. The SBMLToolbox supports reading and writing of all levels and versions of SBML up to L3V1 Core. ---------------- 2. Installation ---------------- ************************************************************** IMPORTANT: You must have installed libSBML with the MATLAB/Octave binding prior to installation of SBMLToolbox. ************************************************************** Start MATLAB or Octave. Navigate to the SBMLToolbox/toolbox directory. Run the script 'install.m' found in that dirctory. This will look for the libSBML binding and report whether it can be found. In addition, it will add the directories from the toolbox to the Path. ------------ 3. Contents ------------ toolbox\AccessModel This directory contains functions that allow the user to derive information from an SBML Model toolbox\Convenience This directory contains a number of convenience functions for checking information or manipulating math expressions. toolbox\MATLAB_SBML_Structure_Functions This directory contains functions that allow the user to manipulate a MATLAB_SBML Model structure The majority of functions mimic their equivalent within the libSBML C API. toolbox\Simulation This directory contains functions to simulate an SBML model toolbox\Validate_MATLAB_SBML_Structures This directory contains functions to validate the MATLAB_SBML structures ------------------------------------------ 4. Licensing, Copyrights and Distribution ------------------------------------------ The terms of redistribution for this software are stated in the file COPYING.txt. ------------------------------------------- File author: S. Keating Last Modified: 2011-03-21 ------------------------------------------- SBMLToolbox-4.1.0/NEWS.txt0000644000000000000000000001711411702567252013646 0ustar rootroot SBMLToolbox NEWS -- History of user-visible changes --------------------------------------------------- Version 4.1.0 Released 2012-01-13 --------------------------------------------------- * New features: - The toolbox now supports the creation of SBML with the Level 3 Flux Balance Constraints (fbc) package. --------------------------------------------------- Version 4.0.1 Released 2011-08-30 --------------------------------------------------- * Bug fixes: - The functions that create structures now also create empty substructures as appropriate. - The structure created by the Model_create function can be exported without crashing. Thanks to Kieran Smallbone for reporting this. * New features: - There are new functions that will create substructures within the MATLAB_SBML structure functions. For example, m = Model_createCompartment(m) will return a model structure with a compartment structure created and added to the model. --------------------------------------------------- Version 4.0.0 Released 2011-07-18 --------------------------------------------------- This release reflects the fact that the libSBML-matlab binding now includes both the import and export of SBML. Thus OutputSBML is not included in this release of SBMLToolbox. SBMLToolbox 4.0.0 has full support for all levels and versions of SBML up to Level 3 Version 1 Core. Simulation capability has been extended to include support for varying parameters. Some of the functionality has been removed. This includes those functions that required the Symbolic Toolbox for MATLAB and any functions involving a Graphical User Interface. Thus ALL functionality of SBMLToolbox-4.0.0 is available using Octave as well as MATLAB. This was functionality that appeared to be unused. The documentation has been overhauled and is now available in html format. --------------------------------------------------- Version 3.1.2 Released 2010-04-27 --------------------------------------------------- This release adds a missing file to the windows installer for libSBML-4.0.1 that is embedded in the windows installer for SBMLToolbox. There are no functional changes. --------------------------------------------------- Version 3.1.1 Released 2010-04-12 --------------------------------------------------- * Bug fixes: - Tracker issue #2954118. When an output filename is specified for the ode function it needs to be communicated to the event handling functions. This is now fixed. - Tracker issue #2945261. OutputSBML crashed if there was no KineticLaw math. This has been fixed. Thanks to Kieran Smallbone for reporting this. - The Model_create function was failing to add more recent fields that the OutputSBML function expects; namely time_symbol; delay_symbol and namespaces. Thanks to Wolfram Liebermeister for reporting this. --------------------------------------------------- Version 3.1.0 Released 2010-01-28 --------------------------------------------------- * New Dependencies - libSBML-4.0.1 * New features: - SBML Level 2 Version 4 support is now implemented. - The functions that validate the MATLAB_SBML structures return a message indicating which elements within the structure have caused the failure. This message is an optional second return argument. - Simulation of models that use functionDefinitions within rules has been implemented. - A function to produce an analytical solution of a model has been implemented. - All functions are completely Octave compatible with the exception of functions using the Symbolic Toolbox. * Bug fixes: - Tracker issue #2780454. The Model_create function was not correctly specifying level and version. This has been fixed. Thanks to Kieran Smallbone for reporting it. - Tracker issue #1928173. The OutputSBML function was failing to correctly output an empty stoichiometryMath structure in an L2V3 model. This was due to the fact that for L2V3 models the stoichiometryMath element was correctly derived from an SBase object and thus became a structure rather than just a field in a MATLAB_SBML structure. This has been corrected. - Tracker issue #1912974. The validation of a model with a large number of errors caused MATLAB to crash. This was due to an error in the calculation of the memory needed to store and report the errors. - Tracker issue #1912971. There was a typo in the RunTest function that caused it not to run. This is fixed. - Tracker issue #1912965. The functions that generate the code to simulate events failed to take into account the fact that the structure of the 'trigger' had changed. This has been fixed. - More rigorous testing revealed several small bugs in the event handling functions; which have now been corrected. Version 3.0.0 - uses libSBML-3.1.0 - added the GetStoichiometrySparse function contributed by Arsen Batagov. This returns the stoichiometry matrix as a sparse matrix and is much quicker for larger models. - The TranslateSBML function has a second optional argument that indicates whether the model is to be validated prior to import. The default value is 0; indicating no validation. In the case of no argument to the function; which opens a browse window to locate the file to import; the user is prompted to indicate whether validation should be done. In the case of validation errors these are displayed to the user, who will be prompted as to whether to import the model regardless. - removed the ReadAndValidate function as this was essentially a version of TranslateSBML that performed validation. - added support for SBML Level 2 Version 2 and Level 2 Version 3. This support does not extend to the GUI's that could be used to view individual components of a model. - fixed bug in DetermineSpeciesRoleInReaction which failed for a level 1 model version 2.0.2 uses libsbml-2.3.4 added a time_symbol field to the Model structure which contains the declaration of the csymbol time if it has been used in the imported model - this symbol is then used in the WriteODEFunction as the time variable changed the isSBML_Model function so that it does not fail if the structure contains additional fields compartment added to function written by WriteODEFunction so variable compartments and non-unit volume models are dealt with functions in AccessToSymbols changed so that the names reflect the equivalent functions in AccessModel ReadAndValidateSBML - an additional function that validates the sbml file being read before importing it OutputODEFunction - an additional function with flags to indicate whether to display the output or write the data to a comma separated variable file (csv) DisplayODEFunction - changed to always display the output OutputSBML - corrected the bug whereby if the user entered no argument MATLAB crashed Empty kinetic law is created as an empty structure with an empty parameter structure; this allows the parameters to be counted version 2.0.1 beta Upgraded to use libsbml 2.3.2 Readme updated with information about all functions OutputSBML adapted to allow an output filename to be spoecified as an argument version 2.0.0 beta release with simulation functions that passed the beta release of the semantic-test-suite Version 1.0.2 is the first official release of the SBMLToolbox separate from libsbml. Version 1.0.1 was released unofficially to interested parties. Version 1.0.0 was the initial libsbml binding version (libsbml 2.0.3) SBMLToolbox-4.1.0/LICENSE.txt0000644000000000000000000000444711703262412014150 0ustar rootroot Licensing and Distribution Terms for SBMLToolbox Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and documentation provided hereunder is on an "as is" basis, and the California Institute of Technology, the Japan Science and Technology Agency, and the University of Hertfordshire have no obligations to provide maintenance, support, updates, enhancements or modifications. In no event shall the California Institute of Technology, the Japan Science and Technology Agency, or the University of Hertfordshire be liable to any party for direct, indirect, special, incidental or consequential damages, including lost profits, arising out of the use of this software and its documentation, even if the California Institute of Technology, the Japan Science and Technology Agency, and/or the University of Hertfordshire have been advised of the possibility of such damage. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library in the file named "LICENSE.txt" included with the software distribution. A copy is also available online at the Internet address http://sbml.org/Software/SBMLToolbox/LICENSE.html for your convenience. You may also write to obtain a copy from the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. SBMLToolbox-4.1.0/LICENSE.html0000644000000000000000000000501411703262412014264 0ustar rootroot Copyright © 2009-2012 jointly by the following organizations:
1. California Institute of Technology, Pasadena, CA, USA
2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright © 2006-2008 jointly by the following organizations:
1. California Institute of Technology, Pasadena, CA, USA
2. University of Hertfordshire, Hatfield, UK

Copyright © 2003-2005 jointly by the following organizations:
1. California Institute of Technology, Pasadena, CA, USA
2. Japan Science and Technology Agency, Japan
3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and documentation provided hereunder is on an "as is" basis, and the California Institute of Technology, the Japan Science and Technology Agency, and the University of Hertfordshire have no obligations to provide maintenance, support, updates, enhancements or modifications. In no event shall the California Institute of Technology, the Japan Science and Technology Agency, or the University of Hertfordshire be liable to any party for direct, indirect, special, incidental or consequential damages, including lost profits, arising out of the use of this software and its documentation, even if the California Institute of Technology, the Japan Science and Technology Agency, and/or the University of Hertfordshire have been advised of the possibility of such damage. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library in the file named "LICENSE.txt" included with the software distribution. A copy is also available online at the Internet address http://sbml.org/Software/SBMLToolbox/LICENSE.html for your convenience. You may also write to obtain a copy from the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. SBMLToolbox-4.1.0/FUNDING.txt0000644000000000000000000000142711540617602014157 0ustar rootrootThis and other projects of the SBML Team have been supported by the following organizations: the National Institutes of Health (USA) under grants R01 GM070923 and R01 GM077671; the International Joint Research Program of NEDO (Japan); the JST ERATO-SORST Program (Japan); the Japanese Ministry of Agriculture; the Japanese Ministry of Education, Culture, Sports, Science and Technology; the BBSRC e-Science Initiative (UK); the DARPA IPTO Bio-Computation Program (USA); the Army Research Office's Institute for Collaborative Biotechnologies (USA); the Air Force Office of Scientific Research (USA); the California Institute of Technology (USA); the University of Hertfordshire (UK); the Molecular Sciences Institute (USA); the Systems Biology Institute (Japan); and Keio University (Japan). SBMLToolbox-4.1.0/docs/0000755000000000000000000000000011704572216013253 5ustar rootrootSBMLToolbox-4.1.0/docs/validation.html0000644000000000000000000005765611611210324016300 0ustar rootroot

VALIDATE_MATLAB_SBML_STRUCTURES

This folder contains tests that checks that the structure supplied as argument is of the appropriate form to represent the intended element of an SBML model. Each check tests that the fields supplied within the structure match the fields expected for an element of that type and SBML Level and Version.

Function are:


[valid, message] = isSBML_AlgebraicRule(SBMLAlgebraicRule, level, version(optional))

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML AlgebraicRule structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML AlgebraicRule structure of the appropriate level and version can be found using getAlgebraicRuleFieldnames(level, version)


[valid, message] = isSBML_AssignmentRule(SBMLAssignmentRule, level, version(optional))

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML AssignmentRule structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML AssignmentRule structure of the appropriate level and version can be found using getAssignmentRuleFieldnames(level, version)


[valid, message] = isSBML_Compartment(SBMLCompartment, level, version(optional))

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Compartment structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Compartment structure of the appropriate level and version can be found using getCompartmentFieldnames(level, version)


[valid, message] = isSBML_CompartmentType(SBMLCompartmentType, level, version(optional))

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML CompartmentType structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML CompartmentType structure of the appropriate level and version can be found using getCompartmentTypeFieldnames(level, version)


[valid, message] = isSBML_CompartmentVolumeRule(SBMLCompartmentVolumeRule, level, version(optional))

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML CompartmentVolumeRule structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML CompartmentVolumeRule structure of the appropriate level and version can be found using getCompartmentVolumeRuleFieldnames(level, version)


[valid, message] = isSBML_Constraint(SBMLConstraint, level, version(optional))

Takes

  1. SBMLConstraint, an SBML Constraint structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Constraint structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Constraint structure of the appropriate level and version can be found using getConstraintFieldnames(level, version)


[valid, message] = isSBML_Delay(SBMLDelay, level, version(optional))

Takes

  1. SBMLDelay, an SBML Delay structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Delay structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Delay structure of the appropriate level and version can be found using getDelayFieldnames(level, version)


[valid, message] = isSBML_Event(SBMLEvent, level, version(optional))

Takes

  1. SBMLEvent, an SBML Event structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Event structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Event structure of the appropriate level and version can be found using getEventFieldnames(level, version)


[valid, message] = isSBML_EventAssignment(SBMLEventAssignment, level, version(optional))

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML EventAssignment structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML EventAssignment structure of the appropriate level and version can be found using getEventAssignmentFieldnames(level, version)


[valid, message] = isSBML_FunctionDefinition(SBMLFunctionDefinition, level, version(optional))

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML FunctionDefinition structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML FunctionDefinition structure of the appropriate level and version can be found using getFunctionDefinitionFieldnames(level, version)


[valid, message] = isSBML_InitialAssignment(SBMLInitialAssignment, level, version(optional))

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML InitialAssignment structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML InitialAssignment structure of the appropriate level and version can be found using getInitialAssignmentFieldnames(level, version)


[valid, message] = isSBML_KineticLaw(SBMLKineticLaw, level, version(optional))

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML KineticLaw structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML KineticLaw structure of the appropriate level and version can be found using getKineticLawFieldnames(level, version)


[valid, message] = isSBML_LocalParameter(SBMLLocalParameter, level, version(optional))

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML LocalParameter structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML LocalParameter structure of the appropriate level and version can be found using getLocalParameterFieldnames(level, version)


[valid, message] = isSBML_Model(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Model structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: The fields present in a MATLAB_SBML Model structure of the appropriate level and version can be found using getModelFieldnames(level, version)


[valid, message] = isSBML_ModifierSpeciesReference(SBMLModifierSpeciesReference, level, version(optional))

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML ModifierSpeciesReference structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML ModifierSpeciesReference structure of the appropriate level and version can be found using getModifierSpeciesReferenceFieldnames(level, version)


[valid, message] = isSBML_Parameter(SBMLParameter, level, version(optional))

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Parameter structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Parameter structure of the appropriate level and version can be found using getParameterFieldnames(level, version)


[valid, message] = isSBML_ParameterRule(SBMLParameterRule, level, version(optional))

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML ParameterRule structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML ParameterRule structure of the appropriate level and version can be found using getParameterRuleFieldnames(level, version)


[valid, message] = isSBML_Priority(SBMLPriority, level, version(optional))

Takes

  1. SBMLPriority, an SBML Priority structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Priority structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Priority structure of the appropriate level and version can be found using getPriorityFieldnames(level, version)


[valid, message] = isSBML_RateRule(SBMLRateRule, level, version(optional))

Takes

  1. SBMLRateRule, an SBML RateRule structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML RateRule structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML RateRule structure of the appropriate level and version can be found using getRateRuleFieldnames(level, version)


[valid, message] = isSBML_Reaction(SBMLReaction, level, version(optional))

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Reaction structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Reaction structure of the appropriate level and version can be found using getReactionFieldnames(level, version)


[valid, message] = isSBML_Rule(SBMLRule, level, version(optional))

Takes

  1. SBMLRule, an SBML Rule structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Rule structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Rule structure of the appropriate level and version can be found using getRuleFieldnames(level, version)


[valid, message] = isSBML_Species(SBMLSpecies, level, version(optional))

Takes

  1. SBMLSpecies, an SBML Species structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Species structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Species structure of the appropriate level and version can be found using getSpeciesFieldnames(level, version)


[valid, message] = isSBML_SpeciesConcentrationRule(SBMLSpeciesConcentrationRule, level, version(optional))

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML SpeciesConcentrationRule structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML SpeciesConcentrationRule structure of the appropriate level and version can be found using getSpeciesConcentrationRuleFieldnames(level, version)


[valid, message] = isSBML_SpeciesReference(SBMLSpeciesReference, level, version(optional))

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML SpeciesReference structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML SpeciesReference structure of the appropriate level and version can be found using getSpeciesReferenceFieldnames(level, version)


[valid, message] = isSBML_SpeciesType(SBMLSpeciesType, level, version(optional))

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML SpeciesType structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML SpeciesType structure of the appropriate level and version can be found using getSpeciesTypeFieldnames(level, version)


[valid, message] = isSBML_StoichiometryMath(SBMLStoichiometryMath, level, version(optional))

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML StoichiometryMath structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML StoichiometryMath structure of the appropriate level and version can be found using getStoichiometryMathFieldnames(level, version)


[valid, message] = isSBML_Trigger(SBMLTrigger, level, version(optional))

Takes

  1. SBMLTrigger, an SBML Trigger structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Trigger structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Trigger structure of the appropriate level and version can be found using getTriggerFieldnames(level, version)


[valid, message] = isSBML_Unit(SBMLUnit, level, version(optional))

Takes

  1. SBMLUnit, an SBML Unit structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Unit structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML Unit structure of the appropriate level and version can be found using getUnitFieldnames(level, version)


[valid, message] = isSBML_UnitDefinition(SBMLUnitDefinition, level, version(optional))

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure
  2. level, an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML UnitDefinition structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML UnitDefinition structure of the appropriate level and version can be found using getUnitDefinitionFieldnames(level, version)


[valid, message] = isValid(SBMLStruct, level(optional), version(optional))

Takes

  1. SBMLStruct, an SBML structure
  2. level (optional), an integer representing an SBML level
  3. version (optional), an integer representing an SBML version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: the optional level defaults to a value of 3

NOTE: the optional version defaults to a value of 1

NOTE: The fields present in a MATLAB_SBML structure of the appropriate level and version can be found using getFieldnames(typecode, level, version)


[valid, message] = isSBML_Model(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML Model structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: The fields present in a MATLAB_SBML Model structure of the appropriate level and version can be found using getModelFieldnames(level, version)


SBMLToolbox-4.1.0/docs/style.css0000644000000000000000000003766411664710060015141 0ustar rootroot/* --- Font defaults --- */ /* Can't make this look good enough in Firefox or IE on Windows: * font-family: "Lucida Grande", "Lucida Sans", Verdana, Geneva, Arial, sans-serif; * So ended up using uglier but more portable fonts. */ body { font-family: Verdana, sans-serif; font-size: 9pt; line-height: 140%; margin-bottom: 2em; } small { font-size: 75%; } h1 { font-weight: bold; margin-bottom: 0; padding-top: 5pt; padding-bottom: 5pt;} h2 { font-weight: bold; padding-top: 5pt; } h3 { font-weight: bold; font-style: italic; line-height: 12pt; } h3 { font-weight: bold; font-style: italic; line-height: 11pt; } h4 { font-weight: normal; font-style: italic; line-height: 11pt; } h5 { font-weight: normal; font-style: italic; line-height: 11pt; } big { font-size: 120%; font-weight: bold } pre { font-size: 100%; } b { font-size: 100%; } dt { font-weight: bold; } #topbar { font-size: 8pt; } h1, h2, h3 { color: #333; } h4, h5, h6 { color: #000; } b, strong { color: #515151; } .small-font, .sm-font { font-size: 8pt; line-height: 120%; } .collapse-p p { display: inline; } .with-border { border: 1px solid gray; } /* Stuff from shared.css -- dunno if it's actually still used. */ img { border: none; } .texvc { direction: ltr; unicode-bidi: embed; } img.tex { vertical-align: middle; } span.texhtml { font-family: serif; } .error { color: red; font-size: larger; } /* --- General defaults --- */ form { font-size: 9pt; } a { font-weight: bold; color: #1e4487; text-decoration: none; } a:visited { color: #7790ba; } a:hover { /* color: #43a3d8; */ text-decoration: underline; color: #000; } a.printable { text-decoration: underline; } a.stub { color: #772233; text-decoration: none; } a.new { color: #CC2200; } pre { border: 1px dashed #9ca2f0; padding: 0.5em; margin: 1em 2em; color: black; } dd { margin: auto 2em; } blockquote { margin-right: 3em; } code, tt { font-size: 10pt; color: #000; } li { margin-left: -8px; margin-top: 0.5em; } ol ol { list-style-type: lower-alpha; } ol ol ol { list-style-type: lower-roman; } ol ol ol ol { list-style-type: decimal; } table { border: 1px solid #aaa; padding-top: 0; padding-left: 0; padding-right: 0; border-collapse: collapse; } th { background-color: #dfdfdf; color: #333; border: 1px solid #bbb; padding: 0; } td { empty-cells: show; border: 1px solid #bbb; padding: 0; } .borderless-table, .borderless-table th, .borderless-table td { border: none; } .borderless-table-rows th, .borderless-table-rows td { border: none; } .sm-padding, .sm-padding th, .sm-padding td { padding: 4px; } .med-padding { padding: 0.5em } /* --- Top header area with logo, navigation bar and search box --- */ #topbar { color: #eee; padding: 0px; margin-left: auto; margin-right: auto; margin-top: 18px; margin-bottom: 0; text-align: center; } #navbar { color: #fff; padding: 0px 0px 0px 2px; margin: auto; width: 768px; position: relative; display: block; height: 16px; vertical-align: middle; border: none; } #navbartext { vertical-align: middle; line-height: 13px; text-align: center; margin: 0 auto; padding: 0 0 0 2px; } #navbartext a { font-size: 8pt; text-decoration: none; color: #eee; display: block; } #navbartext a:visited { color: #eee; } #navbartext a:hover { text-decoration: underline; color: #fff; } #navbartext ul { margin: 0; padding: 0; list-style-type: none; width: auto; } #navbartext ul li { display: block; float: left; margin: 0; } #navbartext ul li a { text-decoration: none; padding: 11px 6px 0 6px; } #navbartext ul li.current a { color: #6acaf2; } #breadcrumbs { padding: 0; margin: 0; text-align: left; } .breadcrumbs { border: none; font-size: 7pt; margin-left: 8px; margin-right: 10px; padding: 0 2px 0 2px; color: #666; } /* --- Whole page content --- */ #content { margin-left: auto; margin-right: auto; margin-top: 30px; width: 768px; background-color: #fff; border: 1px solid #333; } /* --- Other stuff -- needs to be categorized -- */ h1 .editsection, h2 .editsection, h3 .editsection, h4 .editsection { font-size: 9pt; font-style: normal; } #pagetitle { padding-bottom: 0.5em; } h1 .pagetitle { padding-bottom: 0; margin-bottom: 0; } textarea { overflow: auto; } td.bottom { font-size: 10pt; padding: 0; border: none; } #specialform { display: inline; } #article { color: #404040; padding: 0 3px 3px 3px; margin-left: 8px; margin-right: 8px; min-height: 400px; text-align: left; } #article p { padding-top: 0; margin-top: 1px; } #article p.subtitle { color: #666666; font-size: 11pt; font-weight: bold; padding-top: 0; margin-top: 0; padding-bottom: 1ex; } #article p.fake-pre { font-family: -webkit-monospace, monospace; font-size: 100%; border: 1px dashed #1c4283; padding: 7px; color: #000000; } #footer { padding-bottom: 15px; } #footer table { border: none; margin: 0 0 5px 0; } #bottomlinks { display: block; width: 96%; line-height: 130%; font-size: 7pt; margin-left: auto; margin-right: auto; text-align: center; padding-top: 0; padding-bottom: 0; background-color: #ddd; color: #000; border: 1px solid #999; background: transparent url(/skins/SBML/vertical-grad-30px.gif) repeat-x top left; } /* #bottomlinks a { color: #eee; font-size: 8pt; } #bottomlinks a:visited { color: #88aacc; } */ #bottomlinks a:hover { color: #000; } /* probalby can't make this work */ .button-left { position: relative; display: block; background: transparent url(/skins/SBML/button-blue-stripped-left.jpg) top left; } .button-right { position: relative; display: block; background: transparent url(/skins/SBML/button-blue-stripped-right.jpg) top left; } .button-middle { position: relative; display: block; background: transparent url(/skins/SBML/button-blue-stripped-middle.jpg) top left; } #pagestats { display: inline; font-size: 7pt; padding-top: 0.5em; margin-left: 5px; margin-right: auto; text-align: center; color: #ddd; border: 0; } #pagestats a { color: #777777; text-decoration: none; } #pagestats a:hover { color: #fff; text-decoration: none; } #siteAttribution { display: block; } #siteAttribution, #siteAttribution a, #siteAttribution a:visited { font-size: 7pt; text-align: center; margin: 5px auto 0px auto !important; color: #ddd; } #sitetitle { font-weight: normal; font-size: 32pt; color: #fff; line-height: 38pt; } #sitesub { font-style: italic; font-size: 9pt; color: #fff; padding-top: 0.3em; padding-bottom: 0.7em; } /* Recreating-deleted-page warning and log entries */ div#mw-recreate-deleted-warn { padding: 3px; margin-top: 3px; margin-bottom: 3px; border: 1px solid #1c4283; } div#mw-recreate-deleted-warn ul li { font-size: 90%; } #powersearch { background: #DDEEFF; border-style: solid; border-width: 1px; padding: 2px; } /* Since all our editing will be from our own logged-in users, we don't need this copyright warning, and besides, it might confuse some of our faculty. */ #editpage-copywarn { visibility: hidden } /* * Table of contents box. */ /* 2010-10-27 Tried to make toc numbers have a fixed width, so that the toc would be aligned, but the following didn't do it, and nothing I could find could do it either. Why? .tocnumber { min-width: 2em !important; } */ #toc, .toc, .mw-warning { font-family: Helvetica, Arial, sans-serif; border: 1px dotted #aaa; padding: 5px; margin: 15px 4px 15px 15px; font-size: smaller; font-weight: normal; float: right; background-color: #f9f9f9; } #toc h2, .toc h2 { font-family: Helvetica, Arial, sans-serif; font-size: 9pt; display: inline; border: none; padding: 0; margin-top: 0; } #toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle { font-family: Helvetica, Arial, sans-serif; font-weight: normal; font-size: 9pt; text-align: center; margin: 0; padding: 0; } #toc ul, .toc ul { font-family: Helvetica, Arial, sans-serif; font-size: 9pt; font-weight: normal; list-style-type: none; list-style-image: none; margin-left: 0; padding-left: 0; text-align: left; } #toc a { font-weight: normal; } #toc ul li, .toc ul li { margin-left: 0; margin-top: 0; } #toc ul ul, .toc ul ul { margin-left: 0; } #toc ul ul, .toc ul ul { font-family: Helvetica, Arial, sans-serif; margin: 0 0 0 2em; } #toc .toctoggle, .toc .toctoggle { font-family: Helvetica, Arial, sans-serif; font-size: smaller; } #toc td { border: none; padding: 0 3px 3px 3px; } .imagelist { font-size: 8pt; width: 100%; } .TablePager, .TablePager td, .TablePager th { border: none; padding: 0 0.15em 0 0.15em; } .icon { vertical-align: middle; padding-left: 2px; padding-right: 2px; } td p { padding: 0px; margin: 0px; } /* --- Page bottom bling. Has to come after general settings. --- */ #flashyicons { padding-bottom: 10px; } #flashyicons table { margin-left: auto; margin-right: auto; margin-top: 6px; margin-bottom: 10px; border-width: 0px; } #flashyicons td.icon { border-width: 0px; padding: 0 10px 0 10px; } a.osi-icon { display: block; width: 80px; height: 15px; background: url(/skins/SBML/button-osi.gif) -80px 0 no-repeat; text-decoration: none; } a:hover.osi-icon { background-position: 0 0; } a.php-icon { display: block; width: 80px; height: 15px; background: url(/skins/SBML/button-php.gif) -80px 0 no-repeat; text-decoration: none; } a:hover.php-icon { background-position: 0 0; } a.gnu-icon { display: block; width: 80px; height: 15px; background: url(/skins/SBML/button-gnu.gif) -80px 0 no-repeat; text-decoration: none; } a:hover.gnu-icon { background-position: 0 0; } a.linux-icon { display: block; width: 80px; height: 15px; background: url(/skins/SBML/button-linux.gif) -80px 0 no-repeat; text-decoration: none; } a:hover.linux-icon { background-position: 0 0; } a.rss-icon { display: block; width: 80px; height: 15px; background: url(/skins/SBML/button-rss.gif) -80px 0 no-repeat; text-decoration: none; } a:hover.rss-icon { background-position: 0 0; } a.mediawiki-icon { display: block; width: 80px; height: 15px; background: url(/skins/SBML/button-mediawiki.gif) -80px 0 no-repeat; text-decoration: none; } a:hover.mediawiki-icon { background-position: 0 0; } .floatright { margin-top: 1em !important; } /* --- Special cases for different areas of the site --- */ #workshop-quick-map table { padding: 5px; border: none; } #workshop-quick-map th { padding: 5px 15px 5px 15px; background-color: #fff; border-top: none; border-left: none; border-right: none; border-bottom: 1px solid #ccc; } #workshop-quick-map td { padding: 5px 15px 5px 15px; border: none; } /* To make a table collapsed when first viewed, put "collapsed" in its class list. */ #past-events #collapsibleTable0 td, #past-events #collapsibleTable1 td, #past-events #collapsibleTable2 td { font-size: 8pt; } .float-right { display: inline; float: right; } .border-dotted { border: 1px dotted #ccc; } .gray-border { border: 1px solid #ccc; } .news-item-title { font-weight: bold; font-style: italic; display: block; } .news-item-title h3 { margin-bottom: 2px; } .news-item-abstract { font-size: 8pt; } .news-item-date { font-style: italic; margin-right: 3px; color: #937c7c; } #about-blurb { font-size: 8pt; line-height: 120%; margin: 1.25em 1.75em 2em 0; } #about-blurb .icon { padding-bottom: 1em; } .about-blurb-name { display: inline; font-weight: bold; } p.about-blurb-image { text-align: center; margin: 0 0 0.75em 0; padding: 0px; } .about-blurb-text { text-align: justify; } .page-Special_Allpages { font-size: 8pt; } .no-margins { margin: 0; padding: 0; } /* --- Special effects libraries --- */ #stylefour { position: relative; display: block; height: 39px; background: transparent url(/skins/SBML/tab-bgOFF.gif) repeat-x top left; } #stylefour ul { margin: 0; padding: 0; list-style-type: none; width: auto; } #stylefour ul li { display: block; float: left; margin: 0; } #stylefour ul li a { display: block; float: left; color: #666; text-decoration: none; padding: 11px 7px 0 7px; height: 23px; background: transparent url(/skins/SBML/tab-bgDIVIDER.gif) no-repeat top right; } #stylefour ul li a:hover, #stylefour ul li a.current { background: #fff url(/skins/SBML/tab-bgON.gif) no-repeat top right; } #navlinks ul { color: #fff; margin: 0; padding: 0; list-style-type: none; width: auto; } #navlinks ul li { display: block; float: left; margin: 0; } #navlinks ul li a { display: block; float: left; color: #fff; text-decoration: none; padding: 0px 7px 0 7px; } #navlinks ul li a:visited { color: #fff; } #navlinks ul li a:hover, #navlinks ul li a.current { color: #000; } #searchbox { float: right; padding: 8px 10px 0 0; width: auto; margin: auto; } #searchbox img { vertical-align: top; } #searchbox form, #searchbox input, #searchbox .searchform { background: transparent url('osx-searchbox/srch_bg.gif') repeat-x top left; display: inline; font-size: 7pt; text-decoration: none; white-space: nowrap; margin-bottom: 10px; padding: 0px; border: none; height: 19px; width: 100px; vertical-align: middle; } /* 'height' in the following and padding in the next one interact for positioning the placeholder text in the search box. */ #searchbox input { vertical-align: top; background-color: #ffffff; color: #404040; height: 15px; } #searchbox input.srch_fld { padding-top: 4px; } /* Taken from monobook */ /* ** keep the whitespace in front of the ^=, hides rule from konqueror ** this is css3, the validator doesn't like it when validating as css2 */ #article a.external, #article a[href ^="gopher://"] { background: url(external.png) center right no-repeat; padding-right: 13px; } #article a[href ^="mailto:"], .link-mailto { background: url(mail_icon.gif) center right no-repeat; padding-right: 18px; } #article a[href ^="news://"] { background: url(news_icon.png) center right no-repeat; padding-right: 18px; } #article a[href ^="ftp://"], .link-ftp { background: url(file_icon.gif) center right no-repeat; padding-right: 18px; } #article a[href ^="irc://"], .link-irc { background: url(discussionitem_icon.gif) center right no-repeat; padding-right: 18px; } #article a.external[href $=".ogg"], #article a.external[href $=".OGG"], #article a.external[href $=".mid"], #article a.external[href $=".MID"], #article a.external[href $=".midi"], #article a.external[href $=".MIDI"], #article a.external[href $=".mp3"], #article a.external[href $=".MP3"], #article a.external[href $=".wav"], #article a.external[href $=".WAV"], #article a.external[href $=".wma"], #article a.external[href $=".WMA"], .link-audio { background: url("audio.png") center right no-repeat; padding-right: 13px; } #article a.external[href $=".ogm"], #article a.external[href $=".OGM"], #article a.external[href $=".avi"], #article a.external[href $=".AVI"], #article a.external[href $=".mpeg"], #article a.external[href $=".MPEG"], #article a.external[href $=".mpg"], #article a.external[href $=".MPG"], .link-video { background: url("video.png") center right no-repeat; padding-right: 13px; } #article a.external[href $=".pdf"], #article a.external[href $=".PDF"], #article a.external[href *=".pdf#"], #article a.external[href *=".PDF#"], #article a.external[href *=".pdf?"], #article a.external[href *=".PDF?"], .link-document { background: url("document.png") center right no-repeat; padding-right: 12px; } /* Print-specific things to hide */ .printfooter { display: none; } #article img[alt ^="Image:"] { vertical-align: middle; } tr.headers { background: lightgray; } tr.headers2 { background: navajowhite; text-align: center; } td.footnote { text-align: center; font-size:small; } SBMLToolbox-4.1.0/docs/structureFields.html0000644000000000000000000006500511611210324017320 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\STRUCTFIELDNAMES

These functions return the fieldnames and default values for the MATLAB_SBML structures.

Function are:


[values] = getAlgebraicRuleDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML AlgebraicRule structure of the given level and version

NOTE: The corresponding fields present in an SBML AlgebraicRule structure can be found using the function getAlgebraicRuleFieldnames


[fieldnames, num] = getAlgebraicRuleFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML AlgebraicRule structure of the given level and version
  2. the number of fieldnames

[values] = getAssignmentRuleDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML AssignmentRule structure of the given level and version

NOTE: The corresponding fields present in an SBML AssignmentRule structure can be found using the function getAssignmentRuleFieldnames


[fieldnames, num] = getAssignmentRuleFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML AssignmentRule structure of the given level and version
  2. the number of fieldnames

[values] = getCompartmentDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Compartment structure of the given level and version

NOTE: The corresponding fields present in an SBML Compartment structure can be found using the function getCompartmentFieldnames


[fieldnames, num] = getCompartmentFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Compartment structure of the given level and version
  2. the number of fieldnames

[values] = getCompartmentTypeDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML CompartmentType structure of the given level and version

NOTE: The corresponding fields present in an SBML CompartmentType structure can be found using the function getCompartmentTypeFieldnames


[fieldnames, num] = getCompartmentTypeFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML CompartmentType structure of the given level and version
  2. the number of fieldnames

[values] = getCompartmentVolumeRuleDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML CompartmentVolumeRule structure of the given level and version

NOTE: The corresponding fields present in an SBML CompartmentVolumeRule structure can be found using the function getCompartmentVolumeRuleFieldnames


[fieldnames, num] = getCompartmentVolumeRuleFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML CompartmentVolumeRule structure of the given level and version
  2. the number of fieldnames

[values] = getConstraintDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Constraint structure of the given level and version

NOTE: The corresponding fields present in an SBML Constraint structure can be found using the function getConstraintFieldnames


[fieldnames, num] = getConstraintFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Constraint structure of the given level and version
  2. the number of fieldnames

[values] = getDefaultValues(typecode, level, version)

Takes

  1. typecode; a string representing the type of object being queried
  2. level, an integer representing an SBML level
  3. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML structure of the given typecode, level and version

NOTE: The corresponding fields present in an SBML structure can be found using the function getFieldnames


[values] = getDelayDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Delay structure of the given level and version

NOTE: The corresponding fields present in an SBML Delay structure can be found using the function getDelayFieldnames


[fieldnames, num] = getDelayFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Delay structure of the given level and version
  2. the number of fieldnames

[values] = getEventAssignmentDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML EventAssignment structure of the given level and version

NOTE: The corresponding fields present in an SBML EventAssignment structure can be found using the function getEventAssignmentFieldnames


[fieldnames, num] = getEventAssignmentFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML EventAssignment structure of the given level and version
  2. the number of fieldnames

[values] = getEventDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Event structure of the given level and version

NOTE: The corresponding fields present in an SBML Event structure can be found using the function getEventFieldnames


[fieldnames, num] = getEventFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Event structure of the given level and version
  2. the number of fieldnames

[fieldnames, num] = getFieldnames(typecode, level, version)

Takes

  1. typecode; a string representing the type of object being queried
  2. level, an integer representing an SBML level
  3. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML structure of the given typecode, level and version
  2. the number of fieldnames

[values] = getFunctionDefinitionDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML FunctionDefinition structure of the given level and version

NOTE: The corresponding fields present in an SBML FunctionDefinition structure can be found using the function getFunctionDefinitionFieldnames


[fieldnames, num] = getFunctionDefinitionFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML FunctionDefinition structure of the given level and version
  2. the number of fieldnames

[values] = getInitialAssignmentDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML InitialAssignment structure of the given level and version

NOTE: The corresponding fields present in an SBML InitialAssignment structure can be found using the function getInitialAssignmentFieldnames


[fieldnames, num] = getInitialAssignmentFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML InitialAssignment structure of the given level and version
  2. the number of fieldnames

[values] = getKineticLawDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML KineticLaw structure of the given level and version

NOTE: The corresponding fields present in an SBML KineticLaw structure can be found using the function getKineticLawFieldnames


[fieldnames, num] = getKineticLawFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML KineticLaw structure of the given level and version
  2. the number of fieldnames

[values] = getLocalParameterDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML LocalParameter structure of the given level and version

NOTE: The corresponding fields present in an SBML LocalParameter structure can be found using the function getLocalParameterFieldnames


[fieldnames, num] = getLocalParameterFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML LocalParameter structure of the given level and version
  2. the number of fieldnames

[values] = getModelDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Model structure of the given level and version

NOTE: The corresponding fields present in an SBML Model structure can be found using the function getModelFieldnames


[fieldnames, num] = getModelFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Model structure of the given level and version
  2. the number of fieldnames

[values] = getModifierSpeciesReferenceDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML ModifierSpeciesReference structure of the given level and version

NOTE: The corresponding fields present in an SBML ModifierSpeciesReference structure can be found using the function getModifierSpeciesReferenceFieldnames


[fieldnames, num] = getModifierSpeciesReferenceFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML ModifierSpeciesReference structure of the given level and version
  2. the number of fieldnames

[values] = getParameterDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Parameter structure of the given level and version

NOTE: The corresponding fields present in an SBML Parameter structure can be found using the function getParameterFieldnames


[fieldnames, num] = getParameterFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Parameter structure of the given level and version
  2. the number of fieldnames

[values] = getParameterRuleDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML ParameterRule structure of the given level and version

NOTE: The corresponding fields present in an SBML ParameterRule structure can be found using the function getParameterRuleFieldnames


[fieldnames, num] = getParameterRuleFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML ParameterRule structure of the given level and version
  2. the number of fieldnames

[values] = getPriorityDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Priority structure of the given level and version

NOTE: The corresponding fields present in an SBML Priority structure can be found using the function getPriorityFieldnames


[fieldnames, num] = getPriorityFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Priority structure of the given level and version
  2. the number of fieldnames

[values] = getRateRuleDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML RateRule structure of the given level and version

NOTE: The corresponding fields present in an SBML RateRule structure can be found using the function getRateRuleFieldnames


[fieldnames, num] = getRateRuleFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML RateRule structure of the given level and version
  2. the number of fieldnames

[values] = getReactionDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Reaction structure of the given level and version

NOTE: The corresponding fields present in an SBML Reaction structure can be found using the function getReactionFieldnames


[fieldnames, num] = getReactionFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Reaction structure of the given level and version
  2. the number of fieldnames

[fieldnames, num] = getRuleFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Rule structure of the given level and version
  2. the number of fieldnames

[values] = getSpeciesConcentrationRuleDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML SpeciesConcentrationRule structure of the given level and version

NOTE: The corresponding fields present in an SBML SpeciesConcentrationRule structure can be found using the function getSpeciesConcentrationRuleFieldnames


[fieldnames, num] = getSpeciesConcentrationRuleFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML SpeciesConcentrationRule structure of the given level and version
  2. the number of fieldnames

[values] = getSpeciesDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Species structure of the given level and version

NOTE: The corresponding fields present in an SBML Species structure can be found using the function getSpeciesFieldnames


[fieldnames, num] = getSpeciesFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Species structure of the given level and version
  2. the number of fieldnames

[values] = getSpeciesReferenceDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML SpeciesReference structure of the given level and version

NOTE: The corresponding fields present in an SBML SpeciesReference structure can be found using the function getSpeciesReferenceFieldnames


[fieldnames, num] = getSpeciesReferenceFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML SpeciesReference structure of the given level and version
  2. the number of fieldnames

[values] = getSpeciesTypeDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML SpeciesType structure of the given level and version

NOTE: The corresponding fields present in an SBML SpeciesType structure can be found using the function getSpeciesTypeFieldnames


[fieldnames, num] = getSpeciesTypeFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML SpeciesType structure of the given level and version
  2. the number of fieldnames

[values] = getStoichiometryMathDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML StoichiometryMath structure of the given level and version

NOTE: The corresponding fields present in an SBML StoichiometryMath structure can be found using the function getStoichiometryMathFieldnames


[fieldnames, num] = getStoichiometryMathFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML StoichiometryMath structure of the given level and version
  2. the number of fieldnames

[values] = getTriggerDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Trigger structure of the given level and version

NOTE: The corresponding fields present in an SBML Trigger structure can be found using the function getTriggerFieldnames


[fieldnames, num] = getTriggerFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Trigger structure of the given level and version
  2. the number of fieldnames

[values] = getUnitDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML Unit structure of the given level and version

NOTE: The corresponding fields present in an SBML Unit structure can be found using the function getUnitFieldnames


[values] = getUnitDefinitionDefaultValues(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of default values for an SBML UnitDefinition structure of the given level and version

NOTE: The corresponding fields present in an SBML UnitDefinition structure can be found using the function getUnitDefinitionFieldnames


[fieldnames, num] = getUnitDefinitionFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML UnitDefinition structure of the given level and version
  2. the number of fieldnames

[fieldnames, num] = getUnitFieldnames(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. an array of fieldnames for an SBML Unit structure of the given level and version
  2. the number of fieldnames

valid = isValidLevelVersionCombination(level, version)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version

Returns

  1. valid = 1 if the level and version combinbation represent a valid specification of SBML supported by SBMLToolbox

NOTE: This function causes an error if the level/version arguments do not represent a valid supported SBML format


SBMLModel = propagateLevelVersion(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with level and version fields added to all sub structures

NOTE: This function facilitates keeping track of the level and version of sub objects within a model


SBMLToolbox-4.1.0/docs/structure.html0000644000000000000000000000336711611210324016174 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS

These are general functions for working with MATLAB_SBML structures.

Function are:


level = GetLevel(SBMLStructure)

Takes

  1. SBMLStructure, any SBML structure

Returns

  1. the SBML level corresponding to this structure

NOTE: it is not always possible to uniquely determine the level from a structure. The most recent SBML level that matches will be reported.


[level, version] = GetLevelVersion(SBMLStructure)

Takes

  1. SBMLStructure, any SBML structure

Returns

  1. the SBML level corresponding to this structure
  2. the SBML version corresponding to this structure

NOTE: it is not always possible to uniquely determine the level/version from a structure. The most recent SBML level/version that matches will be reported.


SBMLStructure = Object_create(typecode, level, version)

Takes

  1. typecode; a string representing the type of object being queried
  2. level; an integer representing an SBML level
  3. version; an integer representing an SBML version

Returns

  1. an SBML structure representing the given typecode, level and version

identical = areIdentical(SBMLStruct1, SBMLStruct2)

Takes

  1. SBMLStruct1, any SBML structure
  2. SBMLStruct2, any SBML structure

Returns

  1. identical =
    • 1 if the structures are identical i.e. contain same fields and the same values
    • 0 otherwise

SBMLToolbox-4.1.0/docs/structure-functions/0000755000000000000000000000000011704572220017314 5ustar rootrootSBMLToolbox-4.1.0/docs/structure-functions/unitDefinition.html0000644000000000000000000001473511626400656023212 0ustar rootroot

MATLABSBMLSTRUCTURE_FUNCTIONS\UNITDEFINITION

The functions allow users to create and work with the SBML UnitDefinition structure.

Function are:


SBMLUnitDefinition = UnitDefinition_addUnit(SBMLUnitDefinition, SBMLUnit)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure
  2. SBMLUnit, an SBML Unit structure

Returns

  1. the SBML UnitDefinition structure with the SBML Unit structure added

UnitDefinition = UnitDefinition_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML UnitDefinition structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


SBMLUnitDefinition = UnitDefinition_createUnit(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the SBML UnitDefinition structure with a new SBML Unit structure added

id = UnitDefinition_getId(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the value of the id attribute

unit = UnitDefinition_getListOfUnits(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. an array of the unit structures

metaid = UnitDefinition_getMetaid(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the value of the metaid attribute

name = UnitDefinition_getName(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the value of the name attribute

numUnits = UnitDefinition_getNumUnits(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the value of the numUnits attribute

sboTerm = UnitDefinition_getSBOTerm(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the value of the sboTerm attribute

unit = UnitDefinition_getUnit(SBMLUnitDefinition, index)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure
  2. index, an integer representing the index of SBML Unit structure

Returns

  1. the SBML Unit structure at the indexed position

value = UnitDefinition_isSetId(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = UnitDefinition_isSetMetaid(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = UnitDefinition_isSetName(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = UnitDefinition_isSetSBOTerm(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLUnitDefinition = UnitDefinition_setId(SBMLUnitDefinition, id)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure
  2. id; a string representing the id to be set

Returns

  1. the SBML UnitDefinition structure with the new value for the id attribute

SBMLUnitDefinition = UnitDefinition_setMetaid(SBMLUnitDefinition, metaid)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML UnitDefinition structure with the new value for the metaid attribute

SBMLUnitDefinition = UnitDefinition_setName(SBMLUnitDefinition, name)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure
  2. name; a string representing the name to be set

Returns

  1. the SBML UnitDefinition structure with the new value for the name attribute

SBMLUnitDefinition = UnitDefinition_setSBOTerm(SBMLUnitDefinition, sboTerm)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML UnitDefinition structure with the new value for the sboTerm attribute

SBMLUnitDefinition = UnitDefinition_unsetId(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the SBML UnitDefinition structure with the id attribute unset

SBMLUnitDefinition = UnitDefinition_unsetMetaid(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the SBML UnitDefinition structure with the metaid attribute unset

SBMLUnitDefinition = UnitDefinition_unsetName(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the SBML UnitDefinition structure with the name attribute unset

SBMLUnitDefinition = UnitDefinition_unsetSBOTerm(SBMLUnitDefinition)

Takes

  1. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the SBML UnitDefinition structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/unit.html0000644000000000000000000001635711611211102021157 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\UNIT

The functions allow users to create and work with the SBML Unit structure.

Function are:


Unit = Unit_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Unit structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


exponent = Unit_getExponent(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the value of the exponent attribute

kind = Unit_getKind(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the value of the kind attribute

metaid = Unit_getMetaid(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the value of the metaid attribute

multiplier = Unit_getMultiplier(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the value of the multiplier attribute

offset = Unit_getOffset(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the value of the offset attribute

sboTerm = Unit_getSBOTerm(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the value of the sboTerm attribute

scale = Unit_getScale(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the value of the scale attribute

value = Unit_isSetExponent(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. value =
    • 1 if the exponent attribute is set
    • 0 otherwise

value = Unit_isSetKind(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. value =
    • 1 if the kind attribute is set
    • 0 otherwise

value = Unit_isSetMetaid(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Unit_isSetMultiplier(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. value =
    • 1 if the multiplier attribute is set
    • 0 otherwise

value = Unit_isSetOffset(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. value =
    • 1 if the offset attribute is set
    • 0 otherwise

value = Unit_isSetSBOTerm(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = Unit_isSetScale(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. value =
    • 1 if the scale attribute is set
    • 0 otherwise

SBMLUnit = Unit_setExponent(SBMLUnit, exponent)

Takes

  1. SBMLUnit, an SBML Unit structure
  2. exponent; number representing the value of exponent to be set

Returns

  1. the SBML Unit structure with the new value for the exponent attribute

SBMLUnit = Unit_setKind(SBMLUnit, kind)

Takes

  1. SBMLUnit, an SBML Unit structure
  2. kind; a string representing the kind to be set

Returns

  1. the SBML Unit structure with the new value for the kind attribute

SBMLUnit = Unit_setMetaid(SBMLUnit, metaid)

Takes

  1. SBMLUnit, an SBML Unit structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Unit structure with the new value for the metaid attribute

SBMLUnit = Unit_setMultiplier(SBMLUnit, multiplier)

Takes

  1. SBMLUnit, an SBML Unit structure
  2. multiplier; number representing the value of multiplier to be set

Returns

  1. the SBML Unit structure with the new value for the multiplier attribute

SBMLUnit = Unit_setOffset(SBMLUnit, offset)

Takes

  1. SBMLUnit, an SBML Unit structure
  2. offset, an integer representing the offset to be set

Returns

  1. the SBML Unit structure with the new value for the offset attribute

SBMLUnit = Unit_setSBOTerm(SBMLUnit, sboTerm)

Takes

  1. SBMLUnit, an SBML Unit structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Unit structure with the new value for the sboTerm attribute

SBMLUnit = Unit_setScale(SBMLUnit, scale)

Takes

  1. SBMLUnit, an SBML Unit structure
  2. scale; number representing the value of scale to be set

Returns

  1. the SBML Unit structure with the new value for the scale attribute

SBMLUnit = Unit_unsetExponent(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the SBML Unit structure with the exponent attribute unset

SBMLUnit = Unit_unsetKind(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the SBML Unit structure with the kind attribute unset

SBMLUnit = Unit_unsetMetaid(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the SBML Unit structure with the metaid attribute unset

SBMLUnit = Unit_unsetMultiplier(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the SBML Unit structure with the multiplier attribute unset

SBMLUnit = Unit_unsetOffset(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the SBML Unit structure with the offset attribute unset

SBMLUnit = Unit_unsetSBOTerm(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the SBML Unit structure with the sboTerm attribute unset

SBMLUnit = Unit_unsetScale(SBMLUnit)

Takes

  1. SBMLUnit, an SBML Unit structure

Returns

  1. the SBML Unit structure with the scale attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/trigger.html0000644000000000000000000001147711611211102021641 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\TRIGGER

The functions allow users to create and work with the SBML Trigger structure.

Function are:


Trigger = Trigger_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Trigger structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


initialValue = Trigger_getInitialValue(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. the value of the initialValue attribute

math = Trigger_getMath(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. the value of the math attribute

metaid = Trigger_getMetaid(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. the value of the metaid attribute

persistent = Trigger_getPersistent(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. the value of the persistent attribute

sboTerm = Trigger_getSBOTerm(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. the value of the sboTerm attribute

value = Trigger_isSetMath(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. value =
    • 1 if the math attribute is set
    • 0 otherwise

value = Trigger_isSetMetaid(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Trigger_isSetSBOTerm(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLTrigger = Trigger_setInitialValue(SBMLTrigger, initialValue)

Takes

  1. SBMLTrigger, an SBML Trigger structure
  2. initialValue, an integer (0/1) representing the value of initialValue to be set

Returns

  1. the SBML Trigger structure with the new value for the initialValue attribute

SBMLTrigger = Trigger_setMath(SBMLTrigger, math)

Takes

  1. SBMLTrigger, an SBML Trigger structure
  2. math; string representing the math expression math to be set

Returns

  1. the SBML Trigger structure with the new value for the math attribute

SBMLTrigger = Trigger_setMetaid(SBMLTrigger, metaid)

Takes

  1. SBMLTrigger, an SBML Trigger structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Trigger structure with the new value for the metaid attribute

SBMLTrigger = Trigger_setPersistent(SBMLTrigger, persistent)

Takes

  1. SBMLTrigger, an SBML Trigger structure
  2. persistent, an integer (0/1) representing the value of persistent to be set

Returns

  1. the SBML Trigger structure with the new value for the persistent attribute

SBMLTrigger = Trigger_setSBOTerm(SBMLTrigger, sboTerm)

Takes

  1. SBMLTrigger, an SBML Trigger structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Trigger structure with the new value for the sboTerm attribute

SBMLTrigger = Trigger_unsetMath(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. the SBML Trigger structure with the math attribute unset

SBMLTrigger = Trigger_unsetMetaid(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. the SBML Trigger structure with the metaid attribute unset

SBMLTrigger = Trigger_unsetSBOTerm(SBMLTrigger)

Takes

  1. SBMLTrigger, an SBML Trigger structure

Returns

  1. the SBML Trigger structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/stoichiometryMath.html0000644000000000000000000001052711611211102023705 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\STOICHIOMETRYMATH

The functions allow users to create and work with the SBML StoichiometryMath structure.

Function are:


StoichiometryMath = StoichiometryMath_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML StoichiometryMath structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


math = StoichiometryMath_getMath(SBMLStoichiometryMath)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure

Returns

  1. the value of the math attribute

metaid = StoichiometryMath_getMetaid(SBMLStoichiometryMath)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure

Returns

  1. the value of the metaid attribute

sboTerm = StoichiometryMath_getSBOTerm(SBMLStoichiometryMath)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure

Returns

  1. the value of the sboTerm attribute

value = StoichiometryMath_isSetMath(SBMLStoichiometryMath)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure

Returns

  1. value =
    • 1 if the math attribute is set
    • 0 otherwise

value = StoichiometryMath_isSetMetaid(SBMLStoichiometryMath)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = StoichiometryMath_isSetSBOTerm(SBMLStoichiometryMath)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLStoichiometryMath = StoichiometryMath_setMath(SBMLStoichiometryMath, math)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure
  2. math; string representing the math expression math to be set

Returns

  1. the SBML StoichiometryMath structure with the new value for the math attribute

SBMLStoichiometryMath = StoichiometryMath_setMetaid(SBMLStoichiometryMath, metaid)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML StoichiometryMath structure with the new value for the metaid attribute

SBMLStoichiometryMath = StoichiometryMath_setSBOTerm(SBMLStoichiometryMath, sboTerm)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML StoichiometryMath structure with the new value for the sboTerm attribute

SBMLStoichiometryMath = StoichiometryMath_unsetMath(SBMLStoichiometryMath)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure

Returns

  1. the SBML StoichiometryMath structure with the math attribute unset

SBMLStoichiometryMath = StoichiometryMath_unsetMetaid(SBMLStoichiometryMath)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure

Returns

  1. the SBML StoichiometryMath structure with the metaid attribute unset

SBMLStoichiometryMath = StoichiometryMath_unsetSBOTerm(SBMLStoichiometryMath)

Takes

  1. SBMLStoichiometryMath, an SBML StoichiometryMath structure

Returns

  1. the SBML StoichiometryMath structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/speciesType.html0000644000000000000000000001170711611211102022467 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\SPECIESTYPE

The functions allow users to create and work with the SBML SpeciesType structure.

Function are:


SpeciesType = SpeciesType_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML SpeciesType structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


id = SpeciesType_getId(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. the value of the id attribute

metaid = SpeciesType_getMetaid(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. the value of the metaid attribute

name = SpeciesType_getName(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. the value of the name attribute

sboTerm = SpeciesType_getSBOTerm(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. the value of the sboTerm attribute

value = SpeciesType_isSetId(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = SpeciesType_isSetMetaid(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = SpeciesType_isSetName(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = SpeciesType_isSetSBOTerm(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLSpeciesType = SpeciesType_setId(SBMLSpeciesType, id)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure
  2. id; a string representing the id to be set

Returns

  1. the SBML SpeciesType structure with the new value for the id attribute

SBMLSpeciesType = SpeciesType_setMetaid(SBMLSpeciesType, metaid)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML SpeciesType structure with the new value for the metaid attribute

SBMLSpeciesType = SpeciesType_setName(SBMLSpeciesType, name)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure
  2. name; a string representing the name to be set

Returns

  1. the SBML SpeciesType structure with the new value for the name attribute

SBMLSpeciesType = SpeciesType_setSBOTerm(SBMLSpeciesType, sboTerm)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML SpeciesType structure with the new value for the sboTerm attribute

SBMLSpeciesType = SpeciesType_unsetId(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. the SBML SpeciesType structure with the id attribute unset

SBMLSpeciesType = SpeciesType_unsetMetaid(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. the SBML SpeciesType structure with the metaid attribute unset

SBMLSpeciesType = SpeciesType_unsetName(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. the SBML SpeciesType structure with the name attribute unset

SBMLSpeciesType = SpeciesType_unsetSBOTerm(SBMLSpeciesType)

Takes

  1. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. the SBML SpeciesType structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/speciesReference.html0000644000000000000000000003757511703262406023476 0ustar rootroot

MATLABSBMLSTRUCTURE_FUNCTIONS\SPECIESREFERENCE

The functions allow users to create and work with the SBML SpeciesReference structure.

Function are:


SpeciesReference = SpeciesReference_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML SpeciesReference structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


SBMLSpeciesReference = SpeciesReference_createStoichiometryMath(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the SBML SpeciesReference structure with a new SBML StoichiometryMath structure added

constant = SpeciesReference_getConstant(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the value of the constant attribute

denominator = SpeciesReference_getDenominator(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the value of the denominator attribute

id = SpeciesReference_getId(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the value of the id attribute

metaid = SpeciesReference_getMetaid(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the value of the metaid attribute

name = SpeciesReference_getName(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the value of the name attribute

sboTerm = SpeciesReference_getSBOTerm(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the value of the sboTerm attribute

species = SpeciesReference_getSpecies(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the value of the species attribute

stoichiometry = SpeciesReference_getStoichiometry(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the value of the stoichiometry attribute

stoichiometryMath = SpeciesReference_getStoichiometryMath(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the SBML StoichiometryMath structure

y = SpeciesReference_isAssignedByRateRule(SBMLSpeciesReference, SBMLRules)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - the index of the rateRule used to assigned value to the SpeciesReference - 0 if the SpeciesReference is not assigned by rateRule

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


y = SpeciesReference_isAssignedByRule(SBMLSpeciesReference, SBMLRules)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - the index of the assignmentRule used to assigned value to the SpeciesReference - 0 if the SpeciesReference is not assigned by assignmentRule

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


y = SpeciesReference_isInAlgebraicRule(SBMLSpeciesReference, SBMLRules)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - an array of the indices of any algebraicRules the id of the SpeciesReference appears in - 0 if the SpeciesReference appears in no algebraicRules

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


value = SpeciesReference_isSetDenominator(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. value =
    • 1 if the denominator attribute is set
    • 0 otherwise

value = SpeciesReference_isSetId(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = SpeciesReference_isSetMetaid(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = SpeciesReference_isSetName(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = SpeciesReference_isSetSBOTerm(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = SpeciesReference_isSetSpecies(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. value =
    • 1 if the species attribute is set
    • 0 otherwise

value = SpeciesReference_isSetStoichiometry(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. value =
    • 1 if the stoichiometry attribute is set
    • 0 otherwise

value = SpeciesReference_isSetStoichiometryMath(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. value =
    • 1 if the stoichiometryMath structure is set
    • 0 otherwise

SBMLSpeciesReference = SpeciesReference_setConstant(SBMLSpeciesReference, constant)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. constant, an integer (0/1) representing the value of constant to be set

Returns

  1. the SBML SpeciesReference structure with the new value for the constant attribute

SBMLSpeciesReference = SpeciesReference_setDenominator(SBMLSpeciesReference, denominator)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. denominator, an integer representing the denominator to be set

Returns

  1. the SBML SpeciesReference structure with the new value for the denominator attribute

SBMLSpeciesReference = SpeciesReference_setId(SBMLSpeciesReference, id)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. id; a string representing the id to be set

Returns

  1. the SBML SpeciesReference structure with the new value for the id attribute

SBMLSpeciesReference = SpeciesReference_setMetaid(SBMLSpeciesReference, metaid)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML SpeciesReference structure with the new value for the metaid attribute

SBMLSpeciesReference = SpeciesReference_setName(SBMLSpeciesReference, name)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. name; a string representing the name to be set

Returns

  1. the SBML SpeciesReference structure with the new value for the name attribute

SBMLSpeciesReference = SpeciesReference_setSBOTerm(SBMLSpeciesReference, sboTerm)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML SpeciesReference structure with the new value for the sboTerm attribute

SBMLSpeciesReference = SpeciesReference_setSpecies(SBMLSpeciesReference, species)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. species; a string representing the species to be set

Returns

  1. the SBML SpeciesReference structure with the new value for the species attribute

SBMLSpeciesReference = SpeciesReference_setStoichiometry(SBMLSpeciesReference, stoichiometry)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. stoichiometry; number representing the value of stoichiometry to be set

Returns

  1. the SBML SpeciesReference structure with the new value for the stoichiometry attribute

SBMLSpeciesReference = SpeciesReference_setStoichiometryMath(SBMLSpeciesReference, SBMLStoichiometryMath)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure
  2. SBMLStoichiometryMath, an SBML StoichiometryMath structure

Returns

  1. the SBML SpeciesReference structure with the new value for the stoichiometryMath field

SBMLSpeciesReference = SpeciesReference_unsetDenominator(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the SBML SpeciesReference structure with the denominator attribute unset

SBMLSpeciesReference = SpeciesReference_unsetId(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the SBML SpeciesReference structure with the id attribute unset

SBMLSpeciesReference = SpeciesReference_unsetMetaid(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the SBML SpeciesReference structure with the metaid attribute unset

SBMLSpeciesReference = SpeciesReference_unsetName(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the SBML SpeciesReference structure with the name attribute unset

SBMLSpeciesReference = SpeciesReference_unsetSBOTerm(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the SBML SpeciesReference structure with the sboTerm attribute unset

SBMLSpeciesReference = SpeciesReference_unsetSpecies(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the SBML SpeciesReference structure with the species attribute unset

SBMLSpeciesReference = SpeciesReference_unsetStoichiometry(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the SBML SpeciesReference structure with the stoichiometry attribute unset

SBMLSpeciesReference = SpeciesReference_unsetStoichiometryMath(SBMLSpeciesReference)

Takes

  1. SBMLSpeciesReference, an SBML SpeciesReference structure

Returns

  1. the SBML SpeciesReference structure with the stoichiometryMath field unset

SBMLToolbox-4.1.0/docs/structure-functions/speciesConcentrationRule.html0000644000000000000000000001215511611210762025215 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\SPECIESCONCENTRATIONRULE

The functions allow users to create and work with the SBML SpeciesConcentrationRule structure.

Function are:


SpeciesConcentrationRule = SpeciesConcentrationRule_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML SpeciesConcentrationRule structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


formula = SpeciesConcentrationRule_getFormula(SBMLSpeciesConcentrationRule)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure

Returns

  1. the value of the formula attribute

species = SpeciesConcentrationRule_getSpecies(SBMLSpeciesConcentrationRule)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure

Returns

  1. the value of the species attribute

type = SpeciesConcentrationRule_getType(SBMLSpeciesConcentrationRule)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure

Returns

  1. the value of the type attribute

value = SpeciesConcentrationRule_isSetFormula(SBMLSpeciesConcentrationRule)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure

Returns

  1. value =
    • 1 if the formula attribute is set
    • 0 otherwise

value = SpeciesConcentrationRule_isSetSpecies(SBMLSpeciesConcentrationRule)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure

Returns

  1. value =
    • 1 if the species attribute is set
    • 0 otherwise

value = SpeciesConcentrationRule_isSetType(SBMLSpeciesConcentrationRule)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure

Returns

  1. value =
    • 1 if the type attribute is set
    • 0 otherwise

SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setFormula(SBMLSpeciesConcentrationRule, formula)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure
  2. formula; a string representing the formula to be set

Returns

  1. the SBML SpeciesConcentrationRule structure with the new value for the formula attribute

SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setSpecies(SBMLSpeciesConcentrationRule, species)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure
  2. species; a string representing the species to be set

Returns

  1. the SBML SpeciesConcentrationRule structure with the new value for the species attribute

SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_setType(SBMLSpeciesConcentrationRule, type)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure
  2. type; a string representing the type to be set

Returns

  1. the SBML SpeciesConcentrationRule structure with the new value for the type attribute

SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetFormula(SBMLSpeciesConcentrationRule)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure

Returns

  1. the SBML SpeciesConcentrationRule structure with the formula attribute unset

SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetSpecies(SBMLSpeciesConcentrationRule)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure

Returns

  1. the SBML SpeciesConcentrationRule structure with the species attribute unset

SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetType(SBMLSpeciesConcentrationRule)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure

Returns

  1. the SBML SpeciesConcentrationRule structure with the type attribute unset

SBMLSpeciesConcentrationRule = SpeciesConcentrationRule_unsetVariable(SBMLSpeciesConcentrationRule)

Takes

  1. SBMLSpeciesConcentrationRule, an SBML SpeciesConcentrationRule structure

Returns

  1. the SBML SpeciesConcentrationRule structure with the variable attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/species.html0000644000000000000000000005140511703262406021643 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\SPECIES

The functions allow users to create and work with the SBML Species structure.

Function are:


Species = Species_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Species structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


boundaryCondition = Species_getBoundaryCondition(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the boundaryCondition attribute

charge = Species_getCharge(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the charge attribute

compartment = Species_getCompartment(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the compartment attribute

constant = Species_getConstant(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the constant attribute

conversionFactor = Species_getConversionFactor(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the conversionFactor attribute

hasOnlySubstanceUnits = Species_getHasOnlySubstanceUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the hasOnlySubstanceUnits attribute

id = Species_getId(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the id attribute

initialAmount = Species_getInitialAmount(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the initialAmount attribute

initialConcentration = Species_getInitialConcentration(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the initialConcentration attribute

metaid = Species_getMetaid(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the metaid attribute

name = Species_getName(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the name attribute

sboTerm = Species_getSBOTerm(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the sboTerm attribute

spatialSizeUnits = Species_getSpatialSizeUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the spatialSizeUnits attribute

speciesType = Species_getSpeciesType(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the speciesType attribute

substanceUnits = Species_getSubstanceUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the substanceUnits attribute

units = Species_getUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the value of the units attribute

y = Species_isAssignedByRateRule(SBMLSpecies, SBMLRules)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - the index of the rateRule used to assigned value to the Species - 0 if the Species is not assigned by rateRule

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


y = Species_isAssignedByRule(SBMLSpecies, SBMLRules)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - the index of the assignmentRule used to assigned value to the Species - 0 if the Species is not assigned by assignmentRule

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


y = Species_isInAlgebraicRule(SBMLSpecies, SBMLRules)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - an array of the indices of any algebraicRules the id of the Species appears in - 0 if the Species appears in no algebraicRules

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


value = Species_isSetCharge(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the charge attribute is set
    • 0 otherwise

value = Species_isSetCompartment(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the compartment attribute is set
    • 0 otherwise

value = Species_isSetConversionFactor(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the conversionFactor attribute is set
    • 0 otherwise

value = Species_isSetHasOnlySubstanceUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the hasOnlySubstanceUnits attribute is set
    • 0 otherwise

value = Species_isSetId(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = Species_isSetInitialAmount(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the initialAmount attribute is set
    • 0 otherwise

value = Species_isSetInitialConcentration(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the initialConcentration attribute is set
    • 0 otherwise

value = Species_isSetMetaid(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Species_isSetName(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = Species_isSetSBOTerm(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = Species_isSetSpatialSizeUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the spatialSizeUnits attribute is set
    • 0 otherwise

value = Species_isSetSpeciesType(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the speciesType attribute is set
    • 0 otherwise

value = Species_isSetSubstanceUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the substanceUnits attribute is set
    • 0 otherwise

value = Species_isSetUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. value =
    • 1 if the units attribute is set
    • 0 otherwise

SBMLSpecies = Species_setBoundaryCondition(SBMLSpecies, boundaryCondition)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. boundaryCondition, an integer (0/1) representing the value of boundaryCondition to be set

Returns

  1. the SBML Species structure with the new value for the boundaryCondition attribute

SBMLSpecies = Species_setCharge(SBMLSpecies, charge)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. charge, an integer representing the charge to be set

Returns

  1. the SBML Species structure with the new value for the charge attribute

SBMLSpecies = Species_setCompartment(SBMLSpecies, compartment)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. compartment; a string representing the compartment to be set

Returns

  1. the SBML Species structure with the new value for the compartment attribute

SBMLSpecies = Species_setConstant(SBMLSpecies, constant)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. constant, an integer (0/1) representing the value of constant to be set

Returns

  1. the SBML Species structure with the new value for the constant attribute

SBMLSpecies = Species_setConversionFactor(SBMLSpecies, conversionFactor)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. conversionFactor; a string representing the conversionFactor to be set

Returns

  1. the SBML Species structure with the new value for the conversionFactor attribute

SBMLSpecies = Species_setHasOnlySubstanceUnits(SBMLSpecies, hasOnlySubstanceUnits)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. hasOnlySubstanceUnits, an integer (0/1) representing the value of hasOnlySubstanceUnits to be set

Returns

  1. the SBML Species structure with the new value for the hasOnlySubstanceUnits attribute

SBMLSpecies = Species_setId(SBMLSpecies, id)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. id; a string representing the id to be set

Returns

  1. the SBML Species structure with the new value for the id attribute

SBMLSpecies = Species_setInitialAmount(SBMLSpecies, initialAmount)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. initialAmount; number representing the value of initialAmount to be set

Returns

  1. the SBML Species structure with the new value for the initialAmount attribute

SBMLSpecies = Species_setInitialConcentration(SBMLSpecies, initialConcentration)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. initialConcentration; number representing the value of initialConcentration to be set

Returns

  1. the SBML Species structure with the new value for the initialConcentration attribute

SBMLSpecies = Species_setMetaid(SBMLSpecies, metaid)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Species structure with the new value for the metaid attribute

SBMLSpecies = Species_setName(SBMLSpecies, name)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. name; a string representing the name to be set

Returns

  1. the SBML Species structure with the new value for the name attribute

SBMLSpecies = Species_setSBOTerm(SBMLSpecies, sboTerm)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Species structure with the new value for the sboTerm attribute

SBMLSpecies = Species_setSpatialSizeUnits(SBMLSpecies, spatialSizeUnits)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. spatialSizeUnits; a string representing the spatialSizeUnits to be set

Returns

  1. the SBML Species structure with the new value for the spatialSizeUnits attribute

SBMLSpecies = Species_setSpeciesType(SBMLSpecies, speciesType)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. speciesType; a string representing the speciesType to be set

Returns

  1. the SBML Species structure with the new value for the speciesType attribute

SBMLSpecies = Species_setSubstanceUnits(SBMLSpecies, substanceUnits)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. substanceUnits; a string representing the substanceUnits to be set

Returns

  1. the SBML Species structure with the new value for the substanceUnits attribute

SBMLSpecies = Species_setUnits(SBMLSpecies, units)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. units; a string representing the units to be set

Returns

  1. the SBML Species structure with the new value for the units attribute

SBMLSpecies = Species_unsetCharge(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the charge attribute unset

SBMLSpecies = Species_unsetCompartment(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the compartment attribute unset

SBMLSpecies = Species_unsetConversionFactor(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the conversionFactor attribute unset

SBMLSpecies = Species_unsetId(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the id attribute unset

SBMLSpecies = Species_unsetInitialAmount(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the initialAmount attribute unset

SBMLSpecies = Species_unsetInitialConcentration(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the initialConcentration attribute unset

SBMLSpecies = Species_unsetMetaid(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the metaid attribute unset

SBMLSpecies = Species_unsetName(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the name attribute unset

SBMLSpecies = Species_unsetSBOTerm(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the sboTerm attribute unset

SBMLSpecies = Species_unsetSpatialSizeUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the spatialSizeUnits attribute unset

SBMLSpecies = Species_unsetSpeciesType(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the speciesType attribute unset

SBMLSpecies = Species_unsetSubstanceUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the substanceUnits attribute unset

SBMLSpecies = Species_unsetUnits(SBMLSpecies)

Takes

  1. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Species structure with the units attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/rule.html0000644000000000000000000000504211626400656021160 0ustar rootroot

MATLABSBMLSTRUCTURE_FUNCTIONS\RULE

The functions allow users to create and work with the SBML Rule structure.

Function are:


Rule = Rule_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Rule structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


formula = Rule_getFormula(SBMLRule)

Takes

  1. SBMLRule, an SBML Rule structure

Returns

  1. the value of the formula attribute

sboTerm = Rule_getSBOTerm(SBMLRule)

Takes

  1. SBMLRule, an SBML Rule structure

Returns

  1. the value of the sboTerm attribute

value = Rule_isSetFormula(SBMLRule)

Takes

  1. SBMLRule, an SBML Rule structure

Returns

  1. value =
    • 1 if the formula attribute is set
    • 0 otherwise

value = Rule_isSetSBOTerm(SBMLRule)

Takes

  1. SBMLRule, an SBML Rule structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLRule = Rule_setFormula(SBMLRule, formula)

Takes

  1. SBMLRule, an SBML Rule structure
  2. formula; a string representing the formula to be set

Returns

  1. the SBML Rule structure with the new value for the formula attribute

SBMLRule = Rule_setSBOTerm(SBMLRule, sboTerm)

Takes

  1. SBMLRule, an SBML Rule structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Rule structure with the new value for the sboTerm attribute

SBMLRule = Rule_unsetFormula(SBMLRule)

Takes

  1. SBMLRule, an SBML Rule structure

Returns

  1. the SBML Rule structure with the formula attribute unset

SBMLRule = Rule_unsetSBOTerm(SBMLRule)

Takes

  1. SBMLRule, an SBML Rule structure

Returns

  1. the SBML Rule structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/reaction.html0000644000000000000000000003336211626400656022023 0ustar rootroot

MATLABSBMLSTRUCTURE_FUNCTIONS\REACTION

The functions allow users to create and work with the SBML Reaction structure.

Function are:


SBMLReaction = Reaction_addModifier(SBMLReaction, SBMLModifier)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. SBMLModifier, an SBML Modifier structure

Returns

  1. the SBML Reaction structure with the SBML Modifier structure added

SBMLReaction = Reaction_addProduct(SBMLReaction, SBMLProduct)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. SBMLProduct, an SBML Product structure

Returns

  1. the SBML Reaction structure with the SBML Product structure added

SBMLReaction = Reaction_addReactant(SBMLReaction, SBMLReactant)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. SBMLReactant, an SBML Reactant structure

Returns

  1. the SBML Reaction structure with the SBML Reactant structure added

Reaction = Reaction_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Reaction structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


SBMLReaction = Reaction_createKineticLaw(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with a new SBML KineticLaw structure added

SBMLReaction = Reaction_createModifier(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with a new SBML ModifierSpeciesReference structure added

SBMLReaction = Reaction_createProduct(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with a new SBML SpeciesReference structure added

SBMLReaction = Reaction_createReactant(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with a new SBML SpeciesReference structure added

compartment = Reaction_getCompartment(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the value of the compartment attribute

fast = Reaction_getFast(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the value of the fast attribute

id = Reaction_getId(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the value of the id attribute

kineticLaw = Reaction_getKineticLaw(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML KineticLaw structure

modifier = Reaction_getListOfModifiers(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. an array of the modifier structures

product = Reaction_getListOfProducts(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. an array of the product structures

reactant = Reaction_getListOfReactants(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. an array of the reactant structures

metaid = Reaction_getMetaid(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the value of the metaid attribute

modifier = Reaction_getModifier(SBMLReaction, index)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. index, an integer representing the index of SBML Modifier structure

Returns

  1. the SBML Modifier structure at the indexed position

modifier = Reaction_getModifierById(SBMLReaction, id)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. id; a string representing the id of SBML Modifier structure

Returns

  1. the SBML Modifier structure that has this id

name = Reaction_getName(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the value of the name attribute

num = Reaction_getNumModifiers(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the number of SBML Modifier structures present in the Reaction

num = Reaction_getNumProducts(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the number of SBML Product structures present in the Reaction

num = Reaction_getNumReactants(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the number of SBML Reactant structures present in the Reaction

product = Reaction_getProduct(SBMLReaction, index)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. index, an integer representing the index of SBML Product structure

Returns

  1. the SBML Product structure at the indexed position

product = Reaction_getProductById(SBMLReaction, id)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. id; a string representing the id of SBML Product structure

Returns

  1. the SBML Product structure that has this id

reactant = Reaction_getReactant(SBMLReaction, index)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. index, an integer representing the index of SBML Reactant structure

Returns

  1. the SBML Reactant structure at the indexed position

reactant = Reaction_getReactantById(SBMLReaction, id)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. id; a string representing the id of SBML Reactant structure

Returns

  1. the SBML Reactant structure that has this id

reversible = Reaction_getReversible(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the value of the reversible attribute

sboTerm = Reaction_getSBOTerm(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the value of the sboTerm attribute

value = Reaction_isSetCompartment(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. value =
    • 1 if the compartment attribute is set
    • 0 otherwise

value = Reaction_isSetFast(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. value =
    • 1 if the fast attribute is set
    • 0 otherwise

value = Reaction_isSetId(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = Reaction_isSetKineticLaw(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. value =
    • 1 if the kineticLaw structure is set
    • 0 otherwise

value = Reaction_isSetMetaid(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Reaction_isSetName(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = Reaction_isSetReversible(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. value =
    • 1 if the reversible attribute is set
    • 0 otherwise

value = Reaction_isSetSBOTerm(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLReaction = Reaction_setCompartment(SBMLReaction, compartment)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. compartment; a string representing the compartment to be set

Returns

  1. the SBML Reaction structure with the new value for the compartment attribute

SBMLReaction = Reaction_setFast(SBMLReaction, fast)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. fast, an integer (0/1) representing the value of fast to be set

Returns

  1. the SBML Reaction structure with the new value for the fast attribute

SBMLReaction = Reaction_setId(SBMLReaction, id)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. id; a string representing the id to be set

Returns

  1. the SBML Reaction structure with the new value for the id attribute

SBMLReaction = Reaction_setKineticLaw(SBMLReaction, SBMLKineticLaw)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the SBML Reaction structure with the new value for the kineticLaw field

SBMLReaction = Reaction_setMetaid(SBMLReaction, metaid)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Reaction structure with the new value for the metaid attribute

SBMLReaction = Reaction_setName(SBMLReaction, name)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. name; a string representing the name to be set

Returns

  1. the SBML Reaction structure with the new value for the name attribute

SBMLReaction = Reaction_setReversible(SBMLReaction, reversible)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. reversible, an integer (0/1) representing the value of reversible to be set

Returns

  1. the SBML Reaction structure with the new value for the reversible attribute

SBMLReaction = Reaction_setSBOTerm(SBMLReaction, sboTerm)

Takes

  1. SBMLReaction, an SBML Reaction structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Reaction structure with the new value for the sboTerm attribute

SBMLReaction = Reaction_unsetCompartment(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with the compartment attribute unset

SBMLReaction = Reaction_unsetFast(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with the fast attribute unset

SBMLReaction = Reaction_unsetId(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with the id attribute unset

SBMLReaction = Reaction_unsetKineticLaw(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with the kineticLaw field unset

SBMLReaction = Reaction_unsetMetaid(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with the metaid attribute unset

SBMLReaction = Reaction_unsetName(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with the name attribute unset

SBMLReaction = Reaction_unsetReversible(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with the reversible attribute unset

SBMLReaction = Reaction_unsetSBOTerm(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Reaction structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/rateRule.html0000644000000000000000000001146411611210762021770 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\RATERULE

The functions allow users to create and work with the SBML RateRule structure.

Function are:


RateRule = RateRule_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML RateRule structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


formula = RateRule_getFormula(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. the value of the formula attribute

metaid = RateRule_getMetaid(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. the value of the metaid attribute

sboTerm = RateRule_getSBOTerm(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. the value of the sboTerm attribute

variable = RateRule_getVariable(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. the value of the variable attribute

value = RateRule_isSetFormula(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. value =
    • 1 if the formula attribute is set
    • 0 otherwise

value = RateRule_isSetMetaid(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = RateRule_isSetSBOTerm(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = RateRule_isSetVariable(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. value =
    • 1 if the variable attribute is set
    • 0 otherwise

SBMLRateRule = RateRule_setFormula(SBMLRateRule, formula)

Takes

  1. SBMLRateRule, an SBML RateRule structure
  2. formula; a string representing the formula to be set

Returns

  1. the SBML RateRule structure with the new value for the formula attribute

SBMLRateRule = RateRule_setMetaid(SBMLRateRule, metaid)

Takes

  1. SBMLRateRule, an SBML RateRule structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML RateRule structure with the new value for the metaid attribute

SBMLRateRule = RateRule_setSBOTerm(SBMLRateRule, sboTerm)

Takes

  1. SBMLRateRule, an SBML RateRule structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML RateRule structure with the new value for the sboTerm attribute

SBMLRateRule = RateRule_setVariable(SBMLRateRule, variable)

Takes

  1. SBMLRateRule, an SBML RateRule structure
  2. variable; a string representing the variable to be set

Returns

  1. the SBML RateRule structure with the new value for the variable attribute

SBMLRateRule = RateRule_unsetFormula(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. the SBML RateRule structure with the formula attribute unset

SBMLRateRule = RateRule_unsetMetaid(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. the SBML RateRule structure with the metaid attribute unset

SBMLRateRule = RateRule_unsetSBOTerm(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. the SBML RateRule structure with the sboTerm attribute unset

SBMLRateRule = RateRule_unsetVariable(SBMLRateRule)

Takes

  1. SBMLRateRule, an SBML RateRule structure

Returns

  1. the SBML RateRule structure with the variable attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/priority.html0000644000000000000000000000741611611210760022066 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\PRIORITY

The functions allow users to create and work with the SBML Priority structure.

Function are:


Priority = Priority_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Priority structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


math = Priority_getMath(SBMLPriority)

Takes

  1. SBMLPriority, an SBML Priority structure

Returns

  1. the value of the math attribute

metaid = Priority_getMetaid(SBMLPriority)

Takes

  1. SBMLPriority, an SBML Priority structure

Returns

  1. the value of the metaid attribute

sboTerm = Priority_getSBOTerm(SBMLPriority)

Takes

  1. SBMLPriority, an SBML Priority structure

Returns

  1. the value of the sboTerm attribute

value = Priority_isSetMath(SBMLPriority)

Takes

  1. SBMLPriority, an SBML Priority structure

Returns

  1. value =
    • 1 if the math attribute is set
    • 0 otherwise

value = Priority_isSetMetaid(SBMLPriority)

Takes

  1. SBMLPriority, an SBML Priority structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Priority_isSetSBOTerm(SBMLPriority)

Takes

  1. SBMLPriority, an SBML Priority structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLPriority = Priority_setMath(SBMLPriority, math)

Takes

  1. SBMLPriority, an SBML Priority structure
  2. math; string representing the math expression math to be set

Returns

  1. the SBML Priority structure with the new value for the math attribute

SBMLPriority = Priority_setMetaid(SBMLPriority, metaid)

Takes

  1. SBMLPriority, an SBML Priority structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Priority structure with the new value for the metaid attribute

SBMLPriority = Priority_setSBOTerm(SBMLPriority, sboTerm)

Takes

  1. SBMLPriority, an SBML Priority structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Priority structure with the new value for the sboTerm attribute

SBMLPriority = Priority_unsetMath(SBMLPriority)

Takes

  1. SBMLPriority, an SBML Priority structure

Returns

  1. the SBML Priority structure with the math attribute unset

SBMLPriority = Priority_unsetMetaid(SBMLPriority)

Takes

  1. SBMLPriority, an SBML Priority structure

Returns

  1. the SBML Priority structure with the metaid attribute unset

SBMLPriority = Priority_unsetSBOTerm(SBMLPriority)

Takes

  1. SBMLPriority, an SBML Priority structure

Returns

  1. the SBML Priority structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/parameterRule.html0000644000000000000000000001217311611210760023011 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\PARAMETERRULE

The functions allow users to create and work with the SBML ParameterRule structure.

Function are:


ParameterRule = ParameterRule_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML ParameterRule structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


formula = ParameterRule_getFormula(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. the value of the formula attribute

name = ParameterRule_getName(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. the value of the name attribute

type = ParameterRule_getType(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. the value of the type attribute

units = ParameterRule_getUnits(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. the value of the units attribute

value = ParameterRule_isSetFormula(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. value =
    • 1 if the formula attribute is set
    • 0 otherwise

value = ParameterRule_isSetName(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = ParameterRule_isSetType(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. value =
    • 1 if the type attribute is set
    • 0 otherwise

value = ParameterRule_isSetUnits(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. value =
    • 1 if the units attribute is set
    • 0 otherwise

SBMLParameterRule = ParameterRule_setFormula(SBMLParameterRule, formula)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure
  2. formula; a string representing the formula to be set

Returns

  1. the SBML ParameterRule structure with the new value for the formula attribute

SBMLParameterRule = ParameterRule_setName(SBMLParameterRule, name)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure
  2. name; a string representing the name to be set

Returns

  1. the SBML ParameterRule structure with the new value for the name attribute

SBMLParameterRule = ParameterRule_setType(SBMLParameterRule, type)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure
  2. type; a string representing the type to be set

Returns

  1. the SBML ParameterRule structure with the new value for the type attribute

SBMLParameterRule = ParameterRule_setUnits(SBMLParameterRule, units)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure
  2. units; a string representing the units to be set

Returns

  1. the SBML ParameterRule structure with the new value for the units attribute

SBMLParameterRule = ParameterRule_unsetFormula(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. the SBML ParameterRule structure with the formula attribute unset

SBMLParameterRule = ParameterRule_unsetName(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. the SBML ParameterRule structure with the name attribute unset

SBMLParameterRule = ParameterRule_unsetType(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. the SBML ParameterRule structure with the type attribute unset

SBMLParameterRule = ParameterRule_unsetUnits(SBMLParameterRule)

Takes

  1. SBMLParameterRule, an SBML ParameterRule structure

Returns

  1. the SBML ParameterRule structure with the units attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/parameter.html0000644000000000000000000003002711703262406022165 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\PARAMETER

The functions allow users to create and work with the SBML Parameter structure.

Function are:


Parameter = Parameter_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Parameter structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


constant = Parameter_getConstant(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the value of the constant attribute

id = Parameter_getId(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the value of the id attribute

metaid = Parameter_getMetaid(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the value of the metaid attribute

name = Parameter_getName(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the value of the name attribute

sboTerm = Parameter_getSBOTerm(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the value of the sboTerm attribute

units = Parameter_getUnits(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the value of the units attribute

value = Parameter_getValue(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the value of the value attribute

y = Parameter_isAssignedByRateRule(SBMLParameter, SBMLRules)

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - the index of the rateRule used to assigned value to the Parameter - 0 if the Parameter is not assigned by rateRule

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


y = Parameter_isAssignedByRule(SBMLParameter, SBMLRules)

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - the index of the assignmentRule used to assigned value to the Parameter - 0 if the Parameter is not assigned by assignmentRule

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


y = Parameter_isInAlgebraicRule(SBMLParameter, SBMLRules)

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - an array of the indices of any algebraicRules the id of the Parameter appears in - 0 if the Parameter appears in no algebraicRules

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


value = Parameter_isSetId(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = Parameter_isSetMetaid(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Parameter_isSetName(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = Parameter_isSetSBOTerm(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = Parameter_isSetUnits(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. value =
    • 1 if the units attribute is set
    • 0 otherwise

value = Parameter_isSetValue(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. value =
    • 1 if the value attribute is set
    • 0 otherwise

SBMLParameter = Parameter_setConstant(SBMLParameter, constant)

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. constant, an integer (0/1) representing the value of constant to be set

Returns

  1. the SBML Parameter structure with the new value for the constant attribute

SBMLParameter = Parameter_setId(SBMLParameter, id)

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. id; a string representing the id to be set

Returns

  1. the SBML Parameter structure with the new value for the id attribute

SBMLParameter = Parameter_setMetaid(SBMLParameter, metaid)

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Parameter structure with the new value for the metaid attribute

SBMLParameter = Parameter_setName(SBMLParameter, name)

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. name; a string representing the name to be set

Returns

  1. the SBML Parameter structure with the new value for the name attribute

SBMLParameter = Parameter_setSBOTerm(SBMLParameter, sboTerm)

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Parameter structure with the new value for the sboTerm attribute

SBMLParameter = Parameter_setUnits(SBMLParameter, units)

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. units; a string representing the units to be set

Returns

  1. the SBML Parameter structure with the new value for the units attribute

SBMLParameter = Parameter_setValue(SBMLParameter, value)

Takes

  1. SBMLParameter, an SBML Parameter structure
  2. value; number representing the value of value to be set

Returns

  1. the SBML Parameter structure with the new value for the value attribute

SBMLParameter = Parameter_unsetId(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the SBML Parameter structure with the id attribute unset

SBMLParameter = Parameter_unsetMetaid(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the SBML Parameter structure with the metaid attribute unset

SBMLParameter = Parameter_unsetName(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the SBML Parameter structure with the name attribute unset

SBMLParameter = Parameter_unsetSBOTerm(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the SBML Parameter structure with the sboTerm attribute unset

SBMLParameter = Parameter_unsetUnits(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the SBML Parameter structure with the units attribute unset

SBMLParameter = Parameter_unsetValue(SBMLParameter)

Takes

  1. SBMLParameter, an SBML Parameter structure

Returns

  1. the SBML Parameter structure with the value attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/modifierSpeciesReference.html0000644000000000000000000001653411611210654025141 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\MODIFIERSPECIESREFERENCE

The functions allow users to create and work with the SBML ModifierSpeciesReference structure.

Function are:


ModifierSpeciesReference = ModifierSpeciesReference_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML ModifierSpeciesReference structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


id = ModifierSpeciesReference_getId(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. the value of the id attribute

metaid = ModifierSpeciesReference_getMetaid(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. the value of the metaid attribute

name = ModifierSpeciesReference_getName(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. the value of the name attribute

sboTerm = ModifierSpeciesReference_getSBOTerm(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. the value of the sboTerm attribute

species = ModifierSpeciesReference_getSpecies(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. the value of the species attribute

value = ModifierSpeciesReference_isSetId(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = ModifierSpeciesReference_isSetMetaid(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = ModifierSpeciesReference_isSetName(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = ModifierSpeciesReference_isSetSBOTerm(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = ModifierSpeciesReference_isSetSpecies(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. value =
    • 1 if the species attribute is set
    • 0 otherwise

SBMLModifierSpeciesReference = ModifierSpeciesReference_setId(SBMLModifierSpeciesReference, id)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure
  2. id; a string representing the id to be set

Returns

  1. the SBML ModifierSpeciesReference structure with the new value for the id attribute

SBMLModifierSpeciesReference = ModifierSpeciesReference_setMetaid(SBMLModifierSpeciesReference, metaid)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML ModifierSpeciesReference structure with the new value for the metaid attribute

SBMLModifierSpeciesReference = ModifierSpeciesReference_setName(SBMLModifierSpeciesReference, name)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure
  2. name; a string representing the name to be set

Returns

  1. the SBML ModifierSpeciesReference structure with the new value for the name attribute

SBMLModifierSpeciesReference = ModifierSpeciesReference_setSBOTerm(SBMLModifierSpeciesReference, sboTerm)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML ModifierSpeciesReference structure with the new value for the sboTerm attribute

SBMLModifierSpeciesReference = ModifierSpeciesReference_setSpecies(SBMLModifierSpeciesReference, species)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure
  2. species; a string representing the species to be set

Returns

  1. the SBML ModifierSpeciesReference structure with the new value for the species attribute

SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetId(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. the SBML ModifierSpeciesReference structure with the id attribute unset

SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetMetaid(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. the SBML ModifierSpeciesReference structure with the metaid attribute unset

SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetName(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. the SBML ModifierSpeciesReference structure with the name attribute unset

SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetSBOTerm(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. the SBML ModifierSpeciesReference structure with the sboTerm attribute unset

SBMLModifierSpeciesReference = ModifierSpeciesReference_unsetSpecies(SBMLModifierSpeciesReference)

Takes

  1. SBMLModifierSpeciesReference, an SBML ModifierSpeciesReference structure

Returns

  1. the SBML ModifierSpeciesReference structure with the species attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/model.html0000644000000000000000000010236511660457476021331 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\MODEL

The functions allow users to create and work with the SBML Model structure.

Function are:


SBMLModel = Model_addCompartment(SBMLModel, SBMLCompartment)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Model structure with the SBML Compartment structure added

SBMLModel = Model_addCompartmentType(SBMLModel, SBMLCompartmentType)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. the SBML Model structure with the SBML CompartmentType structure added

SBMLModel = Model_addConstraint(SBMLModel, SBMLConstraint)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLConstraint, an SBML Constraint structure

Returns

  1. the SBML Model structure with the SBML Constraint structure added

SBMLModel = Model_addEvent(SBMLModel, SBMLEvent)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Model structure with the SBML Event structure added

SBMLModel = Model_addFunctionDefinition(SBMLModel, SBMLFunctionDefinition)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the SBML Model structure with the SBML FunctionDefinition structure added

SBMLModel = Model_addInitialAssignment(SBMLModel, SBMLInitialAssignment)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. the SBML Model structure with the SBML InitialAssignment structure added

SBMLModel = Model_addParameter(SBMLModel, SBMLParameter)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLParameter, an SBML Parameter structure

Returns

  1. the SBML Model structure with the SBML Parameter structure added

SBMLModel = Model_addReaction(SBMLModel, SBMLReaction)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLReaction, an SBML Reaction structure

Returns

  1. the SBML Model structure with the SBML Reaction structure added

SBMLModel = Model_addRule(SBMLModel, SBMLRule)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLRule, an SBML Rule structure

Returns

  1. the SBML Model structure with the SBML Rule structure added

SBMLModel = Model_addSpecies(SBMLModel, SBMLSpecies)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLSpecies, an SBML Species structure

Returns

  1. the SBML Model structure with the SBML Species structure added

SBMLModel = Model_addSpeciesType(SBMLModel, SBMLSpeciesType)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLSpeciesType, an SBML SpeciesType structure

Returns

  1. the SBML Model structure with the SBML SpeciesType structure added

SBMLModel = Model_addUnitDefinition(SBMLModel, SBMLUnitDefinition)

Takes

  1. SBMLModel, an SBML Model structure
  2. SBMLUnitDefinition, an SBML UnitDefinition structure

Returns

  1. the SBML Model structure with the SBML UnitDefinition structure added

Model = Model_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Model structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


SBMLModel = Model_createCompartment(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML Compartment structure added

SBMLModel = Model_createCompartmentType(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML CompartmentType structure added

SBMLModel = Model_createConstraint(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML Constraint structure added

SBMLModel = Model_createEvent(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML Event structure added

SBMLModel = Model_createFunctionDefinition(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML FunctionDefinition structure added

SBMLModel = Model_createInitialAssignment(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML InitialAssignment structure added

SBMLModel = Model_createParameter(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML Parameter structure added

SBMLModel = Model_createReaction(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML Reaction structure added

SBMLModel = Model_createRule(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML Rule structure added

SBMLModel = Model_createSpecies(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML Species structure added

SBMLModel = Model_createSpeciesType(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML SpeciesType structure added

SBMLModel = Model_createUnitDefinition(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the SBML UnitDefinition structure added

areaUnits = Model_getAreaUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the areaUnits attribute

assignmentRule = Model_getAssignmentRuleByVariable(SBMLModel, variable)

Takes

  1. SBMLModel, an SBML Model structure
  2. variable; a string representing the variable of SBML AssignmentRule structure

Returns

  1. the SBML AssignmentRule structure that has this variable

compartment = Model_getCompartment(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML Compartment structure

Returns

  1. the SBML Compartment structure at the indexed position

compartment = Model_getCompartmentById(SBMLModel, id)

Takes

  1. SBMLModel, an SBML Model structure
  2. id; a string representing the id of SBML Compartment structure

Returns

  1. the SBML Compartment structure that has this id

compartmentType = Model_getCompartmentType(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML CompartmentType structure

Returns

  1. the SBML CompartmentType structure at the indexed position

compartmentType = Model_getCompartmentTypeById(SBMLModel, id)

Takes

  1. SBMLModel, an SBML Model structure
  2. id; a string representing the id of SBML CompartmentType structure

Returns

  1. the SBML CompartmentType structure that has this id

constraint = Model_getConstraint(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML Constraint structure

Returns

  1. the SBML Constraint structure at the indexed position

conversionFactor = Model_getConversionFactor(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the conversionFactor attribute

event = Model_getEvent(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML Event structure

Returns

  1. the SBML Event structure at the indexed position

event = Model_getEventById(SBMLModel, id)

Takes

  1. SBMLModel, an SBML Model structure
  2. id; a string representing the id of SBML Event structure

Returns

  1. the SBML Event structure that has this id

extentUnits = Model_getExtentUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the extentUnits attribute

functionDefinition = Model_getFunctionDefinition(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML FunctionDefinition structure

Returns

  1. the SBML FunctionDefinition structure at the indexed position

functionDefinition = Model_getFunctionDefinitionById(SBMLModel, id)

Takes

  1. SBMLModel, an SBML Model structure
  2. id; a string representing the id of SBML FunctionDefinition structure

Returns

  1. the SBML FunctionDefinition structure that has this id

functionIds = Model_getFunctionIds(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the functionIds attribute

id = Model_getId(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the id attribute

initialAssignment = Model_getInitialAssignment(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML InitialAssignment structure

Returns

  1. the SBML InitialAssignment structure at the indexed position

initialAssignment = Model_getInitialAssignmentBySymbol(SBMLModel, symbol)

Takes

  1. SBMLModel, an SBML Model structure
  2. symbol; a string representing the symbol of SBML InitialAssignment structure

Returns

  1. the SBML InitialAssignment structure that has this symbol

lengthUnits = Model_getLengthUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the lengthUnits attribute

algebraicRule = Model_getListOfAlgebraicRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the algebraicRule structures

assignmentRule = Model_getListOfAssignmentRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the assignmentRule structures

listOf = Model_getListOfByTypecode(SBMLModel, typecode)

Takes

  1. SBMLModel, an SBML Model structure
  2. typecode; a string representing the typecode of SBML ListOf structure

Returns

  1. the SBML ListOf structure that has this typecode

compartmentType = Model_getListOfCompartmentTypes(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the compartmentType structures

compartment = Model_getListOfCompartments(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the compartment structures

constraint = Model_getListOfConstraints(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the constraint structures

event = Model_getListOfEvents(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the event structures

functionDefinition = Model_getListOfFunctionDefinitions(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the functionDefinition structures

initialAssignment = Model_getListOfInitialAssignments(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the initialAssignment structures

parameter = Model_getListOfParameters(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the parameter structures

rateRule = Model_getListOfRateRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the rateRule structures

reaction = Model_getListOfReactions(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the reaction structures

rule = Model_getListOfRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the rule structures

species = Model_getListOfSpecies(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the species structures

speciesType = Model_getListOfSpeciesTypes(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the speciesType structures

species = Model_getListOfSpeciess(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the species structures

unitDefinition = Model_getListOfUnitDefinitions(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of the unitDefinition structures

metaid = Model_getMetaid(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the metaid attribute

name = Model_getName(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the name attribute

num = Model_getNumAlgebraicRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML AlgebraicRule structures present in the Model

num = Model_getNumAssignmentRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML AssignmentRule structures present in the Model

num = Model_getNumCompartmentTypes(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML CompartmentType structures present in the Model

num = Model_getNumCompartments(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML Compartment structures present in the Model

num = Model_getNumConstraints(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML Constraint structures present in the Model

num = Model_getNumEvents(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML Event structures present in the Model

num = Model_getNumFunctionDefinitions(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML FunctionDefinition structures present in the Model

num = Model_getNumInitialAssignments(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML InitialAssignment structures present in the Model

num = Model_getNumParameters(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML Parameter structures present in the Model

num = Model_getNumRateRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML RateRule structures present in the Model

num = Model_getNumReactions(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML Reaction structures present in the Model

num = Model_getNumRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML Rule structures present in the Model

num = Model_getNumSpecies(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML Species structures present in the Model

num = Model_getNumSpeciesTypes(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML SpeciesType structures present in the Model

num = Model_getNumSpeciess(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML Species structures present in the Model

num = Model_getNumUnitDefinitions(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the number of SBML UnitDefinition structures present in the Model

parameter = Model_getParameter(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML Parameter structure

Returns

  1. the SBML Parameter structure at the indexed position

parameter = Model_getParameterById(SBMLModel, id)

Takes

  1. SBMLModel, an SBML Model structure
  2. id; a string representing the id of SBML Parameter structure

Returns

  1. the SBML Parameter structure that has this id

rateRule = Model_getRateRuleByVariable(SBMLModel, variable)

Takes

  1. SBMLModel, an SBML Model structure
  2. variable; a string representing the variable of SBML RateRule structure

Returns

  1. the SBML RateRule structure that has this variable

reaction = Model_getReaction(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML Reaction structure

Returns

  1. the SBML Reaction structure at the indexed position

reaction = Model_getReactionById(SBMLModel, id)

Takes

  1. SBMLModel, an SBML Model structure
  2. id; a string representing the id of SBML Reaction structure

Returns

  1. the SBML Reaction structure that has this id

rule = Model_getRule(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML Rule structure

Returns

  1. the SBML Rule structure at the indexed position

sBMLlevel = ModelgetSBML_level(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the sBML_level attribute

sBMLversion = ModelgetSBML_version(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the sBML_version attribute

sboTerm = Model_getSBOTerm(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the sboTerm attribute

species = Model_getSpecies(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML Species structure

Returns

  1. the SBML Species structure at the indexed position

species = Model_getSpeciesById(SBMLModel, id)

Takes

  1. SBMLModel, an SBML Model structure
  2. id; a string representing the id of SBML Species structure

Returns

  1. the SBML Species structure that has this id

speciesType = Model_getSpeciesType(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML SpeciesType structure

Returns

  1. the SBML SpeciesType structure at the indexed position

speciesType = Model_getSpeciesTypeById(SBMLModel, id)

Takes

  1. SBMLModel, an SBML Model structure
  2. id; a string representing the id of SBML SpeciesType structure

Returns

  1. the SBML SpeciesType structure that has this id

substanceUnits = Model_getSubstanceUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the substanceUnits attribute

timeUnits = Model_getTimeUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the timeUnits attribute

unitDefinition = Model_getUnitDefinition(SBMLModel, index)

Takes

  1. SBMLModel, an SBML Model structure
  2. index, an integer representing the index of SBML UnitDefinition structure

Returns

  1. the SBML UnitDefinition structure at the indexed position

unitDefinition = Model_getUnitDefinitionById(SBMLModel, id)

Takes

  1. SBMLModel, an SBML Model structure
  2. id; a string representing the id of SBML UnitDefinition structure

Returns

  1. the SBML UnitDefinition structure that has this id

volumeUnits = Model_getVolumeUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the value of the volumeUnits attribute

value = Model_isSetAreaUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the areaUnits attribute is set
    • 0 otherwise

value = Model_isSetConversionFactor(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the conversionFactor attribute is set
    • 0 otherwise

value = Model_isSetExtentUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the extentUnits attribute is set
    • 0 otherwise

value = Model_isSetId(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = Model_isSetLengthUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the lengthUnits attribute is set
    • 0 otherwise

value = Model_isSetMetaid(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Model_isSetName(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = ModelisSetSBMLlevel(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the sBML_level attribute is set
    • 0 otherwise

value = ModelisSetSBMLversion(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the sBML_version attribute is set
    • 0 otherwise

value = Model_isSetSBOTerm(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = Model_isSetSubstanceUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the substanceUnits attribute is set
    • 0 otherwise

value = Model_isSetTimeUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the timeUnits attribute is set
    • 0 otherwise

value = Model_isSetVolumeUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. value =
    • 1 if the volumeUnits attribute is set
    • 0 otherwise

SBMLModel = Model_setAreaUnits(SBMLModel, areaUnits)

Takes

  1. SBMLModel, an SBML Model structure
  2. areaUnits; a string representing the areaUnits to be set

Returns

  1. the SBML Model structure with the new value for the areaUnits attribute

SBMLModel = Model_setConversionFactor(SBMLModel, conversionFactor)

Takes

  1. SBMLModel, an SBML Model structure
  2. conversionFactor; a string representing the conversionFactor to be set

Returns

  1. the SBML Model structure with the new value for the conversionFactor attribute

SBMLModel = Model_setExtentUnits(SBMLModel, extentUnits)

Takes

  1. SBMLModel, an SBML Model structure
  2. extentUnits; a string representing the extentUnits to be set

Returns

  1. the SBML Model structure with the new value for the extentUnits attribute

SBMLModel = Model_setId(SBMLModel, id)

Takes

  1. SBMLModel, an SBML Model structure
  2. id; a string representing the id to be set

Returns

  1. the SBML Model structure with the new value for the id attribute

SBMLModel = Model_setLengthUnits(SBMLModel, lengthUnits)

Takes

  1. SBMLModel, an SBML Model structure
  2. lengthUnits; a string representing the lengthUnits to be set

Returns

  1. the SBML Model structure with the new value for the lengthUnits attribute

SBMLModel = Model_setMetaid(SBMLModel, metaid)

Takes

  1. SBMLModel, an SBML Model structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Model structure with the new value for the metaid attribute

SBMLModel = Model_setName(SBMLModel, name)

Takes

  1. SBMLModel, an SBML Model structure
  2. name; a string representing the name to be set

Returns

  1. the SBML Model structure with the new value for the name attribute

SBMLModel = Model_setSBOTerm(SBMLModel, sboTerm)

Takes

  1. SBMLModel, an SBML Model structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Model structure with the new value for the sboTerm attribute

SBMLModel = Model_setSubstanceUnits(SBMLModel, substanceUnits)

Takes

  1. SBMLModel, an SBML Model structure
  2. substanceUnits; a string representing the substanceUnits to be set

Returns

  1. the SBML Model structure with the new value for the substanceUnits attribute

SBMLModel = Model_setTimeUnits(SBMLModel, timeUnits)

Takes

  1. SBMLModel, an SBML Model structure
  2. timeUnits; a string representing the timeUnits to be set

Returns

  1. the SBML Model structure with the new value for the timeUnits attribute

SBMLModel = Model_setVolumeUnits(SBMLModel, volumeUnits)

Takes

  1. SBMLModel, an SBML Model structure
  2. volumeUnits; a string representing the volumeUnits to be set

Returns

  1. the SBML Model structure with the new value for the volumeUnits attribute

SBMLModel = Model_unsetAreaUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the areaUnits attribute unset

SBMLModel = Model_unsetConversionFactor(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the conversionFactor attribute unset

SBMLModel = Model_unsetExtentUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the extentUnits attribute unset

SBMLModel = Model_unsetId(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the id attribute unset

SBMLModel = Model_unsetLengthUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the lengthUnits attribute unset

SBMLModel = Model_unsetMetaid(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the metaid attribute unset

SBMLModel = Model_unsetName(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the name attribute unset

SBMLModel = Model_unsetSBOTerm(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the sboTerm attribute unset

SBMLModel = Model_unsetSubstanceUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the substanceUnits attribute unset

SBMLModel = Model_unsetTimeUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the timeUnits attribute unset

SBMLModel = Model_unsetVolumeUnits(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the SBML Model structure with the volumeUnits attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/localParameter.html0000644000000000000000000001662511611210654023144 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\LOCALPARAMETER

The functions allow users to create and work with the SBML LocalParameter structure.

Function are:


LocalParameter = LocalParameter_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML LocalParameter structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


id = LocalParameter_getId(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the value of the id attribute

metaid = LocalParameter_getMetaid(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the value of the metaid attribute

name = LocalParameter_getName(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the value of the name attribute

sboTerm = LocalParameter_getSBOTerm(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the value of the sboTerm attribute

units = LocalParameter_getUnits(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the value of the units attribute

value = LocalParameter_getValue(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the value of the value attribute

value = LocalParameter_isSetId(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = LocalParameter_isSetMetaid(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = LocalParameter_isSetName(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = LocalParameter_isSetSBOTerm(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = LocalParameter_isSetUnits(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. value =
    • 1 if the units attribute is set
    • 0 otherwise

value = LocalParameter_isSetValue(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. value =
    • 1 if the value attribute is set
    • 0 otherwise

SBMLLocalParameter = LocalParameter_setId(SBMLLocalParameter, id)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure
  2. id; a string representing the id to be set

Returns

  1. the SBML LocalParameter structure with the new value for the id attribute

SBMLLocalParameter = LocalParameter_setMetaid(SBMLLocalParameter, metaid)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML LocalParameter structure with the new value for the metaid attribute

SBMLLocalParameter = LocalParameter_setName(SBMLLocalParameter, name)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure
  2. name; a string representing the name to be set

Returns

  1. the SBML LocalParameter structure with the new value for the name attribute

SBMLLocalParameter = LocalParameter_setSBOTerm(SBMLLocalParameter, sboTerm)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML LocalParameter structure with the new value for the sboTerm attribute

SBMLLocalParameter = LocalParameter_setUnits(SBMLLocalParameter, units)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure
  2. units; a string representing the units to be set

Returns

  1. the SBML LocalParameter structure with the new value for the units attribute

SBMLLocalParameter = LocalParameter_setValue(SBMLLocalParameter, value)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure
  2. value; number representing the value of value to be set

Returns

  1. the SBML LocalParameter structure with the new value for the value attribute

SBMLLocalParameter = LocalParameter_unsetId(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the SBML LocalParameter structure with the id attribute unset

SBMLLocalParameter = LocalParameter_unsetMetaid(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the SBML LocalParameter structure with the metaid attribute unset

SBMLLocalParameter = LocalParameter_unsetName(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the SBML LocalParameter structure with the name attribute unset

SBMLLocalParameter = LocalParameter_unsetSBOTerm(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the SBML LocalParameter structure with the sboTerm attribute unset

SBMLLocalParameter = LocalParameter_unsetUnits(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the SBML LocalParameter structure with the units attribute unset

SBMLLocalParameter = LocalParameter_unsetValue(SBMLLocalParameter)

Takes

  1. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the SBML LocalParameter structure with the value attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/kineticLaw.html0000644000000000000000000002512611626400656022310 0ustar rootroot

MATLABSBMLSTRUCTURE_FUNCTIONS\KINETICLAW

The functions allow users to create and work with the SBML KineticLaw structure.

Function are:


SBMLKineticLaw = KineticLaw_addLocalParameter(SBMLKineticLaw, SBMLLocalParameter)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. SBMLLocalParameter, an SBML LocalParameter structure

Returns

  1. the SBML KineticLaw structure with the SBML LocalParameter structure added

SBMLKineticLaw = KineticLaw_addParameter(SBMLKineticLaw, SBMLParameter)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. SBMLParameter, an SBML Parameter structure

Returns

  1. the SBML KineticLaw structure with the SBML Parameter structure added

KineticLaw = KineticLaw_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML KineticLaw structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


SBMLKineticLaw = KineticLaw_createLocalParameter(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the SBML KineticLaw structure with a new SBML LocalParameter structure added

SBMLKineticLaw = KineticLaw_createParameter(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the SBML KineticLaw structure with a new SBML Parameter structure added

formula = KineticLaw_getFormula(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the value of the formula attribute

localParameter = KineticLaw_getListOfLocalParameters(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. an array of the localParameter structures

parameter = KineticLaw_getListOfParameters(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. an array of the parameter structures

localParameter = KineticLaw_getLocalParameter(SBMLKineticLaw, index)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. index, an integer representing the index of SBML LocalParameter structure

Returns

  1. the SBML LocalParameter structure at the indexed position

math = KineticLaw_getMath(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the value of the math attribute

metaid = KineticLaw_getMetaid(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the value of the metaid attribute

num = KineticLaw_getNumLocalParameters(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the number of SBML LocalParameter structures present in the KineticLaw

num = KineticLaw_getNumParameters(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the number of SBML Parameter structures present in the KineticLaw

parameter = KineticLaw_getParameter(SBMLKineticLaw, index)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. index, an integer representing the index of SBML Parameter structure

Returns

  1. the SBML Parameter structure at the indexed position

sboTerm = KineticLaw_getSBOTerm(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the value of the sboTerm attribute

substanceUnits = KineticLaw_getSubstanceUnits(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the value of the substanceUnits attribute

timeUnits = KineticLaw_getTimeUnits(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the value of the timeUnits attribute

value = KineticLaw_isSetFormula(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. value =
    • 1 if the formula attribute is set
    • 0 otherwise

value = KineticLaw_isSetMath(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. value =
    • 1 if the math attribute is set
    • 0 otherwise

value = KineticLaw_isSetMetaid(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = KineticLaw_isSetSBOTerm(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = KineticLaw_isSetSubstanceUnits(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. value =
    • 1 if the substanceUnits attribute is set
    • 0 otherwise

value = KineticLaw_isSetTimeUnits(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. value =
    • 1 if the timeUnits attribute is set
    • 0 otherwise

SBMLKineticLaw = KineticLaw_setFormula(SBMLKineticLaw, formula)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. formula; a string representing the formula to be set

Returns

  1. the SBML KineticLaw structure with the new value for the formula attribute

SBMLKineticLaw = KineticLaw_setFormulaFromMath(SBMLKineticLaw, formulaFromMath)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. formulaFromMath; a string representing the formulaFromMath to be set

Returns

  1. the SBML KineticLaw structure with the new value for the formulaFromMath attribute

SBMLKineticLaw = KineticLaw_setMath(SBMLKineticLaw, math)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. math; string representing the math expression math to be set

Returns

  1. the SBML KineticLaw structure with the new value for the math attribute

SBMLKineticLaw = KineticLaw_setMathFromFormula(SBMLKineticLaw, mathFromFormula)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. mathFromFormula; string representing the math expression mathFromFormula to be set

Returns

  1. the SBML KineticLaw structure with the new value for the mathFromFormula attribute

SBMLKineticLaw = KineticLaw_setMetaid(SBMLKineticLaw, metaid)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML KineticLaw structure with the new value for the metaid attribute

SBMLKineticLaw = KineticLaw_setSBOTerm(SBMLKineticLaw, sboTerm)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML KineticLaw structure with the new value for the sboTerm attribute

SBMLKineticLaw = KineticLaw_setSubstanceUnits(SBMLKineticLaw, substanceUnits)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. substanceUnits; a string representing the substanceUnits to be set

Returns

  1. the SBML KineticLaw structure with the new value for the substanceUnits attribute

SBMLKineticLaw = KineticLaw_setTimeUnits(SBMLKineticLaw, timeUnits)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure
  2. timeUnits; a string representing the timeUnits to be set

Returns

  1. the SBML KineticLaw structure with the new value for the timeUnits attribute

SBMLKineticLaw = KineticLaw_unsetFormula(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the SBML KineticLaw structure with the formula attribute unset

SBMLKineticLaw = KineticLaw_unsetMath(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the SBML KineticLaw structure with the math attribute unset

SBMLKineticLaw = KineticLaw_unsetMetaid(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the SBML KineticLaw structure with the metaid attribute unset

SBMLKineticLaw = KineticLaw_unsetSBOTerm(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the SBML KineticLaw structure with the sboTerm attribute unset

SBMLKineticLaw = KineticLaw_unsetSubstanceUnits(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the SBML KineticLaw structure with the substanceUnits attribute unset

SBMLKineticLaw = KineticLaw_unsetTimeUnits(SBMLKineticLaw)

Takes

  1. SBMLKineticLaw, an SBML KineticLaw structure

Returns

  1. the SBML KineticLaw structure with the timeUnits attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/initialAssignment.html0000644000000000000000000001300311611210654023656 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\INITIALASSIGNMENT

The functions allow users to create and work with the SBML InitialAssignment structure.

Function are:


InitialAssignment = InitialAssignment_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML InitialAssignment structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


math = InitialAssignment_getMath(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. the value of the math attribute

metaid = InitialAssignment_getMetaid(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. the value of the metaid attribute

sboTerm = InitialAssignment_getSBOTerm(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. the value of the sboTerm attribute

symbol = InitialAssignment_getSymbol(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. the value of the symbol attribute

value = InitialAssignment_isSetMath(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. value =
    • 1 if the math attribute is set
    • 0 otherwise

value = InitialAssignment_isSetMetaid(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = InitialAssignment_isSetSBOTerm(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = InitialAssignment_isSetSymbol(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. value =
    • 1 if the symbol attribute is set
    • 0 otherwise

SBMLInitialAssignment = InitialAssignment_setMath(SBMLInitialAssignment, math)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure
  2. math; string representing the math expression math to be set

Returns

  1. the SBML InitialAssignment structure with the new value for the math attribute

SBMLInitialAssignment = InitialAssignment_setMetaid(SBMLInitialAssignment, metaid)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML InitialAssignment structure with the new value for the metaid attribute

SBMLInitialAssignment = InitialAssignment_setSBOTerm(SBMLInitialAssignment, sboTerm)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML InitialAssignment structure with the new value for the sboTerm attribute

SBMLInitialAssignment = InitialAssignment_setSymbol(SBMLInitialAssignment, symbol)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure
  2. symbol; a string representing the symbol to be set

Returns

  1. the SBML InitialAssignment structure with the new value for the symbol attribute

SBMLInitialAssignment = InitialAssignment_unsetMath(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. the SBML InitialAssignment structure with the math attribute unset

SBMLInitialAssignment = InitialAssignment_unsetMetaid(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. the SBML InitialAssignment structure with the metaid attribute unset

SBMLInitialAssignment = InitialAssignment_unsetSBOTerm(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. the SBML InitialAssignment structure with the sboTerm attribute unset

SBMLInitialAssignment = InitialAssignment_unsetSymbol(SBMLInitialAssignment)

Takes

  1. SBMLInitialAssignment, an SBML InitialAssignment structure

Returns

  1. the SBML InitialAssignment structure with the symbol attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/functionDefinition.html0000644000000000000000000001532011611210654024036 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\FUNCTIONDEFINITION

The functions allow users to create and work with the SBML FunctionDefinition structure.

Function are:


FunctionDefinition = FunctionDefinition_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML FunctionDefinition structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


id = FunctionDefinition_getId(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the value of the id attribute

math = FunctionDefinition_getMath(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the value of the math attribute

metaid = FunctionDefinition_getMetaid(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the value of the metaid attribute

name = FunctionDefinition_getName(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the value of the name attribute

sboTerm = FunctionDefinition_getSBOTerm(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the value of the sboTerm attribute

value = FunctionDefinition_isSetId(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = FunctionDefinition_isSetMath(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. value =
    • 1 if the math attribute is set
    • 0 otherwise

value = FunctionDefinition_isSetMetaid(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = FunctionDefinition_isSetName(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = FunctionDefinition_isSetSBOTerm(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLFunctionDefinition = FunctionDefinition_setId(SBMLFunctionDefinition, id)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure
  2. id; a string representing the id to be set

Returns

  1. the SBML FunctionDefinition structure with the new value for the id attribute

SBMLFunctionDefinition = FunctionDefinition_setMath(SBMLFunctionDefinition, math)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure
  2. math; string representing the math expression math to be set

Returns

  1. the SBML FunctionDefinition structure with the new value for the math attribute

SBMLFunctionDefinition = FunctionDefinition_setMetaid(SBMLFunctionDefinition, metaid)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML FunctionDefinition structure with the new value for the metaid attribute

SBMLFunctionDefinition = FunctionDefinition_setName(SBMLFunctionDefinition, name)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure
  2. name; a string representing the name to be set

Returns

  1. the SBML FunctionDefinition structure with the new value for the name attribute

SBMLFunctionDefinition = FunctionDefinition_setSBOTerm(SBMLFunctionDefinition, sboTerm)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML FunctionDefinition structure with the new value for the sboTerm attribute

SBMLFunctionDefinition = FunctionDefinition_unsetId(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the SBML FunctionDefinition structure with the id attribute unset

SBMLFunctionDefinition = FunctionDefinition_unsetMath(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the SBML FunctionDefinition structure with the math attribute unset

SBMLFunctionDefinition = FunctionDefinition_unsetMetaid(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the SBML FunctionDefinition structure with the metaid attribute unset

SBMLFunctionDefinition = FunctionDefinition_unsetName(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the SBML FunctionDefinition structure with the name attribute unset

SBMLFunctionDefinition = FunctionDefinition_unsetSBOTerm(SBMLFunctionDefinition)

Takes

  1. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. the SBML FunctionDefinition structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/eventAssignment.html0000644000000000000000000001256111611210654023356 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\EVENTASSIGNMENT

The functions allow users to create and work with the SBML EventAssignment structure.

Function are:


EventAssignment = EventAssignment_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML EventAssignment structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


math = EventAssignment_getMath(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. the value of the math attribute

metaid = EventAssignment_getMetaid(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. the value of the metaid attribute

sboTerm = EventAssignment_getSBOTerm(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. the value of the sboTerm attribute

variable = EventAssignment_getVariable(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. the value of the variable attribute

value = EventAssignment_isSetMath(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. value =
    • 1 if the math attribute is set
    • 0 otherwise

value = EventAssignment_isSetMetaid(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = EventAssignment_isSetSBOTerm(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = EventAssignment_isSetVariable(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. value =
    • 1 if the variable attribute is set
    • 0 otherwise

SBMLEventAssignment = EventAssignment_setMath(SBMLEventAssignment, math)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure
  2. math; string representing the math expression math to be set

Returns

  1. the SBML EventAssignment structure with the new value for the math attribute

SBMLEventAssignment = EventAssignment_setMetaid(SBMLEventAssignment, metaid)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML EventAssignment structure with the new value for the metaid attribute

SBMLEventAssignment = EventAssignment_setSBOTerm(SBMLEventAssignment, sboTerm)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML EventAssignment structure with the new value for the sboTerm attribute

SBMLEventAssignment = EventAssignment_setVariable(SBMLEventAssignment, variable)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure
  2. variable; a string representing the variable to be set

Returns

  1. the SBML EventAssignment structure with the new value for the variable attribute

SBMLEventAssignment = EventAssignment_unsetMath(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. the SBML EventAssignment structure with the math attribute unset

SBMLEventAssignment = EventAssignment_unsetMetaid(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. the SBML EventAssignment structure with the metaid attribute unset

SBMLEventAssignment = EventAssignment_unsetSBOTerm(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. the SBML EventAssignment structure with the sboTerm attribute unset

SBMLEventAssignment = EventAssignment_unsetVariable(SBMLEventAssignment)

Takes

  1. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. the SBML EventAssignment structure with the variable attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/event.html0000644000000000000000000002534611626400656021343 0ustar rootroot

MATLABSBMLSTRUCTURE_FUNCTIONS\EVENT

The functions allow users to create and work with the SBML Event structure.

Function are:


SBMLEvent = Event_addEventAssignment(SBMLEvent, SBMLEventAssignment)

Takes

  1. SBMLEvent, an SBML Event structure
  2. SBMLEventAssignment, an SBML EventAssignment structure

Returns

  1. the SBML Event structure with the SBML EventAssignment structure added

Event = Event_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Event structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


SBMLEvent = Event_createDelay(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with a new SBML Delay structure added

SBMLEvent = Event_acreateEventAssignment(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with a new SBML EventAssignment structure added

SBMLEvent = Event_createPriority(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with a new SBML Priority structure added

SBMLEvent = Event_createTrigger(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with a new SBML Trigger structure added

delay = Event_getDelay(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Delay structure

eventAssignment = Event_getEventAssignment(SBMLEvent, index)

Takes

  1. SBMLEvent, an SBML Event structure
  2. index, an integer representing the index of SBML EventAssignment structure

Returns

  1. the SBML EventAssignment structure at the indexed position

id = Event_getId(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the value of the id attribute

eventAssignment = Event_getListOfEventAssignments(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. an array of the eventAssignment structures

metaid = Event_getMetaid(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the value of the metaid attribute

name = Event_getName(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the value of the name attribute

num = Event_getNumEventAssignments(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the number of SBML EventAssignment structures present in the Event

priority = Event_getPriority(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Priority structure

sboTerm = Event_getSBOTerm(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the value of the sboTerm attribute

timeUnits = Event_getTimeUnits(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the value of the timeUnits attribute

trigger = Event_getTrigger(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Trigger structure

useValuesFromTriggerTime = Event_getUseValuesFromTriggerTime(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the value of the useValuesFromTriggerTime attribute

value = Event_isSetDelay(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. value =
    • 1 if the delay structure is set
    • 0 otherwise

value = Event_isSetId(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = Event_isSetMetaid(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Event_isSetName(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = Event_isSetPriority(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. value =
    • 1 if the priority structure is set
    • 0 otherwise

value = Event_isSetSBOTerm(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = Event_isSetTimeUnits(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. value =
    • 1 if the timeUnits attribute is set
    • 0 otherwise

value = Event_isSetTrigger(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. value =
    • 1 if the trigger structure is set
    • 0 otherwise

SBMLEvent = Event_setDelay(SBMLEvent, SBMLDelay)

Takes

  1. SBMLEvent, an SBML Event structure
  2. SBMLDelay, an SBML Delay structure

Returns

  1. the SBML Event structure with the new value for the delay field

SBMLEvent = Event_setId(SBMLEvent, id)

Takes

  1. SBMLEvent, an SBML Event structure
  2. id; a string representing the id to be set

Returns

  1. the SBML Event structure with the new value for the id attribute

SBMLEvent = Event_setMetaid(SBMLEvent, metaid)

Takes

  1. SBMLEvent, an SBML Event structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Event structure with the new value for the metaid attribute

SBMLEvent = Event_setName(SBMLEvent, name)

Takes

  1. SBMLEvent, an SBML Event structure
  2. name; a string representing the name to be set

Returns

  1. the SBML Event structure with the new value for the name attribute

SBMLEvent = Event_setPriority(SBMLEvent, SBMLPriority)

Takes

  1. SBMLEvent, an SBML Event structure
  2. SBMLPriority, an SBML Priority structure

Returns

  1. the SBML Event structure with the new value for the priority field

SBMLEvent = Event_setSBOTerm(SBMLEvent, sboTerm)

Takes

  1. SBMLEvent, an SBML Event structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Event structure with the new value for the sboTerm attribute

SBMLEvent = Event_setTimeUnits(SBMLEvent, timeUnits)

Takes

  1. SBMLEvent, an SBML Event structure
  2. timeUnits; a string representing the timeUnits to be set

Returns

  1. the SBML Event structure with the new value for the timeUnits attribute

SBMLEvent = Event_setTrigger(SBMLEvent, SBMLTrigger)

Takes

  1. SBMLEvent, an SBML Event structure
  2. SBMLTrigger, an SBML Trigger structure

Returns

  1. the SBML Event structure with the new value for the trigger field

SBMLEvent = Event_setUseValuesFromTriggerTime(SBMLEvent, useValuesFromTriggerTime)

Takes

  1. SBMLEvent, an SBML Event structure
  2. useValuesFromTriggerTime, an integer (0/1) representing the value of useValuesFromTriggerTime to be set

Returns

  1. the SBML Event structure with the new value for the useValuesFromTriggerTime attribute

SBMLEvent = Event_unsetDelay(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with the delay field unset

SBMLEvent = Event_unsetId(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with the id attribute unset

SBMLEvent = Event_unsetMetaid(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with the metaid attribute unset

SBMLEvent = Event_unsetName(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with the name attribute unset

SBMLEvent = Event_unsetPriority(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with the priority field unset

SBMLEvent = Event_unsetSBOTerm(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with the sboTerm attribute unset

SBMLEvent = Event_unsetTimeUnits(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with the timeUnits attribute unset

SBMLEvent = Event_unsetTrigger(SBMLEvent)

Takes

  1. SBMLEvent, an SBML Event structure

Returns

  1. the SBML Event structure with the trigger field unset

SBMLToolbox-4.1.0/docs/structure-functions/delay.html0000644000000000000000000000711311611210542021273 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\DELAY

The functions allow users to create and work with the SBML Delay structure.

Function are:


Delay = Delay_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Delay structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


math = Delay_getMath(SBMLDelay)

Takes

  1. SBMLDelay, an SBML Delay structure

Returns

  1. the value of the math attribute

metaid = Delay_getMetaid(SBMLDelay)

Takes

  1. SBMLDelay, an SBML Delay structure

Returns

  1. the value of the metaid attribute

sboTerm = Delay_getSBOTerm(SBMLDelay)

Takes

  1. SBMLDelay, an SBML Delay structure

Returns

  1. the value of the sboTerm attribute

value = Delay_isSetMath(SBMLDelay)

Takes

  1. SBMLDelay, an SBML Delay structure

Returns

  1. value =
    • 1 if the math attribute is set
    • 0 otherwise

value = Delay_isSetMetaid(SBMLDelay)

Takes

  1. SBMLDelay, an SBML Delay structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Delay_isSetSBOTerm(SBMLDelay)

Takes

  1. SBMLDelay, an SBML Delay structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLDelay = Delay_setMath(SBMLDelay, math)

Takes

  1. SBMLDelay, an SBML Delay structure
  2. math; string representing the math expression math to be set

Returns

  1. the SBML Delay structure with the new value for the math attribute

SBMLDelay = Delay_setMetaid(SBMLDelay, metaid)

Takes

  1. SBMLDelay, an SBML Delay structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Delay structure with the new value for the metaid attribute

SBMLDelay = Delay_setSBOTerm(SBMLDelay, sboTerm)

Takes

  1. SBMLDelay, an SBML Delay structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Delay structure with the new value for the sboTerm attribute

SBMLDelay = Delay_unsetMath(SBMLDelay)

Takes

  1. SBMLDelay, an SBML Delay structure

Returns

  1. the SBML Delay structure with the math attribute unset

SBMLDelay = Delay_unsetMetaid(SBMLDelay)

Takes

  1. SBMLDelay, an SBML Delay structure

Returns

  1. the SBML Delay structure with the metaid attribute unset

SBMLDelay = Delay_unsetSBOTerm(SBMLDelay)

Takes

  1. SBMLDelay, an SBML Delay structure

Returns

  1. the SBML Delay structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/constraint.html0000644000000000000000000001167411611210542022370 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\CONSTRAINT

The functions allow users to create and work with the SBML Constraint structure.

Function are:


Constraint = Constraint_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Constraint structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


math = Constraint_getMath(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. the value of the math attribute

message = Constraint_getMessage(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. the value of the message attribute

metaid = Constraint_getMetaid(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. the value of the metaid attribute

sboTerm = Constraint_getSBOTerm(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. the value of the sboTerm attribute

value = Constraint_isSetMath(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. value =
    • 1 if the math attribute is set
    • 0 otherwise

value = Constraint_isSetMessage(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. value =
    • 1 if the message attribute is set
    • 0 otherwise

value = Constraint_isSetMetaid(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Constraint_isSetSBOTerm(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLConstraint = Constraint_setMath(SBMLConstraint, math)

Takes

  1. SBMLConstraint, an SBML Constraint structure
  2. math; string representing the math expression math to be set

Returns

  1. the SBML Constraint structure with the new value for the math attribute

SBMLConstraint = Constraint_setMessage(SBMLConstraint, message)

Takes

  1. SBMLConstraint, an SBML Constraint structure
  2. message; a string representing the message to be set

Returns

  1. the SBML Constraint structure with the new value for the message attribute

SBMLConstraint = Constraint_setMetaid(SBMLConstraint, metaid)

Takes

  1. SBMLConstraint, an SBML Constraint structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Constraint structure with the new value for the metaid attribute

SBMLConstraint = Constraint_setSBOTerm(SBMLConstraint, sboTerm)

Takes

  1. SBMLConstraint, an SBML Constraint structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Constraint structure with the new value for the sboTerm attribute

SBMLConstraint = Constraint_unsetMath(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. the SBML Constraint structure with the math attribute unset

SBMLConstraint = Constraint_unsetMessage(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. the SBML Constraint structure with the message attribute unset

SBMLConstraint = Constraint_unsetMetaid(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. the SBML Constraint structure with the metaid attribute unset

SBMLConstraint = Constraint_unsetSBOTerm(SBMLConstraint)

Takes

  1. SBMLConstraint, an SBML Constraint structure

Returns

  1. the SBML Constraint structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/compartmentVolumeRule.html0000644000000000000000000001120711611210540024543 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\COMPARTMENTVOLUMERULE

The functions allow users to create and work with the SBML CompartmentVolumeRule structure.

Function are:


CompartmentVolumeRule = CompartmentVolumeRule_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML CompartmentVolumeRule structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


compartment = CompartmentVolumeRule_getCompartment(SBMLCompartmentVolumeRule)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure

Returns

  1. the value of the compartment attribute

formula = CompartmentVolumeRule_getFormula(SBMLCompartmentVolumeRule)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure

Returns

  1. the value of the formula attribute

type = CompartmentVolumeRule_getType(SBMLCompartmentVolumeRule)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure

Returns

  1. the value of the type attribute

value = CompartmentVolumeRule_isSetCompartment(SBMLCompartmentVolumeRule)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure

Returns

  1. value =
    • 1 if the compartment attribute is set
    • 0 otherwise

value = CompartmentVolumeRule_isSetFormula(SBMLCompartmentVolumeRule)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure

Returns

  1. value =
    • 1 if the formula attribute is set
    • 0 otherwise

value = CompartmentVolumeRule_isSetType(SBMLCompartmentVolumeRule)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure

Returns

  1. value =
    • 1 if the type attribute is set
    • 0 otherwise

SBMLCompartmentVolumeRule = CompartmentVolumeRule_setCompartment(SBMLCompartmentVolumeRule, compartment)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure
  2. compartment; a string representing the compartment to be set

Returns

  1. the SBML CompartmentVolumeRule structure with the new value for the compartment attribute

SBMLCompartmentVolumeRule = CompartmentVolumeRule_setFormula(SBMLCompartmentVolumeRule, formula)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure
  2. formula; a string representing the formula to be set

Returns

  1. the SBML CompartmentVolumeRule structure with the new value for the formula attribute

SBMLCompartmentVolumeRule = CompartmentVolumeRule_setType(SBMLCompartmentVolumeRule, type)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure
  2. type; a string representing the type to be set

Returns

  1. the SBML CompartmentVolumeRule structure with the new value for the type attribute

SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetCompartment(SBMLCompartmentVolumeRule)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure

Returns

  1. the SBML CompartmentVolumeRule structure with the compartment attribute unset

SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetFormula(SBMLCompartmentVolumeRule)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure

Returns

  1. the SBML CompartmentVolumeRule structure with the formula attribute unset

SBMLCompartmentVolumeRule = CompartmentVolumeRule_unsetType(SBMLCompartmentVolumeRule)

Takes

  1. SBMLCompartmentVolumeRule, an SBML CompartmentVolumeRule structure

Returns

  1. the SBML CompartmentVolumeRule structure with the type attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/compartmentType.html0000644000000000000000000001243311611210540023367 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\COMPARTMENTTYPE

The functions allow users to create and work with the SBML CompartmentType structure.

Function are:


CompartmentType = CompartmentType_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML CompartmentType structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


id = CompartmentType_getId(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. the value of the id attribute

metaid = CompartmentType_getMetaid(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. the value of the metaid attribute

name = CompartmentType_getName(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. the value of the name attribute

sboTerm = CompartmentType_getSBOTerm(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. the value of the sboTerm attribute

value = CompartmentType_isSetId(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = CompartmentType_isSetMetaid(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = CompartmentType_isSetName(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = CompartmentType_isSetSBOTerm(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLCompartmentType = CompartmentType_setId(SBMLCompartmentType, id)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure
  2. id; a string representing the id to be set

Returns

  1. the SBML CompartmentType structure with the new value for the id attribute

SBMLCompartmentType = CompartmentType_setMetaid(SBMLCompartmentType, metaid)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML CompartmentType structure with the new value for the metaid attribute

SBMLCompartmentType = CompartmentType_setName(SBMLCompartmentType, name)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure
  2. name; a string representing the name to be set

Returns

  1. the SBML CompartmentType structure with the new value for the name attribute

SBMLCompartmentType = CompartmentType_setSBOTerm(SBMLCompartmentType, sboTerm)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML CompartmentType structure with the new value for the sboTerm attribute

SBMLCompartmentType = CompartmentType_unsetId(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. the SBML CompartmentType structure with the id attribute unset

SBMLCompartmentType = CompartmentType_unsetMetaid(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. the SBML CompartmentType structure with the metaid attribute unset

SBMLCompartmentType = CompartmentType_unsetName(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. the SBML CompartmentType structure with the name attribute unset

SBMLCompartmentType = CompartmentType_unsetSBOTerm(SBMLCompartmentType)

Takes

  1. SBMLCompartmentType, an SBML CompartmentType structure

Returns

  1. the SBML CompartmentType structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/compartment.html0000644000000000000000000004142711703262406022544 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\COMPARTMENT

The functions allow users to create and work with the SBML Compartment structure.

Function are:


Compartment = Compartment_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML Compartment structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


compartmentType = Compartment_getCompartmentType(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the compartmentType attribute

constant = Compartment_getConstant(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the constant attribute

id = Compartment_getId(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the id attribute

metaid = Compartment_getMetaid(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the metaid attribute

name = Compartment_getName(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the name attribute

outside = Compartment_getOutside(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the outside attribute

sboTerm = Compartment_getSBOTerm(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the sboTerm attribute

size = Compartment_getSize(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the size attribute

spatialDimensions = Compartment_getSpatialDimensions(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the spatialDimensions attribute

units = Compartment_getUnits(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the units attribute

volume = Compartment_getVolume(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the value of the volume attribute

y = Compartment_isAssignedByRateRule(SBMLCompartment, SBMLRules)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - the index of the rateRule used to assigned value to the Compartment - 0 if the Compartment is not assigned by rateRule

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


y = Compartment_isAssignedByRule(SBMLCompartment, SBMLRules)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - the index of the assignmentRule used to assigned value to the Compartment - 0 if the Compartment is not assigned by assignmentRule

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


y = Compartment_isInAlgebraicRule(SBMLCompartment, SBMLRules)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. SBMLRules; the array of rules from an SBML Model structure

Returns

y = - an array of the indices of any algebraicRules the id of the Compartment appears in - 0 if the Compartment appears in no algebraicRules

!--------------------------------------------------------------------------- This file is part of SBMLToolbox. Please visit http://sbml.org for more information about SBML, and the latest version of SBMLToolbox.

Copyright (C) 2009-2012 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. University of Hertfordshire, Hatfield, UK

Copyright (C) 2003-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan 3. University of Hertfordshire, Hatfield, UK

SBMLToolbox is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. ---------------------------------------------------------------------- -->


value = Compartment_isSetCompartmentType(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. value =
    • 1 if the compartmentType attribute is set
    • 0 otherwise

value = Compartment_isSetId(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. value =
    • 1 if the id attribute is set
    • 0 otherwise

value = Compartment_isSetMetaid(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = Compartment_isSetName(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. value =
    • 1 if the name attribute is set
    • 0 otherwise

value = Compartment_isSetOutside(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. value =
    • 1 if the outside attribute is set
    • 0 otherwise

value = Compartment_isSetSBOTerm(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = Compartment_isSetSize(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. value =
    • 1 if the size attribute is set
    • 0 otherwise

value = Compartment_isSetSpatialDimensions(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. value =
    • 1 if the spatialDimensions attribute is set
    • 0 otherwise

value = Compartment_isSetUnits(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. value =
    • 1 if the units attribute is set
    • 0 otherwise

value = Compartment_isSetVolume(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. value =
    • 1 if the volume attribute is set
    • 0 otherwise

SBMLCompartment = Compartment_setCompartmentType(SBMLCompartment, compartmentType)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. compartmentType; a string representing the compartmentType to be set

Returns

  1. the SBML Compartment structure with the new value for the compartmentType attribute

SBMLCompartment = Compartment_setConstant(SBMLCompartment, constant)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. constant, an integer (0/1) representing the value of constant to be set

Returns

  1. the SBML Compartment structure with the new value for the constant attribute

SBMLCompartment = Compartment_setId(SBMLCompartment, id)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. id; a string representing the id to be set

Returns

  1. the SBML Compartment structure with the new value for the id attribute

SBMLCompartment = Compartment_setMetaid(SBMLCompartment, metaid)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML Compartment structure with the new value for the metaid attribute

SBMLCompartment = Compartment_setName(SBMLCompartment, name)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. name; a string representing the name to be set

Returns

  1. the SBML Compartment structure with the new value for the name attribute

SBMLCompartment = Compartment_setOutside(SBMLCompartment, outside)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. outside; a string representing the outside to be set

Returns

  1. the SBML Compartment structure with the new value for the outside attribute

SBMLCompartment = Compartment_setSBOTerm(SBMLCompartment, sboTerm)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML Compartment structure with the new value for the sboTerm attribute

SBMLCompartment = Compartment_setSize(SBMLCompartment, size)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. size; number representing the value of size to be set

Returns

  1. the SBML Compartment structure with the new value for the size attribute

SBMLCompartment = Compartment_setSpatialDimensions(SBMLCompartment, spatialDimensions)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. spatialDimensions; number representing the value of spatialDimensions to be set

Returns

  1. the SBML Compartment structure with the new value for the spatialDimensions attribute

SBMLCompartment = Compartment_setUnits(SBMLCompartment, units)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. units; a string representing the units to be set

Returns

  1. the SBML Compartment structure with the new value for the units attribute

SBMLCompartment = Compartment_setVolume(SBMLCompartment, volume)

Takes

  1. SBMLCompartment, an SBML Compartment structure
  2. volume; number representing the value of volume to be set

Returns

  1. the SBML Compartment structure with the new value for the volume attribute

SBMLCompartment = Compartment_unsetCompartmentType(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Compartment structure with the compartmentType attribute unset

SBMLCompartment = Compartment_unsetId(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Compartment structure with the id attribute unset

SBMLCompartment = Compartment_unsetMetaid(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Compartment structure with the metaid attribute unset

SBMLCompartment = Compartment_unsetName(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Compartment structure with the name attribute unset

SBMLCompartment = Compartment_unsetOutside(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Compartment structure with the outside attribute unset

SBMLCompartment = Compartment_unsetSBOTerm(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Compartment structure with the sboTerm attribute unset

SBMLCompartment = Compartment_unsetSize(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Compartment structure with the size attribute unset

SBMLCompartment = Compartment_unsetSpatialDimensions(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Compartment structure with the spatialDimensions attribute unset

SBMLCompartment = Compartment_unsetUnits(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Compartment structure with the units attribute unset

SBMLCompartment = Compartment_unsetVolume(SBMLCompartment)

Takes

  1. SBMLCompartment, an SBML Compartment structure

Returns

  1. the SBML Compartment structure with the volume attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/assignmentRule.html0000644000000000000000000001246211611210540023176 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\ASSIGNMENTRULE

The functions allow users to create and work with the SBML AssignmentRule structure.

Function are:


AssignmentRule = AssignmentRule_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML AssignmentRule structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


formula = AssignmentRule_getFormula(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. the value of the formula attribute

metaid = AssignmentRule_getMetaid(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. the value of the metaid attribute

sboTerm = AssignmentRule_getSBOTerm(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. the value of the sboTerm attribute

variable = AssignmentRule_getVariable(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. the value of the variable attribute

value = AssignmentRule_isSetFormula(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. value =
    • 1 if the formula attribute is set
    • 0 otherwise

value = AssignmentRule_isSetMetaid(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = AssignmentRule_isSetSBOTerm(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = AssignmentRule_isSetVariable(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. value =
    • 1 if the variable attribute is set
    • 0 otherwise

SBMLAssignmentRule = AssignmentRule_setFormula(SBMLAssignmentRule, formula)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure
  2. formula; a string representing the formula to be set

Returns

  1. the SBML AssignmentRule structure with the new value for the formula attribute

SBMLAssignmentRule = AssignmentRule_setMetaid(SBMLAssignmentRule, metaid)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML AssignmentRule structure with the new value for the metaid attribute

SBMLAssignmentRule = AssignmentRule_setSBOTerm(SBMLAssignmentRule, sboTerm)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML AssignmentRule structure with the new value for the sboTerm attribute

SBMLAssignmentRule = AssignmentRule_setVariable(SBMLAssignmentRule, variable)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure
  2. variable; a string representing the variable to be set

Returns

  1. the SBML AssignmentRule structure with the new value for the variable attribute

SBMLAssignmentRule = AssignmentRule_unsetFormula(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. the SBML AssignmentRule structure with the formula attribute unset

SBMLAssignmentRule = AssignmentRule_unsetMetaid(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. the SBML AssignmentRule structure with the metaid attribute unset

SBMLAssignmentRule = AssignmentRule_unsetSBOTerm(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. the SBML AssignmentRule structure with the sboTerm attribute unset

SBMLAssignmentRule = AssignmentRule_unsetVariable(SBMLAssignmentRule)

Takes

  1. SBMLAssignmentRule, an SBML AssignmentRule structure

Returns

  1. the SBML AssignmentRule structure with the variable attribute unset

SBMLToolbox-4.1.0/docs/structure-functions/algebraicRule.html0000644000000000000000000001015111611210364022734 0ustar rootroot

MATLAB_SBML_STRUCTURE_FUNCTIONS\ALGEBRAICRULE

The functions allow users to create and work with the SBML AlgebraicRule structure.

Function are:


AlgebraicRule = AlgebraicRule_create(level(optional), version(optional) )

Takes

  1. level, an integer representing an SBML level (optional)
  2. version, an integer representing an SBML version (optional)

Returns

  1. a MATLAB_SBML AlgebraicRule structure of the appropriate level and version

NOTE: the optional level and version preserve backwards compatibility a missing version argument will default to L1V2; L2V4 or L3V1 missing both arguments will default to L3V1


formula = AlgebraicRule_getFormula(SBMLAlgebraicRule)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure

Returns

  1. the value of the formula attribute

metaid = AlgebraicRule_getMetaid(SBMLAlgebraicRule)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure

Returns

  1. the value of the metaid attribute

sboTerm = AlgebraicRule_getSBOTerm(SBMLAlgebraicRule)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure

Returns

  1. the value of the sboTerm attribute

value = AlgebraicRule_isSetFormula(SBMLAlgebraicRule)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure

Returns

  1. value =
    • 1 if the formula attribute is set
    • 0 otherwise

value = AlgebraicRule_isSetMetaid(SBMLAlgebraicRule)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

value = AlgebraicRule_isSetSBOTerm(SBMLAlgebraicRule)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLAlgebraicRule = AlgebraicRule_setFormula(SBMLAlgebraicRule, formula)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure
  2. formula; a string representing the formula to be set

Returns

  1. the SBML AlgebraicRule structure with the new value for the formula attribute

SBMLAlgebraicRule = AlgebraicRule_setMetaid(SBMLAlgebraicRule, metaid)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure
  2. metaid; a string representing the metaid to be set

Returns

  1. the SBML AlgebraicRule structure with the new value for the metaid attribute

SBMLAlgebraicRule = AlgebraicRule_setSBOTerm(SBMLAlgebraicRule, sboTerm)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure
  2. sboTerm, an integer representing the sboTerm to be set

Returns

  1. the SBML AlgebraicRule structure with the new value for the sboTerm attribute

SBMLAlgebraicRule = AlgebraicRule_unsetFormula(SBMLAlgebraicRule)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure

Returns

  1. the SBML AlgebraicRule structure with the formula attribute unset

SBMLAlgebraicRule = AlgebraicRule_unsetMetaid(SBMLAlgebraicRule)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure

Returns

  1. the SBML AlgebraicRule structure with the metaid attribute unset

SBMLAlgebraicRule = AlgebraicRule_unsetSBOTerm(SBMLAlgebraicRule)

Takes

  1. SBMLAlgebraicRule, an SBML AlgebraicRule structure

Returns

  1. the SBML AlgebraicRule structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/structure/0000755000000000000000000000000011704572220015306 5ustar rootrootSBMLToolbox-4.1.0/docs/structure/unitdefinition.html0000644000000000000000000001666311626412302021235 0ustar rootroot

UnitDefinition

typecode = SBML_UNIT_DEFINITION




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
name string
unit array of structures
Fieldname Type
typecode as above
notes string
annotation string
name string
unit array of structures


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
unit array of structures
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
unit array of structures


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
unit array of structures
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
unit array of structures


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
unit array of structures
SBMLToolbox-4.1.0/docs/structure/unit.html0000644000000000000000000001772311626412302017162 0ustar rootroot

Unit

typecode = SBML_UNIT




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
kind string
exponent integer
scale boolean
Fieldname Type
typecode as above
notes string
annotation string
kind string
exponent integer
scale boolean


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
kind string
exponent integer
scale boolean
multiplier double
offset double
Fieldname Type
typecode as above
metaid string
notes string
annotation string
kind string
exponent integer
scale boolean
multiplier double


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
kind string
exponent integer
scale boolean
multiplier double
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
kind string
exponent integer
scale boolean
multiplier double


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
kind string
exponent double
scale double
multiplier double
SBMLToolbox-4.1.0/docs/structure/trigger.html0000644000000000000000000000777111626412302017650 0ustar rootroot

Trigger

typecode = SBML_TRIGGER




SBML Level 1

Version 1 Version 2
The Trigger component is not part of SBML Level 1 Version 1 The Trigger component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
The Trigger component is not part of SBML Level 2 Version 1 The Trigger component is not part of SBML Level 2 Version 2


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
persistent boolean
initialValue boolean
math string
SBMLToolbox-4.1.0/docs/structure/stoichiometrymath.html0000644000000000000000000000623411626412302021752 0ustar rootroot

StoichiometryMath

typecode = SBML_STOICHIOMETRY_MATH




SBML Level 1

Version 1 Version 2
The StoichiometryMath component is not part of SBML Level 1 Version 1 The StoichiometryMath component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
The StoichiometryMath component is not part of SBML Level 2 Version 1 The StoichiometryMath component is not part of SBML Level 2 Version 2


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string


SBML Level 3

Version 1
The StoichiometryMath component is not part of SBML Level 3 Version 1
SBMLToolbox-4.1.0/docs/structure/speciestype.html0000644000000000000000000000777411626412302020545 0ustar rootroot

SpeciesType

typecode = SBML_SPECIES_TYPE




SBML Level 1

Version 1 Version 2
The SpeciesType component is not part of SBML Level 1 Version 1 The SpeciesType component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
The SpeciesType component is not part of SBML Level 2 Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string


SBML Level 3

Version 1
The SpeciesType component is not part of SBML Level 3 Version 1
SBMLToolbox-4.1.0/docs/structure/speciesreference.html0000644000000000000000000002103511626412302021504 0ustar rootroot

SpeciesReference

typecode = SBML_SPECIES_REFERENCE




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
species string
stoichiometry integer
denominator integer
Fieldname Type
typecode as above
notes string
annotation string
species string
stoichiometry integer
denominator integer


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
species string
stoichiometry double
denominator integer
stoichiometryMath string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
species string
id string
name string
sboTerm integer
stoichiometry double
stoichiometryMath string


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
species string
id string
name string
stoichiometry double
stoichiometryMath structure
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
species string
id string
name string
stoichiometry double
stoichiometryMath structure


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
species string
id string
name string
stoichiometry double
constant boolean
isSetStoichiometry boolean
SBMLToolbox-4.1.0/docs/structure/speciesconcentrationrule.html0000644000000000000000000000755511626412302023317 0ustar rootroot

SpeciesConcentrationRule

typecode = SBML_SPECIES_CONCENTRATION_RULE




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
type string
formula string
variable string
species string
compartment string
name string
units string
Fieldname Type
typecode as above
notes string
annotation string
type string
formula string
variable string
species string
compartment string
name string
units string


SBML Level 2

Version 1 Version 2
The SpeciesConcentrationRule component is not part of SBML Level 2 Version 1 The SpeciesConcentrationRule component is not part of SBML Level 2 Version 2


Version 3 Version 4
The SpeciesConcentrationRule component is not part of SBML Level 2 Version 3 The SpeciesConcentrationRule component is not part of SBML Level 2 Version 4


SBML Level 3

Version 1
The SpeciesConcentrationRule component is not part of SBML Level 3 Version 1
SBMLToolbox-4.1.0/docs/structure/species.html0000644000000000000000000003227011626412302017630 0ustar rootroot

Species

typecode = SBML_SPECIES




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
name string
compartment string
initialAmount double
units string
boundaryCondition boolean
charge double
isSetInitialAmount boolean
isSetCharge boolean
Fieldname Type
typecode as above
notes string
annotation string
name string
compartment string
initialAmount double
units string
boundaryCondition boolean
charge double
isSetInitialAmount boolean
isSetCharge boolean


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
compartment string
initialAmount double
initialConcentration double
substanceUnits string
spatialSizeUnits string
hasOnlySubstanceUnits boolean
boundaryCondition boolean
charge double
constant boolean
isSetInitialAmount boolean
isSetInitialConcentration boolean
isSetCharge boolean
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
speciesType string
compartment string
initialAmount double
initialConcentration double
substanceUnits string
spatialSizeUnits string
hasOnlySubstanceUnits boolean
boundaryCondition boolean
charge double
constant boolean
isSetInitialAmount boolean
isSetInitialConcentration boolean
isSetCharge boolean


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
speciesType string
compartment string
initialAmount double
initialConcentration double
substanceUnits string
hasOnlySubstanceUnits boolean
boundaryCondition boolean
charge double
constant boolean
isSetInitialAmount boolean
isSetInitialConcentration boolean
isSetCharge boolean
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
speciesType string
compartment string
initialAmount double
initialConcentration double
substanceUnits string
hasOnlySubstanceUnits boolean
boundaryCondition boolean
charge double
constant boolean
isSetInitialAmount boolean
isSetInitialConcentration boolean
isSetCharge boolean


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
compartment string
initialAmount double
initialConcentration double
substanceUnits string
hasOnlySubstanceUnits boolean
boundaryCondition boolean
constant boolean
isSetInitialAmount boolean
isSetInitialConcentration boolean
conversionFactor string
SBMLToolbox-4.1.0/docs/structure/rule.html0000644000000000000000000000337511626415222017154 0ustar rootroot

Rule



SBML Level 1

Rule structures
AlgebraicRule
CompartmentVolumeRule
ParameterRule
SpeciesConcentrationRule


SBML Level 2

Rule structures
AlgebraicRule
AssignmentRule
RateRule


SBML Level 3

Rule structures
AlgebraicRule
AssignmentRule
RateRule
SBMLToolbox-4.1.0/docs/structure/reaction.html0000644000000000000000000002627311626412302020007 0ustar rootroot

Reaction

typecode = SBML_REACTION




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
name string
reactant array of structures
product array of structures
kineticLaw structure
reversible boolean
fast boolean
Fieldname Type
typecode as above
notes string
annotation string
name string
reactant array of structures
product array of structures
kineticLaw structure
reversible boolean
fast boolean


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
reactant array of structures
product array of structures
modifier array of structures
kineticLaw structure
reversible boolean
fast boolean
isSetFast boolean
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
reactant array of structures
product array of structures
modifier array of structures
kineticLaw structure
reversible boolean
fast boolean
sboTerm integer
isSetFast boolean


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
reactant array of structures
product array of structures
modifier array of structures
kineticLaw structure
reversible boolean
fast boolean
isSetFast boolean
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
reactant array of structures
product array of structures
modifier array of structures
kineticLaw structure
reversible boolean
fast boolean
isSetFast boolean


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
reactant array of structures
product array of structures
modifier array of structures
kineticLaw structure
reversible boolean
fast boolean
isSetFast boolean
compartment string
SBMLToolbox-4.1.0/docs/structure/raterule.html0000644000000000000000000001644111626412302020022 0ustar rootroot

RateRule

typecode = SBML_RATE_RULE




SBML Level 1

Version 1 Version 2
The RateRule component is not part of SBML Level 1 Version 1 The RateRule component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
formula string
variable string
species string
compartment string
name string
units string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string
SBMLToolbox-4.1.0/docs/structure/priority.html0000644000000000000000000000452611626412302020061 0ustar rootroot

Priority

typecode = SBML_PRIORITY




SBML Level 1

Version 1 Version 2
The Priority component is not part of SBML Level 1 Version 1 The Priority component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
The Priority component is not part of SBML Level 2 Version 1 The Priority component is not part of SBML Level 2 Version 2


Version 3 Version 4
The Priority component is not part of SBML Level 2 Version 3 The Priority component is not part of SBML Level 2 Version 4


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string
SBMLToolbox-4.1.0/docs/structure/parameterrule.html0000644000000000000000000000742411626412302021050 0ustar rootroot

ParameterRule

typecode = SBML_PARAMETER_RULE




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
type string
formula string
variable string
species string
compartment string
name string
units string
Fieldname Type
typecode as above
notes string
annotation string
type string
formula string
variable string
species string
compartment string
name string
units string


SBML Level 2

Version 1 Version 2
The ParameterRule component is not part of SBML Level 2 Version 1 The ParameterRule component is not part of SBML Level 2 Version 2


Version 3 Version 4
The ParameterRule component is not part of SBML Level 2 Version 3 The ParameterRule component is not part of SBML Level 2 Version 4


SBML Level 3

Version 1
The ParameterRule component is not part of SBML Level 3 Version 1
SBMLToolbox-4.1.0/docs/structure/parameter.html0000644000000000000000000002164511626412302020161 0ustar rootroot

Parameter

typecode = SBML_PARAMETER




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
name string
value double
units string
isSetValue boolean
Fieldname Type
typecode as above
notes string
annotation string
name string
value double
units string
isSetValue boolean


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
value double
units string
constant boolean
isSetValue boolean
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
value double
units string
constant boolean
sboTerm integer
isSetValue boolean


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
value double
units string
constant boolean
isSetValue boolean
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
value double
units string
constant boolean
isSetValue boolean


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
value double
units string
constant boolean
isSetValue boolean
SBMLToolbox-4.1.0/docs/structure/modifierspeciesreference.html0000644000000000000000000001371711626412302023233 0ustar rootroot

ModifierSpeciesReference

typecode = SBML_MODIFIER_SPECIES_REFERENCE




SBML Level 1

Version 1 Version 2
The ModifierSpeciesReference component is not part of SBML Level 1 Version 1 The ModifierSpeciesReference component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
species string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
species string
id string
name string
sboTerm integer


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
species string
id string
name string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
species string
id string
name string


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
species string
id string
name string
SBMLToolbox-4.1.0/docs/structure/model.html0000644000000000000000000003770411626412302017304 0ustar rootroot

Model

typecode = SBML_MODEL




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
SBML_level double
SBML_version double
name string
unitDefinition array of structures
compartment array of structures
species array of structures
parameter array of structures
rule array of structures
reaction array of structures
Fieldname Type
typecode as above
notes string
annotation string
SBML_level double
SBML_version double
name string
unitDefinition array of structures
compartment array of structures
species array of structures
parameter array of structures
rule array of structures
reaction array of structures


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
SBML_level double
SBML_version double
name string
id string
functionDefinition array of structures
unitDefinition array of structures
compartment array of structures
species array of structures
parameter array of structures
rule array of structures
reaction array of structures
event array of structures
Fieldname Type
typecode as above
metaid string
notes string
annotation string
SBML_level double
SBML_version double
name string
id string
sboTerm integer
functionDefinition array of structures
unitDefinition array of structures
compartmentType array of structures
speciesType array of structures
compartment array of structures
species array of structures
parameter array of structures
initialAssignment array of structures
rule array of structures
constraint array of structures
reaction array of structures
event array of structures


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
SBML_level double
SBML_version double
name string
id string
sboTerm integer
functionDefinition array of structures
unitDefinition array of structures
compartmentType array of structures
speciesType array of structures
compartment array of structures
species array of structures
parameter array of structures
initialAssignment array of structures
rule array of structures
constraint array of structures
reaction array of structures
event array of structures
Fieldname Type
typecode as above
metaid string
notes string
annotation string
SBML_level double
SBML_version double
name string
id string
sboTerm integer
functionDefinition array of structures
unitDefinition array of structures
compartmentType array of structures
speciesType array of structures
compartment array of structures
species array of structures
parameter array of structures
initialAssignment array of structures
rule array of structures
constraint array of structures
reaction array of structures
event array of structures


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
SBML_level double
SBML_version double
name string
id string
sboTerm integer
functionDefinition array of structures
unitDefinition array of structures
compartment array of structures
species array of structures
parameter array of structures
initialAssignment array of structures
rule array of structures
constraint array of structures
reaction array of structures
event array of structures
substanceUnits string
timeUnits string
lengthUnits string
areaUnits string
volumeUnits string
extentUnits string
conversionFactor string
SBMLToolbox-4.1.0/docs/structure/localparameter.html0000644000000000000000000000532411626412302021170 0ustar rootroot

LocalParameter

typecode = SBML_LOCAL_PARAMETER




SBML Level 1

Version 1 Version 2
The LocalParameter component is not part of SBML Level 1 Version 1 The LocalParameter component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
The LocalParameter component is not part of SBML Level 2 Version 1 The LocalParameter component is not part of SBML Level 2 Version 2


Version 3 Version 4
The LocalParameter component is not part of SBML Level 2 Version 3 The LocalParameter component is not part of SBML Level 2 Version 4


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
value double
units string
isSetValue boolean
SBMLToolbox-4.1.0/docs/structure/kineticlaw.html0000644000000000000000000002004411626412302020323 0ustar rootroot

KineticLaw

typecode = SBML_KINETIC_LAW




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
formula string
parameter array of structures
timeUnits string
substanceUnits string
Fieldname Type
typecode as above
notes string
annotation string
formula string
parameter array of structures
timeUnits string
substanceUnits string


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
formula string
math string
parameter array of structures
timeUnits string
substanceUnits string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
formula string
math string
parameter array of structures
sboTerm integer


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
math string
parameter array of structures
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
math string
parameter array of structures


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string
localParameter array of structures
SBMLToolbox-4.1.0/docs/structure/initialassignment.html0000644000000000000000000001171411626412302021717 0ustar rootroot

InitialAssignment

typecode = SBML_INITIAL_ASSIGNMENT




SBML Level 1

Version 1 Version 2
The InitialAssignment component is not part of SBML Level 1 Version 1 The InitialAssignment component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
The InitialAssignment component is not part of SBML Level 2 Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
symbol string
math string


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
symbol string
math string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
symbol string
math string


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
symbol string
math string
SBMLToolbox-4.1.0/docs/structure/functiondefinition.html0000644000000000000000000001407711626412302022100 0ustar rootroot

FunctionDefinition

typecode = SBML_FUNCTION_DEFINITION




SBML Level 1

Version 1 Version 2
The FunctionDefinition component is not part of SBML Level 1 Version 1 The FunctionDefinition component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
math string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
math string


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
math string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
math string


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
math string
SBMLToolbox-4.1.0/docs/structure/eventassignment.html0000644000000000000000000001327611626412302021414 0ustar rootroot

EventAssignment

typecode = SBML_EVENT_ASSIGNMENT




SBML Level 1

Version 1 Version 2
The EventAssignment component is not part of SBML Level 1 Version 1 The EventAssignment component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
variable string
math string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
variable string
sboTerm integer
math string


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
variable string
math string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
variable string
math string


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
variable string
math string
SBMLToolbox-4.1.0/docs/structure/event.html0000644000000000000000000001707111626412302017320 0ustar rootroot

Event

typecode = SBML_EVENT




SBML Level 1

Version 1 Version 2
The Event component is not part of SBML Level 1 Version 1 The Event component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
trigger string
delay string
timeUnits string
eventAssignment array of structures
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
trigger string
delay string
timeUnits string
sboTerm integer
eventAssignment array of structures


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
trigger structure
delay structure
eventAssignment array of structures
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
useValuesFromTriggerTime boolean
trigger structure
delay structure
eventAssignment array of structures


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
useValuesFromTriggerTime boolean
trigger structure
delay structure
priority structure
eventAssignment array of structures
SBMLToolbox-4.1.0/docs/structure/delay.html0000644000000000000000000000747311626412302017302 0ustar rootroot

Delay

typecode = SBML_DELAY




SBML Level 1

Version 1 Version 2
The Delay component is not part of SBML Level 1 Version 1 The Delay component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
The Delay component is not part of SBML Level 2 Version 1 The Delay component is not part of SBML Level 2 Version 2


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string
SBMLToolbox-4.1.0/docs/structure/constraint.html0000644000000000000000000001164511626412302020364 0ustar rootroot

Constraint

typecode = SBML_CONSTRAINT




SBML Level 1

Version 1 Version 2
The Constraint component is not part of SBML Level 1 Version 1 The Constraint component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
The Constraint component is not part of SBML Level 2 Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string
message string


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string
message string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string
message string


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
math string
message string
SBMLToolbox-4.1.0/docs/structure/compartmentvolumerule.html0000644000000000000000000000752511626412302022653 0ustar rootroot

CompartmentVolumeRule

typecode = SBML_COMPARTMENT_VOLUME_RULE




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
type string
formula string
variable string
species string
compartment string
name string
units string
Fieldname Type
typecode as above
notes string
annotation string
type string
formula string
variable string
species string
compartment string
name string
units string


SBML Level 2

Version 1 Version 2
The CompartmentVolumeRule component is not part of SBML Level 2 Version 1 The CompartmentVolumeRule component is not part of SBML Level 2 Version 2


Version 3 Version 4
The CompartmentVolumeRule component is not part of SBML Level 2 Version 3 The CompartmentVolumeRule component is not part of SBML Level 2 Version 4


SBML Level 3

Version 1
The CompartmentVolumeRule component is not part of SBML Level 3 Version 1
SBMLToolbox-4.1.0/docs/structure/compartmenttype.html0000644000000000000000000001003011626412302021416 0ustar rootroot

CompartmentType

typecode = SBML_COMPARTMENT_TYPE




SBML Level 1

Version 1 Version 2
The CompartmentType component is not part of SBML Level 1 Version 1 The CompartmentType component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
The CompartmentType component is not part of SBML Level 2 Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string


SBML Level 3

Version 1
The CompartmentType component is not part of SBML Level 3 Version 1
SBMLToolbox-4.1.0/docs/structure/compartment.html0000644000000000000000000002475511626412302020537 0ustar rootroot

Compartment

typecode = SBML_COMPARTMENT




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
name string
volume double
units string
outside string
isSetVolume boolean
Fieldname Type
typecode as above
notes string
annotation string
name string
volume double
units string
outside string
isSetVolume boolean


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
spatialDimensions integer
size double
units string
outside string
constant boolean
isSetSize boolean
isSetVolume boolean
Fieldname Type
typecode as above
metaid string
notes string
annotation string
name string
id string
compartmentType string
spatialDimensions integer
size double
units string
outside string
constant boolean
isSetSize boolean
isSetVolume boolean


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
compartmentType string
spatialDimensions integer
size double
units string
outside string
constant boolean
isSetSize boolean
isSetVolume boolean
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
compartmentType string
spatialDimensions integer
size double
units string
outside string
constant boolean
isSetSize boolean
isSetVolume boolean


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
spatialDimensions integer
size double
units string
constant boolean
isSetSize boolean
isSetSpatialDimensions boolean
SBMLToolbox-4.1.0/docs/structure/assignmentrule.html0000644000000000000000000001647711626412302021250 0ustar rootroot

AssignmentRule

typecode = SBML_ASSIGNMENT_RULE




SBML Level 1

Version 1 Version 2
The AssignmentRule component is not part of SBML Level 1 Version 1 The AssignmentRule component is not part of SBML Level 1 Version 2


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
formula string
variable string
species string
compartment string
name string
units string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string
SBMLToolbox-4.1.0/docs/structure/algebraicrule.html0000644000000000000000000002270211626412300020773 0ustar rootroot

AlgebraicRule

typecode = SBML_ALGEBRAIC_RULE




SBML Level 1

Version 1 Version 2
Fieldname Type
typecode as above
notes string
annotation string
type string
formula string
variable string
species string
compartment string
name string
units string
Fieldname Type
typecode as above
notes string
annotation string
type string
formula string
variable string
species string
compartment string
name string
units string


SBML Level 2

Version 1 Version 2
Fieldname Type
typecode as above
metaid string
notes string
annotation string
formula string
variable string
species string
compartment string
name string
units string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string


Version 3 Version 4
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string


SBML Level 3

Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
formula string
variable string
species string
compartment string
name string
units string
SBMLToolbox-4.1.0/docs/simulation.html0000644000000000000000000001423211704012754016323 0ustar rootroot

SIMULATION

The functions allow users to simulate SBML Models.

Function are:


[analysis] = AnalyseSpecies(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. a structure detailing the species and how they are manipulated within the model

EXAMPLE:

     Using the model from toolbox/Test/test-data/algebraicRules.xml

        analysis = AnalyseSpecies(m)

        analysis = 

        1x5 struct array with fields:
            Name
            constant
            boundaryCondition
            initialValue
            hasAmountOnly
            isConcentration
            compartment
            ChangedByReaction
            KineticLaw
            ChangedByRateRule
            RateRule
            ChangedByAssignmentRule
            AssignmentRule
            InAlgebraicRule
            AlgebraicRule
            ConvertedToAssignRule
            ConvertedRule

        analysis(1) = 


                               Name: {'S1'}
                           constant: 0
                  boundaryCondition: 0
                       initialValue: 0.0300
                      hasAmountOnly: 0
                    isConcentration: 0
                        compartment: 'compartment'
                  ChangedByReaction: 1
                         KineticLaw: {' - (k*S1)'}
                  ChangedByRateRule: 0
                           RateRule: ''
            ChangedByAssignmentRule: 0
                     AssignmentRule: ''
                    InAlgebraicRule: 1
                      AlgebraicRule: {{1x1 cell}}
              ConvertedToAssignRule: 0
                      ConvertedRule: ''

[analysis] = AnalyseVaryingParameters(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. a structure detailing any parameters that are not constant and how they are manipulated within the model

EXAMPLE:

     Using the model from toolbox/Test/test-data/algebraicRules.xml

       analysis = AnalyseVaryingParameters(m)

       analysis = 
                   Name: {'s2'}
           initialValue: 4
      ChangedByRateRule: 0
               RateRule: ''
ChangedByAssignmentRule: 0
         AssignmentRule: ''
        InAlgebraicRule: 1
          AlgebraicRule: {{1x1 cell}}
  ConvertedToAssignRule: 1
          ConvertedRule: '-(-S2-S3)'

elements = DealWithPiecewise(formula)

Takes

  1. formula, a string representation of a math expression that contains the MathML piecewise function

Returns

  1. an array of the three components of the piecewise function

EXAMPLE:

      elements = DealWithPiecewise('piecewise(le(s2,4),1.5,0.05)')

               =  'le(s2,4)'  '1.5'   '0.05'

NOTE: The function cannot deal with a piecewise statement with more than three elements.


elements = GetArgumentsFromLambdaFunction(formula)

Takes

  1. formula, a string representation of a math expression that contains the MathML lambda function

Returns

  1. an array of the components of the lambda function

EXAMPLE:

      elements = GetArgumentsFromLambdaFunction('lambda(x, x+0.5)')

               =  'x'  'x+0.5'   

      elements = GetArgumentsFromLambdaFunction('lambda(x, y, x + y)')

               =  'x'  'y'    'x+y'

OutputODEFunction

NOTE: This function is deprecated. Use SolveODEFunction instead.


SolveODEFunction(varargin)

Takes

  1. a MATLAB_SBML model structure (required argument)
  2. time limit (default = 10)
  3. number of time steps (default lets the solver decide)
  4. a flag to indicate whether to output species values in amount/concentration 1 amount, 0 concentration (default)
  5. a flag to indicate whether to output the simulation data as a comma separated variable (csv) file 1 output 0 no output (default)
  6. a filename (this is needed if WriteODEFunction was used with a filename)

Returns

  1. an array of time values
  2. an array of the values of variables at each time point; species will be in concentration or amount as specified by input arguments

Outputs

  1. a file 'name.csv' with the data results (if the flag to output such a file is set to 1.

NOTE: the results are generated using ode45 solver (MATLAB) or lsode (Octave)


WriteEventAssignmentFunction(SBMLModel, name)

Takes

  1. SBMLModel, an SBML Model structure
  2. name, a string representing the name of the ode function being used

Outputs

  1. a file 'name_eventAssign.m' defining a function that assigns values following an event (for use with the event option of MATLABs ode solvers)

NOTE: This function is called from WriteODEFunction when a model with events is encountered.


WriteEventHandlerFunction(SBMLModel, name)

Takes

  1. SBMLModel, an SBML Model structure
  2. name, a string representing the name of the ode function being used

Outputs

  1. a file 'name_events.m' defining a function that tests whether events have been triggered (for use with the event option of MATLABs ode solvers)

NOTE: This function is called from WriteODEFunction when a model with events is encountered.


WriteODEFunction(SBMLModel, name(optional))

Takes

  1. SBMLModel, an SBML Model structure
  2. name, an optional string representing the name of the ode function to be used

Outputs

  1. a file 'name.m' defining a function that defines the ode equations of the model for use with the ode solvers (if no name supplied the model id will be used)

SBMLToolbox-4.1.0/docs/sbmltoolbox.html0000644000000000000000000001743311704572032016511 0ustar rootroot

SBMLToolbox 4.1 API

This manual describes the application programming interface (API) of SBMLToolbox, an open-source (LGPL) MATLAB/Octave toolbox for writing and manipulating content in the Systems Biology Markup Language (SBML). This version of SBMLToolbox supports all releases of SBML up through Level 3 Version 1 Core Release 1. For more information about SBML, please visit http://sbml.org on the Internet.

All functions can be used in both the MATLAB and Octave environments.

Installation

Functions

MATLAB_SBML Structure Functions

MATLAB_SBML Structures

The following sections detail the structures of individual component types.

Level 3 FBC package

This version of SBMLToolbox (4.1.0) includes support for creating and manipulating structures representing the SBML L3 Flux Boubd Constraints (fbc) package.

Acknowledgements

This and other projects of the SBML Team have been supported by the following organizations: the National Institutes of Health (USA) under grants R01 GM070923 and R01 GM077671; the International Joint Research Program of NEDO (Japan); the JST ERATO-SORST Program (Japan); the Japanese Ministry of Agriculture; the Japanese Ministry of Education, Culture, Sports, Science and Technology; the BBSRC e-Science Initiative (UK); the DARPA IPTO Bio-Computation Program (USA); the Army Research Office's Institute for Collaborative Biotechnologies (USA); the Air Force Office of Scientific Research (USA); the California Institute of Technology (USA); the University of Hertfordshire (UK); the Molecular Sciences Institute (USA); the Systems Biology Institute (Japan); and Keio University (Japan).

SBMLToolbox-4.1.0/docs/known_issues.html0000644000000000000000000000177411704571624016703 0ustar rootroot

Known issues


Simulating the SBML Test Suite

SBMLToolbox correctly simulates about 50% of the models in the SBML Test-suite.

There are 7 cases where comparison of the output reports that the test failed.

  • 00676
  • 00677
  • 00678
  • 00712
  • 00713
  • 00714
  • 00954
These are cases where the number of variables with data output by SBMLToolbox does not match the number of variables used in the comparison. The data output by SBMLToolbox is however correct.


SBMLToolbox-4.1.0/docs/installation.html0000644000000000000000000000142611611210324016627 0ustar rootroot

Installation

SBMLToolbox consists of scripts only. No compilation is required.

The import and export of SBML requires the installation of libSBML binding for either MATLAB or Octave. This is available via the libSBML page.

To install

  1. Start MATLAB/Octave
  2. Navigate to the SBMLToolbox/toolbox directory
  3. Run the install.m script found in that directory

The install.m script

  1. Reports whether the appropriate libSBML binding is available
  2. Adds the directories in the toolbox to the Path
SBMLToolbox-4.1.0/docs/general.html0000644000000000000000000000131711704570014015552 0ustar rootroot

General functions

Functions in the top-level toolbox directory.

Function are:


installed = isBindingInstalled()

Returns

  1. installed =
    • 1 if the libSBML executables have been installed
    • 0 otherwise

install()

  1. Reports whether the appropriate libSBML binding is available
  2. Adds the directories in the toolbox to the Path

See installation


SBMLToolbox-4.1.0/docs/fbc_package/0000755000000000000000000000000011704572220015453 5ustar rootrootSBMLToolbox-4.1.0/docs/fbc_package/structure-functions/0000755000000000000000000000000011704572220021521 5ustar rootrootSBMLToolbox-4.1.0/docs/fbc_package/structure-functions/objective.html0000644000000000000000000001402511702543302024360 0ustar rootroot

FBC_PACKAGE\MATLAB_SBML_STRUCTURES\OBJECTIVE

The functions allow users to create and work with the SBML FBC Objective structure.

Function are:


SBMLObjective = Objective_addFluxObjective(SBMLObjective, SBMLFluxObjective)

Takes

  1. SBMLObjective, an SBML Objective structure
  2. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. the SBML Objective structure with the SBML FluxObjective structure added

Objective = Objective_create(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. a MATLAB_SBML FBC Objective structure of the appropriate level, version and pkgVersion

SBMLObjective = Objective_createFluxObjective(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. the SBML Objective structure with a new SBML FluxObjective structure added

fluxObjective = Objective_getFluxObjective(SBMLObjective, index)

Takes

  1. SBMLObjective, an SBML Objective structure
  2. index, an integer representing the index of SBML FluxObjective structure

Returns

  1. the SBML FluxObjective structure at the indexed position

id = Objective_getId(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. the value of the fbc_id attribute

fluxObjective = Objective_getListOfFluxObjectives(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. an array of the fluxObjective structures

metaid = Objective_getMetaid(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. the value of the metaid attribute

num = Objective_getNumFluxObjectives(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. the number of SBML FluxObjective structures present in the Objective

sboTerm = Objective_getSBOTerm(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. the value of the sboTerm attribute

type = Objective_getType(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. the value of the fbc_type attribute

id = Objective_isSetId(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. value =
    • 1 if the fbc_id attribute is set
    • 0 otherwise

metaid = Objective_isSetMetaid(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

sboTerm = Objective_isSetSBOTerm(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

type = Objective_isSetType(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. value =
    • 1 if the fbc_type attribute is set
    • 0 otherwise

SBMLObjective = Objective_setId(SBMLObjective, id)

Takes

  1. SBMLObjective, an SBML Objective structure
  2. id, a string representing the fbc_id to be set

Returns

  1. the SBML FBC Objective structure with the new value for the fbc_id attribute

SBMLObjective = Objective_setMetaid(SBMLObjective, metaid)

Takes

  1. SBMLObjective, an SBML Objective structure
  2. metaid, a string representing the metaid to be set

Returns

  1. the SBML FBC Objective structure with the new value for the metaid attribute

SBMLObjective = Objective_setSBOTerm(SBMLObjective, sboTerm)

Takes

  1. SBMLObjective, an SBML Objective structure
  2. sboTerm, a number representing the sboTerm to be set

Returns

  1. the SBML FBC Objective structure with the new value for the sboTerm attribute

SBMLObjective = Objective_setType(SBMLObjective, type)

Takes

  1. SBMLObjective, an SBML Objective structure
  2. type, a string representing the fbc_type to be set

Returns

  1. the SBML FBC Objective structure with the new value for the fbc_type attribute

SBMLObjective = Objective_unsetId(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. the SBML FBC Objective structure with the fbc_id attribute unset

SBMLObjective = Objective_unsetMetaid(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. the SBML FBC Objective structure with the metaid attribute unset

SBMLObjective = Objective_unsetSBOTerm(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. the SBML FBC Objective structure with the sboTerm attribute unset

SBMLObjective = Objective_unsetType(SBMLObjective)

Takes

  1. SBMLObjective, an SBML Objective structure

Returns

  1. the SBML FBC Objective structure with the fbc_type attribute unset

SBMLToolbox-4.1.0/docs/fbc_package/structure-functions/fluxObjective.html0000644000000000000000000001217211660503634025227 0ustar rootroot

FBC_PACKAGE\MATLAB_SBML_STRUCTURES\FLUXOBJECTIVE

The functions allow users to create and work with the SBML FBC FluxObjective structure.

Function are:


FluxObjective = FluxObjective_create(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. a MATLAB_SBML FBC FluxObjective structure of the appropriate level, version and pkgVersion

coefficient = FluxObjective_getCoefficient(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. the value of the fbc_coefficient attribute

metaid = FluxObjective_getMetaid(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. the value of the metaid attribute

reaction = FluxObjective_getReaction(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. the value of the fbc_reaction attribute

sboTerm = FluxObjective_getSBOTerm(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. the value of the sboTerm attribute

coefficient = FluxObjective_isSetCoefficient(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. value =
    • 1 if the fbc_coefficient attribute is set
    • 0 otherwise

metaid = FluxObjective_isSetMetaid(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

reaction = FluxObjective_isSetReaction(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. value =
    • 1 if the fbc_reaction attribute is set
    • 0 otherwise

sboTerm = FluxObjective_isSetSBOTerm(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

SBMLFluxObjective = FluxObjective_setCoefficient(SBMLFluxObjective, coefficient)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure
  2. coefficient, a number representing the fbc_coefficient to be set

Returns

  1. the SBML FBC FluxObjective structure with the new value for the fbc_coefficient attribute

SBMLFluxObjective = FluxObjective_setMetaid(SBMLFluxObjective, metaid)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure
  2. metaid, a string representing the metaid to be set

Returns

  1. the SBML FBC FluxObjective structure with the new value for the metaid attribute

SBMLFluxObjective = FluxObjective_setReaction(SBMLFluxObjective, reaction)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure
  2. reaction, a string representing the fbc_reaction to be set

Returns

  1. the SBML FBC FluxObjective structure with the new value for the fbc_reaction attribute

SBMLFluxObjective = FluxObjective_setSBOTerm(SBMLFluxObjective, sboTerm)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure
  2. sboTerm, a number representing the sboTerm to be set

Returns

  1. the SBML FBC FluxObjective structure with the new value for the sboTerm attribute

SBMLFluxObjective = FluxObjective_unsetCoefficient(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. the SBML FBC FluxObjective structure with the fbc_coefficient attribute unset

SBMLFluxObjective = FluxObjective_unsetMetaid(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. the SBML FBC FluxObjective structure with the metaid attribute unset

SBMLFluxObjective = FluxObjective_unsetReaction(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. the SBML FBC FluxObjective structure with the fbc_reaction attribute unset

SBMLFluxObjective = FluxObjective_unsetSBOTerm(SBMLFluxObjective)

Takes

  1. SBMLFluxObjective, an SBML FluxObjective structure

Returns

  1. the SBML FBC FluxObjective structure with the sboTerm attribute unset

SBMLToolbox-4.1.0/docs/fbc_package/structure-functions/fluxBound.html0000644000000000000000000001543511660503634024371 0ustar rootroot

FBC_PACKAGE\MATLAB_SBML_STRUCTURES\FLUXBOUND

The functions allow users to create and work with the SBML FBC FluxBound structure.

Function are:


FluxBound = FluxBound_create(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. a MATLAB_SBML FBC FluxBound structure of the appropriate level, version and pkgVersion

id = FluxBound_getId(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the value of the fbc_id attribute

metaid = FluxBound_getMetaid(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the value of the metaid attribute

operation = FluxBound_getOperation(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the value of the fbc_operation attribute

reaction = FluxBound_getReaction(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the value of the fbc_reaction attribute

sboTerm = FluxBound_getSBOTerm(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the value of the sboTerm attribute

value = FluxBound_getValue(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the value of the fbc_value attribute

id = FluxBound_isSetId(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. value =
    • 1 if the fbc_id attribute is set
    • 0 otherwise

metaid = FluxBound_isSetMetaid(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. value =
    • 1 if the metaid attribute is set
    • 0 otherwise

operation = FluxBound_isSetOperation(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. value =
    • 1 if the fbc_operation attribute is set
    • 0 otherwise

reaction = FluxBound_isSetReaction(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. value =
    • 1 if the fbc_reaction attribute is set
    • 0 otherwise

sboTerm = FluxBound_isSetSBOTerm(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. value =
    • 1 if the sboTerm attribute is set
    • 0 otherwise

value = FluxBound_isSetValue(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. value =
    • 1 if the fbc_value attribute is set
    • 0 otherwise

SBMLFluxBound = FluxBound_setId(SBMLFluxBound, id)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure
  2. id, a string representing the fbc_id to be set

Returns

  1. the SBML FBC FluxBound structure with the new value for the fbc_id attribute

SBMLFluxBound = FluxBound_setMetaid(SBMLFluxBound, metaid)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure
  2. metaid, a string representing the metaid to be set

Returns

  1. the SBML FBC FluxBound structure with the new value for the metaid attribute

SBMLFluxBound = FluxBound_setOperation(SBMLFluxBound, operation)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure
  2. operation, a string representing the fbc_operation to be set

Returns

  1. the SBML FBC FluxBound structure with the new value for the fbc_operation attribute

SBMLFluxBound = FluxBound_setReaction(SBMLFluxBound, reaction)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure
  2. reaction, a string representing the fbc_reaction to be set

Returns

  1. the SBML FBC FluxBound structure with the new value for the fbc_reaction attribute

SBMLFluxBound = FluxBound_setSBOTerm(SBMLFluxBound, sboTerm)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure
  2. sboTerm, a number representing the sboTerm to be set

Returns

  1. the SBML FBC FluxBound structure with the new value for the sboTerm attribute

SBMLFluxBound = FluxBound_setValue(SBMLFluxBound, value)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure
  2. value, a number representing the fbc_value to be set

Returns

  1. the SBML FBC FluxBound structure with the new value for the fbc_value attribute

SBMLFluxBound = FluxBound_unsetId(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the SBML FBC FluxBound structure with the fbc_id attribute unset

SBMLFluxBound = FluxBound_unsetMetaid(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the SBML FBC FluxBound structure with the metaid attribute unset

SBMLFluxBound = FluxBound_unsetOperation(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the SBML FBC FluxBound structure with the fbc_operation attribute unset

SBMLFluxBound = FluxBound_unsetReaction(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the SBML FBC FluxBound structure with the fbc_reaction attribute unset

SBMLFluxBound = FluxBound_unsetSBOTerm(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the SBML FBC FluxBound structure with the sboTerm attribute unset

SBMLFluxBound = FluxBound_unsetValue(SBMLFluxBound)

Takes

  1. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the SBML FBC FluxBound structure with the fbc_value attribute unset

SBMLToolbox-4.1.0/docs/fbc_package/structure-functions/fBCSpecies.html0000644000000000000000000000552511660503634024370 0ustar rootroot

FBC_PACKAGE\MATLAB_SBML_STRUCTURES\FBCSPECIES

The functions allow users to create and work with the FBC elements and attributes of an SBML FBC Species structure.

Function are:


FBCSpecies = FBCSpecies_create(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. a MATLAB_SBML FBC FBCSpecies structure of the appropriate level, version and pkgVersion

charge = FBCSpecies_getCharge(SBMLFBCSpecies)

Takes

  1. SBMLFBCSpecies, an SBML FBCSpecies structure

Returns

  1. the value of the fbc_charge attribute

chemicalFormula = FBCSpecies_getChemicalFormula(SBMLFBCSpecies)

Takes

  1. SBMLFBCSpecies, an SBML FBCSpecies structure

Returns

  1. the value of the fbc_chemicalFormula attribute

charge = FBCSpecies_isSetCharge(SBMLFBCSpecies)

Takes

  1. SBMLFBCSpecies, an SBML FBCSpecies structure

Returns

  1. value =
    • 1 if the fbc_charge attribute is set
    • 0 otherwise

chemicalFormula = FBCSpecies_isSetChemicalFormula(SBMLFBCSpecies)

Takes

  1. SBMLFBCSpecies, an SBML FBCSpecies structure

Returns

  1. value =
    • 1 if the fbc_chemicalFormula attribute is set
    • 0 otherwise

SBMLFBCSpecies = FBCSpecies_setCharge(SBMLFBCSpecies, charge)

Takes

  1. SBMLFBCSpecies, an SBML FBCSpecies structure
  2. charge, a number representing the fbc_charge to be set

Returns

  1. the SBML FBC FBCSpecies structure with the new value for the fbc_charge attribute

SBMLFBCSpecies = FBCSpecies_setChemicalFormula(SBMLFBCSpecies, chemicalFormula)

Takes

  1. SBMLFBCSpecies, an SBML FBCSpecies structure
  2. chemicalFormula, a string representing the fbc_chemicalFormula to be set

Returns

  1. the SBML FBC FBCSpecies structure with the new value for the fbc_chemicalFormula attribute

SBMLFBCSpecies = FBCSpecies_unsetCharge(SBMLFBCSpecies)

Takes

  1. SBMLFBCSpecies, an SBML FBCSpecies structure

Returns

  1. the SBML FBC FBCSpecies structure with the fbc_charge attribute unset

SBMLFBCSpecies = FBCSpecies_unsetChemicalFormula(SBMLFBCSpecies)

Takes

  1. SBMLFBCSpecies, an SBML FBCSpecies structure

Returns

  1. the SBML FBC FBCSpecies structure with the fbc_chemicalFormula attribute unset

SBMLToolbox-4.1.0/docs/fbc_package/structure-functions/fBCModel.html0000644000000000000000000001053411660503634024031 0ustar rootroot

FBC_PACKAGE\MATLAB_SBML_STRUCTURES\FBCMODEL

The functions allow users to create and work with the FBC elements and attributes of an SBML FBC Model structure.

Function are:


SBMLFBCModel = FBCModel_addFluxBound(SBMLFBCModel, SBMLFluxBound)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure
  2. SBMLFluxBound, an SBML FluxBound structure

Returns

  1. the SBML FBCModel structure with the SBML FluxBound structure added

SBMLFBCModel = FBCModel_addObjective(SBMLFBCModel, SBMLObjective)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure
  2. SBMLObjective, an SBML Objective structure

Returns

  1. the SBML FBCModel structure with the SBML Objective structure added

FBCModel = FBCModel_create(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. a MATLAB_SBML FBC FBCModel structure of the appropriate level, version and pkgVersion

SBMLFBCModel = FBCModel_createFluxBound(SBMLFBCModel)

Takes

  1. FBCModel, an SBML FBCModel structure

Returns

  1. the SBML FBCModel structure with a new SBML FluxBound structure added

SBMLFBCModel = FBCModel_createObjective(SBMLFBCModel)

Takes

  1. FBCModel, an SBML FBCModel structure

Returns

  1. the SBML FBCModel structure with a new SBML Objective structure added

activeObjective = FBCModel_getActiveObjective(SBMLFBCModel)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure

Returns

  1. the value of the fbc_activeObjective attribute

fluxBound = FBCModel_getFluxBound(SBMLFBCModel, index)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure
  2. index, an integer representing the index of SBML FluxBound structure

Returns

  1. the SBML FluxBound structure at the indexed position

fluxBound = FBCModel_getListOfFluxBounds(SBMLFBCModel)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure

Returns

  1. an array of the fluxBound structures

objective = FBCModel_getListOfObjectives(SBMLFBCModel)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure

Returns

  1. an array of the objective structures

num = FBCModel_getNumFluxBounds(SBMLFBCModel)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure

Returns

  1. the number of SBML FluxBound structures present in the FBCModel

num = FBCModel_getNumObjectives(SBMLFBCModel)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure

Returns

  1. the number of SBML Objective structures present in the FBCModel

objective = FBCModel_getObjective(SBMLFBCModel, index)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure
  2. index, an integer representing the index of SBML Objective structure

Returns

  1. the SBML Objective structure at the indexed position

activeObjective = FBCModel_isSetActiveObjective(SBMLFBCModel)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure

Returns

  1. value =
    • 1 if the fbc_activeObjective attribute is set
    • 0 otherwise

SBMLFBCModel = FBCModel_setActiveObjective(SBMLFBCModel, activeObjective)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure
  2. activeObjective, a string representing the fbc_activeObjective to be set

Returns

  1. the SBML FBC FBCModel structure with the new value for the fbc_activeObjective attribute

SBMLFBCModel = FBCModel_unsetActiveObjective(SBMLFBCModel)

Takes

  1. SBMLFBCModel, an SBML FBCModel structure

Returns

  1. the SBML FBC FBCModel structure with the fbc_activeObjective attribute unset

SBMLToolbox-4.1.0/docs/fbc_package/structure/0000755000000000000000000000000011704572220017513 5ustar rootrootSBMLToolbox-4.1.0/docs/fbc_package/structure/objective.html0000644000000000000000000000300411662153034022351 0ustar rootroot

Objective

typecode = SBML_FBC_OBJECTIVE




SBML Level 3 Version 1

fbc Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
fbc_id string
fbc_type string
fbc_fluxObjective array of structures
SBMLToolbox-4.1.0/docs/fbc_package/structure/fluxobjective.html0000644000000000000000000000300211662153016023246 0ustar rootroot

FluxObjective

typecode = SBML_FBC_FLUXOBJECTIVE




SBML Level 3 Version 1

fbc Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
fbc_reaction string
fbc_coefficient double
isSetfbc_coefficient boolean
SBMLToolbox-4.1.0/docs/fbc_package/structure/fluxbound.html0000644000000000000000000000322511662153002022405 0ustar rootroot

FluxBound

typecode = SBML_FBC_FLUXBOUND




SBML Level 3 Version 1

fbc Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
fbc_id string
fbc_reaction string
fbc_operation string
fbc_value double
isSetfbc_value boolean
SBMLToolbox-4.1.0/docs/fbc_package/structure/fbcspecies.html0000644000000000000000000000565111665137076022532 0ustar rootroot

FBCSpecies

typecode = SBML_SPECIES




SBML Level 3 Version 1

fbc Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
sboTerm integer
name string
id string
compartment string
initialAmount double
initialConcentration double
substanceUnits string
hasOnlySubstanceUnits boolean
boundaryCondition boolean
constant boolean
isSetInitialAmount boolean
isSetInitialConcentration boolean
conversionFactor string
fbc_charge integer
isSetfbc_charge boolean
fbc_chemicalFormula string
∗ additional to core SBML_SPECIES
SBMLToolbox-4.1.0/docs/fbc_package/structure/fbcmodel.html0000644000000000000000000001047611665137102022166 0ustar rootroot

FBCModel

typecode = SBML_MODEL




SBML Level 3 Version 1

fbc Version 1
Fieldname Type
typecode as above
metaid string
notes string
annotation string
SBML_level double
SBML_version double
name string
id string
sboTerm integer
functionDefinition array of structures
unitDefinition array of structures
compartment array of structures
species array of structures
parameter array of structures
initialAssignment array of structures
rule array of structures
constraint array of structures
reaction array of structures
event array of structures
substanceUnits string
timeUnits string
lengthUnits string
areaUnits string
volumeUnits string
extentUnits string
conversionFactor string
fbc_fluxBound array of structures
fbc_objective array of structures
fbc_activeObjective string
∗ additional to core SBML_MODEL
‡ extended by fbc package
SBMLToolbox-4.1.0/docs/fbc_package/fbcValidation.html0000644000000000000000000001161611660503434021115 0ustar rootroot

FBC_PACKAGE\VALIDATE_MATLAB_SBML_STRUCTURES

This folder contains tests that checks that the structure supplied as argument is of the appropriate form to represent the intended element of an SBML model that includes the fbc package.

Function are:


[valid, message] = isSBML_FBC_FluxBound(SBMLFBCFluxBound, level, version, pkgVersion)

Takes

  1. SBMLStructure, an SBML FBC FluxBound structure
  2. level, an integer representing an SBML level
  3. version, an integer representing an SBML version
  4. pkgVersion, an integer representing an FBC package version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML FBC FluxBound structure of the appropriate level, version and FBC version
    • 0, otherwise
  2. a message explaining any failure

NOTE: The fields present in a MATLAB_SBML FBC FluxBound structure of the appropriate level and version can be found using getFluxBoundFieldnames(level, version, pkgVersion)


[valid, message] = isSBML_FBC_FluxObjective(SBMLFBCFluxObjective, level, version, pkgVersion)

Takes

  1. SBMLStructure, an SBML FBC FluxObjective structure
  2. level, an integer representing an SBML level
  3. version, an integer representing an SBML version
  4. pkgVersion, an integer representing an FBC package version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML FBC FluxObjective structure of the appropriate level, version and FBC version
    • 0, otherwise
  2. a message explaining any failure

NOTE: The fields present in a MATLAB_SBML FBC FluxObjective structure of the appropriate level and version can be found using getFluxObjectiveFieldnames(level, version, pkgVersion)


[valid, message] = isSBML_FBC_Model(SBMLFBCModel, level, version, pkgVersion)

Takes

  1. SBMLStructure, an SBML FBC Model structure
  2. level, an integer representing an SBML level
  3. version, an integer representing an SBML version
  4. pkgVersion, an integer representing an FBC package version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML FBC Model structure of the appropriate level, version and FBC version
    • 0, otherwise
  2. a message explaining any failure

NOTE: The fields present in a MATLAB_SBML FBC Model structure of the appropriate level and version can be found using getModelFieldnames(level, version, pkgVersion)


[valid, message] = isSBML_FBC_Objective(SBMLFBCObjective, level, version, pkgVersion)

Takes

  1. SBMLStructure, an SBML FBC Objective structure
  2. level, an integer representing an SBML level
  3. version, an integer representing an SBML version
  4. pkgVersion, an integer representing an FBC package version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML FBC Objective structure of the appropriate level, version and FBC version
    • 0, otherwise
  2. a message explaining any failure

NOTE: The fields present in a MATLAB_SBML FBC Objective structure of the appropriate level and version can be found using getObjectiveFieldnames(level, version, pkgVersion)


[valid, message] = isSBML_FBC_Species(SBMLFBCSpecies, level, version, pkgVersion)

Takes

  1. SBMLStructure, an SBML FBC Species structure
  2. level, an integer representing an SBML level
  3. version, an integer representing an SBML version
  4. pkgVersion, an integer representing an FBC package version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML FBC Species structure of the appropriate level, version and FBC version
    • 0, otherwise
  2. a message explaining any failure

NOTE: The fields present in a MATLAB_SBML FBC Species structure of the appropriate level and version can be found using getSpeciesFieldnames(level, version, pkgVersion)


[valid, message] = isValidFBC(SBMLStruct, level, version, pkgVersion)

Takes

  1. SBMLStruct, an SBML structure
  2. level, an integer representing an SBML level
  3. version, an integer representing an SBML version
  4. pkgVersion, an integer representing the FBC package version

Returns

  1. valid =
    • 1, if the structure represents a MATLAB_SBML FBC structure of the appropriate level and version
    • 0, otherwise
  2. a message explaining any failure

NOTE: The fields present in a MATLAB_SBML structure of the appropriate level and version can be found using getFieldnames(typecode, level, version)


SBMLToolbox-4.1.0/docs/fbc_package/fbcStructureFields.html0000644000000000000000000001236011660503126022145 0ustar rootroot

FBC_PACKAGE\MATLAB_SBML_STRUCTURES\STRUCTFIELDNAMES

These functions return the fieldnames and default values for the MATLAB_SBML FBC structures.

Function are:


[values] = getFBCModelDefaultValues(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. an array of default values for teh FBC attributes SBML Model structure of the given level and version

NOTE: The corresponding fields present in an SBML FBC Model structure can be found using the function getFBCModelFieldnames


[fieldnames, num] = getFBCModelFieldnames(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. an array of fieldnames for an SBML FBCModel structure of the given level and version
  2. the number of fieldnames

[values] = getFBCSpeciesDefaultValues(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. an array of default values for teh FBC attributes SBML Species structure of the given level and version

NOTE: The corresponding fields present in an SBML FBC Species structure can be found using the function getFBCSpeciesFieldnames


[fieldnames, num] = getFBCSpeciesFieldnames(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. an array of fieldnames for an SBML FBCSpecies structure of the given level and version
  2. the number of fieldnames

[values] = getFluxBoundsDefaultValues(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. an array of default values for an SBML FluxBound structure of the given level and version

NOTE: The corresponding fields present in an SBML FluxBound structure can be found using the function getFluxBoundFieldnames


[fieldnames, num] = getFluxBoundFieldnames(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. an array of fieldnames for an SBML FluxBound structure of the given level and version
  2. the number of fieldnames

[values] = getFluxObjectivesDefaultValues(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. an array of default values for an SBML FluxObjective structure of the given level and version

NOTE: The corresponding fields present in an SBML FluxObjective structure can be found using the function getFluxObjectiveFieldnames


[fieldnames, num] = getFluxObjectiveFieldnames(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. an array of fieldnames for an SBML FluxObjective structure of the given level and version
  2. the number of fieldnames

[values] = getObjectiveDefaultValues(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. an array of default values for an SBML Objective structure of the given level and version

NOTE: The corresponding fields present in an SBML Objective structure can be found using the function getObjectiveFieldnames


[fieldnames, num] = getObjectiveFieldnames(level, version, pkgVersion)

Takes

  1. level, an integer representing an SBML level
  2. version, an integer representing an SBML version
  3. pkgVersion, an integer representing an SBML package version

Returns

  1. an array of fieldnames for an SBML Objective structure of the given level and version
  2. the number of fieldnames

SBMLToolbox-4.1.0/docs/fbc_package/fbcpackage.html0000644000000000000000000000045211703263204020406 0ustar rootroot

FBC_PACKAGE

Functions for using the SBML L3V1 fbc package.

Function are:


fbcEnabled = isBindingFbcEnabled()

Returns

  1. fbcEnabled =
    • 1 if the executables are enabled with fbc support
    • 0 otherwise

SBMLToolbox-4.1.0/docs/convenience.html0000644000000000000000000001660011611210324016422 0ustar rootroot

CONVENIENCE

The Convenience folder contains a number of convenience functions for checking information or manipulating math expressions.

Function are:


y = CheckValidUnitKind(kind)

Takes

  1. kind, a string representing a unit kind

Returns

  1. y =
    • 1 if the string represents a valid unit kind
    • 0 otherwise

NOTE: This is identical to the function isValidUnitKind


newArray = LoseWhiteSpace(charArray)

Takes

  1. charArray, an array of characters

Returns

  1. the array with any white space removed

EXAMPLE:

     newArray = LoseWhiteSpace('     exa  mp le')

     newArray = 'example'

pairs = PairBrackets(expression)

Takes

  1. expression, a string representation of a math expression

Returns

  1. an array of the indices of each pair of brackets ordered from the opening bracket index

EXAMPLE:

     pairs = PairBrackets('(a+((b*c)/(a+b)))')

     pairs = 
                 1   17
                 4   16
                 5    9
                 11  15

output = Rearrange(expression, name)

Takes

  1. expression, a string representation of a math expression
  2. name, a string representing the name of a variable

Returns

  1. the expression rearranged in terms of the variable

EXAMPLE:

     output   =   Rearrange('X + Y - Z', 'X')

     output   =   '-Y+Z'

newArray = RemoveDuplicates(array)

Takes

  1. array, any array

Returns

  1. the array with any duplicate entries removed

EXAMPLE:

          newArray = RemoveDuplicates([2, 3, 4, 3, 2, 5])
          newArray = [2, 3, 4, 5]

value = Substitute(expression, SBMLModel)

Takes

  1. expression, a string representation of a math expression
  2. SBMLModel, an SBML Model structure

Returns

  1. the value of the expression when all variables within the model have been substituted

EXAMPLE:

     Consider m to be an SBMLModel containing a species with 
                id = 'g' and initialConcentration = '3' 

     value = Substitute('g*2', m)

     value = 6

newExpression = SubstituteConstants(expression, SBMLModel)

Takes

  1. expression, a string representation of a math expression
  2. SBMLModel, an SBML Model structure

Returns

  1. the string representation of the expression when all constants within the model have been substituted

EXAMPLE:

     Consider m to be an SBMLModel containing a parameter
          with id = 'g', constant = '1' and value = 3' 

     newExpression = SubstituteConstants('2 * g * S1', SBMLModel)

     newExpression = '2 * 3 * S1'

newExpression = SubstituteFunction(expression, SBMLFunctionDefinition)

Takes

  1. expression, a string representation of a math expression
  2. SBMLFunctionDefinition, an SBML FunctionDefinition structure

Returns

  1. newExpression
    • the string representation of the expression when any instances of the functionDefinition have been substituted
    • an empty string if the functiondefinition is not in the original expression

EXAMPLE:

     Consider fD to be an SBMLFunctionDefinition 
          with id = 'g' and math = 'lambda(x,x+0.5)' 

     formula = SubstituteFormula('g(y)', fD)

     formula = 'y+0.5'


     formula = SubstituteFormula('h(y)', fD)

     formula = ''

y = isIntegralNumber(number)

Takes

  1. number, any number

Returns

  1. y =
  2. 1 if the number represents an integer
  3. 0 otherwise

EXAMPLE:

          y = isIntegralNumber(int32(3))
          y = 1

          y = isIntegralNumber(double(3.2))
          y = 0

          y = isIntegralNumber(double(3))
          y = 1

NOTE: The inbuilt 'isinteger' function only returns true if the number has been declared as having an integer type, whereas the default type for numbers in MATLAB is double. This function will return '1' if the number represents an integer.


y = isValidUnitKind(kind)

Takes

  1. kind, a string representing a unit kind

returns

  1. y =
    • 1 if the string represents a valid unit kind
    • 0 otherwise

NOTE: This is identical to the function CheckValidUnitKind


index = matchFunctionName(expression, name)

Takes

  1. expression, a string representation of a math expression
  2. name, a string representing the name of a function

Returns

  1. the index of the starting point of 'name' in the 'expression'

EXAMPLE:

     index = matchFunctionName('f*g', 'g')

     index = []


     index = matchFunctionName('add(d,g_1)', 'add')

     index = 0


     index = matchFunctionName('add(add(a,b), c)', 'add')

     index = [1, 5]

NOTE: This differs from the 'strfind' function in that it checks that the name is used as a function call.


index = matchName(expression, name)

Takes

  1. expression, a string representation of a math expression
  2. name, a string representing the name of a variable

Returns

  1. the index of the starting point of 'name' in the 'expression'

EXAMPLE:

     index = matchName('f*g', 'g')

     index = 3


     index = matchName('f*g_1', 'g')

     index = []


     index = matchName('f*g(a,g)', 'g')

     index = 7

NOTE: This differs from the 'strfind' function in that it checks that the name is used as a variable.


value = piecewise(value1, test, value2)

Takes

  1. value1, the value to return if the test is true
  2. test, a boolean test that will return true or false
  3. value2, the value to return if the test is false

Returns

  1. value =
    • value1, if test returns true
    • value2, if test returns false

EXAMPLE:

          value = piecewise(3, 1<2, 4)
          value = 3

          value = piecewise(3, 1>2, 4)
          value = 4

NOTE: This function provides the functionality of the MathML 'piecewise' function.


y = testmember(value, array)

Takes

  1. value, any number/string
  2. array, an array of objects

Returns

  1. y =
    • 1 if value is a member of the array
    • 0 otherwise

NOTE: this function is necessary for octave to emulate the MATLAB functionality of the 'ismember' function


SBMLToolbox-4.1.0/docs/accessmodel.html0000644000000000000000000003057311611210324016415 0ustar rootroot

ACCESSMODEL

The AccessModel folder contains a number of functions that derive information from the MATLAB_SBML structures.

Function are:


array = DetermineSpeciesRoleInReaction(SBMLSpecies, SBMLReaction)

Takes

  1. SBMLSpecies, an SBML species structure
  2. SBMLReaction, an SBML reaction structure

Returns

  1. an array with five elements [isProduct, isReactant, isModifier, positionInProductList, positionInReactantList] indicating whether the species is a product, reactant or modifier and recording the position in the list of products/reactants

or

  1. array = 0 if the species is NOT part of the reaction

EXAMPLE:

         y   =   DetermineSpeciesRoleInReaction(s, r)
             =   0                 if s is not in r
             =   [1, 0, 0, 2, 0]   if s is product number 2 in rb 
             =   [0, 1, 0, 0, 1]   if s is reactant number 1 in r
             =   [0, 0, 1, 0, 0]   if s is a modifier in r
             =   [1, 1, 0, 1, 2]   if s is product number 1 and reactant number 2 in r

[names, values] = GetAllParameters(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all parameters (both global and embedded) within the model
  2. an array of the values of each parameter

NOTE: the value returned will be (in order)

  • determined from assignmentRules/initialAssignments where appropriate
  • the attribute 'value' for the given parameter
  • NaN, if the value is not specified in any way within the model

[names, values] = GetAllParametersUnique(SBMLModel)

Takes

  1. SBMLModel, an SBML model structure

Returns

  1. an array of strings representing the identifiers of all parameters (both global and embedded) within the model. Note: reaction names are appended to the names of parameters declared within a reaction
  2. an array of the values of each parameter

NOTE: the value returned will be (in order)

  • determined from assignmentRules/initialAssignments where appropriate
  • the attribute 'value' for the given parameter
  • NaN, if the value is not specified in any way within the model

EXAMPLE:

 model has 1 parameter k1 
       and reaction R1 that lists a local parameter k1

      [names, values] = GetAllParametersUnique(model)

                names = [k1, k1_R1]
               values = [2, 1.5]

names = GetCompartmentTypes(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all compartmentTypes within the model

[names, values] = GetCompartments(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all compartments within the model
  2. an array of the size/volume values of each compartment

NOTE: the value returned will be (in order)

  • determined from assignmentRules/initialAssignments where appropriate
  • the attribute 'size' ('volume' in L1) for the given compartment
  • NaN, if the value is not specified in any way within the model

[names, values] = GetGlobalParameters(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all global parameters within the model
  2. an array of the values of each parameter

NOTE: the value returned will be (in order)

  • determined from assignmentRules/initialAssignments where appropriate
  • the attribute 'value' for the given parameter
  • NaN, if the value is not specified in any way within the model

[parameters, algebraicRules] = GetParameterAlgebraicRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all parameters
  2. an array of

    • the character representation of each algebraic rule the parameter appears in
    • '0' if the particular parameter is not in an algebraic rule

EXAMPLE:

 model has 3 parameters (k1, k2, k3) 
       and 2 algebraic rules with formula 'k2+7' and 'k2-k3'

      [parameters, algebraicRules] = GetParameterAlgebraicRules(model)

               parameters     = ['k1', 'k2', 'k3']
               algebraicRules = {'0', ['k2+7', 'k2-k3'], ['k2-k3']}

[parameters, assignmentRules] = GetParameterAssignmentRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all parameters
  2. an array of

    • the character representation of the assignment rule used to assign value to a given parameter
    • '0' if the parameter is not assigned by a rule

[names, values] = GetParameterFromReaction(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. an array of strings representing the identifiers of all parameters defined within the kinetic law of the reaction
  2. an array of the values of each parameter

[names, values] = GetParameterFromReactionUnique(SBMLReaction)

Takes

  1. SBMLReaction, an SBML Reaction structure

Returns

  1. an array of strings representing the identifiers of all parameters defined within the kinetic law of the reaction, with the reaction name appended
  2. an array of the values of each parameter

EXAMPLE:

 reaction with id R1 has 2 parameters k1 and k2 

      [names, values] = GetParameterFromReactionUnique(reaction)

                names = [k1_R1, k2_R1]
               values = [2, 1.5]

[parameters, raterules] = GetParameterRateRules((SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all parameters
  2. an array of

    • the character representation of the rate rule used to assign value to a given parameter
    • '0' if the parameter is not assigned by a rule

[species, rateLaws] = GetRateLawsFromReactions(SBMLModel)

Takes

  1. SBMLModel; an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all species
  2. an array of

    • the character representation of the rate law established from any reactions that determines the particular species
    • '0' if the particular species is not a reactant/product in any reaction

EXAMPLE:

 model has 4 species (s1, s2, s3, s4) 
       and 2 reactions; s1 -> s2 with kineticLaw 'k1*s1'
                        s2 -> s3 with kineticLaw 'k2*s2'

      [species, rateLaws] = GetRateLawsFromReactions(model)

               species     = ['s1', 's2', 's3', 's4']
               rateLaws = {'-k1*s1', 'k1*s1-k2*s2', 'k2*s2', '0'}

[species, rateLaws] = GetRateLawsFromRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all species
  2. an array of

    • the character representation of the rateRule that determines the particular species
    • '0' if the particular species is not assigned by a rateRule

[names, values] = GetSpecies(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all species within the model
  2. an array of the initial concentration/amount values of each species

NOTE: the value returned will be (in order)

  • determined from assignmentRules/initialAssignments where appropriate
  • the attribute 'initialAmount' or 'initialConcentration' for the given parameter
  • NaN, if the value is not specified in any way within the model

[names, values] = GetSpeciesAlgebraicRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all species
  2. an array of

    • the character representation of each algebraic rule the species appears in
    • '0' if the particular species is not in an algebraic rule

EXAMPLE:

 model has 3 species (s1, s2, s3) 
       and 2 algebraic rules with formula 's2+7' and 's2-s3'

      [species, algebraicRules] = GetSpeciesAlgebraicRules(model)

               species     = ['s1', 's2', 's3']
               algebraicRules = {'0', ['s2+7', 's2-s3'], ['k2-k3']}

[species, assignmentRules] = GetSpeciesAssignmentRules(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all species
  2. an array of

    • the character representation of the assignment rule used to assign value to a given species
    • '0' if the species is not assigned by a rule

names = GetSpeciesTypes(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of all SpeciesTypes within the model

[matrix, species] = GetStoichiometryMatrix(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. the stoichiometry matrix produced from the reactions/species
  2. an array of strings representing the identifiers of all species within the model (in the order in which the matrix deals with them)

EXAMPLE:

 model has 5 species (s1, s2, s3, s4, s5) 
       and 3 reactions: s1 -> s2
                        s3 -> s5
                        2s1 -> s5

      [matrix, species] = GetRateLawsFromReactions(model)

               matrix = -1   0  -2
                         1   0   0
                         0  -1   0
                         0   1   1
               species     = ['s1', 's2', 's3', 's5']

        (species s4 does not play a role in any reaction)

S = GetStoichiometrySparse(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. a sparse stoichiometry matrix produced from the reactions/species

NOTE: This function was contributed by: Arsen Batagov (2006)


[names, values] = GetVaryingParameters(SBMLModel)

Takes

  1. SBMLModel, an SBML Model structure

Returns

  1. an array of strings representing the identifiers of any non-constant parameters within the model
  2. an array of the values of each of these parameter

NOTE: the value returned will be (in order)

  • determined from assignmentRules/initialAssignments where appropriate
  • the attribute 'value' for the given parameter
  • NaN; if the value is not specified in any way within the model

num = IsSpeciesInReaction(SBMLSpecies, SBMLReaction)

Takes

  1. SBMLSpecies, an SBML Species structure
  2. SBMLReaction, an SBML Reaction structure

Returns

  1. the number of times the species occurs within the reaction

SBMLToolbox-4.1.0/COPYING.txt0000644000000000000000000006364711540617602014211 0ustar rootroot GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. ^L Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. ^L GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. ^L Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. ^L 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. ^L 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. ^L 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. ^L 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS ^L How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! SBMLToolbox-4.1.0/COPYING.html0000644000000000000000000006471411540617602014332 0ustar rootroot

GNU LESSER GENERAL PUBLIC LICENSE

Version 2.1, February 1999

Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.

This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.

When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.

To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.

For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.

We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.

To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.

Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.

Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.

When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.

We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.

For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.

In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.

Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.

The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.

GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".

A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.

The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)

"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.

1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

a) The modified work must itself be a software library.

b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.

c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.

d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.

(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.

In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.

Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.

This option is useful when you wish to copy part of the code of the Library into a program that is not a library.

4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.

If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.

5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.

However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.

When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.

If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)

Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.

6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.

You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:

a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)

b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.

c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.

d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.

e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.

For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.

7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:

a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.

b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.

8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.

10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.

11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.

14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Libraries

If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).

To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

    <one line to give the library's name and a brief idea of what it
does.>
    Copyright (C) <year>  <name of author>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  library `Frob' (a library for tweaking knobs) written by James
  Random Hacker.

  <signature of Ty Coon>, 1 April 1990
  Ty Coon, President of Vice

That's all there is to it!

SBMLToolbox-4.1.0/AUTHORS.txt0000644000000000000000000000075011626644524014220 0ustar rootroot SBMLToolbox has been primarily developed by Sarah Keating with contributions from (in alphabetical order) Arsen Batagov, Ben Bornstein, Will Bryant, Bill Denney, Andrew Finney, Thomas Grotkjær, Mike Hucka, Pieter Pareit, Kieran Smallbone, Sumant Turlapati, and others in the SBML community. For more information about SBML or SBMLToolbox, contact: The SBML Team http://www.sbml.org/ mailto:sbml-team@caltech.edu