@@ -419,6 +419,37 @@ function rops!(ropvec,rarray,cs,kfs,krevs,V,start,ind)
419
419
end
420
420
421
421
422
+ function rops! (ropmat,rarray,fragmentbasedrxnarray,cs,kfs,krevs,V,start)
423
+ numfragmentbasedreacprod, numrxns = size (fragmentbasedrxnarray)
424
+ half = Int (numfragmentbasedreacprod/ 2 )
425
+ for i = 1 : length (kfs)
426
+ R = getrate (rarray,cs,kfs,krevs,V,i)
427
+
428
+ for j = 1 : half
429
+ if fragmentbasedrxnarray[j,i] != 0
430
+ @fastmath ropmat[fragmentbasedrxnarray[j,i]] -= R
431
+ end
432
+ end
433
+
434
+ for j = half+ 1 : numfragmentbasedreacprod
435
+ if fragmentbasedrxnarray[j,i] != 0
436
+ @fastmath ropmat[fragmentbasedrxnarray[j,i]] += R
437
+ end
438
+ end
439
+ end
440
+ end
441
+
442
+ function rops! (ropvec,rarray,fragmentbasedrxnarray,cs,kfs,krevs,V,start,ind)
443
+ numfragmentbasedreacprod, numrxns = size (fragmentbasedrxnarray)
444
+ half = Int (numfragmentbasedreacprod/ 2 )
445
+ for i = 1 : length (kfs)
446
+ @views c = count (isequal (ind),fragmentbasedrxnarray[half+ 1 : end ,i])- count (isequal (ind),fragmentbasedrxnarray[1 : half,i])
447
+ if c != 0.0
448
+ R = getrate (rarray,cs,kfs,krevs,V,i)
449
+ @fastmath @inbounds ropvec[i+ start] = c* R
450
+ end
451
+ end
452
+ end
422
453
423
454
"""
424
455
Calculates sensitivities with respect to `target` at the time point at the end of the simulation
0 commit comments