Configuration¶
The full 0-liquid-styrene.yaml is short — no reactions, no
CURE, no postcure. It is just enough to parameterize a single
monomer, build a low-density box, and run the densification + anneal
cascade.
# htpolynet -- Example 0 -- Liquid Styrene
#
# Self-contained config: the styrene monomer is generated from SMILES
# (RDKit path via the atom-mapping syntax). Run with:
#
# htpolynet run -diag diagnostics.log 0-liquid-styrene.yaml
#
# This example produces a densified liquid of "active" styrene monomers
# (no curing). After the run completes you can compute properties with
# `htpolynet analyze` -- save the following as `ck.yaml` and invoke
# `htpolynet analyze -cfg ck.yaml -ocfg 0-liquid-styrene.yaml -proj proj-0`:
#
# - command: check
# subdir: analyze/check
# links: [systems/densification/densified-npt.trr]
# options: {f: densified-npt.trr}
# outfile: check.out
# matchlines: ['Last frame', 'Coords']
# - command: report-methods
# subdir: analyze/report-methods
# links: [systems/densification/densified-npt.tpr]
# options: {s: densified-npt.tpr, m: report.tex}
# - command: freevolume
# subdir: analyze/freevolume
# links:
# - systems/densification/densified-npt.tpr
# - systems/densification/densified-npt.trr
# options: {s: densified-npt.tpr, f: densified-npt.trr}
#
# Cameron F. Abrams -- cfa22@drexel.edu
Title: Liquid of Active Styrene Monomers
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: 1000
densification:
initial_density: 300.0 # kg/m3
equilibration:
- ensemble: min
- ensemble: nvt
temperature: 300.0
ps: 10.0
- ensemble: npt
temperature: 300.0
pressure: 10.0
ps: 200.0
precure:
preequilibration:
ensemble: npt
temperature: 300 # K
pressure: 1.0 # bar
ps: 200
anneal:
ncycles: 2
initial_temperature: 300.0
cycle_segments:
- T: 300.0
ps: 0
- T: 600.0
ps: 20
- T: 600.0
ps: 20
- T: 300.0
ps: 20
- T: 300.0
ps: 20
postequilibration:
ensemble: npt
temperature: 300.0 # K
pressure: 1.0 # bar
ps: 100
A block-by-block walk-through:
TitleA free-text label for the run; appears in logs and in the title field of generated topology/structure files.
gromacsTells
htpolynethow to invoke GROMACS.gmx_optionsare passed to everygmxinvocation;mdrun_optionsare passed tomdrunonly. Thegpu_id: 0line is left in by default and the runtime will automatically strip it (with a warning) if thegmxbuild is not GPU-capable or no GPU is visible.ambertoolsSelects the partial-charge method for
antechamber;gasis Gasteiger and is fast and good enough for a non-reactive densification.constituentsDeclares the molecular species in the box. Here, one species (
STY, 1000 copies) generated from SMILES. See monomer for the atom-mapping details.densificationThe post-pack equilibration cascade. Starts at
initial_density: 300 kg/m³(deliberately loose so the pack succeeds without overlaps) and runs minimization → 10 ps NVT at 300 K → 200 ps NPT at 300 K, 10 bar. The deliberately high pressure accelerates compaction.precureDespite the name,
precureis not chemically a curing step — it is the post-densification equilibration thathtpolynetruns whether or not a cure is configured. Here it is:preequilibration— 200 ps NPT at 300 K, 1 bar (relax the pressure jolt from densification);anneal— two 300 K → 600 K → 300 K cycles, 80 ps per cycle, useful for shaking the liquid out of any pack-induced local traps;postequilibration— 100 ps NPT at 300 K, 1 bar.
The comment block at the top of the YAML also sketches an
htpolynet analyze configuration (ck.yaml) you can run after the
build to compute free volume and similar properties; see
results and the Post-build simulations and analyses section.