HOW TO WRITE A BioNetGen2 INPUT FILE
The simplest example
begin parameters
A0 100
B0 500
kp1 0.01
km1 0.1
end parameters
begin species
A(b) A0
B(a) B0
end species
begin reaction rules
A(b) + B(a) <-> A(b!1,).B(a!1) kp1, km1
end reaction rules
begin observables
Molecules A A()
Molecules B B(a!?)
Molecules A_bind A(b!+)
Molecules B_bind B(a!+)
end observables
generate_network();
writeSBML();
#simulate_ssa({t_end=>50,n_steps=>20});
simulate_ode({t_end=>50,n_steps=>20});
Extension example
begin parameters
A0 1000
B0 500
kp1 0.46e-5
km1 1.0
p 100
d 5
end parameters
begin species
A(b) A0
B(a,Y~U) B0
end species
begin reaction rules
A(b) + B(a) <-> A(b!1).B(a!1) kp1, km1
A(b!1).B(a!1,Y~U) -> A(b!1).B(a!1,Y~P) p
B(Y~P) -> B(Y~P) d
end reaction rules
begin observables
Molecules A A()
Molecules BP B(a!?,Y~P)
Molecules BU B(a!?,Y~U)
Molecules A_bind A(b!+)
Molecules B_bind B(a!+)
Molecules BP_bind B(a!+,Y~P)
Molecules BU_bind B(a!+,Y~U)
end observables
generate_network();
writeSBML();
#simulate_ssa({t_end=>50,n_steps=>20});
simulate_ode({t_end=>50,n_steps=>20});
Compartmental example
begin parameters
A0 1000
B0 500
kp1 0.46e-5
km1 1.0
p 100
d 5
t 10
end parameters
begin species
A(b,loc~Cyt) A0
B(a,Y~U,loc~Cyt) B0
end species
begin reaction rules
A(b,loc~Cyt) + B(a,loc~Cyt) <-> A(b!1,loc~Cyt).B(a!1,loc~Cyt) kp1, km1
A(b!1).B(a!1,Y~U) -> A(b!1).B(a!1,Y~P) p
B(Y~P,a,loc~Cyt) -> B(Y~P,a,loc~Nuc) t
B(Y~P,loc~Nuc) -> B(Y~U,loc~Nuc) p
end reaction rules
begin observables
Molecules A A()
Molecules BP B(a!?,Y~P)
Molecules BPC B(a!?,Y~P,loc~Cyt)
Molecules BPN B(a!?,Y~P,loc~Nuc)
Molecules BU B(a!?,Y~U)
Molecules A_bind A(b!+)
Molecules B_bind B(a!+)
end observables
generate_network();
writeSBML();
#simulate_ssa({t_end=>50,n_steps=>20});
simulate_ode({t_end=>50,n_steps=>20});
#%VC% mergeReversibleReactions
#%VC% speciesRenamePattern("\." , "_")
#%VC% speciesRenamePattern("[\(,][a-zA-Z]\w*", "")
#%VC% speciesRenamePattern("~|!\d*", "")
#%VC% speciesRenamePattern("\(\)", "")
#%VC% speciesRenamePattern("\)", "")
#%VC% setUnit("all", "default")
#%VC% compartmentalizeSpecies("loc~Nuc", "Nucleus", "Cytoplasm")
#%VC% compartmentalizeSpecies("loc~Cyt", "Cytoplasm", "")
Cartoon of a toy model at BioNetGen@VCell screen
Another set of parameters
begin parameters
1 L0 200
2 R0 200
3 A0 50
4 kp1 0.01
5 km1 1
6 kp2 1
7 km2 1
8 p1 10
9 d1 5
10 kpA 10
11 kmA 5
end parameters