File: monodromy-experiment.m2

package info (click to toggle)
macaulay2 1.21%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 133,096 kB
  • sloc: cpp: 110,377; ansic: 16,306; javascript: 4,193; makefile: 3,821; sh: 3,580; lisp: 764; yacc: 590; xml: 177; python: 140; perl: 114; lex: 65; awk: 3
file content (45 lines) | stat: -rw-r--r-- 1,000 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
restart
FF = CC_53
needsPackage "ReactionNetworks"
needsPackage "NAGtools"
CRN = reactionNetwork "A <--> 2B, A + C <--> D, B + E --> A + C, D --> B + E"
stSpace = stoichiometricSubspace CRN
F = matrix{steadyStateEquations(CRN,FF)}
R = ring F
n = numgens R
pre0 = point{apply(n,i->random FF)}
F0 = sub(F, apply(gens R,coordinates pre0,(x,x0)->x=>x0))
V = numericalIrreducibleDecomposition ideal F0
W = first V#3
c0 = sample W

normals = sub(gens stSpace,FF)
L = (vars R - matrix pre0) * normals

setDefault(Software=>PHCPACK)
stop = (n,L)->n>1
rMatrix = random(FF^(numgens R),FF^(numcols(F|L)))
elapsedTime sols = solveViaMonodromy(sub(rMatrix,R) * transpose (F|L),c0,{pre0},
    StoppingCriterion=>stop);

end





R' = FF[gens R]
toR' = map(R',R, vars R' | random(FF^1,FF^(numgens coefficientRing R)))
F' = toR' matrix{F}
L = vars R' * sub(gens stSpace,FF) - random(FF^1,FF^(numgens stSpace))





I = ideal (F')
isPrime I
dec = decompose I
sols = solveSystem polySystem transpose (F'|L_{1})
#sols