The Configuration File¶
The complete 2-bisgma-styrene-thermoset.yaml from the depot:
# htpolynet -- Example 2 -- Bis-GMA/Styrene Thermoset
#
# Self-contained config: STY, BPA, and HIE monomers are generated from SMILES
# (RDKit path via the atom-mapping syntax). Bis-GMA (GMA) is assembled at
# runtime from BPA + 2 HIE via the two param-stage reactions defined below.
# Run with:
#
# htpolynet run -diag diagnostics.log 2-bisgma-styrene-thermoset.yaml
#
# Cameron F. Abrams -- cfa22@drexel.edu
Title: GMA-STY thermoset
gromacs:
gmx: gmx
gmx_options: -quiet -nobackup
mdrun: gmx mdrun
mdrun_options:
gpu_id: 0 # auto-stripped at runtime if gmx is not GPU-capable or no GPU is visible
ambertools:
charge_method: gas
constituents:
STY:
smiles: "c1ccccc1[CH2:1][CH3:2]"
reactive_atoms: {1: C1, 2: C2}
count: 150
BPA:
smiles: "CC(c1ccc([OH:1])cc1)(c1ccc([OH:2])cc1)C"
reactive_atoms: {1: O1, 2: O2}
HIE:
# NB: `[CH:1]` not `[C:1]` — SMILES bracket atoms without an explicit H
# count default to zero implicit H, which leaves atom C1 at valence 3 and
# confuses antechamber into typing it as `c2` (sp2) and the adjacent
# carbonyl as `c2` instead of `c`, breaking tleap with "no angle parameter
# for o - c2 - os".
smiles: "[CH3:2][CH:1]([CH3])C(=O)OC[CH:3](O)[CH3:4]"
reactive_atoms: {1: C1, 2: C2, 3: C3, 4: C4}
stereocenters:
- C1
- C3
GMA:
count: 75
densification:
initial_density: 100.0 # kg/m3
equilibration:
- ensemble: min
- ensemble: nvt
temperature: 300
ps: 10
- ensemble: npt
temperature: 300
pressure: 10
ps: 100
repeat: 8
precure:
preequilibration:
ensemble: npt
temperature: 300 # K
pressure: 1 # bar
ps: 200
anneal:
ncycles: 2
initial_temperature: 300
cycle_segments:
- T: 300
ps: 0
- T: 600
ps: 20
- T: 600
ps: 20
- T: 300
ps: 20
- T: 300
ps: 20
postequilibration:
ensemble: npt
temperature: 300 # K
pressure: 1 # bar
ps: 100
CURE:
controls:
search_radius: 0.5 # nm
radial_increment: 0.25 # nm
max_iterations: 150
desired_conversion: 0.95
late_threshold: 0.85
drag:
trigger_distance: 0.6 # nm
increment: 0.08 # nm
limit: 0.3 # nm
equilibration:
- ensemble: min
- ensemble: nvt
temperature: 600
nsteps: 1000
- ensemble: npt
temperature: 600
pressure: 1
nsteps: 2000
relax:
increment: 0.08 # nm
equilibration:
- ensemble: min
- ensemble: nvt
temperature: 600
nsteps: 1000
- ensemble: npt
temperature: 600
pressure: 1
nsteps: 2000
equilibrate:
ensemble: npt
temperature: 300 # K
pressure: 1 # bar
ps: 100
gromacs:
rdefault: 0.9 # nm
postcure:
anneal:
ncycles: 2
initial_temperature: 300
cycle_segments:
- T: 300
ps: 0
- T: 600
ps: 20
- T: 600
ps: 20
- T: 300
ps: 20
- T: 300
ps: 20
postequilibration:
ensemble: npt
temperature: 300 # K
pressure: 1 # bar
ps: 100
reactions:
# Build bis-GMA by adding one hydroxyethyl methacrylate to each side of BPA
- name: B1
stage: param
reactants:
1: BPA
2: HIE
product: GM1
atoms:
A:
reactant: 1
resid: 1
atom: O1
z: 1
B:
reactant: 2
resid: 1
atom: C4
z: 2
bonds:
- atoms: [A, B]
order: 1
- name: B2
stage: param
reactants:
1: GM1
2: HIE
product: GMA
atoms:
A:
reactant: 1
resid: 1
atom: O2
z: 1
B:
reactant: 2
resid: 1
atom: C4
z: 1
bonds:
- atoms: [A, B]
order: 1
# Cure-stage polymerization reactions
- name: dimer_xx
stage: cure
reactants:
1: STY
2: STY
product: STY~C1-C2~STY
atoms:
A:
reactant: 1
resid: 1
atom: C1
z: 1
B:
reactant: 2
resid: 1
atom: C2
z: 1
bonds:
- atoms: [A, B]
order: 1
- name: dimer_yy
stage: cure
reactants:
1: HIE
2: HIE
product: HIE~C1-C2~HIE
atoms:
A:
reactant: 1
resid: 1
atom: C1
z: 1
B:
reactant: 2
resid: 1
atom: C2
z: 1
bonds:
- atoms: [A, B]
order: 1
- name: dimer_xy
stage: cure
reactants:
1: STY
2: HIE
product: STY~C1-C2~HIE
atoms:
A:
reactant: 1
resid: 1
atom: C1
z: 1
B:
reactant: 2
resid: 1
atom: C2
z: 1
bonds:
- atoms: [A, B]
order: 1
- name: dimer_yx
stage: cure
reactants:
1: HIE
2: STY
product: HIE~C1-C2~STY
atoms:
A:
reactant: 1
resid: 1
atom: C1
z: 1
B:
reactant: 2
resid: 1
atom: C2
z: 1
bonds:
- atoms: [A, B]
order: 1
# Capping reactions
- name: styCC
stage: cap
reactants:
1: STY
product: STYCC
probability: 1.0
atoms:
A:
reactant: 1
resid: 1
atom: C1
z: 1
B:
reactant: 1
resid: 1
atom: C2
z: 1
bonds:
- atoms: [A, B]
order: 2
- name: hieCC
stage: cap
reactants:
1: HIE
product: HIECC
probability: 1.0
atoms:
A:
reactant: 1
resid: 1
atom: C1
z: 1
B:
reactant: 1
resid: 1
atom: C2
z: 1
bonds:
- atoms: [A, B]
order: 2
The Title, gromacs, ambertools, precure, CURE, and
postcure blocks follow the same pattern as
example 1. The two interesting differences are
constituents and densification.
constituents¶
constituents:
STY:
smiles: "c1ccccc1[CH2:1][CH3:2]"
reactive_atoms: {1: C1, 2: C2}
count: 150
BPA:
smiles: "CC(c1ccc([OH:1])cc1)(c1ccc([OH:2])cc1)C"
reactive_atoms: {1: O1, 2: O2}
HIE:
smiles: "[CH3:2][CH:1]([CH3])C(=O)OC[CH:3](O)[CH3:4]"
reactive_atoms: {1: C1, 2: C2, 3: C3, 4: C4}
stereocenters:
- C1
- C3
GMA:
count: 75
Four species, three of them generated from SMILES. Three things worth noting:
BPA and HIE have no ``count``. That’s because they’re consumed by the
param-stage reactions to assemble GMA; they don’t appear in the initial liquid as their own species. Theirmol2files are still generated and parameterized so the param reactions have something to consume.GMA has no ``smiles``.
htpolynetknows GMA from theparam-stage reactions in thereactionsblock; it builds the template by runningB1andB2at startup. GMA’scount: 75is what actually populates the initial liquid (paired with 150 STY, giving a 1:2 BisGMA:styrene ratio).``stereocenters`` is declared on HIE, not GMA. HIE has two chiral carbons (
C1andC3). Each GMA contains two HIE moieties, so the racemic poolhtpolynetbuilds for filling the initial box is 16 GMA diastereomers (2 chiral centres × 2 HIE per GMA = 4 bits → 16 configurations). The diagnostics log at the start of a run lists the full set (e.g.GMAS-1throughGMAS-15plus the canonicalGMA).
A note on the HIE SMILES¶
The HIE SMILES uses [CH:1] (with an explicit H) rather than
[C:1]. This matters: SMILES bracket atoms without an explicit
hydrogen count default to zero implicit H, which would leave atom
C1 at valence 3. antechamber then mistypes it as c2 (sp2),
mistypes the adjacent carbonyl carbon as c2 instead of c, and
tleap later fails with “no angle parameter for o-c2-os”. Writing
[CH:1] keeps the valence at 4 and the typing correct. The same
applies to [CH:3].
densification¶
densification:
initial_density: 100.0 # kg/m3
equilibration:
- ensemble: min
- ensemble: nvt
temperature: 300
ps: 10
- ensemble: npt
temperature: 300
pressure: 10
ps: 100
repeat: 8
GMA is a long, awkward-shaped molecule; gmx insert-molecules has
trouble packing it cleanly at higher densities, so the initial density
is set to a deliberately loose 100 kg/m³. The NPT compression step
then uses repeat: 8 to run eight 100 ps NPT segments back-to-back —
serial restarts let gmx rebuild its neighbour lists between
segments, which avoids the “box size changed too much” warning that
would otherwise trip a single long run.