-
Notifications
You must be signed in to change notification settings - Fork 0
/
polydex.py
83 lines (70 loc) · 2.13 KB
/
polydex.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
from stk import *
###
# Functional Groups
###
""" [Dextrose] Forms an alpha 1,4-glycosidic bond at the anomeric carbon """
C1_OH = SmartsFunctionalGroupFactory(
smarts='[#6]-1(-[#6]-[#6]-[#6]-[#6](-[#8]-1)-[#8]-[#1])-[#6]-[#8]-[#1]',
bonders=(6,),
deleters=(7,)
)
""" [Dextrose] Forms an alpha 1,4-glycosidic bond at C4 """
C4_OH = SmartsFunctionalGroupFactory(
smarts='[#6]-1(-[#6](-[#6]-[#6]-[#6](-[#8]-1)-[#8]-[#1])-[#8]-[#1])-[#6]-[#8]-[#1]',
bonders=(8,),
deleters=(9,)
)
""" [Dextrose] Forms an ether bond between glucose and a given linker at C6 """
C6_OH = SmartsFunctionalGroupFactory(
smarts='[#6]-1(-[#6]-[#6]-[#6]-[#6]-[#8]-1)-[#6]-[#8]-[#1]',
bonders=(7,),
deleters=(8,)
)
""" [R-O-dextrose] Forms an alpha 1,4-glycosidic bond at the anomeric carbon """
C1_OH_lk = SmartsFunctionalGroupFactory(
smarts='[#6]-1(-[#6](-[#6](-[#6](-[#6](-[#8]-1)-[#8]-[#1])-[#8]-[#1])-[#8]-[#1])-[#8]-[#1])-[#6]-[#8]',
bonders=(6,),
deleters=(7,)
)
""" [R-O-dextrose] Forms an alpha 1,4-glycosidic bond at C4 """
C4_OH_lk = SmartsFunctionalGroupFactory(
smarts='[#6]-1(-[#6](-[#6](-[#6](-[#6](-[#8]-1)-[#8]-[#1])-[#8]-[#1])-[#8]-[#1])-[#8]-[#1])-[#6]-[#8]',
bonders=(12,),
deleters=(13,)
)
###
# Building Blocks
###
""" Alpha-D-glucose """
dextrose = BuildingBlock(
smiles='C([C@@H]1[C@H]([C@@H]([C@H]([C@H](O1)O)O)O)O)O',
functional_groups=(C6_OH,)
)
""" Forms a single link between macrocycles (CO-C[n]-OC) """
strut = BuildingBlock(
smiles='CCCCBr',
functional_groups=[BromoFactory()]
)
###
# Constructed Molecules
###
""" Forms a dextrose-strut ether bond at C6 """
micro_unit = ConstructedMolecule(
topology_graph=polymer.Linear(
building_blocks=(dextrose, strut),
repeating_unit='AB',
num_repeating_units=1,
)
)
""" Forms alpha-glycosidic cyclodextrin """
micro_block = BuildingBlock.init_from_molecule(
molecule=micro_unit,
functional_groups=(C1_OH_lk, C4_OH_lk,)
)
macro_cycle = ConstructedMolecule(
topology_graph=macrocycle.Macrocycle(
building_blocks=(micro_block,),
repeating_unit='A',
num_repeating_units=6,
)
)