Synthesis control options¶
Both synthesis runners are configured from a .ini control file with a single
[OPTIONS] section:
``cosmo-csp`` — the coarse-grained-ribosome runner (
csp.ini), read bycosmo.csp.protocol.read_csp_config();``cosmo-cylinder`` — the analytic-tunnel runner (
cylinder.ini), read bycosmo.csp.cylinder.read_cylinder_config().
Both return a populated RunParams, so most keys are shared.
This page is the single reference for every control key — grouped into shared,
coarse-grained-ribosome-only, and cylinder-only sets below; the
Synthesis on a coarse-grained ribosome and Synthesis through an analytic tunnel (cylinder model) pages cover the physics and
point back here for the keys.
Comments: inline or on their own line, starting with
;or#.Keyword and value are separated by
=or:.Every option has a default except the ones marked required.
Units are OpenMM defaults — nm, ps, kJ/mol, K, kJ/mol/nm² — and dwell times are in seconds. Integers may use
_digit separators (200_000).
Running a synthesis¶
Once cosmo is installed (pip install -e . from the repo root):
cosmo-csp -f csp.ini # coarse-grained-ribosome runner
cosmo-cylinder -f cylinder.ini # analytic-tunnel runner
# stitch the per-stage trajectories into one VMD movie afterwards
cosmo-csp-movie -o synth_out --ribosome 4v9d_50S_PtR_5jte_AtR_model_cg_trunc.pdb
A GPU is recommended for cosmo-csp: the truncated ribosome adds several thousand
rigid beads.
Example control files¶
csp.ini (coarse-grained ribosome):
[OPTIONS]
; --- inputs (pdb_file, ribosome are required) ---
pdb_file = asyn.pdb ; native PDB (all-atom OR Cα-only CG); CG model built from it
ribosome = 4v9d_..._cg_trunc.pdb ; truncated CG ribosome (P-/A-anchors + rigid scenery)
model = hps_urry ; nascent IDP force field (any model; hps_kr is the default)
; --- length schedule ---
L0 = 1 ; L_max = ; final length blank -> full residue count
; --- codon-resolved kinetics ---
mrna = mrna.txt ; codon_times = trans_times.txt ; scale_factor = 4331293
time_stage_1 = 0.000340 ; time_stage_2 = 0.004201 ; [CSP only]
random_seed = 1
; --- integrator / ribosome mechanics ---
dt = 0.01 ; ref_t = 300 ; tau_t = 0.01 ; nstout = 50
constraints = None ; minimize = yes
; tunnel_wall = yes ; one-sided tunnel floor (default on)
; --- post-synthesis + resume + hardware ---
ejection_steps = 20000 ; resume = auto
device = GPU ; ppn = 4 ; outdir = synth_out
cylinder.ini (analytic tunnel) — the shared keys are identical; it drops ribosome
and adds the tunnel_* geometry:
[OPTIONS]
pdb_file = asyn.pdb ; model = hps_kr ; (no `ribosome` PDB)
L0 = 1 ; L_max = ; mrna = mrna.txt ; codon_times = trans_times.txt
scale_factor = 4331293 ; random_seed = 1
constraints = None ; minimize = yes
dt = 0.01 ; ref_t = 300 ; tau_t = 0.01 ; nstout = 50
; --- analytic exit tunnel (cylinder only) ---
tunnel_radius = 0.9 ; tunnel_length = 10.0 ; tunnel_x_lo = 0.0
tunnel_center = 0.0, 0.0 ; tunnel_k = 8368
ejection_steps = 300000 ; resume = auto
device = GPU ; ppn = 4 ; outdir = synth_out
Option reference¶
“Required = yes” means the run cannot proceed without it. — in the Default column
means there is no default. The keys are grouped into three sets — all in the same single
[OPTIONS] section:
Shared — accepted (with identical meaning) by both runners.
Coarse-grained ribosome runner only (
cosmo-csp/csp.ini).Cylinder runner only (
cosmo-cylinder/cylinder.ini).
Coarse-grained ribosome runner only (cosmo-csp)¶
These keys are read only from csp.ini. (time_stage_1 / time_stage_2 are
accepted by the cylinder INI but have no effect there — with a single MD segment
per residue the whole codon dwell is one segment, not a three-way split.)
Option |
Type |
Default |
Description |
|---|---|---|---|
|
str |
required |
Truncated CG ribosome PDB — the P-/A-anchors and the rigid (mass-0) scenery. Supplying it is the signal to load it as rigid (no |
|
float [s] |
|
Mean peptidyl-transfer (stage 1) dwell; the actual dwell is an exponential draw with this mean. |
|
float [s] |
|
Mean translocation (stage 2) dwell. Stage 3’s mean is the remainder |
|
bool |
|
Apply the one-sided half-harmonic tunnel wall (a floor below the synthesis point). The plane |
Cylinder runner only (cosmo-cylinder)¶
The analytic exit tunnel — a bore of radius r drilled through an infinite wall — that
replaces the explicit ribosome beads. Read only from cylinder.ini.
Option |
Default |
Description |
|---|---|---|
|
|
Bore radius |
|
|
Bore length (nm). The exit face sits at |
|
|
PTC / closed end of the bore (nm); the C-terminus is restrained on-axis here. |
|
|
Tunnel axis |
|
|
Wall stiffness (kJ/mol/nm² = 20 kcal/mol/Ų). |
|
|
Mouth-corner fillet radius |
Note
Boolean options accept yes/no, true/false, 1/0.
trna_tether selects the C-terminus restraint mode: no (default) uses the
harmonic position restraint to the A/P target point; yes uses O’Brien’s full
tRNA tether (bond + 2 orienting angles + improper to the A-site tRNA beads in
stages 1-2, the P-site beads in stage 3; plus a backbone orienting angle, the
hps_ss bistable backbone potential applied for all models), which controls
orientation as well as position. Both drive the same A→P three-stage translocation.
Notes on individual options¶
- Required inputs (
pdb_file/ribosome) pdb_filesupplies the sequence (the length-Lmodel isbuildCoarseGrainModelon residues1..L— no STRIDE, no contact map). It may be an all-atom PDB or a Cα-only CG structure — only the Cα positions and residue names are read (unlike the siblingtopoGō model, which needs an all-atom structure for STRIDE + heavy-atom native contacts).ribosome(cosmo-csponly) provides the P-/A-anchors and rigid scenery; it must carry tRNA beads under the fixed names (segidsPtR/AtR, resid 76, beadsR/P/BR2) or anchor lookup — and the always-on PTC-geometry optimization — fail.- Per-codon vs. uniform timing (
mrna/codon_times) codon_timesselects the timing mode by its value type: a path → per-codon timing (mrnarequired); a positive number of seconds → uniform timing (nomrna). There is no bundled default — per-codon timing needs an explicit table path (pick one underassets/csp/codon_dwell_times/). A codon-time table filename must not be a bare number. Settingmrna = fastest,slowestormedianauto-builds a synonymous-codon mRNA from the protein + table (see Codon dwell-time tables (per-codon timing)).- Kinetics and step counts (
scale_factor/time_stage_1/time_stage_2) In
cosmo-cspeach residue is added over three sub-stages whose dwell times are exponential draws with meanstime_stage_1(peptidyl transfer),time_stage_2(translocation), andτ(next codon) − time_stage_1 − time_stage_2(the decoding wait). Those seconds map to MD steps throughscale_factoranddt. ``cosmo-cylinder`` uses a single segment per residue, so the whole codon dwellτis one MD segment andtime_stage_1/time_stage_2are ignored.- Ribosome ↔ nascent excluded volume
The rigid ribosome interacts with the chain via the O’Brien 12-10-6 excluded volume (sum rule
R = Rmin/2ᵢ + Rmin/2ⱼ,ε = 0.000132kcal/mol) plus Debye–Hückel electrostatics. The per-beadRmin/2values are model-independent steric radii (standaloneOBRIEN_RMIN_2_NM/OBRIEN_RNA_RMIN_2_BEADStables incosmo.parameters.model_parameters), decoupled from the force field, so the excluded volume is identical for every nascent model.- Tunnel wall vs. analytic tunnel (
tunnel_wall/tunnel_*) cosmo-cspuses a one-sided half-harmonic wall (tunnel_wall) whose plane is auto-placed and stiffness fixed, so only the on/off toggle is exposed.cosmo-cylinderinstead uses a fully analytic tunnel — a cylindrical bore in an infinite wall — whose geometry is set by thetunnel_radius/tunnel_length/tunnel_x_lo/tunnel_center/tunnel_k/tunnel_mouth_roundkeys (see Synthesis through an analytic tunnel (cylinder model)).- Post-synthesis phases (
stall_steps,ejection_steps) After the last residue, up to two optional phases run in order.
stall_steps > 0first holds the finished chain at the PTC with the C-terminus restraint / tRNA tether still ON (a ribosome-stalling hold), thenejection_steps > 0runs a phase with the restraint released (ribosome/tunnel still present), so the finished chain diffuses out. Each writes its own output folder (stall/thenejection/);0skips that phase.The ejection free run is extendable, but extension is an explicit opt-in via the
restartkey (defaultno):restart = no(default) – a completed ejection (ejection DONEinprogress.log) is skipped on resume, exactly like thestallphase; a fresh run (or a never-completed ejection) runs from step 0 toejection_steps. Raisingejection_stepsalone does not re-run or extend a finished ejection – userestart = yesfor that (orresume = noto redo the whole synthesis fresh).restart = yes– on a resumed run (resume = auto/yes) with a priorejection/traj.chk, the ejection continues from that checkpoint (positions + velocities + step count) and appends only the steps needed to reach the cumulativeejection_stepstarget, a true simulation restart. If the checkpoint already reachedejection_steps, the run prints “already met” and steps nothing.
So CSP continuation has two independent knobs:
resume(whole synthesis, residue granularity) andrestart(the ejection MD checkpoint). Unlike the earlier behavior, raisingejection_stepsno longer implicitly restarts. See Resuming long synthesis runs, “Resume vs. restart”.- Output layout, resume and movies
Each residue writes one
<outdir>/L_<L>/folder (CSP: sharedtraj.psf+ per-stagetraj_s<1,2,3>.dcdand a singletraj_final.pdb; cylinder: a singletraj.dcd+traj_final.pdb), plus a per-residuedwell_times.dat(the schedule, with a#PTCheader for CSP) and an append-onlyprogress.log. Re-invoking a runner on an interruptedoutdirresumes from the last completed residue (resume = auto); see Resuming long synthesis runs. Stitch a movie withcosmo-csp-movie -o <outdir>; setCOSMO_CSP_VERBOSE=1for the full per-stage banners.