crn++ molecular programming language · crn++ molecular programming language marko vasic, david...
TRANSCRIPT
![Page 1: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/1.jpg)
CRN++Molecular Programming Language
Marko Vasic, David Soloveichik and Sarfraz Khurshid
Arm Research Summit, Austin, USASeptember 16, 2019
![Page 2: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/2.jpg)
Goal: Embed logic into living and synthetic biochemical systems
Electronic logic Chemical logic
![Page 3: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/3.jpg)
Smart drugs for health
target cells for killing by detecting particular combination of indicators
payload opens,kil ls cell
Applications of Smart Molecular Systems
Manufacturing complex nanostructures and materialsby self-assembly
controlling assembly with local computational rules
Douglas et al, Nature 2009
Douglas et al, Nature 2012Han et al, Science 2009
Cells as factories(bioreactors)
“chemical controller” within cells would dramatically increase production
Khalil, Collins, Nat Rev Gen 2010
![Page 4: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/4.jpg)
“Hello World” of molecular programming
A → Z1 + Y
B → Z2 + Y
Z1 + Z2 → K
Y + K → W
4
• Computes max function: Y = max(A, B)
• Abstract: doesn’t say what the chemical species (hardware) are
• Hard to reason, can we make it easier?
![Page 5: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/5.jpg)
How is computation in chemistry defined?
5
0 5 10 15
2
4
6
8
10
12
A
B
C
Species concentrations
A + B + F → A + B + C
C + F → W
CRN:
Equilibrium: 𝐶 = 𝐴 ∙ 𝐵
Multiplication!
ODE: 𝑑𝐶
𝑑𝑡= 𝐴 ∙ 𝐵 ∙ 𝐹 − 𝐶 ∙ 𝐹
![Page 6: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/6.jpg)
Challenges of molecular computation
• Analog computation: all reactions are always occurring.• How to detect and extract operations that are human understandable?
• How do we model sequential execution that we are used to?
• How do we model conditional execution (branching)?
• Convergence to solution: only at equilibrium correct solution is reached.• We need to compute in finite time → error is inevitable.
• How do we control error?
6
![Page 7: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/7.jpg)
CRN++ modules to implement basic commands
• CRN++ implements basic modules that are intuitive and understandable.
7
Load:
A → A + B
B → W
Add:
A → A + C
B → B + C
C → W
Sub:
A → A + C
B → B + H
C → W
C + H → W
Mul:A + B → A + B + C
C → W
Div:
A → A + C
B + C → B
• Modules must respect strict properties to enable compositions.
• CRN++ is modular and allows for including additional modules.• Modules need to follow the principles of composability and convergence speed
…others
Buisman et al. 2009
![Page 8: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/8.jpg)
How do we enable sequential execution?
• CRN++ provides step statement for ordering execution
• It relies on chemical oscillator underneath (analog to clock signal)
8
CRN = {conc[a, 3],
step[{rxn[a, b, 1]
}],
step[{
rxn[b, c, 1]}]
};
A B C
![Page 9: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/9.jpg)
How do we model conditional execution?
• CRN++ supports cmp instruction that enables branching.
9
CRN = {step[{
….....
cmp[a, b]}],step[{
ifGT[{ ... }],
ifLT[{ ... }]}]
};
Only if a > b
Comparison
![Page 10: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/10.jpg)
Epsilon Equality
• Signal analog (ε equality, ε = 0.5)
• GT, GE, EQ, LE, LT blocks supported
10
A
B< ε
A + ε
B + ε
compare
![Page 11: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/11.jpg)
Reducing error through faster convergence
11
Linear convergence Exponential convergence
error ∝ 1/t error ∝ e-t
![Page 12: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/12.jpg)
Putting It All Together: GCD
• Compute Greatest Common Divisor of two numbers
12
1: procedure gcd(a, b)2: while a ≠ b do3: if a > b then4: a ← a − b5: else6: b ← b − a7: end if8: end while9: return a10: end procedure
GCD= {step[{
ld[a, atmp],ld[b, btmp],cmp[a, b]
}],step[{
ifGT[{ sub[atmp, btmp, a] }],ifLT[{ sub[btmp, atmp, b] }]
}]};
![Page 13: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/13.jpg)
GCD Simulation Results
13
0 100 200 300 400 500
5
10
15
20
25
30 A
B
Initial values: A = 32, B = 12A and B converge to GCD(32, 12) = 4.
![Page 14: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/14.jpg)
CRN++ Programs
14
Counter GCD Integer square root
Factorial Integer Division Euler Number Approximation
![Page 15: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/15.jpg)
Error Analysis
• Error inevitable
• Feedback during simulation (expected vs actual value)
15
GCD= {conc[a, 32], conc[b, 12],step[{
ld[a, atmp],ld[b, btmp],cmp[a, b]
}],step[{
ifGT[{ sub[atmp, btmp, a] }],ifLT[{ sub[btmp, atmp, b] }]
}]};
Expected: a=32, b=12, atmp=0, btmp=0Actual: a=32, b=12, atmp=0, btmp=0
Expected: a=20, b=12, atmp=32, btmp=12Actual: a=20.011, b=12.007, atmp=31.98, btmp=0.02
Expected: a=32, b=12, atmp=32, btmp=12Actual: a=32.05, b=12.01, atmp=31.99, btmp=0.001
![Page 16: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/16.jpg)
Error Analysis
• Plot showing difference between expected and actual value
• Insight into sources of error
16
0 100 200 300 400
0.00001
0.00002
0.00003
0.00004
0.00005
0.00006
0.00007
Error for variable a in GCD program
![Page 17: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/17.jpg)
Program Refactoring
17
• Rewriting CRN++ programs can lead to solutions with smaller error• Rewriting subtraction.• Error now constant!
Original CRN
Rewritten CRN
![Page 18: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/18.jpg)
Conclusions and Future Work
• Designed an intuitive language for programming chemistry
• Future work:• How do we understand algorithms that happen in living cells and map them back
to programming languages such as CRN++
• How do we translate CRN++ languages to chemical reactions biologists are familiar with, such as transcriptional networks, protein-protein networks, etc.
• CRN++ open sourced: https://github.com/marko-vasic/crnPlusPlus
• Contact: [email protected]
18
![Page 19: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/19.jpg)
Questions
19
![Page 20: CRN++ Molecular Programming Language · CRN++ Molecular Programming Language Marko Vasic, David Soloveichik and Sarfraz Khurshid Arm Research Summit, Austin, USA September 16, 2019](https://reader034.vdocuments.us/reader034/viewer/2022043017/5f39e4cce3507e1fcc6da541/html5/thumbnails/20.jpg)
Smart drugs for health
target cells for killing by detecting particular combination of indicators
miR
-122
a
let-
7c
miR
-15a
miR
-10b
miR
-124
a
payload opens,kills cell
Applications of Smart Molecular Systems
Manufacturing complex nanostructures and materialsby self-assembly
controlling assembly with local computational rules
Douglas et al, Nature 2009
Seelig et al, Science 2006 + Douglas et al, Nature 2012 Han et al, Science 2009
Cells as factories(bioreactors)
“chemical controller” within cells would dramatically increase production
Khalil, Collins, Nat Rev Gen 2010