0 | module Test.Text.Smiles.Generators
2 | import public Test.Chem.Generators
3 | import public Text.Smiles
10 | chirality : Gen Chirality
11 | chirality = frequency
13 | , (1, element [CW, CCW, TH1, TH2, AL1, AL2, SP1, SP2, SP3])
14 | , (1, maybe None TB . refineTBIx <$> bits8 (linear 1 20))
15 | , (1, maybe None OH . refineOHIx <$> bits8 (linear 1 20))
19 | subset : Gen SmilesAtom
21 | [ SubsetAtom C False
22 | , SubsetAtom B False
23 | , SubsetAtom N False
24 | , SubsetAtom O False
25 | , SubsetAtom P False
26 | , SubsetAtom S False
27 | , SubsetAtom F False
28 | , SubsetAtom Cl False
29 | , SubsetAtom Br False
30 | , SubsetAtom I False
41 | hcount = fromMaybe 0 . refineHCount <$> bits8 (linear 0 9)
44 | atom : Gen SmilesAtom
47 | , (5, Prelude.[| bracket aromIsotope chirality hcount charge |])
51 | bond : Gen SmilesBond
52 | bond = element [Sngl,Dbl,Trpl,Quad,Arom,FW,BW]
56 | ringNr = fromMaybe 0 . refineRingNr <$> bits8 (linear 0 99)
60 | ring = [| R ringNr (maybe bond) |]