Taking distance into account in unimolecular reactions?

13 views
Skip to first unread message

Octave Hazard

unread,
Sep 21, 2021, 5:33:07 AM9/21/21
to kappa-users
Hi,

I am currently thinking of using Kappa for a DNA nanostructure assembly simulator.
I was wondering wether there was a way to write a rule that takes into account some information about the topology of the connected components of its reactants. More specifically, I would like to take into account the distance between to reactants of the same rule (for the unimolecular version of the rule).

I first hoped for a way to directly be able to write the unimolecular rate as a function of the distance between two species (for example: "A(b[.]), B(a[.]) → A(b[1]), B([1]) @ γ2 (γ1 * [exp] (-d_AB))" where d_AB is the distante between A and B). But it seems incompatible with the way the simulator works... However I saw here (https://groups.google.com/g/kappa-users/c/2e49uDxdBps/m/hhD23XL9YDcJ) that it may be possible to specify a fixed (maximum) distance between the agents in the description of the pattern. Is it actually implemented?

Thanks in advance !

Octave Hazard

Héctor F

unread,
Sep 22, 2021, 6:39:35 PM9/22/21
to kappa-users
Hi Octave!

Yes, this is implemented and works as expected. The manual maintainers will someday update their manuals with this syntax, but in the meantime:

rule @ 'binary' { 'unary' : 'horizon' }

So the horizon is an integer that limits the maximum bond distance between the agents matched by the unary application. For example:

%agent: K(j, l, s{a b})
%agent: H(h)
%init: 1 H(h[0]), K(s{a}, j[0], l[1]), K(s{a}, j[1], l[2]), K(s{a}, j[2], l[3]), K(s{a}, j[3], l[4]), K(s{a}, j[4], l[.])
%init: 1 H(h[0]), K(s{a}, j[0], l[1]), K(s{a}, j[1], l[2]), K(s{a}, j[2], l[3]), K(s{a}, j[3], l[.])
%init: 1 H(h[0]), K(s{a}, j[0], l[1]), K(s{a}, j[1], l[2]), K(s{a}, j[2], l[.])
%init: 1 H(h[0]), K(s{a}, j[0], l[1]), K(s{a}, j[1], l[.])
%init: 1 H(h[0]), K(s{a}, j[0], l[.])

H(), K(s{a/b}) @ 0.0 {3: 2}

In the above, there is one rule, that changes the state of K's site "s" from "a" to "b", when an H is bound at most 2 bonds away. The initial conditions are just 5 linear polymers, with an H at one end, and then a concatenation of Ks in their default "a" state. If you run this, it will deadlock (zero activity) when the "s" within H's horizon have been converted. The snapshot shows:

// Snapshot [Event: 9]
%def: "T0" "1.62535"
%init: 1 /*6 agents*/ H(h[1]), K(j[1] l[2] s{b}[.]), K(j[2] l[3] s{b}[.]), K(j[3] l[4] s{a}[.]), K(j[4] l[5] s{a}[.]), K(j[5] l[.] s{a}[.])
%init: 1 /*5 agents*/ H(h[1]), K(j[1] l[2] s{b}[.]), K(j[2] l[3] s{b}[.]), K(j[3] l[4] s{a}[.]), K(j[4] l[.] s{a}[.])
%init: 1 /*4 agents*/ H(h[1]), K(j[1] l[2] s{b}[.]), K(j[2] l[3] s{b}[.]), K(j[3] l[.] s{a}[.])
%init: 1 /*3 agents*/ H(h[1]), K(j[1] l[2] s{b}[.]), K(j[2] l[.] s{b}[.])
%init: 1 /*2 agents*/ H(h[1]), K(j[1] l[.] s{b}[.])

As there were 9 K's in "a" state within the various H's horizons, it took 9 events to convert them. The K's beyond H's horizon were not converted.

I hope that's helpful!
Héctor

NB: if you input a float for the horizon, KaSim won't complain and will just truncate.
Reply all
Reply to author
Forward
0 new messages