BioSIMI-Python/modules/SimpleModel.py
def createNewReaction(self, rId, rStr, rRate, rFast = False, isConstant = False):
        ''' 
        Creates a new Reaction object inside the 
        Model with the given attributes and returns a pointer to the Reaction object created
        '''
        model = self.getModel()
        check(model,'retreived model object')
        r_obj = model.createReaction()
        check(r_obj, 'created r_obj reaction')
        check(r_obj.setId(rId), 'set r_obj ID')
        check(r_obj.setFast(rFast), 'set r_obj Fast')
        newRxn = NewReaction(r_obj)
        reactantList, reactant_stoichList, productList, product_stoichList = newRxn.parseReactionString(rStr)
        for reactant, stoich in zip(reactantList, reactant_stoichList):
            reactant_sp = self.getSpeciesByName(reactant)
            if type(reactant_sp) is list:
                raise SyntaxError('Multiple species found with the same name.')
            newRxn.createNewReactant(reactant_sp.getId(), isConstant, stoich)
        for product, stoich in zip(productList, product_stoichList):
            product_sp = self.getSpeciesByName(product)
            if type(product_sp) is list:
                raise SyntaxError('Multiple species found with the same name.')
            newRxn.createNewProduct(product_sp.getId(), isConstant, stoich)
        newRxn_math = newRxn.createMath(rRate)
        newRxn.createRate(newRxn_math)
        return r_obj
 
        Creates a new Reaction object inside the 
        Model with the given attributes and returns a pointer to the Reaction object created
        
Creates a new Reaction object inside the
Model with the given attributes and returns a pointer to the Reaction object created
Creates a new Reaction object inside the Model with the given attributes and returns a pointer to the Reaction object created
def createNewReaction(self, rId, rStr, rRate, rFast = False, isConstant = False):
        model = self.getModel()
        check(model,'retreived model object')
        r_obj = model.createReaction()
        check(r_obj, 'created r_obj reaction')
        check(r_obj.setId(rId), 'set r_obj ID')
        check(r_obj.setFast(rFast), 'set r_obj Fast')
        newRxn = NewReaction(r_obj)
        reactantList, reactant_stoichList, productList, product_stoichList = newRxn.parseReactionString(rStr)
        for reactant, stoich in zip(reactantList, reactant_stoichList):
            reactant_sp = self.getSpeciesByName(reactant)
            if type(reactant_sp) is list:
                raise SyntaxError('Multiple species found with the same name.')
            newRxn.createNewReactant(reactant_sp.getId(), isConstant, stoich)
        for product, stoich in zip(productList, product_stoichList):
            product_sp = self.getSpeciesByName(product)
            if type(product_sp) is list:
                raise SyntaxError('Multiple species found with the same name.')
            newRxn.createNewProduct(product_sp.getId(), isConstant, stoich)
        newRxn_math = newRxn.createMath(rRate)
        newRxn.createRate(newRxn_math)
        return r_obj
def createNewReaction ( self , rId , rStr , rRate , rFast = False , isConstant = False ) : model = self . getModel ( ) check ( model , 'retreived model object' ) r_obj = model . createReaction ( ) check ( r_obj , 'created r_obj reaction' ) check ( r_obj . setId ( rId ) , 'set r_obj ID' ) check ( r_obj . setFast ( rFast ) , 'set r_obj Fast' ) newRxn = NewReaction ( r_obj ) reactantList , reactant_stoichList , productList , product_stoichList = newRxn . parseReactionString ( rStr ) for reactant , stoich in zip ( reactantList , reactant_stoichList ) : reactant_sp = self . getSpeciesByName ( reactant ) if type ( reactant_sp ) is list : raise SyntaxError ( 'Multiple species found with the same name.' ) newRxn . createNewReactant ( reactant_sp . getId ( ) , isConstant , stoich ) for product , stoich in zip ( productList , product_stoichList ) : product_sp = self . getSpeciesByName ( product ) if type ( product_sp ) is list : raise SyntaxError ( 'Multiple species found with the same name.' ) newRxn . createNewProduct ( product_sp . getId ( ) , isConstant , stoich ) newRxn_math = newRxn . createMath ( rRate ) newRxn . createRate ( newRxn_math ) return r_obj
Creates a new Reaction object inside the
Model with the given attributes and returns a pointer to the Reaction object created
Creates a new Reaction object inside the Model with the given attributes and returns a pointer to the Reaction object created
''' 
        Creates a new Reaction object inside the 
        Model with the given attributes and returns a pointer to the Reaction object created
        '''
self
rId
rStr
rRate
rFast
isConstant