Module 14: Applied CADD Workflows & Reproducibility
Turn isolated commands into inspectable pipelines using Python, pandas, RDKit, KNIME, the command line, SLURM, and deployment practices that preserve scientific provenance.
Learning outcomes
- Design a reproducible project with explicit inputs, environments, parameters, and checks.
- Build transparent chemical-data transformations with Python or KNIME.
- Automate docking and MD without hiding failed records or incompatible results.
- Package and monitor predictive models without confusing an interface with validation.
Interactive workflow audit
Would you trust this pipeline rerun?
Turn safeguards on and off. A script becomes a defensible scientific pipeline only when its inputs, environment, decisions, failures, and outputs remain traceable.
Audit readiness
Rerunnable, not auditable
60/100
The commands may rerun, but missing compounds or outputs can pass through silently.
Example stage ledger
- Input structures
- 250
- Parsed successfully
- 248
- Docked successfully
- 244
- Silently missing
- 6
Without stage checks, the final ranking looks complete even though six compounds disappeared.
Next safeguard to add
Recorded random seeds: Makes stochastic conformer generation, splitting, and docking behavior traceable.
Boundary: a high audit score shows that the computation is traceable. It does not prove that the docking setup, force field, assay labels, or predictive model are scientifically valid.
1. Reproducibility is part of the scientific method
A result is reproducible when another researcher can recover the same inputs, environment, parameters, random seeds, workflow steps, and outputs. A folder full of commands is useful evidence, but it becomes a scientific workflow only when assumptions and provenance are explicit.
Inputs
Use immutable source files or record stable identifiers and retrieval dates. Preserve raw data and write cleaned outputs to a separate location.
- Structures and sequence versions
- Compound identifiers and standardized structures
- Assay definitions, units, and censoring rules
Environment
Pin software and database versions. Record operating system, CPU/GPU requirements, containers or environment files, and licensed components.
Configuration
Keep scientific choices in readable configuration files: protonation pH, grid center, scoring settings, split strategy, force field, water model, and random seed.
Outputs and checks
Create machine-readable summary tables, logs, checksums, and plots. A pipeline should fail loudly when expected records, columns, poses, or trajectories are missing.
2. Python, pandas, and RDKit as a transparent data layer
Use Python for explicit transformations that can be tested and version controlled. Pandas handles tabular assay data, while RDKit supplies chemical parsing, standardization, descriptors, fingerprints, and substructure operations.
3. KNIME for visible, inspectable workflows
KNIME represents data transformations as connected nodes. It is valuable for teaching, prototyping, and mixed teams because each table can be inspected between steps. Component nodes should expose parameters and describe their chemical assumptions.
- 1
Read and validate
Load molecular and assay tables, verify column types, parse structures, and branch invalid records to a review table rather than silently dropping them.
- 2
Construct
Generate molecules using atom-, fragment-, or reaction-based transformations. Preserve parent-child relationships and reaction provenance for every proposal.
- 3
Score
Calculate property filters, similarity, substructure alerts, predictive-model outputs, novelty, and synthesizability. Keep raw component scores before combining objectives.
- 4
Search and select
Explore candidates with enumeration, stochastic search, active learning, or multi-objective ranking. Apply diversity selection before exporting a review set.
- 5
Package the workflow
Bundle required extensions, input examples, component versions, annotations, and expected outputs. Test the workflow from a clean workspace.
4. Command-line automation for docking and MD
A production pipeline needs an entry point that runs stages in a defined order, captures the environment, reconciles record counts, and exits on failure. The example below is intentionally small: each scientific stage remains a testable script, while the shell wrapper owns orchestration and provenance.
| Stage | Automation pattern | Essential guardrail |
|---|---|---|
| Library preparation | One record per compound with a stable identifier and standardized protonation/3D generation | Count inputs and outputs; quarantine failures. |
| Docking | One configuration template plus an explicit compound/receptor manifest | Capture software version, random seed, grid, exhaustiveness, and exit status. |
| Pose aggregation | Parse scores and poses into a single table linked to source structures | Do not rank across incompatible scoring setups. |
| MD setup | Script topology, box, solvation, ions, minimization, NVT, NPT, and production stages | Stop if energy, density, temperature, or pressure checks fail. |
| Trajectory analysis | Use named index groups and scripted RMSD/RMSF/Rg/SASA/contact analyses | Correct periodic boundaries and state the fitted atom selection. |
5. Running at scale with SLURM and GPUs
An HPC scheduler allocates resources; it does not validate the science. Request resources that match the executable, split independent replicas or ligands into job arrays, and write logs that identify both job and scientific configuration.
6. From assay data to a deployable model
Assay quality first
Check controls, replicates, plate effects, units, censoring, aggregation, autofluorescence, redox activity, reactive compounds, and orthogonal counterscreens before labeling molecules.
Split by chemistry and time
Random splits can leak close analogs. Prefer scaffold, series, cluster, or temporal splits that approximate how the model will encounter future compounds.
Package preprocessing with the model
The deployed artifact must include structure standardization, descriptor calculation, feature order, missing-value handling, model weights, thresholds, and applicability-domain logic.
Monitor scientific validity
Track input failures, chemical-space drift, confidence, calibration, and delayed assay outcomes. A Streamlit interface is a delivery layer, not evidence of model validity.