BioSIMI-Python/modules/Subsystem.py
def unsetReversibleReactions(self, indexList, rateFormulaList = None):
        ''' The indexList is used to unset the corresponding reactions' reversible
        attribute by setting it as False. 
        The rateFormulaList is a list of strings with math formula 
        for the new rates of the corresponding reactions that are 
        being set as reversible. Returns the new Subsystem object with changes made
        '''
        if not indexList:
            print('The list of index for reactions is empty.')
            return
        newSubsystem = self.getSystem().createNewSubsystem(3,1)
        model_orig = self.getSubsystemDoc().getModel()
        newSubsystem.getSubsystemDoc().setModel(model_orig)
        model = newSubsystem.getSubsystemDoc().getModel()
        if type(indexList) is int:
            rxn = model.getReaction(indexList-1)
            rxn.setReversible(False)
            if rateFormulaList:
                rxn.unsetKineticLaw()
                rxn_obj = NewReaction(rxn)
                formulaString = rateFormulaList
                math_ast = rxn_obj.createMath(formulaString)
                kinetic_law = rxn_obj.createRate(math_ast)
                rxn.setKineticLaw(kinetic_law)
            return newSubsystem

        for i in range(len(indexList)):
            index = indexList[i]
            rxn = model.getReaction(index-1)
            rxn.setReversible(False)
            if rateFormulaList:
                rxn.unsetKineticLaw()
                rxn_obj = NewReaction(rxn)
                formulaString = rateFormulaList[i]
                math_ast = rxn_obj.createMath(formulaString)
                kinetic_law = rxn_obj.createRate(math_ast)
                rxn.setKineticLaw(kinetic_law)
        return newSubsystem
 The indexList is used to unset the corresponding reactions' reversible
        attribute by setting it as False. 
        The rateFormulaList is a list of strings with math formula 
        for the new rates of the corresponding reactions that are 
        being set as reversible. Returns the new Subsystem object with changes made
        
The indexList is used to unset the corresponding reactions' reversible
attribute by setting it as False.
The rateFormulaList is a list of strings with math formula
for the new rates of the corresponding reactions that are
being set as reversible. Returns the new Subsystem object with changes made
The indexList is used to unset the corresponding reactions ' reversible attribute by setting it as False . The rateFormulaList is a list of strings with math formula for the new rates of the corresponding reactions that are being set as reversible . Returns the new Subsystem object with changes made
def unsetReversibleReactions(self, indexList, rateFormulaList = None):
        if not indexList:
            print('The list of index for reactions is empty.')
            return
        newSubsystem = self.getSystem().createNewSubsystem(3,1)
        model_orig = self.getSubsystemDoc().getModel()
        newSubsystem.getSubsystemDoc().setModel(model_orig)
        model = newSubsystem.getSubsystemDoc().getModel()
        if type(indexList) is int:
            rxn = model.getReaction(indexList-1)
            rxn.setReversible(False)
            if rateFormulaList:
                rxn.unsetKineticLaw()
                rxn_obj = NewReaction(rxn)
                formulaString = rateFormulaList
                math_ast = rxn_obj.createMath(formulaString)
                kinetic_law = rxn_obj.createRate(math_ast)
                rxn.setKineticLaw(kinetic_law)
            return newSubsystem
        for i in range(len(indexList)):
            index = indexList[i]
            rxn = model.getReaction(index-1)
            rxn.setReversible(False)
            if rateFormulaList:
                rxn.unsetKineticLaw()
                rxn_obj = NewReaction(rxn)
                formulaString = rateFormulaList[i]
                math_ast = rxn_obj.createMath(formulaString)
                kinetic_law = rxn_obj.createRate(math_ast)
                rxn.setKineticLaw(kinetic_law)
        return newSubsystem
def unsetReversibleReactions ( self , indexList , rateFormulaList = None ) : if not indexList : print ( 'The list of index for reactions is empty.' ) return newSubsystem = self . getSystem ( ) . createNewSubsystem ( 3 , 1 ) model_orig = self . getSubsystemDoc ( ) . getModel ( ) newSubsystem . getSubsystemDoc ( ) . setModel ( model_orig ) model = newSubsystem . getSubsystemDoc ( ) . getModel ( ) if type ( indexList ) is int : rxn = model . getReaction ( indexList - 1 ) rxn . setReversible ( False ) if rateFormulaList : rxn . unsetKineticLaw ( ) rxn_obj = NewReaction ( rxn ) formulaString = rateFormulaList math_ast = rxn_obj . createMath ( formulaString ) kinetic_law = rxn_obj . createRate ( math_ast ) rxn . setKineticLaw ( kinetic_law ) return newSubsystem for i in range ( len ( indexList ) ) : index = indexList [ i ] rxn = model . getReaction ( index - 1 ) rxn . setReversible ( False ) if rateFormulaList : rxn . unsetKineticLaw ( ) rxn_obj = NewReaction ( rxn ) formulaString = rateFormulaList [ i ] math_ast = rxn_obj . createMath ( formulaString ) kinetic_law = rxn_obj . createRate ( math_ast ) rxn . setKineticLaw ( kinetic_law ) return newSubsystem
The indexList is used to unset the corresponding reactions' reversible
attribute by setting it as False.
The indexList is used to unset the corresponding reactions ' reversible attribute by setting it as False .
''' The indexList is used to unset the corresponding reactions' reversible
        attribute by setting it as False. 
        The rateFormulaList is a list of strings with math formula 
        for the new rates of the corresponding reactions that are 
        being set as reversible. Returns the new Subsystem object with changes made
        '''
self
indexList
rateFormulaList