Synthesis control options¶
Both synthesis runners are configured from a .ini control file:
``topo-csp`` — the coarse-grained-ribosome runner (
csp.ini), read bytopo.csp.protocol.read_csp_config();``topo-cylinder`` — the analytic-tunnel runner (
cylinder.ini), read bytopo.csp.cylinder.read_cylinder_config().
Both return a populated RunParams, so most keys are shared.
Every control key is documented here, in shared, coarse-grained-ribosome-only
and cylinder-only sets; the Synthesis in coarse-grained ribosome model and
Synthesis in cylinder ribosome model pages cover the physics.
The file is a flat list of
key = valuelines.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; set only what you want to change.
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 TOPO is installed (pip install -e . from the repo root):
topo-csp -f csp.ini # coarse-grained-ribosome runner
topo-cylinder -f cylinder.ini # analytic-tunnel runner
# stitch the per-stage trajectories into one VMD movie afterwards
topo-csp-movie -o synth_out --ribosome ribosome_trunc.pdb
A GPU is recommended for topo-csp: the truncated ribosome adds several thousand rigid
beads. See Tutorial B.2 — Protein synthesis on a coarse-grained ribosome for a runnable, validated example.
Example control files¶
csp.ini (coarse-grained ribosome):
; --- inputs (pdb_file, ribosome, domain_def are required) ---
pdb_file = 4c5c_model_clean.pdb ; all-atom native PDB; the CG model is built from it
ribosome = ribosome_trunc.pdb ; truncated CG ribosome (P-/A-anchors + rigid scenery)
domain_def = domain.yaml ; per-domain contact-nscale definition
stride_output_file = 4c5c_model_clean_stride.dat ; optional; else STRIDE is run for you
; --- length schedule ---
L0 = 1 ; first nascent length (default 1)
L_max = 306 ; final nascent length (default: full residue count)
; --- codon-resolved kinetics ---
mrna = 4c5c_mrna.txt ; one codon per residue; or fastest/slowest/median
codon_times = trans_times.txt ; table path = per-codon; a number of s = uniform
scale_factor = 216564650 ; in-vivo s -> in-silico ns compression (larger = faster)
time_stage_1 = 0.000340 ; mean peptidyl-transfer dwell (s) [CSP only]
time_stage_2 = 0.004201 ; mean translocation dwell (s) [CSP only]
random_seed = 20240629 ; reproducible first-passage-time schedule
; --- integrator / ribosome mechanics ---
dt = 0.015 ; ref_t = 310 ; tau_t = 0.05 ; nstout = 100
constraints = AllBonds ; minimize = yes
; tunnel_wall = yes ; one-sided tunnel floor (default on)
; ribo_free_mask = L24 : 42 - 59 ; free the L24 exit-tunnel loop (optional)
; ribo_free_pdb = .../ecoli/L24_atomistic.pdb ; all-atom chain for native contacts
; --- post-synthesis phase + 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
/ the tRNA-tether / flexible-loop keys and adds the tunnel_* geometry:
pdb_file = P0CX28_clean.pdb ; domain_def = domain.yaml ; (no `ribosome` PDB)
L0 = 1 ; L_max = ; mrna = P0CX28_mrna.txt ; codon_times = trans_times.txt
scale_factor = 216564650 ; random_seed = 20240629
constraints = None ; minimize = yes ; (cylinder allows None or AllBonds)
dt = 0.015 ; ref_t = 300 ; tau_t = 0.05 ; nstout = 100
; --- 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; options with a default may be
omitted. — in the Default column means there is no default. The keys fall into
three sets, all written in the same flat file:
Shared — accepted (with identical meaning) by both runners.
Coarse-grained ribosome runner only (
topo-csp/csp.ini).Cylinder runner only (
topo-cylinder/cylinder.ini).
Coarse-grained ribosome runner only (topo-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 |
|
str ( |
Nascent per-residue excluded-volume radius (Rmin/2) for the nascent ↔ ribosome force: |
|
bool ( |
How the growing C-terminus is held at the PTC. |
|
str (none) |
Free a portion of one ribosomal protein as a mobile Gō loop, |
|
path (none) |
All-atom PDB of the |
Cylinder runner only (topo-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
(parsed by topo.utils.config.strtobool()).
Notes on individual options¶
- Required inputs (
pdb_file/ribosome/domain_def) pdb_filesupplies the target fold (topology, force field, and the full native contact map, computed once and sliced to the top-leftL×Lblock per length). It must be all-atom — STRIDE (secondary structure) and the native-contact map are derived from the heavy atoms; a Cα-only CG PDB is not sufficient (the sibling cosmo IDP runner does accept one).ribosome(topo-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 fails.domain_defsets the per-domain contact-nscale (thenscalanalogue); see Domain definition file (domain.yaml).- Per-codon vs. uniform timing (
mrna/codon_times) A single key,
codon_times, selects the timing mode by its value type:A path (e.g.
codon_times = trans_times.txt) → per-codon timing:mrnais required and each codon’s mean time is read from thatCODON secondstable.A positive number of seconds (e.g.
codon_times = 0.05) → uniform timing: every codon gets that mean dwell and nomrnais needed (a control/testing mode).
There is no bundled default table: per-codon timing needs an explicit path (pick one under
assets/csp/codon_dwell_times/). Because a numeric value is always read as a uniform time, a codon-time table filename must not be a bare number.Fastest / slowest / median mRNA. Setting
mrna = fastest,slowestormedian(instead of a file) auto-builds a synonymous-codon mRNA that holds the protein sequence fixed and reassigns each residue’s codon — a controlled comparison in which only the elongation timing changes. The sequence is read frompdb_fileand each residue is encoded by its shortest-τ(fastest), longest-τ(slowest) or middle-τ(median) synonymous codon per thecodon_timestable, written next to the PDB asmrna_<mode>.txt. This needs acodon_timestable (a uniform numeric value is rejected). Pre-generate one standalone withtopo-make-mrna --pdb P.pdb --codon-times T.txt --mode fastest.- Kinetics and step counts (
scale_factor/time_stage_1/time_stage_2) In
topo-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.random_seedfixes the whole schedule. ``topo-cylinder`` uses a single segment per residue, so the whole codon dwellτis one MD segment andtime_stage_1/time_stage_2are ignored. Full derivation in Synthesis in coarse-grained ribosome model.- Bond treatment and PTC geometry (
constraints) The PTC-geometry optimization is always on: each new residue is seeded one equilibrium peptide bond (0.381 nm) from the previous C-terminus, clear of the excluded volume, so rigid
constraints = AllBonds(the CSP default) seeds and minimizes cleanly without the dt-halving guard firing. The cylinder runner seeds each new residue one equilibrium bond deeper than its restraint point, which likewise keepsAllBondsstable (its example usesNonehistorically; either works). SetNonefor flexible harmonic bonds.- C-terminus restraint (
trna_tether/restraint_k) Each new residue is added at the PTC and translocated A→P over the three stages (A-site in stages 1–2, P-site in stage 3).
trna_tetherselects how the growing C-terminus is held there — the two modes differ in whether they control the chain’s orientation as well as its position:trna_tether = no(default) — position restraint to a fixed point. The C-terminal bead is pulled by a single harmonic spring (stiffnessrestraint_k, default 83680 kJ/mol/nm² = 200 kcal/mol/Ų) toward a fixed point in space — the A-site or P-site target computed once per residue byoptimal_ptc_targets(the two points sit one equilibrium peptide bond, 0.381 nm, apart and clear of the ribosome). This constrains only where the C-terminus sits, not which way the residue faces; it is simpler, needs no tRNA orientation data, and is the right choice for routine runs.trna_tether = yes— full O’Brien peptidyl-tRNA linkage. Instead of a fixed point, the C-terminus is coupled to the actual tRNA beads of the loaded ribosome, reproducingcontinuous_synthesis_v6.py. Four terms act on the restrained beadNand the current-site tRNA beads (R= acceptor,P= R−1,PU2= R+2):a bond
N–R(sets the tRNA–residue distance);two orienting angles
N–R–PandN–R–PU2(fix the residue’s bearing in the tRNA frame);an improper
N–R–P–PU2(fixes the out-of-plane sense);a backbone orienting angle
prev–N–R(aims the chain down the tunnel).
Together these control position *and* orientation, so the nascent chain extrudes N-terminus-first down the exit tunnel rather than curling up at the PTC — the behaviour to pick when faithfully reproducing O’Brien’s directional mechanism. It requires the tRNA beads to be present in the
ribosomePDB (segidsPtR/AtR, resid 76, beadsR/P/BR2). The always-present peptide bondN-1↔Nstays in place either way (topo keeps the chain permanently bonded — a deliberate deviation, see Synthesis in coarse-grained ribosome model).
restraint_ksets the spring stiffness of the position restraint only (thenomode). The tether-modeN–Rbond uses a fixed internal constant of the same magnitude (200 kcal/mol/Ų) and does not readrestraint_k, so changing that key has no effect undertrna_tether = yes. (topo-cylinderhas no tRNA tether — it always restrains the C-terminus to the on-axis PTC point.)- Tunnel wall vs. analytic tunnel (
tunnel_wall/tunnel_*) topo-cspuses a one-sided half-harmonic wall (tunnel_wall) that supplies the “floor” the truncated 50S no longer provides; its plane is auto-placed and its stiffness fixed, so only the on/off toggle is exposed.topo-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 in cylinder ribosome model).
- Flexible exit-tunnel loop (
ribo_free_mask/ribo_free_pdb) (
topo-csponly.) By default every ribosome bead is frozen.ribo_free_maskfrees a portion of the exit-tunnel protein (uL24 family: E. coli L24, eukaryotic L26) as a mobile, topo-style Gō loop — reproducing O’Brien’s mobile-L24 setup, where the β-hairpin that lines the tunnel can breathe and contact the nascent chain while the rest of the ribosome stays rigid. Its bonded terms and native contacts are built from an all-atom copy of the chain (ribo_free_pdb) — the Cα-only ribosome cannot supply the STRIDE H-bonds and heavy-atom contacts. The freed residues get mass; the two boundary residues just outside the range stay frozen and anchor the loop. Requiresminimize = yes. Prepare the all-atom chain withassets/csp/prepare_ribosome/helpers/carve_flexible_protein.py; ready-carved chains and per-organism mask ranges are inassets/csp/prepare_ribosome/MANIFEST.md. Example:ribo_free_mask = L24 : 42 - 59 ribo_free_pdb = assets/csp/prepare_ribosome/structures/ecoli/L24_atomistic.pdb
- 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 — the analogue of termination. Each writes its own 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>.dcd, a foldedtraj_runinfo.logand 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 withtopo-csp-movie -o <outdir>; setTOPO_CSP_VERBOSE=1to restore the full per-stage banners.