Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nextflow MD Analysis

Automated Nextflow pipelines for high-throughput molecular dynamics screening of antibody-antigen complexes

Nextflow License: MIT


Table of Contents

  1. Overview
  2. Pipelines
  3. Requirements
  4. Installation
  5. Quick Start
  6. Pipeline Architecture
  7. Output Structure
  8. Configuration Options
  9. Use Cases
  10. Cluster Profiles
  11. Performance

1. Overview

This repository contains production-ready Nextflow pipelines for automated molecular dynamics (MD) simulation and analysis of antibody-antigen complexes. Designed for high-throughput screening of antibody variants on HPC clusters with SLURM scheduling.

Key Features:

  • Automated system preparation and MD production with Schrödinger Suite
  • Parallel execution across multiple variants and replicates
  • Comprehensive trajectory analysis (RMSD, RMSF, Rg, H-bonds, MM-GBSA)
  • Reproducible workflows with validated random seeds
  • HPC-optimized with GPU support for production runs

2. Pipelines

Production Pipeline (workflows/production.nf)

Generates MD trajectories for antibody-antigen complexes with independent replicates.

Processes:

  1. System preparation (solvation, neutralization)
  2. MD production (NPT ensemble, 100 ns default)
  3. Trajectory validation

Example:

nextflow run workflows/production.nf \
  --variant_list variants.csv \
  --md_replicates 3 \
  --md_time_ns 100 \
  -profile slurm

Analysis Pipeline (workflows/analysis.nf)

Comprehensive analysis of MD trajectories with binding energy calculations.

Analyses performed:

  • SID (Simulation Interactions Diagram) — RMSD, RMSF, contacts, H-bonds
  • MM-GBSA — Binding free energy estimation
  • Trajectory metrics — RMSD, RMSF, Rg, hydrogen bonds

Example:

nextflow run workflows/analysis.nf \
  --variant_list variants.csv \
  --trajectory_dir results/production/trajectories \
  -profile slurm

3. Requirements

Software

Requirement Version
Nextflow ≥ 23.04.0
Schrödinger Suite 2024-1 or later
Python 3.9+
Python packages pandas, matplotlib, numpy, seaborn

Infrastructure

Resource Purpose
SLURM-based HPC cluster Job scheduling
GPU nodes MD production
CPU nodes Analysis

4. Installation

Step 1: Clone repository

git clone https://github.com/matt-esqueda/nextflow-md-analysis.git
cd nextflow-md-analysis

Step 2: Install Nextflow

curl -s https://get.nextflow.io | bash

Step 3: Configure for your cluster

Edit conf/slurm.config to match your HPC environment:

  • Schrödinger installation path
  • Module names
  • Queue/partition names
  • GPU resource syntax

Step 4: Install Python dependencies

# Using conda
conda create -n md-analysis python=3.9 pandas matplotlib numpy seaborn
conda activate md-analysis

# Or using pip
pip install pandas matplotlib numpy seaborn

5. Quick Start

Step 1: Prepare Input Structures

Create antibody-antigen complex structures (.maegz format) using Schrödinger Protein Preparation Wizard.

Step 2: Create Variant List

cp test_data/variants.csv.template variants.csv
# Edit variants.csv with your structure paths

Example variants.csv:

variant_name,structure_path
control,/path/to/structures/control.maegz
variant_A,/path/to/structures/variant_A.maegz
variant_B,/path/to/structures/variant_B.maegz

Step 3: Run Production Pipeline

nextflow run workflows/production.nf \
  --variant_list variants.csv \
  --md_replicates 3 \
  --md_time_ns 100 \
  -profile slurm

Step 4: Run Analysis Pipeline

nextflow run workflows/analysis.nf \
  --variant_list variants.csv \
  --trajectory_dir results/production/trajectories \
  -profile slurm

6. Pipeline Architecture

For detailed workflow diagrams and module dependencies, see docs/ARCHITECTURE.md

Production Pipeline:
  Input: .maegz structures
    ↓
  System Builder (solvation, ions)
    ↓
  MD Production (parallel replicates)
    ↓
  Trajectory Validation
    ↓
  Output: .cms, .xtc files

Analysis Pipeline:
  Input: MD trajectories
    ↓
  SID Analysis (interactions, RMSD, RMSF)
    ↓
  Extract Snapshots (for MM-GBSA)
    ↓
  MM-GBSA Calculations
    ↓
  Trajectory Analysis (Python scripts)
    ↓
  Output: CSV stats, plots (PNG/PDF)

7. Output Structure

results/
├── production/
│   ├── systems/                     # Prepared .cms files
│   ├── trajectories/                # MD trajectories (.xtc)
│   └── validation/                  # QC reports
├── analysis/
│   ├── sid/                         # SID analysis outputs
│   ├── mmgbsa/                      # Binding energies
│   └── trajectory_analysis/
│       ├── rmsd/                    # RMSD plots and stats
│       ├── rmsf/                    # RMSF plots and stats
│       ├── rg/                      # Radius of gyration
│       └── hbonds/                  # H-bond analysis
└── pipeline_info/                   # Execution reports

8. Configuration Options

Production Pipeline

Parameter Default Description
--variant_list CSV with variant names and structure paths (required)
--md_replicates 3 Number of independent replicates
--md_time_ns 100 Simulation time (ns)
--md_temperature 310.0 Temperature (K)
--system_builder_salt 0.15 Salt concentration (M)
--outdir results Output directory

Analysis Pipeline

Parameter Default Description
--variant_list CSV with variant names (required)
--trajectory_dir Directory with MD trajectories (required)
--mmgbsa_snapshots 50 Number of snapshots for MM-GBSA
--min_replicates 3 Minimum replicates required

9. Use Cases

Antibody Humanization Screening

Screen humanized variants to identify candidates with maintained binding affinity:

variant_name,structure_path
mouse_parent,/data/mouse_mAb.maegz
human_v1,/data/humanized_v1.maegz
human_v2,/data/humanized_v2.maegz

Epitope Mapping

Compare binding dynamics across antibodies targeting different epitopes:

variant_name,structure_path
epitope_A,/data/Ab_epitope_A.maegz
epitope_B,/data/Ab_epitope_B.maegz

Affinity Optimization

High-throughput screening of point mutations:

variant_name,structure_path
wildtype,/data/wt.maegz
Y50A,/data/Y50A.maegz
Y50F,/data/Y50F.maegz
Y50W,/data/Y50W.maegz

10. Cluster Profiles

Profile Flag Description
SLURM (default) -profile slurm GPU queue for MD; CPU queue for analysis; module-based software loading
Test -profile test 1 replicate, 1 ns simulation, reduced snapshots
Debug -profile debug Enhanced logging, no automatic cleanup

11. Performance

Typical Execution Times

Stage Time
System preparation ~5 min per variant
MD production (100 ns) ~4–6 hours per replicate (GPU)
SID analysis ~15 min per trajectory
MM-GBSA (50 snapshots) ~30 min per trajectory
Trajectory analysis ~5 min per metric

Scalability

  • Processes run in parallel across variants and replicates
  • Can screen 10+ variants with 3 replicates each in ~6–8 hours (wall time)

About

Automated Nextflow pipelines for high-throughput molecular dynamics screening of antibody-antigen complexes

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages