10.4. Local Geometry and Stereochemistry¶
10.4.1. Stereospecific Aconitase¶
Modelling of the reaction performed by the aconitase enzyme in the citric acid cycle: citrate to D-isocitrate. The rule implements the stereo-specificity of the reaction.
1water = smiles("O", "H_2O")
2cit = smiles("C(C(=O)O)C(CC(=O)O)(C(=O)O)O", name="Cit")
3d_icit = smiles("C([C@@H]([C@H](C(=O)O)O)C(=O)O)C(=O)O", name="D-ICit")
4
5aconitase = ruleGMLString("""rule [
6 ruleID "Aconitase"
7 left [
8 # the dehydrated water
9 edge [ source 1 target 100 label "-" ]
10 edge [ source 2 target 102 label "-" ]
11 # the hydrated water
12 edge [ source 200 target 202 label "-" ]
13 ]
14 context [
15 node [ id 1 label "C" ]
16 edge [ source 1 target 2 label "-" ] # goes from - to = to -
17 node [ id 2 label "C" ]
18 # the dehydrated water
19 node [ id 100 label "O" ]
20 edge [ source 100 target 101 label "-" ]
21 node [ id 101 label "H" ]
22 node [ id 102 label "H" ]
23 # the hydrated water
24 node [ id 200 label "O" ]
25 edge [ source 200 target 201 label "-" ]
26 node [ id 201 label "H" ]
27 node [ id 202 label "H" ]
28 # dehydrated C neighbours
29 node [ id 1000 label "C" ]
30 edge [ source 1 target 1000 label "-" ]
31 node [ id 1010 label "O" ]
32 edge [ source 1000 target 1010 label "-" ]
33 node [ id 1001 label "C" ]
34 edge [ source 1 target 1001 label "-" ]
35 # hydrated C neighbours
36 node [ id 2000 label "C" ]
37 edge [ source 2 target 2000 label "-" ]
38 node [ id 2001 label "H" ]
39 edge [ source 2 target 2001 label "-" ]
40 ]
41 right [
42 # The '!' in the end changes it from TetrahedralSym to
43 # TetrahedralFixed
44 node [ id 1 stereo "tetrahedral[1000, 1001, 202, 2]!" ]
45 node [ id 2 stereo "tetrahedral[200, 1, 2000, 2001]!" ]
46 # the dehydrated water
47 edge [ source 100 target 102 label "-" ]
48 # the hydrated water
49 edge [ source 1 target 202 label "-" ]
50 edge [ source 2 target 200 label "-" ]
51 ]
52]""")
53
54dg = DG(graphDatabase=inputGraphs,
55 labelSettings=LabelSettings(
56 LabelType.Term,
57 LabelRelation.Specialisation,
58 LabelRelation.Specialisation))
59dg.build().execute(addSubset(cit, water) >> aconitase)
60for e in dg.edges:
61 p = GraphPrinter()
62 p.withColour = True
63 e.print(p, matchColour="Maroon")
10.4.2. Stereoisomers of Tartaric Acid¶
Generation of stereoisomers of tartaric acid, starting from a model without stereo-information and fixating each tetrahedral embedding.
1smiles("C(C(C(=O)O)O)(C(=O)O)O", name="Tartaric acid")
2smiles("[C@@H]([C@H](C(=O)O)O)(C(=O)O)O", name="L-tartaric acid")
3smiles("[C@H]([C@@H](C(=O)O)O)(C(=O)O)O", name="D-tartaric acid")
4smiles("[C@@H]([C@@H](C(=O)O)O)(C(=O)O)O", name="Meso-tartaric acid")
5change = ruleGMLString("""rule [
6 ruleID "Change"
7 left [
8 node [ id 0 stereo "tetrahedral" ]
9 ]
10 context [
11 node [ id 0 label "*" ]
12 node [ id 1 label "*" ]
13 node [ id 2 label "*" ]
14 node [ id 3 label "*" ]
15 node [ id 4 label "*" ]
16 edge [ source 0 target 1 label "-" ]
17 edge [ source 0 target 2 label "-" ]
18 edge [ source 0 target 3 label "-" ]
19 edge [ source 0 target 4 label "-" ]
20 ]
21 right [
22 node [ id 0 stereo "tetrahedral[1, 2, 3, 4]!" ]
23 ]
24]""")
25
26dg = DG(graphDatabase=inputGraphs,
27 labelSettings=LabelSettings(
28 LabelType.Term,
29 LabelRelation.Specialisation,
30 LabelRelation.Specialisation))
31dg.build().execute(addSubset(inputGraphs) >> repeat(change))
32
33p = GraphPrinter()
34p.setMolDefault()
35p.withPrettyStereo = True
36change.print(p)
37p = DGPrinter()
38p.withRuleName = True
39p.withRuleId = False
40dg.print(p)
10.4.3. Non-trivial Stereoisomers¶
Generation of stereoisomers in a non-trivial molecule.
1g = smiles("N[C@](O)([C@](S)(P)(O))([C@](S)(P)(O))")
2change = ruleGMLString("""rule [
3 ruleID "Change"
4 left [
5 node [ id 0 stereo "tetrahedral" ]
6 ]
7 context [
8 node [ id 0 label "*" ]
9 node [ id 1 label "*" ]
10 node [ id 2 label "*" ]
11 node [ id 3 label "*" ]
12 node [ id 4 label "*" ]
13 edge [ source 0 target 1 label "-" ]
14 edge [ source 0 target 2 label "-" ]
15 edge [ source 0 target 3 label "-" ]
16 edge [ source 0 target 4 label "-" ]
17 ]
18 right [
19 node [ id 0 stereo "tetrahedral[1, 2, 3, 4]!" ]
20 ]
21]""")
22
23dg = DG(graphDatabase=inputGraphs,
24 labelSettings=LabelSettings(
25 LabelType.Term,
26 LabelRelation.Specialisation,
27 LabelRelation.Specialisation))
28dg.build().execute(addSubset(inputGraphs) >> repeat(change))
29
30p = GraphPrinter()
31p.setMolDefault()
32p.withPrettyStereo = True
33change.print(p)
34p = DGPrinter()
35p.withRuleName = True
36p.withRuleId = False
37dg.print(p)