All workflows

Molecular dynamics

Protein Conformational Ensembles

Generate protein conformational ensembles with CONCOORD, FlexServ, NOLB and iMODS, then cluster and run PCA to get B-factors, hinge points, stiffness and collectivity.

CONCOORDFlexServNOLBiMODSProDyGROMACScpptrajBioExcel biobb

What this workflow does

This workflow generates protein conformational ensembles with five independent methods. It then merges the ensembles and analyzes the flexibility of the result. The example is adenylate kinase (PDB 1AKE, chain A), a protein with a well known open-to-closed hinge motion.

The five methods sample the conformational space in different ways. CONCOORD uses atomistic distance restraints. The ProDy Anisotropic Network Model uses an elastic network. FlexServ contributes Brownian Dynamics, Discrete Molecular Dynamics and Normal Mode Analysis. NOLB runs non-linear rigid-block NMA. iMODS runs internal-coordinate NMA with Monte Carlo sampling.

Each method writes its own trajectory. cpptraj fits each trajectory and converts it. The workflow then concatenates every ensemble into one meta-trajectory. GROMACS clusters that meta-trajectory and extracts the representatives.

Principal component analysis closes the workflow. It compresses the meta-trajectory in a classical and a Gaussian-weighted form. From the PCA modes it derives B-factors, hinge points by three methods, the apparent stiffness and the collectivity index.

The compute problem

This workflow is a benchmark. The five generation methods do not depend on each other. They all read the same prepared monomer and they all write a trajectory. Run in sequence they are slow. Run in parallel they finish in the time of the slowest one.

The methods also have unequal costs. CONCOORD generates thousands of atomistic structures and is CPU and disk heavy. The normal mode methods, NOLB and iMODS, are cheap because they work on a reduced representation. Brownian Dynamics and Discrete Molecular Dynamics sit between the two.

The merge point is a bottleneck of a different kind. trjcat and gmx_cluster read every trajectory at once. Clustering cost grows with the square of the frame count. This stage wants memory, not cores.

Two packages, biobb_flexdyn and biobb_flexserv, have no osx-arm64 conda build. CONCOORD, FlexServ, NOLB and iMODS are all compiled binaries.

How Horus solves it

Horus starts the five generation branches at the same time. It derives that from the graph, not from a flag. You add a sixth method by adding a stage that reads the same monomer. Nothing else changes.

The per-stage routing follows the cost profile. Send the CONCOORD branch to a host with many cores and fast local disk. Keep the NOLB branch and the iMODS branch on your workstation, because they finish in seconds. Send the gmx_cluster stage to a high-memory host. Each choice is one executor: field.

Horus moves the trajectories to the clustering host and brings the representatives back. It also runs the arm64-incompatible stages in the matching biocontainer image, so the whole benchmark runs on an Apple Silicon laptop before you commit cluster time.

This is the pattern that a single-machine tool cannot express. The workflow needs a CPU-heavy host, a memory-heavy host and a light local host in one run. You would otherwise split the benchmark into three scripts and reconcile the outputs by hand.

Pipeline

fetch_pdb                Download 1AKE from the PDB (biobb_io)
   │
extract_model             Extract first model
   │
extract_chain              Extract chain A monomer
   │
   ├── cpptraj_mask_backbone / cpptraj_mask_ca      Extract backbone / Cα atom masks
   │
   ├── concoord_dist ──► concoord_disco ──► cpptraj_rms_concoord ──► cpptraj_convert_concoord
   │                     CONCOORD distance-restraint ensemble
   │
   ├── prody_anm ──► cpptraj_rms_prody ──► cpptraj_convert_prody
   │                 ProDy Anisotropic Network Model ensemble
   │
   ├── bd_run ──► cpptraj_rms_bd                     FlexServ Brownian Dynamics
   ├── dmd_run ──► cpptraj_rms_dmd                    FlexServ Discrete Molecular Dynamics
   ├── nma_run ──► cpptraj_rms_nma ──► cpptraj_convert_nma   FlexServ Normal Mode Analysis
   │
   ├── nolb_nma ──► cpptraj_rms_nolb ──► cpptraj_convert_nolb   NOLB rigid-block NMA
   │
   └── imod_imode ──► imod_imc ──► cpptraj_rms_imods ──► cpptraj_convert_imods
                       iMODS internal-coordinate NMA + Monte Carlo sampling
   │
zip_trajectories ──► trjcat            Concatenate all ensemble trajectories into meta-trajectory
   │
make_ndx ──► gmx_cluster ──► cpptraj_rms_meta    Cluster meta-trajectory, fit representatives (GROMACS)
   │
pcz_zip_classic / pcz_zip_gaussian      PCA-compress meta-trajectory (classical / Gaussian-weighted)
   │
   ├── pcz_info, pcz_evecs               PCA statistics, variance profile, eigenvectors
   ├── pcz_animate ──► cpptraj_convert_proj   Animate along PC1, convert projection to XTC
   ├── pcz_bfactor                        B-factor analysis from PCA modes
   ├── pcz_hinges_bfactor / pcz_hinges_dyndom / pcz_hinges_fcte   Hinge-point detection (3 methods)
   ├── pcz_stiffness                      Apparent stiffness analysis
   └── pcz_collectivity                   Collectivity index

Inputs and outputs

Inputs

This workflow has no file inputs. It fetches PDB 1AKE from PDBe at run time. Set the code, the chain and the model in configs/fetch_pdb.yaml.

Outputs land in workflow_results/results/:

  • 1ake.pdb: the extracted chain A monomer.
  • One trajectory and one RMSD series per method, each converted to .trr.
  • meta_traj.*: the concatenated meta-trajectory and the GROMACS cluster output.
  • pcz_classic.pcz, pcz_gaussian.pcz: the compressed PCA trajectories.
  • pcz_bfactor.dat: the B-factors from the PCA modes.
  • pcz_hinges_*.dat: the hinge points from three detection methods.
  • pcz_stiffness.dat, pcz_collectivity.dat: the stiffness and the collectivity index.

The configs/concoord_*.yaml, configs/prody_anm.yaml, configs/nolb_nma.yaml and configs/imod_i*.yaml files hold the parameters of each method. The configs/pcz_*.yaml files hold the PCA and the hinge-detection options.

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.