0 | module CyBy.Draw.Internal.Abbreviations
2 | import CyBy.Draw.Internal.Atom
3 | import CyBy.Draw.Internal.Graph
4 | import Derive.Prelude
8 | %language ElabReflection
11 | record Abbreviation where
18 | %runElab derive "Abbreviation" [Show,Eq]
20 | abbr : String -> String -> String -> Abbreviation
21 | abbr x y = A x y . readMolfile
24 | reverseLabel : String -> List Abbreviation -> String
25 | reverseLabel s [] = s
26 | reverseLabel s (A l r _ :: xs) = if s == l then r else reverseLabel s xs
31 | ac, oAc, bn, bz : String
35 | phenyl = readMolfile ph
38 | abbreviations : List Abbreviation
44 | , abbr "OAc" "AcO" oAc
51 | created by cyby-draw 1.0
54 | -2.3125 2.9375 0.0000 C
55 | -2.3125 4.1875 0.0000 O
56 | -3.3950 2.3124 0.0000 C
65 | created by cyby-draw 1.0
68 | -2.1875 1.6875 0.0000 O
69 | -1.1049 2.3125 0.0000 C
70 | -0.0223 1.6875 0.0000 C
71 | -1.1049 3.5625 0.0000 O
81 | created by cyby-draw 1.0
84 | -0.3125 1.5625 0.0000 C
85 | -1.3949 0.9375 0.0000 C
86 | -1.3949 -0.3125 0.0000 C
87 | -0.3125 -0.9375 0.0000 C
88 | 0.7699 -0.3125 0.0000 C
89 | 0.7699 0.9375 0.0000 C
102 | created by cyby-draw 1.0
105 | -0.3125 1.5625 0.0000 C
106 | -1.3949 0.9375 0.0000 C
107 | -1.3949 -0.3125 0.0000 C
108 | -0.3125 -0.9375 0.0000 C
109 | 0.7699 -0.3125 0.0000 C
110 | 0.7699 0.9375 0.0000 C
123 | created by cyby-draw 1.0
126 | -5.8125 2.0625 0.0000 C
127 | -3.6476 4.5625 0.0000 C
128 | -4.7299 3.9375 0.0000 C
129 | -4.7299 2.6875 0.0000 C
130 | -3.6476 2.0625 0.0000 C
131 | -2.5650 2.6875 0.0000 C
132 | -2.5650 3.9375 0.0000 C
146 | created by cyby-draw 1.0
149 | -5.8125 2.0625 0.0000 C
150 | -3.6476 4.5625 0.0000 C
151 | -4.7299 3.9375 0.0000 C
152 | -4.7299 2.6875 0.0000 C
153 | -3.6476 2.0625 0.0000 C
154 | -2.5650 2.6875 0.0000 C
155 | -2.5650 3.9375 0.0000 C
156 | -5.8125 0.8125 0.0000 O