HTPolyNet 1.0.7.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. HTPolyNet/__init__.py +1 -0
  2. HTPolyNet/ambertools.py +94 -0
  3. HTPolyNet/analyze.py +258 -0
  4. HTPolyNet/banner.py +26 -0
  5. HTPolyNet/bondlist.py +206 -0
  6. HTPolyNet/bondtemplate.py +111 -0
  7. HTPolyNet/checkpoint.py +88 -0
  8. HTPolyNet/command.py +42 -0
  9. HTPolyNet/configuration.py +240 -0
  10. HTPolyNet/coordinates.py +1071 -0
  11. HTPolyNet/countTime.py +26 -0
  12. HTPolyNet/curecontroller.py +767 -0
  13. HTPolyNet/dataframetools.py +130 -0
  14. HTPolyNet/driver.py +250 -0
  15. HTPolyNet/expandreactions.py +154 -0
  16. HTPolyNet/gromacs.py +333 -0
  17. HTPolyNet/inputcheck.py +51 -0
  18. HTPolyNet/linkcell.py +322 -0
  19. HTPolyNet/molecule.py +1279 -0
  20. HTPolyNet/plot.py +607 -0
  21. HTPolyNet/postsim.py +444 -0
  22. HTPolyNet/projectfilesystem.py +483 -0
  23. HTPolyNet/reaction.py +282 -0
  24. HTPolyNet/resources/README.md +20 -0
  25. HTPolyNet/resources/__init__.py +0 -0
  26. HTPolyNet/resources/cfg/DGE-PAC-hi.yaml +115 -0
  27. HTPolyNet/resources/cfg/DGE-PAC-lo.yaml +115 -0
  28. HTPolyNet/resources/cfg/FDE-DFDA-hi.yaml +116 -0
  29. HTPolyNet/resources/cfg/FDE-DFDA-lo.yaml +116 -0
  30. HTPolyNet/resources/cfg/GMASTY-hi.yaml +158 -0
  31. HTPolyNet/resources/cfg/GMASTY-lo.yaml +158 -0
  32. HTPolyNet/resources/cfg/README.md +1 -0
  33. HTPolyNet/resources/cfg/STY.yaml +23 -0
  34. HTPolyNet/resources/cfg/pMSTY-hi.yaml +101 -0
  35. HTPolyNet/resources/cfg/pMSTY-lo.yaml +101 -0
  36. HTPolyNet/resources/cfg/pSTY-hi.yaml +101 -0
  37. HTPolyNet/resources/cfg/pSTY-lo.yaml +101 -0
  38. HTPolyNet/resources/example_depot/0-liquid-styrene.tgz +0 -0
  39. HTPolyNet/resources/example_depot/1-polystyrene.tgz +0 -0
  40. HTPolyNet/resources/example_depot/2-polymethylstyrene.tgz +0 -0
  41. HTPolyNet/resources/example_depot/3-bisgma-styrene-thermoset.tgz +0 -0
  42. HTPolyNet/resources/example_depot/4-pacm-dgeba-epoxy-thermoset.tgz +0 -0
  43. HTPolyNet/resources/example_depot/5-dfda-fde-epoxy-thermoset.tgz +0 -0
  44. HTPolyNet/resources/mdp/README.md +1 -0
  45. HTPolyNet/resources/mdp/drag-min.mdp +13 -0
  46. HTPolyNet/resources/mdp/drag-npt.mdp +36 -0
  47. HTPolyNet/resources/mdp/drag-nvt.mdp +31 -0
  48. HTPolyNet/resources/mdp/min.mdp +14 -0
  49. HTPolyNet/resources/mdp/npt.mdp +37 -0
  50. HTPolyNet/resources/mdp/nvt.mdp +29 -0
  51. HTPolyNet/resources/mdp/relax-min.mdp +13 -0
  52. HTPolyNet/resources/mdp/relax-npt.mdp +37 -0
  53. HTPolyNet/resources/mdp/relax-nvt.mdp +31 -0
  54. HTPolyNet/resources/mdp/single-molecule-min.mdp +12 -0
  55. HTPolyNet/resources/mdp/single-molecule-nvt.mdp +25 -0
  56. HTPolyNet/resources/molecules/inputs/DFA.pdb +62 -0
  57. HTPolyNet/resources/molecules/inputs/DGE.mol2 +115 -0
  58. HTPolyNet/resources/molecules/inputs/EMB.mol2 +50 -0
  59. HTPolyNet/resources/molecules/inputs/FDE.pdb +72 -0
  60. HTPolyNet/resources/molecules/inputs/GMA.mol2 +163 -0
  61. HTPolyNet/resources/molecules/inputs/PAC.mol2 +91 -0
  62. HTPolyNet/resources/molecules/inputs/STY.mol2 +44 -0
  63. HTPolyNet/resources/molecules/make-monomers.sh +64 -0
  64. HTPolyNet/resources/molecules/pics/DFA.png +0 -0
  65. HTPolyNet/resources/molecules/pics/DGE.png +0 -0
  66. HTPolyNet/resources/molecules/pics/EMB.png +0 -0
  67. HTPolyNet/resources/molecules/pics/FDE.png +0 -0
  68. HTPolyNet/resources/molecules/pics/GMA.png +0 -0
  69. HTPolyNet/resources/molecules/pics/PAC.png +0 -0
  70. HTPolyNet/resources/molecules/pics/STY.png +0 -0
  71. HTPolyNet/resources/molecules/sample-inputs/DFA.pdb +62 -0
  72. HTPolyNet/resources/molecules/sample-inputs/DGE.mol2 +115 -0
  73. HTPolyNet/resources/molecules/sample-inputs/EMB.mol2 +50 -0
  74. HTPolyNet/resources/molecules/sample-inputs/FDE.pdb +72 -0
  75. HTPolyNet/resources/molecules/sample-inputs/GMA.mol2 +163 -0
  76. HTPolyNet/resources/molecules/sample-inputs/PAC.mol2 +91 -0
  77. HTPolyNet/resources/molecules/sample-inputs/STY.mol2 +44 -0
  78. HTPolyNet/resources/tcl/readbonds.tcl +32 -0
  79. HTPolyNet/resources/tcl/readgrx.tcl +46 -0
  80. HTPolyNet/resources/tcl/render.tcl +74 -0
  81. HTPolyNet/ring.py +155 -0
  82. HTPolyNet/runtime.py +709 -0
  83. HTPolyNet/software.py +106 -0
  84. HTPolyNet/stringthings.py +39 -0
  85. HTPolyNet/topocoord.py +1877 -0
  86. HTPolyNet/topology.py +1288 -0
  87. HTPolyNet/unused_symmetry_stuff.py +291 -0
  88. HTPolyNet/utils.py +405 -0
  89. htpolynet-1.0.7.2.dist-info/METADATA +84 -0
  90. htpolynet-1.0.7.2.dist-info/RECORD +93 -0
  91. htpolynet-1.0.7.2.dist-info/WHEEL +4 -0
  92. htpolynet-1.0.7.2.dist-info/entry_points.txt +2 -0
  93. htpolynet-1.0.7.2.dist-info/licenses/LICENSE +21 -0
