Dateien nach "mod" hochladen

This commit is contained in:
kilian 2026-07-10 12:35:15 +02:00
parent 0c2eec0d9e
commit bf6629de02
4 changed files with 53 additions and 16 deletions

View File

@ -211,6 +211,30 @@ rule [
"""
)
#hydroxylation = Rule.fromGMLString(
"""
rule [
left [
node [ id 1 label "H" ]
edge [ source 1 target 2 label "-" ]
]
context [
node [ id 2 label "C" ]
node [ id 3 label "C" ]
node [ id 4 label "C" ]
edge [ source 2 target 3 label ":" ]
edge [ source 2 target 4 label ":" ]
]
right [
node [ id 5 label "O" ]
node [ id 6 label "H" ]
edge [ source 2 target 5 label "-" ]
edge [ source 5 target 6 label "-" ]
]
]
"""
#)
#decarboxylation = Rule.fromGMLString(
"""
rule [
@ -277,21 +301,19 @@ for a in inputRules:
dg = DG(graphDatabase=inputGraphs)
dg.build().execute(
addSubset(inputGraphs)
>> rightPredicate[
lambda d: all(g.vLabelCount("C") <= 30 for g in d.right)
](
repeat(inputRules)
)
>>repeat(inputRules)
)
#rightPredicate[
# lambda d: all(g.vLabelCount("C") <= 30 for g in d.right)
# ](
dg.print()
postSection("Product Graphs")
for a in dg.vertices:
a.graph.print()
flowAutocata = Flow(dg)
flowAutocata.overallAutocatalysis.enable()
for a in {cinnamon}:
flowAutocata.addSource(a)
flowAutocata.addSource(cinnamon)
flowAutocata.addSink(vanilline)
flowAutocata.findSolutions()
flowAutocata.solutions.list()

View File

@ -114,6 +114,27 @@ nmethylation = Rule.fromGMLString(
]"""
)
#doublebondflip = Rule.fromGMLString(
"""rule [
left [
edge [ source 1 target 2 label "-" ]
edge [ source 2 target 3 label "-" ]
edge [ source 3 target 4 label "=" ]
]
context [
node [ id 1 label "H" ]
node [ id 2 label "N" ]
node [ id 3 label "C"]
node [ id 4 label "N"]
]
right [
edge [ source 1 target 4 label "-" ]
edge [ source 4 target 3 label "-" ]
edge [ source 3 target 2 label "=" ]
]
]"""
#)
flowPrinter = FlowPrinter()
flowPrinter.printUnfiltered = False
@ -127,11 +148,7 @@ for a in inputRules:
dg = DG(graphDatabase=inputGraphs)
dg.build().execute(
addSubset(inputGraphs)
>> rightPredicate[
lambda d: all(g.vLabelCount("C") <= 20 for g in d.right)
](
repeat(inputRules)
)
>>repeat(inputRules)
)
dg.print()
postSection("Product Graphs")
@ -139,9 +156,7 @@ for a in dg.vertices:
a.graph.print()
flowAutocata = Flow(dg)
flowAutocata.overallAutocatalysis.enable()
for a in {xanthine}:
flowAutocata.addSource(a)
flowAutocata.addSource(xanthine)
flowAutocata.addSink(caffeine)
flowAutocata.findSolutions()
flowAutocata.solutions.list()

Binary file not shown.

BIN
mod/summaryNMeDBflip.pdf Normal file

Binary file not shown.