Episode 1 - Introduction (environment and data)

All episodes Next

Table of contents

Duration

Objectives

Content

Preliminary sequence and ligand checks

Before we launch the OpenMM demos, review two focused notebooks to explore the inputs.

Alanine dipeptide

Guided demo

Exercise

Notebooks and scripts

Protein-ligand complex

Visual sanity checks

Splitting the complex

Recreate the canonical protein2.pdb / ligand2.pdb pair any time the $COURSE_DIR/data/complex folder changes by running the helper script below (copy/paste from the repository). It assumes the full complex resides in $COURSE_DIR/data/complex/protein2-ligand2.pdb:

#!/usr/bin/env bash
set -euo pipefail

COURSE_DIR="${COURSE_DIR:-$HOME/Concepcion26}"
INPUT_PATH="$COURSE_DIR/data/complex/protein2-ligand2.pdb"
OUTPUT_DIR="$COURSE_DIR/data/complex"

if [[ ! -f "$INPUT_PATH" ]]; then
  echo "Error: missing $INPUT_PATH" >&2
  exit 1
fi

mkdir -p "$OUTPUT_DIR"

python - <<PY
from pathlib import Path

input_path = Path("$INPUT_PATH")
output_dir = Path("$OUTPUT_DIR")
protein_path = output_dir / "protein2.pdb"
ligand_path = output_dir / "ligand2.pdb"

protein_lines = []
ligand_lines = []

with input_path.open("r") as fh:
    for line in fh:
        if line.startswith("HETATM") and line[17:20].strip() == "SUB":
            ligand_lines.append(line)
        else:
            protein_lines.append(line)

protein_path.write_text("".join(protein_lines))
ligand_path.write_text("".join(ligand_lines))

print(f"Saved protein {protein_path}")
print(f"Saved ligand  {ligand_path}")
PY

Run this once after updating the data bundle so every episode reads the same split files.

Guided demo

Exercise

Notebooks and scripts

Key points

All episodes Next