HTPolyNet/reaction.py ADDED
@@ -0,0 +1,282 @@
1
+ """
2
+
3
+ .. module:: reaction
4
+ :synopsis: handles Reaction objects
5
+
6
+ .. moduleauthor: Cameron F. Abrams, <cfa22@drexel.edu>
7
+
8
+ """
9
+ import logging
10
+ from copy import deepcopy
11
+ from enum import Enum
12
+ import networkx as nx
13
+ from HTPolyNet.plot import network_graph
14
+ logger=logging.getLogger(__name__)
15
+
16
+ class reaction_stage(Enum):
17
+ """Enumerated reaction stage
18
+ """
19
+ build=0 # only used for building molecules that use parameterized oligomers
20
+ param=1 # used to generate parameterized oligomers that are not cure reactions
21
+ cure=2 # used to generate parameterized oligormers that ARE cure reactions
22
+ cap=3 # used to generate parameterized capped monomers
23
+ unset=99
24
+ def __str__(self):
25
+ return self.name
26
+
27
+ class Reaction:
28
+ default_directives={
29
+ 'name':'',
30
+ 'atoms':{},
31
+ 'bonds':[],
32
+ 'reactants':{},
33
+ 'product':'',
34
+ 'stage':reaction_stage.unset,
35
+ 'procession':{},
36
+ 'probability':1.0
37
+ }
38
+ def __init__(self,jsondict={}):
39
+ """__init__ generates a Reaction object using directives in jsondict
40
+
41
+ :param jsondict: directives for creating a new Reaction object, defaults to {}
42
+ :type jsondict: dict, optional
43
+ """
44
+ self.jsondict=jsondict
45
+ self.name=jsondict.get('name',self.default_directives['name'])
46
+ self.atoms=jsondict.get('atoms',self.default_directives['atoms'])
47
+ self.bonds=jsondict.get('bonds',self.default_directives['bonds'])
48
+ self.reactants=jsondict.get('reactants',self.default_directives['reactants'])
49
+ self.product=jsondict.get('product',self.default_directives['product'])
50
+ self.stage=reaction_stage[jsondict.get('stage',str(self.default_directives['stage']))]
51
+ self.procession=jsondict.get('procession',self.default_directives['procession'])
52
+ self.probability=jsondict.get('probability',self.default_directives['probability'])
53
+ for label in jsondict:
54
+ if not label in self.default_directives:
55
+ logging.debug(f'Ignoring unknown reaction directive "{label}"')
56
+ self.symmetry_versions=[]
57
+
58
+ def __str__(self):
59
+ retstr=f'Reaction "{self.name}" ({str(self.stage)})\n'
60
+ for i,r in self.reactants.items():
61
+ retstr+=f'reactant {i}: {r}\n'
62
+ retstr+=f'product {self.product}\n'
63
+ for i,a in self.atoms.items():
64
+ retstr+=f'atom {i}: {a}\n'
65
+ for b in self.bonds:
66
+ retstr+=f'bond {b}\n'
67
+ return retstr
68
+
69
+ ReactionList = list[Reaction]
70
+
71
+ def parse_reaction_list(baselist:ReactionList):
72
+ """parse_reaction_list generates any new reactions inferred by procession (i.e., linear polymerization)
73
+
74
+ :param baselist: list of unprocessed reaction dicts read directly from configuration file
75
+ :type baselist: ReactionList
76
+ :return: entire set of all reactions, including new ones added here
77
+ :rtype: ReactionList
78
+ """
79
+ processives=[]
80
+ for i,R in enumerate(baselist):
81
+ if R.procession:
82
+ nReactions=[]
83
+ logger.debug(f'Reaction {R.name} is processive: {R.procession}')
84
+ final_product_name=R.product
85
+ R.product=f'{final_product_name}_I0'
86
+ original_name=R.name
87
+ R.name=f'{R.name}-i0'
88
+ base_reactant_key=R.procession['increment_resid']
89
+ for c in range(R.procession['count']):
90
+ nR=deepcopy(R)
91
+ nR.name=f'{original_name}-i{c+1}'
92
+ nR.product=f'{final_product_name}_I{c+1}' if c<(R.procession['count']-1) else final_product_name
93
+ nR.reactants[base_reactant_key]=f'{final_product_name}_I{c}'
94
+ for ak,arec in nR.atoms.items():
95
+ if arec['reactant']==base_reactant_key: arec['resid']+=(c+1)
96
+ nR.procession={}
97
+ nReactions.append(nR)
98
+ processives.append((i,nReactions))
99
+ lasti=0
100
+ ret_reactions=baselist.copy()
101
+ for rec in processives:
102
+ atidx,sublist=rec
103
+ atidx+=lasti
104
+ ret_reactions=ret_reactions[0:atidx+1]+sublist+ret_reactions[atidx+1:]
105
+ lasti+=len(sublist)
106
+ return ret_reactions
107
+
108
+ def extract_molecule_reactions(rlist:ReactionList,plot=True):
109
+ """extract_molecule_reactions establishes the correct order of reactions so that molecular templates are created in a sensible order (reactants before products for all reactions)
110
+
111
+ :param rlist: list of all reactions
112
+ :type rlist: ReactionList
113
+ :param plot: flag to plot the reaction network, defaults to True
114
+ :type plot: bool, optional
115
+ :return: ordered list of tuples, reach of the from (name-of-product-molecule,Reaction)
116
+ :rtype: list of tuples
117
+ """
118
+ working_rlist=rlist.copy()
119
+ G=nx.DiGraph()
120
+ # Given an unsorted list of reactions (list of reactants + one product), order a list of
121
+ # of molecules so that no product comes before any of its reactants
122
+ if not rlist: return []
123
+ molecule_react_order=[]
124
+ reactants=set()
125
+ products=set()
126
+ # first molecules to generate are the input reactants
127
+ for R in working_rlist:
128
+ for r in R.reactants.values():
129
+ reactants.add(r)
130
+ G.add_edge(r,R.product)
131
+ products.add(R.product)
132
+ if plot: network_graph(G,'plots/reaction_network.png',arrows=True,with_labels=True,figsize=(10,10),node_size=0)
133
+ input_reactants=reactants.intersection(reactants.symmetric_difference(products))
134
+ logger.debug(f'Input reactants: {input_reactants}')
135
+ for i in input_reactants:
136
+ molecule_react_order.append((i,None))
137
+ # once inputs are generated, any moleculed constructed only from inputs can be generated
138
+ for R in rlist:
139
+ if all([x in input_reactants for x in R.reactants.values()]):
140
+ molecule_react_order.append((R.product,R))
141
+ working_rlist.remove(R)
142
+
143
+ while len(working_rlist)>0:
144
+ molecules=[x[0] for x in molecule_react_order]
145
+ for R in working_rlist:
146
+ if all([x in molecules for x in R.reactants.values()]):
147
+ molecule_react_order.append((R.product,R))
148
+ molecules.append(R.product)
149
+ working_rlist.remove(R)
150
+ # else:
151
+ # logger.debug(f'Cannot place {R.product} since not all of {R.reactants.values()} are in the list yet')
152
+
153
+ return molecule_react_order
154
+
155
+ def get_r(mname,RL:ReactionList):
156
+ """get_r returns the Reaction that generates molecule mname as a product, if it exists, otherwise None
157
+
158
+ :param mname: name of molecule to search
159
+ :type mname: str
160
+ :param RL: list of all Reactions
161
+ :type RL: ReactionList
162
+ :return: Reaction that generates mname, or None
163
+ :rtype: Reaction or NoneType
164
+ """
165
+ if not RL: return None
166
+ i=0
167
+ while RL[i].product!=mname:
168
+ i+=1
169
+ if i==len(RL):
170
+ return None
171
+ return RL[i]
172
+
173
+ def is_reactant(name:str,reaction_list:ReactionList,stage=reaction_stage.cure):
174
+ """is_reactant tests to see if molecule 'name' appears as a reactant in any reaction in reaction_list
175
+
176
+ :param name: name of molecule
177
+ :type name: str
178
+ :param reaction_list: list of all Reactions
179
+ :type reaction_list: ReactionList
180
+ :param stage: stage or reactions to search, defaults to reaction_stage.cure
181
+ :type stage: reaction_stage(Enum), optional
182
+ :return: True if molecule is a reactant, False otherwise
183
+ :rtype: bool
184
+ """
185
+ reactants=[]
186
+ for r in reaction_list:
187
+ if r.stage==stage:
188
+ for v in r.reactants.values():
189
+ if not v in reactants:
190
+ reactants.append(v)
191
+ return name in reactants
192
+
193
+ def product_sequence_resnames(R:Reaction,reactions:ReactionList):
194
+ """product_sequence_resnames recursively generate sequence of product of R by traversing network of reactions; sequence is by definition an ordered list of monomer names
195
+
196
+ :param R: a Reaction
197
+ :type R: Reaction
198
+ :param reactions: list of all Reactions
199
+ :type reactions: ReactionList
200
+ :return: the sequence of R's product molecule as a list of monomer names
201
+ :rtype: list
202
+ """
203
+ result=[]
204
+ allProducts=[x.product for x in reactions]
205
+ for rKey,rName in R.reactants.items():
206
+ if rName in allProducts:
207
+ result.extend(product_sequence_resnames(reactions[allProducts.index(rName)],reactions))
208
+ else:
209
+ result.extend([rName])
210
+ return result
211
+
212
+ def molname_sequence_resnames(molname:str,reactions:ReactionList):
213
+ """molname_sequence_resnames determine monomer sequence of the molecule with name molname based on a traversal of the reaction network
214
+
215
+ :param molname: name of molecule
216
+ :type molname: str
217
+ :param reactions: list of all Reactions
218
+ :type reactions: ReactionList
219
+ :return: monomer sequence of molecule as a list of monomer names
220
+ :rtype: list
221
+ """
222
+ prodnames=[x.product for x in reactions]
223
+ if molname in prodnames:
224
+ R=reactions[prodnames.index(molname)]
225
+ return product_sequence_resnames(R,reactions)
226
+ else:
227
+ return [molname] # not a product in the reaction list? must be a monomer
228
+
229
+ def reactant_resid_to_presid(R:Reaction,reactantName:str,resid:int,reactions:ReactionList):
230
+ """reactant_resid_to_presid map the resid of a reactant monomer to its inferred resid in the associate product in reaction R, by traversing the reaction network
231
+
232
+ :param R: a Reaction
233
+ :type R: Reaction
234
+ :param reactantName: the name of one of the reactants in R
235
+ :type reactantName: str
236
+ :param resid: the resid in that reactant we want mapped to the product
237
+ :type resid: int
238
+ :param reactions: list of all Reactions
239
+ :type reactions: ReactionList
240
+ :return: resid of this residue in the product of R
241
+ :rtype: int
242
+ """
243
+ reactants=[x for x in R.reactants.values()]
244
+ if reactantName in reactants:
245
+ ridx=reactants.index(reactantName)
246
+ logger.debug(f'reactantName {reactantName} {ridx} in {reactants} of {R.name}')
247
+ S=0
248
+ for i in range(ridx):
249
+ seq=molname_sequence_resnames(reactants[i],reactions)
250
+ logger.debug(f'{i} {seq} {S}')
251
+ S+=len(seq)
252
+ return S+resid
253
+ else:
254
+ return -1
255
+
256
+ def generate_product_name(R:Reaction):
257
+ """generate_product_name automatically generate the name of the product based on the names of the reactants and the bonds in R
258
+
259
+ :param R: a Reaction
260
+ :type R: Reaction
261
+ :return: suggested name of product
262
+ :rtype: str
263
+ """
264
+ pname=''
265
+ for b in R.bonds:
266
+ i,j=b['atoms']
267
+ i_arec=R.atoms[i]
268
+ j_arec=R.atoms[j]
269
+ i_reKey=i_arec['reactant']
270
+ i_reNm=R.reactants[i_reKey]
271
+ i_aNm=i_arec['atom']
272
+ j_reKey=j_arec['reactant']
273
+ j_reNm=R.reactants[j_reKey]
274
+ j_aNm=j_arec['atom']
275
+ tbNm=f'{i_reNm}~{i_aNm}-{j_aNm}~{j_reNm}'
276
+ if len(R.reactants)>1:
277
+ if len(pname)==0:
278
+ pname=tbNm
279
+ else:
280
+ pname+='---'+tbNm
281
+ return pname
282
+
@@ -0,0 +1,20 @@
1
+ ## Library package for HTPolyNet
2
+
3
+ This is a set of resources used by `HTPolyNet`, including example input configurations, Gromacs parameter files (`mdp`), and data files containing structural/topological information on monomers.
4
+
5
+ The `HTPolyNet/projectfilesystem` module manages this resource via its `Library` and `ProjectFileSystem` classes. The `Library` resource is organized according to file extension and molecule class:
6
+
7
+ The file `XYZ.ext` resides in a subdirectory determined like this:
8
+
9
+ * If `ext` is `yaml`, `json`, or `cfg`, then `XYZ.ext` is found in `cfg/`.
10
+ * If `ext` is `mdp`, the `XYZ.ext` is found in `mdp/`.
11
+ * If `ext` is one of `mol2`, `gro`, `top`, `itp`, or `sea`, then `XYZ.ext` is found *either* in `molecules/monomers/` or in `molecules/oligomers/`. `molecules/monomers/` has search preference. Generally, filename prefixes for automatically generated oligomer file contain at least one `@` character. (See documentation for the `oligomerize()` function in the `molecule` module.)
12
+
13
+
14
+ `Library` uses three main methods:
15
+
16
+ * `fetch()` by default copies to the current runtime directory, controlled by `HTPolyNet`.
17
+
18
+ * `store()` is the opposite of `fetch()`, and is used to store any automatically generated files for potential later use. It shouldn't be necessary to parameterize the same molecule over and over.
19
+
20
+ * `exist()` simply checks to see that the file exists in its expected place in the library.
File without changes
@@ -0,0 +1,115 @@
1
+ Title: DGEBA-PACM thermoset
2
+ gromacs: {
3
+ gmx: 'gmx',
4
+ gmx_options: '-quiet -nobackup',
5
+ mdrun: 'gmx mdrun'
6
+ }
7
+ ambertools: {
8
+ charge_method: gas
9
+ }
10
+ constituents: {
11
+ DGE: {count: 200, symmetry_equivalent_atoms: [[C1,C2],[C3,C4],[O1,O2]], stereocenters: [C3]},
12
+ PAC: {count: 100, symmetry_equivalent_atoms: [[N1,N2],[C1,C2]], stereocenters: [C1] }
13
+ }
14
+ densification: {
15
+ initial_density: 300.0, # kg/m3
16
+ temperature: 300, # K
17
+ pressure: 10, # bar
18
+ nsteps: 150000
19
+ }
20
+ precure_equilibration: {
21
+ temperature: 300, # K
22
+ pressure: 1, # bar
23
+ nsteps: 150000
24
+ }
25
+ CURE: {
26
+ initial_search_radius: 0.5, # nm
27
+ radial_increment: 0.25, # nm
28
+ max_iterations: 150,
29
+ desired_conversion: 0.95,
30
+ late_threshhold: 0.85
31
+ }
32
+ drag: {
33
+ trigger_distance: 0.6, # nm
34
+ increment: 0.08, # nm
35
+ limit: 0.3, # nm
36
+ equilibration: [
37
+ { ensemble: min },
38
+ { ensemble: nvt, temperature: 600, nsteps: 1000 },
39
+ { ensemble: npt, temperature: 600, pressure: 1, nsteps: 2000 }
40
+ ]
41
+ }
42
+ relax: {
43
+ increment: 0.08, # nm
44
+ temperature: 600, # K
45
+ equilibration: [
46
+ { ensemble: min },
47
+ { ensemble: nvt, temperature: 600, nsteps: 1000 },
48
+ { ensemble: npt, temperature: 600, pressure: 1, nsteps: 2000 }
49
+ ]
50
+ }
51
+ postcure_equilibration: {
52
+ ensemble: npt,
53
+ temperature: 300, # K
54
+ pressure: 1, # bar
55
+ nsteps: 50000
56
+ }
57
+ postcure_anneal: {
58
+ ncycles: 2,
59
+ initial_temperature: 300,
60
+ cycle_segments: [
61
+ { T: 300, ps: 0 },
62
+ { T: 600, ps: 20 },
63
+ { T: 600, ps: 20 },
64
+ { T: 300, ps: 20 },
65
+ { T: 300, ps: 20 }
66
+ ]
67
+ }
68
+ postanneal_equilibration: {
69
+ temperature: 300, # K
70
+ pressure: 1, # bar
71
+ nsteps: 50000
72
+ }
73
+ reactions:
74
+ - {
75
+ name: 'Primary-to-secondary-amine',
76
+ stage: cure,
77
+ reactants: {1: PAC, 2: DGE},
78
+ product: PAC~N1-C1~DGE,
79
+ probability: 1.0,
80
+ atoms: {
81
+ A: {reactant: 1, resid: 1, atom: N1, z: 2},
82
+ B: {reactant: 2, resid: 1, atom: C1, z: 1}
83
+ },
84
+ bonds: [
85
+ {atoms: [A, B], order: 1}
86
+ ]
87
+ }
88
+ - {
89
+ name: 'Secondary-to-tertiary-amine',
90
+ reactants: {1: PAC~N1-C1~DGE, 2: DGE},
91
+ product: PAC~N1-C1~DGE-C1~DGE,
92
+ stage: cure,
93
+ probability: 0.5,
94
+ atoms: {
95
+ A: {reactant: 1, resid: 1, atom: N1, z: 1},
96
+ B: {reactant: 2, resid: 1, atom: C1, z: 1}
97
+ },
98
+ bonds: [
99
+ {atoms: [A, B], order: 1}
100
+ ]
101
+ }
102
+ - {
103
+ name: 'Oxirane-formation',
104
+ reactants: {1: DGE},
105
+ product: DGEC,
106
+ stage: post-cure,
107
+ probability: 1.0,
108
+ atoms: {
109
+ A: {reactant: 1, resid: 1, atom: O1, z: 1},
110
+ B: {reactant: 1, resid: 1, atom: C1, z: 1}
111
+ },
112
+ bonds: [
113
+ {atoms: [A, B], order: 1}
114
+ ]
115
+ }
@@ -0,0 +1,115 @@
1
+ Title: DGEBA-PACM thermoset
2
+ gromacs: {
3
+ gmx: 'gmx',
4
+ gmx_options: '-quiet -nobackup',
5
+ mdrun: 'gmx mdrun'
6
+ }
7
+ ambertools: {
8
+ charge_method: gas
9
+ }
10
+ constituents: {
11
+ DGE: {count: 200, symmetry_equivalent_atoms: [[C1,C2],[C3,C4],[O1,O2]], stereocenters: [C3]},
12
+ PAC: {count: 100, symmetry_equivalent_atoms: [[N1,N2],[C1,C2]], stereocenters: [C1] }
13
+ }
14
+ densification: {
15
+ initial_density: 300.0, # kg/m3
16
+ temperature: 300, # K
17
+ pressure: 10, # bar
18
+ nsteps: 150000
19
+ }
20
+ precure_equilibration: {
21
+ temperature: 300, # K
22
+ pressure: 1, # bar
23
+ nsteps: 150000
24
+ }
25
+ CURE: {
26
+ initial_search_radius: 0.5, # nm
27
+ radial_increment: 0.25, # nm
28
+ max_iterations: 150,
29
+ desired_conversion: 0.50,
30
+ late_threshhold: 0.85
31
+ }
32
+ drag: {
33
+ trigger_distance: 0.6, # nm
34
+ increment: 0.08, # nm
35
+ limit: 0.3, # nm
36
+ equilibration: [
37
+ { ensemble: min },
38
+ { ensemble: nvt, temperature: 600, nsteps: 1000 },
39
+ { ensemble: npt, temperature: 600, pressure: 1, nsteps: 2000 }
40
+ ]
41
+ }
42
+ relax: {
43
+ increment: 0.08, # nm
44
+ temperature: 600, # K
45
+ equilibration: [
46
+ { ensemble: min },
47
+ { ensemble: nvt, temperature: 600, nsteps: 1000 },
48
+ { ensemble: npt, temperature: 600, pressure: 1, nsteps: 2000 }
49
+ ]
50
+ }
51
+ postcure_equilibration: {
52
+ ensemble: npt,
53
+ temperature: 300, # K
54
+ pressure: 1, # bar
55
+ nsteps: 50000
56
+ }
57
+ postcure_anneal: {
58
+ ncycles: 2,
59
+ initial_temperature: 300,
60
+ cycle_segments: [
61
+ { T: 300, ps: 0 },
62
+ { T: 600, ps: 20 },
63
+ { T: 600, ps: 20 },
64
+ { T: 300, ps: 20 },
65
+ { T: 300, ps: 20 }
66
+ ]
67
+ }
68
+ postanneal_equilibration: {
69
+ temperature: 300, # K
70
+ pressure: 1, # bar
71
+ nsteps: 50000
72
+ }
73
+ reactions:
74
+ - {
75
+ name: 'Primary-to-secondary-amine',
76
+ stage: cure,
77
+ reactants: {1: PAC, 2: DGE},
78
+ product: PAC~N1-C1~DGE,
79
+ probability: 1.0,
80
+ atoms: {
81
+ A: {reactant: 1, resid: 1, atom: N1, z: 2},
82
+ B: {reactant: 2, resid: 1, atom: C1, z: 1}
83
+ },
84
+ bonds: [
85
+ {atoms: [A, B], order: 1}
86
+ ]
87
+ }
88
+ - {
89
+ name: 'Secondary-to-tertiary-amine',
90
+ reactants: {1: PAC~N1-C1~DGE, 2: DGE},
91
+ product: PAC~N1-C1~DGE-C1~DGE,
92
+ stage: cure,
93
+ probability: 0.5,
94
+ atoms: {
95
+ A: {reactant: 1, resid: 1, atom: N1, z: 1},
96
+ B: {reactant: 2, resid: 1, atom: C1, z: 1}
97
+ },
98
+ bonds: [
99
+ {atoms: [A, B], order: 1}
100
+ ]
101
+ }
102
+ - {
103
+ name: 'Oxirane-formation',
104
+ reactants: {1: DGE},
105
+ product: DGEC,
106
+ stage: post-cure,
107
+ probability: 1.0,
108
+ atoms: {
109
+ A: {reactant: 1, resid: 1, atom: O1, z: 1},
110
+ B: {reactant: 1, resid: 1, atom: C1, z: 1}
111
+ },
112
+ bonds: [
113
+ {atoms: [A, B], order: 1}
114
+ ]
115
+ }
@@ -0,0 +1,116 @@
1
+ Title: DFA-FDE thermoset
2
+ gromacs: {
3
+ gmx: 'gmx',
4
+ gmx_options: '-quiet -nobackup',
5
+ mdrun: 'gmx mdrun'
6
+ }
7
+ ambertools: {
8
+ charge_method: gas
9
+ }
10
+ constituents: {
11
+ FDE: {count: 200, symmetry_equivalent_atoms: [[C1,C2],[C3,C4],[O1,O2]], stereocenters: [C3]},
12
+ DFA: {count: 100, symmetry_equivalent_atoms: [[N1,N2]] }
13
+ }
14
+ densification: {
15
+ initial_density: 200.0, # kg/m3
16
+ temperature: 300, # K
17
+ pressure: 10, # bar
18
+ nsteps: 100000
19
+ }
20
+ precure_equilibration: {
21
+ temperature: 300, # K
22
+ pressure: 1, # bar
23
+ nsteps: 50000
24
+ }
25
+ CURE: {
26
+ initial_search_radius: 0.5, # nm
27
+ radial_increment: 0.25, # nm
28
+ max_iterations: 150,
29
+ desired_conversion: 0.95,
30
+ late_threshhold: 0.85
31
+ }
32
+ drag: {
33
+ trigger_distance: 0.6, # nm
34
+ increment: 0.08, # nm
35
+ limit: 0.3, # nm
36
+ equilibration: [
37
+ { ensemble: min },
38
+ { ensemble: nvt, temperature: 600, nsteps: 1000 },
39
+ { ensemble: npt, temperature: 600, pressure: 1, nsteps: 2000 }
40
+ ]
41
+ }
42
+ relax: {
43
+ increment: 0.08, # nm
44
+ temperature: 600, # K
45
+ equilibration: [
46
+ { ensemble: min },
47
+ { ensemble: nvt, temperature: 600, nsteps: 1000 },
48
+ { ensemble: npt, temperature: 600, pressure: 1, nsteps: 2000 }
49
+ ]
50
+ }
51
+ postcure_equilibration: {
52
+ ensemble: npt,
53
+ temperature: 300, # K
54
+ pressure: 1, # bar
55
+ nsteps: 50000
56
+ }
57
+ postcure_anneal: {
58
+ ncycles: 2,
59
+ initial_temperature: 300,
60
+ cycle_segments: [
61
+ { T: 300, ps: 0 },
62
+ { T: 600, ps: 20 },
63
+ { T: 600, ps: 20 },
64
+ { T: 300, ps: 20 },
65
+ { T: 300, ps: 20 }
66
+ ]
67
+ }
68
+ postanneal_equilibration: {
69
+ temperature: 300, # K
70
+ pressure: 1, # bar
71
+ nsteps: 50000
72
+ }
73
+ reactions:
74
+ - {
75
+ name: 'Primary-to-secondary-amine',
76
+ stage: cure,
77
+ reactants: {1: DFA, 2: FDE},
78
+ product: DFA~N1-C1~FDE,
79
+ probability: 1.0,
80
+ atoms: {
81
+ A: {reactant: 1, resid: 1, atom: N1, z: 2},
82
+ B: {reactant: 2, resid: 1, atom: C1, z: 1}
83
+ },
84
+ bonds: [
85
+ {atoms: [A, B], order: 1}
86
+ ]
87
+ }
88
+ - {
89
+ name: 'Secondary-to-tertiary-amine',
90
+ reactants: {1: DFA~N1-C1~FDE, 2: FDE},
91
+ product: DFA~N1-C1~FDE-C1~FDE,
92
+ stage: cure,
93
+ probability: 0.5,
94
+ atoms: {
95
+ A: {reactant: 1, resid: 1, atom: N1, z: 1},
96
+ B: {reactant: 2, resid: 1, atom: C1, z: 1}
97
+ },
98
+ bonds: [
99
+ {atoms: [A, B], order: 1}
100
+ ]
101
+ }
102
+ - {
103
+ name: 'Oxirane-formation',
104
+ reactants: {1: FDE},
105
+ product: FDEC,
106
+ stage: post-cure,
107
+ probability: 1.0,
108
+ atoms: {
109
+ A: {reactant: 1, resid: 1, atom: O1, z: 1},
110
+ B: {reactant: 1, resid: 1, atom: C1, z: 1}
111
+ },
112
+ bonds: [
113
+ {atoms: [A, B], order: 1}
114
+ ]
115
+ }
116
+