All workflows

Molecular dynamics

DNA Helical Parameters Analysis

Extract helical parameters from a DNA MD trajectory with Curves+ and Canal, then fan out to averages, time series, stiffness, bimodality and correlations with biobb_dna.

Curves+Canalbiobb_dnaBioExcel biobb

What this workflow does

This workflow extracts the structural and the dynamical helical parameters of a DNA duplex from an MD trajectory. It uses the biobb_dna package, which wraps Curves+ and Canal.

The example system is the Drew-Dickerson Dodecamer, sequence CGCGAATTCGCG, PDB code 1BNA. The input is a 500 ns MD trajectory from the BigNASim database.

Curves+ reads the raw trajectory. It computes the helical parameters per base pair and per base-pair step for every frame. Canal converts that output into time series and histograms.

The workflow then fans out. About sixty downstream stages read the Canal bundle. They compute averages, time series, stiffness, bimodality and correlations for every parameter. The parameter set covers the base-pair step (rise, roll, twist, shift, slide, tilt), the base pair (shear, stretch, stagger, buckle, propeller, opening), the helical axis (inclination, tip, X and Y displacement), the groove widths and depths, the backbone torsions and the sugar puckering.

The compute problem

This workflow has an unusual shape. It is not a long serial chain. It is a narrow neck followed by a very wide fan-out.

Curves+ and Canal are the neck. They are serial, they are I/O bound, and they read the full 500 ns trajectory. The trajectory file is large. The Curves+ output is larger.

The fan-out stages are the opposite. Each one reads the same Canal bundle and writes a small CSV file. Each finishes in seconds. There are enough of them that the serial total is significant, and none of them depend on each other.

The biobb_dna package has no osx-arm64 conda build. Curves+ and Canal are compiled Fortran binaries. Neither installs natively on Apple Silicon.

How Horus solves it

Horus reads the data dependencies and runs the fan-out stages in parallel. You do not write a job array. You do not write a loop. The sixty analysis stages start as soon as Canal finishes.

The routing matters most at the neck. Point the Curves+ stage at the host that already holds the trajectory. That host is often a storage node or the cluster where the MD ran. Horus runs Curves+ there and moves only the Canal bundle back. You avoid a multi-gigabyte transfer of the raw trajectory.

The analysis stages then run locally on your CPU. They produce CSV files that you plot. This is the correct place for them, because the outputs are small and you inspect them often.

On Apple Silicon, Horus runs the biobb_dna stages in the quay.io/biocontainers/biobb_dna image. The stages that use arm64-compatible packages stay in the native conda environment. The runtime.command string is identical in both cases.

Without per-stage routing, you copy the trajectory to your laptop, install Curves+ by hand, and then run sixty analysis commands one after the other.

Pipeline

curves              Extract helical parameters from trajectory (Curves+)
   │
canal               Generate time series and histograms (Canal)
   │
   ├── avg_*   (20 stages)   Average helical parameters: base-pair step (rise, roll, twist,
   │                         shift, slide, tilt), base pair (shear, stretch, stagger, buckle,
   │                         propeller, opening), axis (inclination, tip, x/y-disp), grooves
   │                         (major/minor width & depth)
   │
   ├── puckering, canonicalag, bipopulations
   │                         Sugar pucker, canonical alpha/gamma, and BI/BII backbone
   │                         conformational populations
   │
   ├── ts_*    (~34 stages)  Time series of every helical parameter and backbone torsion
   │                         (alpha/beta/gamma/delta/epsilon/zeta/chi, phase) per strand
   │
   ├── average_stiffness, basepair_stiffness
   │                         Stiffness / elastic constants for Twist and the CG step
   │
   ├── dna_bimodality        Bimodality analysis of Twist at the CG step
   │
   └── intraseqcorr, interseqcorr, intrahpcorr, interhpcorr, intrabpcorr, interbpcorr
                             Sequence and helical-parameter correlations (intra/inter base
                             pair, neighboring steps)

Inputs and outputs

Inputs

This workflow uses real trajectory data checked into the directory. It fetches nothing at run time.

  • TRAJ/structure.stripped.nc: the 500 ns Drew-Dickerson Dodecamer trajectory.
  • TRAJ/structure.stripped.top: the matching AMBER topology.
  • .curvesplus/: the Curves+ standard base and backbone reference libraries.

Outputs land in workflow_results/results/:

  • curves.out.lis, curves.out.cda: the raw Curves+ output.
  • canal.out.zip: the Canal time series and histogram bundle.
  • avg_<param>.csv: the average value of one helical parameter.
  • ts_<param>.csv: the time series of one parameter or torsion.
  • stiffness.csv, bimodality.csv: the elastic and the bimodality analysis.
  • *corr.csv: the sequence and helical-parameter correlation matrices.

configs/curves.yaml sets the strand base-pair ranges. Each configs/avg_*.yaml and configs/ts_*.yaml file selects one parameter and one strand.

Run the workflow

Install the horus-runtime one time:

uv sync

If you do not have uv, install it first:

curl -LsSf https://astral.sh/uv/install.sh | sh

You can also install the packages with pip:

pip install horus-runtime horus-environments

Then run the workflow:

uv run horus run workflow.yaml

References

Run this workflow

The workflow is open source. Clone the pantheon repository and run it with the horus-runtime engine. To run it on managed compute without a cluster of your own, join the Temple Compute OS waitlist.