0 | ||| Some of the refined types in here should probably
1 | ||| go to their own dedicated module
15 | %language ElabReflection
16 | %hide Language.Reflection.TT.Count
18 | --------------------------------------------------------------------------------
19 | -- V2000 Mol Lines
20 | --------------------------------------------------------------------------------
22 | ||| An uninterpreted line in a v2000 mol file
38 | --------------------------------------------------------------------------------
39 | -- Counts Line
40 | --------------------------------------------------------------------------------
42 | ------------------------------
43 | -- MolVersion
53 | ------------------------------
54 | -- ChiralFlag
66 | --------------------------------------------------------------------------------
67 | -- Atoms
68 | --------------------------------------------------------------------------------
70 | ------------------------------
71 | -- AtomSymbol
73 | ||| Ast -> Asterisk
74 | ||| RSharp -> R# (RGroupLabel)
78 | export
94 | ------------------------------
95 | -- StereoParity
97 | ||| Atom Stereo parity encoded in V2000 CTAB
100 | NoStereo
114 | ------------------------------
115 | -- StereoCareBox
117 | ||| Stereo care box encoded in V2000
128 | ------------------------------
129 | -- Valence
131 | ||| Valence of atoms
132 | |||
133 | ||| NOTE: In a V2000 molfile 15 is zero valence,
134 | ||| while 0 means no marking
148 | export
152 | ------------------------------
153 | -- H0Designator
155 | ||| Reduntant hydrogen count flag
166 | ------------------------------
167 | -- Hydrogen Count
169 | ||| HCount plus 1: 0 means "not explicitly given"
170 | ||| 1 means "explicitly 0" and so on.
184 | export
188 | ||| We encode coordinates as a sufficiently precise integer
189 | ||| to prevent loss of precision during parsing.
216 | where
221 | export
226 | ||| Space-efficient version of `interpolate` to be used in V3000
227 | ||| mol files.
228 | export
236 | ||| Convenience alias for `Vect 3 Coordinates`
249 | ||| Regular atom loaded from a .mol file.
250 | |||
251 | ||| Note: .mol files support additional atom symbols
252 | ||| (for instance, for queries), but for real-world molecules,
253 | ||| this is the type to use.
254 | |||
255 | ||| The type parameters are used for implicit hydrogens and atom types,
256 | ||| which are `()` for freshly loaded `MolAtom`s but more specific after
257 | ||| atom type perception.
262 | ||| Regular atom loaded from a .mol file.
263 | |||
264 | ||| Note: .mol files support additional atom symbols
265 | ||| (for instance, for queries), but for real-world molecules,
266 | ||| this is the type to use.
271 | ||| .mol-file atom with perceived atom type and computed
272 | ||| implicit hydrogen count
281 | --------------------------------------------------------------------------------
282 | -- Bonds
283 | --------------------------------------------------------------------------------
285 | ------------------------------
286 | -- BondType
308 | ------------------------------
309 | -- BondStereo
311 | ||| Stereoinformation represented in molfiles
324 | ------------------------------
325 | -- BondTopo
327 | ||| Bond topology encoded in CTAB V2000
342 | ||| Flag indicating whether the bond goes from the
343 | ||| atom with the smaller index to the one with the larger index
344 | ||| or vice versa.
345 | |||
346 | ||| We need this to figure out in which direction wedged bonds should
347 | ||| point.
366 | --------------------------------------------------------------------------------
367 | -- MolFile
368 | --------------------------------------------------------------------------------
383 | ||| .mol-file graph with perceived atom types and computed
384 | ||| implicit hydrogen counts
412 | --------------------------------------------------------------------------------
413 | -- Error
414 | --------------------------------------------------------------------------------
429 | export