Output files and the run log¶
Every run writes all of its files into one self-contained folder, set by
output_dir (default traj/) and named <outname> (default traj).
This page lists every file TOPO produces, explains the state-log format and how
to parse it, and describes the run-provenance record.
The files a run produces¶
After topo-mdrun -f md.ini finishes, the run folder contains:
File |
Format |
Contents / use |
|---|---|---|
|
binary |
Trajectory — coordinates written every |
|
text |
State log — step, time, energies, temperature, speed, ETA, every |
|
text |
Topology of the CA model (atoms, masses, charges, bonds). Needed to load the |
|
binary |
Checkpoint — full dynamical state (positions and velocities), every |
|
text |
Last conformation (CA PDB). Reuse as |
|
text (INI) |
Run provenance — package versions, hardware, GPU, timing, coordinate/velocity sources. See below. |
Conditional files:
<outname>_multi.psf— written whenn_copies > 1: the combined multi-chain topology matching the multi-copy.dcd(the plain.psfremains the single-chain topology). See Tutorial 4 — Many copies in one run (better GPU utilization).<outname>_quench.dcd/<outname>_quench.log— written whenanneal = yes: the quench-phase trajectory and log, kept separate from the production.dcd/.logso the hot phase never contaminates your production ensemble. See Tutorial 6 — Temperature annealing & quenching.<pdb_prefix>_stride.dat— cached STRIDE hydrogen-bond output, written next to the input PDB (not in the run folder) the first time the model is built. Reused automatically on later runs; delete to force regeneration.
Tip
Each run overwrites the traj/ folder. To keep several runs side by
side, point each at its own folder (output_dir = runs/P0CX28_T300) or
change outname.
The state log format¶
The .log is written by topo.reporter.topo_reporter.topoReporter, a
subclass of OpenMM’s StateDataReporter tuned for readability and easy
parsing. Each float column is rounded to log_precision decimals (default 4)
and right-justified to log_width characters (default 14), columns are
separated by two spaces, and the header is a # comment line:
# Step Time (ps) Potential Energy (kJ/mole) Kinetic Energy (kJ/mole) ... Temperature (K) Speed (ns/day) Time Remaining
1000 15.0 -1234.5678 312.4567 ... 301.2345 123.4567 0:01:23
2000 30.0 -1241.0021 305.1180 ... 299.8765 124.0012 0:01:10
Default columns: step, time (ps), potential energy, kinetic energy, total energy, temperature, speed (ns/day), and estimated time remaining. The energies are in kJ/mol.
``log_precision`` — decimals for float columns;
Nonegives OpenMM’s fullreprprecision.``log_width`` — minimum column width for alignment;
Nonedisables fixed-width padding.
On a restart, the reporter appends to the existing .log and .dcd
(no repeated header), so a multi-stage run stays one continuous record. In an
annealing run, the quench writes _quench.log and the production log’s
step counter is reset to 0 (see Tutorial 6 — Temperature annealing & quenching).
Parsing the log in Python¶
Use the companion reader, which returns a {column_name: [values...]} dict
(numeric columns as floats, others as strings) and respects the two-space
separator so multi-word headers like Potential Energy (kJ/mole) stay intact:
import numpy as np
from topo.reporter.topo_reporter import readOpenMMReporterFile
data = readOpenMMReporterFile("traj/traj.log")
step = np.array(data["Step"])
pe = np.array(data["Potential Energy (kJ/mole)"])
temp = np.array(data["Temperature (K)"])
print("mean T:", round(temp.mean(), 1), "K")
This is the recommended way to plot energy or temperature vs. time, or to check
that a run is healthy (stable temperature near ref_t, non-exploding
potential energy).
The run-provenance record¶
<outname>_runinfo.log is an INI-format side channel (written by
topo.utils.runinfo) that does not affect the simulation but records
everything you need to reproduce or debug it:
[run_start]— start timestamp; the control file and checkpoint paths; whether this was a restart; steps planned; initial coordinate and velocity sources (checkpoint vs.init_positionvs.pdb_file, and Boltzmann velocities atref_t); Python / NumPy / ParmEd / OpenMM versions; hostname, OS, CPU count, requested threads; and the selected OpenMM platform.[cuda_metadata]— on GPU runs: CUDA device name, driver/runtime versions, precision, and annvidia-smisnapshot.[run_end]— end timestamp, wall-clock elapsed time, final step and simulated time, and the path to the final structure.
Keep this file with your trajectory: it answers “what exactly did I run, on what hardware, from which coordinates?” long after the job is gone.
Loading a trajectory for analysis¶
import MDAnalysis as mda
u = mda.Universe("traj/traj.psf", "traj/traj.dcd") # single chain
print(u.atoms.n_atoms, "CA beads,", len(u.trajectory), "frames")
# multi-copy run: use the combined topology
u_multi = mda.Universe("traj/traj_multi.psf", "traj/traj.dcd")
From there, compute RMSD, radius of gyration, or the native-contact score Q
(Native-contact analysis (the Q score)). For multi-copy runs, split the combined DCD into
per-copy trajectories first with topo.split_chains()
(Tutorial 4 — Many copies in one run (better GPU utilization)).