Skip to content

MD Plugin

Package: caddforge-md

Version 0.15.0

This page describes caddforge-md==0.15.0 with core 0.24.0, GUI 0.7.0, descriptors 0.12.0 and docking 0.8.0. See the version matrix.

The MD plugin provides molecular dynamics preparation, simulation, and analysis workflows.

Requirements and example status

The example library provides downloadable configuration templates for every workflow on this page, plus a shared Python runner. File paths refer to inputs you must prepare; these are not bundled research datasets. Schema validation does not establish scientific validity or engine availability. See the version matrix for release tags and publication status.

fix-structure

Workbench repair and optional preparation

The workbench exposes Fix Structure as a standalone tool. Inputs selects the exact PDB; Method makes protein protonation/pH, independent terminal treatment and required OpenMM force fields explicit. Advanced controls keep the native normalization, membrane and validation policies available. Repair adds protein/cap and supported membrane hydrogens; it leaves ligands/cofactors untouched and does not rebuild missing loops. Approximate cap geometry should be minimized before production MD.

Results provide on-demand supplied/prepared structures in the shared molecular viewer and paginated chemistry, link, normalization and alias diagnostics. Failed jobs retain available diagnostics without advertising their structure as a successful preparation. Use Use in … to create a reviewable downstream draft with the exact PDB and paired chemistry records; all source files are retained independently when submitted.

Plain MD, GaMD and OpenBPMD offer Prepare with Fix Structure after choosing a PDB in Inputs. It is off by default. Configure the same repair fields in the expandable panel. Compute inherits the calculation's entire profile, including GPU requests; untick inheritance to choose separate preparation compute settings. Review shows Fix Structure → calculation. Run submits one registered workflow, then starts the calculation only after repair and verified artifact publication succeed. Native stage progress, logs and results remain accessible, including GaMD's pilot/replicas. The parent links to the calculation's analysis and owns a single combined export.

Repair workers declare the artifacts they produced and whether protein residues were recognized. Before success, they verify the PDB, normalization/alias diagnostics and, for protein repairs, both chemistry records against the exact repaired structure. Required missing, malformed or mismatched records fail preparation and retain recovery evidence. Publication verifies the persistent copies before exposing result paths. Standalone repairs without recognized protein do not fabricate protein records; automatic MD preparation still requires the pair and reports why it is unavailable. These artifact-contract checks are included in MD 0.15.0.

Checkpoint or prebuilt Amber starts, existing chemistry records/mappings and conflicting hydrogen/custom-script settings disable automatic repair with an explanation. No scientific retry is implicit. Resume workflow reviews stopped stages, reuses verified repair and delegates supported checkpoint recovery; Retry as new retains the original two-stage setup. A stopped coordinator may reattach to known live stages without resubmitting them. Uncertain submissions require reconciliation.

Conservatively repairs protein hydrogens in a protein-only PDB, protein-ligand complex PDB, or existing POPC/POPE membrane system before OpenMM simulations. The tool preserves explicit protein protonation choices where possible, repairs configured membrane lipid hydrogens with OpenMM force-field templates, leaves ligands/cofactors untouched, and preserves ligand/cofactor CONECT records and PDB formal-charge fields by default.

CLI:

caddforge run md fix-structure --config fix_structure.yaml

YAML:

backend: local
input_pdb: data/complex.pdb
forcefields:
  - amber14-all.xml
  - amber14/tip3p.xml
ph: 7.0
protonation_policy: preserve
termini_policy: charged
fix_nonstandard_residues: auto
strict_all: false
membrane_lipid_resnames:
  - POPC
  - POPE
validate_openmm_system: auto
sanitize_mixed_residues: auto
preserve_conect: true
quiet: false
output_dir_name: output
output_filename: null

validate_openmm_system: auto keeps normal non-membrane behavior unchanged and runs an OpenMM ForceField.createSystem() validation when configured membrane lipid residues are present. sanitize_mixed_residues: auto separates mixed PDB residue ids and reassembles split atom records before OpenMM parsing, for example POPC records interrupted by CL/T3P records that reuse the same residue number. POPC/POPE are detected from both standard and 4-character PDB residue-name layouts. For POPC/POPE Amber-style inputs, include force fields that cover protein, lipids, water, and ions; amber14-all.xml includes lipid templates and amber14/tip3p.xml covers TIP3P water and common ions. Unmatched ligands/cofactors left untouched by this repair tool are reported in repair_metadata.openmm_system_validation.ignored_unmatched_residues and must still be parameterized by the downstream MD workflow.

Python:

from caddforge.core.execution import load_result_for_job, submit_workflow
from caddforge.plugins import get_tool

spec = get_tool("md", "fix-structure")
cfg = spec.config_cls(
    input_pdb="data/complex.pdb",
    forcefields=["amber14-all.xml", "amber14/tip3p.xml"],
    backend="local",
)
workflow = spec.workflow_cls(cfg)
job = submit_workflow(
    workflow, cfg, backend_name=cfg.backend,
    input_ports=tuple(getattr(spec.plugin, "input_ports", ())),
)
result = load_result_for_job(job)
if result is not None:
    print(result.paths["output_pdb"])

Outputs to inspect: results/output/<input_stem>_fixed.pdb, results/result_record.json. In pipelines, bind input artifact structure and consume output artifact repaired_structure.

Terminal chemistry

termini_policy controls terminal chemistry separately from side-chain protonation:

Policy Behavior
charged (default) Prepare free N-termini as positively charged and free C-termini as negatively charged, independently of pH. Repair missing terminal OXT when the backbone permits reconstruction.
preserve Preserve the input terminal state and validate against the supplied force fields. Ambiguous or incomplete terminal groups fail with a residue-specific explanation.
cap Add ACE/NME caps to eligible neutral or incomplete termini. Already charged or capped termini remain unchanged.

A protonated, uncapped C-terminus (–COOH) is neutral. A deprotonated C-terminus (–COO⁻) is charged. A neutral NME cap (–CONHCH₃) is chemically different from an uncapped neutral acid. Capping can affect both N- and C-termini.

Terminal policy takes precedence over protonation_policy only at terminal groups. Thus the default charged policy can remove HXT even when protonation_policy: preserve; unrelated residue substitutions remain forbidden. Missing terminal hydrogens can make preservation ambiguous (for example, only one H on an ordinary free N-terminus). Prepare the intended terminal state explicitly rather than relying on pH to select it in preserve mode. Hydrogen repair still fills unrelated missing hydrogens.

Stock OpenMM amber14-all.xml supports standard charged termini and ACE/NME caps, but does not include a neutral uncapped –COOH template. To preserve that form, supply a compatible force field or additional, scientifically validated templates:

input_pdb: data/protein_with_explicit_terminal_states.pdb
forcefields:
  - amber14-all.xml
  - /absolute/path/to/your_validated_terminal_templates.xml
protonation_policy: preserve
termini_policy: preserve

The extra XML above is user-supplied, not bundled with CADDForge. Force-field compatibility is checked; preserve mode never silently converts an unsupported neutral terminus. Setting validate_openmm_system: never does not disable protein/cap template matching or terminal-state validation. This feature concerns terminal states of recognized protein residues, not arbitrary modified residues.

For standard charged preparation, set termini_policy: charged. For explicitly requested caps, set termini_policy: cap; side-chain preservation can stay enabled. Approximate reconstructed atoms and caps should be minimized before production MD.

Migration: cap_neutral_termini: true is a deprecated alias for termini_policy: cap. Combining it with an explicit different policy fails. false does not override the new policy. fix_nonstandard_residues now controls modified-residue normalization only; setting it to never does not disable terminal treatment. Users who previously relied on protonation_policy: preserve to reject terminal conversions must now also set termini_policy: preserve.

The report at paths.normalization records requested/effective policy, original terminal evidence, normalization edits or added caps, final decisions, and validation status under normalization.terminal_treatment. It is retained on failure. Successful results also expose repair_metadata.terminal_treatment.

Pipeline example

version: 1
name: prepare-protein
stages:
  - id: repair
    tool: md/fix-structure
    config:
      input_pdb: data/protein.pdb
      forcefields: [amber14-all.xml, amber14/tip3p.xml]
      protonation_policy: preserve
      termini_policy: charged
    outputs:
      protein: output_pdb
  - id: cleanup
    tool: md/minimize
    inputs:
      protein: repair.protein
    config:
      ligand_path: data/ligand.sdf
      mode: ligand_only

The input must be a protein-only receptor for this example; ligand chemistry is supplied separately to minimize. The repair tool's existing input port structure and output port repaired_structure are unchanged. The explicit protein: output_pdb output alias above binds the same PDB for the next stage.

center-and-align

Centers, wraps, optionally aligns, and writes a processed trajectory.

CLI:

caddforge run md center-and-align --config center_and_align.yaml

YAML:

backend: local
topology_path: data/system.pdb
trajectory_path: data/traj.xtc
center_selection: protein or resname MOL
keep_selection: protein or resname MOL
align_selection: protein and backbone
unwrap: true
center: true
wrap: true
center_mode: geometry
wrap_compound: residues
align_weights: mass
output_dir_name: output
output_trajectory_filename: traj-centered.xtc
output_structure_filename: traj-centered.pdb

Python:

from caddforge.core.execution import load_result_for_job, submit_workflow
from caddforge.plugins import get_tool

spec = get_tool("md", "center-and-align")
cfg = spec.config_cls(
    topology_path="data/system.pdb",
    trajectory_path="data/traj.xtc",
    center_selection="protein or resname MOL",
    keep_selection="protein or resname MOL",
    align_selection="protein and backbone",
    backend="local",
)
workflow = spec.workflow_cls(cfg)
job = submit_workflow(
    workflow, cfg, backend_name=cfg.backend,
    input_ports=tuple(getattr(spec.plugin, "input_ports", ())),
)
result = load_result_for_job(job)
if result is not None:
    print(result.paths)

Outputs to inspect: results/output/<trajectory>, results/output/<structure>, results/result_record.json.

extract-frames

Extracts one or more frames from a trajectory. For multi-frame selections it writes a sliced trajectory and a first selected-frame structure; for single-frame selections it writes only structure-style outputs.

CLI:

caddforge run md extract-frames --config extract_frames.yaml

YAML:

backend: local
topology_path: data/traj-centered.pdb
trajectory_path: data/traj-centered.xtc
ligand_template_sdf: data/template.sdf
ligand_resname: UNK
extract_selection: protein or resname UNK
frame_index: null
last_ns: 10.0
frame_slice: null
write_per_frame_pdbs: false
output_dir_name: output
output_trajectory_filename: last-10ns.xtc
output_structure_filename: last-10ns_first_complex.pdb
protein_trajectory_filename: last-10ns_protein.xtc
protein_structure_filename: last-10ns_first_protein.pdb
ligand_sdf_filename: last-10ns_first_ligand.sdf

Use exactly one frame-selection mode. A Python-style slice is written as:

frame_index: null
last_ns: null
frame_slice:
  start: 100
  stop: 1000
  step: 10

Python:

from caddforge.core.execution import load_result_for_job, submit_workflow
from caddforge.plugins import get_tool

spec = get_tool("md", "extract-frames")
cfg = spec.config_cls(
    topology_path="data/traj-centered.pdb",
    trajectory_path="data/traj-centered.xtc",
    ligand_template_sdf="data/template.sdf",
    ligand_resname="UNK",
    extract_selection="protein or resname UNK",
    last_ns=10.0,
    backend="local",
)
workflow = spec.workflow_cls(cfg)
job = submit_workflow(
    workflow, cfg, backend_name=cfg.backend,
    input_ports=tuple(getattr(spec.plugin, "input_ports", ())),
)
result = load_result_for_job(job)
if result is not None:
    print(result.paths)

Outputs to inspect: results/output/<structure>, optional results/output/<trajectory> for multi-frame selections, optional protein-only outputs, optional corrected ligand SDF, results/output/frame_manifest.json, results/result_record.json.

cluster-representative

Clusters selected trajectory frames and writes the medoid of the largest cluster. By default, ligand systems cluster on ligand heavy atoms when ligand_resname is provided, while extract_selection controls the atoms written to the representative complex PDB.

CLI:

caddforge run md cluster-representative --config cluster_representative.yaml

YAML:

backend: local
topology_path: data/traj-centered.pdb
trajectory_path: data/traj-centered.xtc
ligand_template_sdf: data/template.sdf
ligand_resname: UNK
cluster_selection: null
extract_selection: protein or resname UNK
last_ns: 10.0
frame_slice: null
distance_threshold_nm: 0.2
output_dir_name: output
output_complex_filename: largest_cluster_representative_complex.pdb
output_protein_filename: largest_cluster_representative_protein.pdb
output_ligand_sdf_filename: largest_cluster_representative_ligand.sdf
clustering_summary_filename: clustering_summary.json

For slice-based clustering, replace last_ns with:

last_ns: null
frame_slice:
  start: 1000
  stop: null
  step: 5

Python:

from caddforge.core.execution import load_result_for_job, submit_workflow
from caddforge.plugins import get_tool

spec = get_tool("md", "cluster-representative")
cfg = spec.config_cls(
    topology_path="data/traj-centered.pdb",
    trajectory_path="data/traj-centered.xtc",
    ligand_template_sdf="data/template.sdf",
    ligand_resname="UNK",
    extract_selection="protein or resname UNK",
    last_ns=10.0,
    distance_threshold_nm=0.2,
    backend="local",
)
workflow = spec.workflow_cls(cfg)
job = submit_workflow(
    workflow, cfg, backend_name=cfg.backend,
    input_ports=tuple(getattr(spec.plugin, "input_ports", ())),
)
result = load_result_for_job(job)
if result is not None:
    print(result.metrics)

Outputs to inspect: results/output/largest_cluster_representative_complex.pdb, optional results/output/largest_cluster_representative_protein.pdb, optional corrected ligand SDF, results/output/clustering_summary.json, results/result_record.json.

plain-md

Runs a standard OpenMM simulation, with optional OpenFF/SMIRNOFF parameterization for non-standard molecules. For already complete systems, system_preparation_mode: prepared skips hydrogen, solvent, and ion addition and builds a snug periodic box around the provided atoms. Membrane systems can use OpenMM's membrane-specific barostat with barostat: membrane.

CLI:

caddforge run md plain-md --config plain_md.yaml
caddforge run md plain-md --config plain_md.yaml --backend slurm --slurm-time 24:00:00

YAML:

backend: local
system_pdb_path: data/system.pdb
molecule_sdf_paths:
  - data/ligand.sdf
ph: 7.4
system_preparation_mode: solvate
padding: 1.0
ionic_strength: 0.15
prepared_box_margin: 0.0
nonbonded_cutoff: 1.0
barostat: isotropic
pressure: 1.0
membrane_surface_tension: 0.0
membrane_xy_mode: isotropic
membrane_z_mode: free
barostat_frequency: 25
temperature: 300.0
step_size_fs: 4
simulation_time_ns: 1.0
trajectory_filename: traj.xtc
report_interval: 10000
checkpoint_interval: 5000
output_dir_name: output
seed: null
repeats: 1
checkpoint_path: null
max_restarts: 10

Python:

from caddforge.core.execution import load_result_for_job, submit_workflow
from caddforge.plugins import get_tool

spec = get_tool("md", "plain-md")
cfg = spec.config_cls(
    system_pdb_path="data/system.pdb",
    molecule_sdf_paths=["data/ligand.sdf"],
    simulation_time_ns=1.0,
    backend="local",
)
workflow = spec.workflow_cls(cfg)
job = submit_workflow(
    workflow, cfg, backend_name=cfg.backend,
    input_ports=tuple(getattr(spec.plugin, "input_ports", ())),
)
result = load_result_for_job(job)
if result is not None:
    print(result.metrics)

Outputs to inspect: results/output/*_prepared.pdb, results/output/*_minimized.pdb, results/output/traj.xtc, results/output/checkpoint.chk, results/result_record.json. The standardized result exposes prepared_structure, minimized_structure, trajectory, checkpoint, and output_dir as pipeline-ready result paths.

Set repeats above one to submit independent simulations with distinct reproducible seeds. The parent records child IDs and publishes replicas_manifest.json with aggregate completion metrics when every child reaches a terminal state. In MD 0.15.0, repeats use core's shared execution graph: Slurm submits all repeat children and an afterany finalizer without waiting between submissions; local execution runs children serially and can detach one coordinator with local_async=True. Status queries do not trigger finalization for these new jobs. Released repeat-parent records remain readable.

Plain MD uses the shared GUI setup and compute profiles. Solvation/prepared and membrane settings appear conditionally while retaining their values. Production progress and stage-local ETA observe native OpenMM state/checkpoint callbacks without changing reporter schedules, integration calls, seeds or forces. Preparation and minimization have unknown durations; scheduler wait is excluded from ETA. Live worker events and native state data are available in the GUI and caddforge logs JOB_ID --follow, including declared replicas.

Additional result paths are simulation_manifest, topology and state_data. The manifest declares XTC format regardless of the configured filename, actual timestep, units, replica/seed, checkpoint source and execution boundaries. Repeat parents publish an exact collection of successful child sources, without claiming a parent trajectory. With export_results: true, the parent owns one export containing all child results. Scratch inputs use verified content copies; native checkpoints are snapshotted only after the writer closes them, and mutable XTC is published after reporting finishes. Unresolved publication failures retain scratch recovery evidence.

Checkpoint continuation requires the original preparation, force fields and compatible OpenMM runtime/platform. Select checkpoint_path explicitly, optionally with original_trajectory_path to retain the saved prefix. Job restart reuses recorded inputs and does not automatically choose a later checkpoint. OpenMM compatibility failures give an explicit error; this feature does not promise portable checkpoints across platforms.

For an already prepared system, use:

system_preparation_mode: prepared
prepared_box_margin: 0.0

In this mode, padding and ionic_strength are ignored. The workflow derives an orthorhombic box from the existing coordinates plus prepared_box_margin and fails if the resulting box is too small for the configured nonbonded cutoff.

For membrane systems oriented in the XY plane with the membrane normal along Z, use:

barostat: membrane
membrane_surface_tension: 0.0
membrane_xy_mode: isotropic
membrane_z_mode: free
barostat_frequency: 25

trajectory-analysis

This tool analyzes explicit topology/trajectory pairs from plain MD or other compatible producers. It is available in the GUI catalog and through the CLI/Python API; it does not change a source simulation or its status. From a completed plain-MD result, choose Analyze trajectory to prefill exact files, review selections, choose a CPU compute profile and submit a separate job. Source results list related analyses. For a failed repeat parent, open a completed child under Tasks to analyze that child's committed trajectory.

caddforge show-config md trajectory-analysis
caddforge run md trajectory-analysis --config trajectory-analysis.yaml
caddforge logs JOB_ID --follow
backend: local
sources:
  - id: replica_1
    topology_path: runs/example/results/output/topology.json
    trajectory_path: runs/example/results/output/traj.xtc
    trajectory_format: xtc
    state_data_path: runs/example/results/output/state-data.csv
    source_job_id: null
    frame_time_segments: []
    segment_start_frames: []
source_job_ids: []
start_frame: 0
stop_frame: null
stride: 1
fit_selection: protein and backbone
rmsd_selection: protein and backbone
rmsf_selection: protein and name CA
reference_path: null
reconstruct_pbc: true
preview_selection: not water
preview_max_frames: 500
preview_max_bytes: 67108864
chunk_frames: 100

Replace example paths with real, explicitly paired files. topology.json from plain MD records the actual engine atom order, residue identity and bonds, with unspecified bond orders retained as unknown. PSF and Amber topologies are also supported. Coordinate-only PDB/mmCIF topologies cannot establish authoritative periodic connectivity; provide a bonded topology for periodic reconstruction. Matching atom counts alone cannot prove that independently supplied topology/trajectory files have the same atom order.

Periodic reconstruction uses an ordered spanning forest of the recorded topology bonds and supports MDTraj 1.10.3 on Python 3.10 as well as newer supported versions. Connectivity and explicit fit anchors are retained; missing bonds remain an error.

Selections use MDTraj syntax. By default, all selected saved frames contribute: there is no automatic equilibration discard. The range uses zero-based source indices, an exclusive stop and a stride in saved frames. Replicas and restart segments remain independent, including monotonic execution boundaries recorded by the producer and nonmonotonic saved-time boundaries. Frames skipped by stride cannot hide a restart. For resumed/appended XTC, producer engine-time mappings correct native timestamp offsets in the analysis while preserving the source file bytes; the mapping is recorded in provenance. Without a producer mapping, analysis uses the saved trajectory times.

The default fit/RMSD atoms are protein backbone atoms; RMSD is measured against the first selected saved frame in each segment, in Å. Cα RMSF is the square root of population variance around each segment's aligned mean, also in Å. Explicit Amber protonation-state residues are included. RMSF plots use topology residue numbers on the x axis, preserving numbering gaps and showing separate plots for different chains (numbered from 1 in topology order). Atom-level values remain unchanged even when multiple selected atoms belong to one residue. The CSV retains atom indices and adds explicit residue-number and zero-based chain-index columns. Existing GUI analyses use committed residue mappings where complete; otherwise the GUI retains the atom-index axis with guidance to rerun only the analysis. An optional common single-frame reference must match exact ordered atom identities. Nonprotein systems need explicit fit/RMSD/RMSF selections. Periodic molecules are made whole using recorded bonds and imaged around explicit fitting anchors before fitting; invalid connectivity or selections produce an actionable error.

Analysis uses streaming reads and bounded coordinate accumulation. It writes full RMSD and RMSF CSVs, native state-data CSV, plots and per-source provenance. Temperature, potential energy, density and box-volume plots use the native OpenMM CSV's declared units, never values inferred from XTC coordinates. Native thermodynamic plots retain all recorded state samples, independently of structural frame slicing. The manifest and provenance record source hashes, software versions, exact selections, frame range, references, segment boundaries and preview-to-source atom/frame mappings.

The GUI plots bounded series and downloads full CSVs. Molecular playback uses an independently sampled preview with a shared budget of at most 500 frames and 64 MiB of raw coordinates across replicas. Source frame/time/segment remain visible. The PSF preview preserves connectivity; bond orders are unspecified. The original simulation's XTC, topology and checkpoint remain unchanged. Free energies, clustering and ligand-contact analysis are outside this tool's scope.

minimize

Minimize one protein–ligand complex with OpenMM L-BFGS. This is local pose cleanup: the reported physical-model energy includes implicit solvation and is not a binding affinity or a score for comparing different chemical systems. The tool emits finite poses with quality flags by default; strict mode can reject flagged jobs while retaining their structures and diagnostics.

Minimize installation and execution

Use an environment containing AmberTools (pdb4amber, antechamber, parmchk2, tleap), OpenMM >=8.2, ParmEd, RDKit, NumPy, SciPy, and this plugin. For example:

conda create -n caddforge-minimize -c conda-forge python=3.13 ambertools openmm=8.2 parmed rdkit numpy scipy
conda activate caddforge-minimize
# Use the reviewed public checkout, which includes the Amber validation fixes.
python -m pip install -e '/path/to/caddforge-md[minimize]'
caddforge show-config md minimize
caddforge run md minimize --config minimize.yaml

Save this configuration as minimize.yaml, replacing the input paths:

complex_pdb_path: data/complex.pdb
ligand_path: data/ligand.sdf
lig_resname: LIG
mode: ligand_only
pocket_radius_angstrom: 5.0
shell_radius_angstrom: 5.0
backbone_restraint_strength: moderate
shell_restraint_strength: very_strong
tolerance_kj_mol_nm: 10.0
max_iterations: 1000
platform: CPU
run_directory: runs/minimize-one-complex

For separate inputs, replace complex_pdb_path with protein_pdb_path; retain ligand_path in the same coordinate frame. To submit through Slurm, use caddforge run md minimize --config minimize.yaml --backend slurm with your site's backend/environment settings. There is no dedicated minimize GUI in this revision.

AmberTools is installed separately from the Python extra. A prepared Amber input does not run AmberTools. Scientific imports are deferred until execution. CLI and pipeline execution use core input staging, including transparent gzip for declared input files. Checksums in chemistry/mapping records refer to the decompressed bytes. Nested cofactor chemistry paths are ordinary uncompressed configuration inputs and must be available on the execution node.

from cadd_md.minimize import MinimizeConfig, MinimizeWorkflow

config = MinimizeConfig(
    complex_pdb_path="complex.pdb",
    ligand_path="ligand.sdf",
    lig_resname="LIG",
    mode="pocket_restrained",
    run_directory="runs/cleanup",
    registry_path="runs/job_registry.sqlite",
)
workflow = MinimizeWorkflow(config)
result = workflow.run(workflow.prepare_job())
print(result.status, result.metrics)
print(result.paths["minimized_complex"])

Paths follow the existing config convention: relative paths resolve from the submission working directory. Use the core CLI/backend for Slurm submission; the scientific workflow contains no scheduler-specific execution logic. Choose a fresh run_directory for each run; existing minimization outputs are preserved and cannot be overwritten by a new job.

Minimize inputs and physical model

Supply either complex_pdb_path, or protein_pdb_path plus a ligand pose in the same coordinate frame. ligand_path is always required and supplies authoritative SDF/MOL/MOL2 chemistry. For a complex PDB, coordinates come from that complex; template coordinates are not used to align or move the pose. For separate inputs, the ligand file must contain one explicitly hydrogenated 3D molecule. The target residue is selected by lig_resname, which must occur exactly once.

Preparation preserves supplied atoms, protonation, ligand stereochemistry, and disulfides, adds only missing hydrogens, and rejects missing protein heavy atoms. Repair missing protein heavy atoms upstream before submitting the complex; this tool only adds missing hydrogens. Bare histidines need unambiguous hydrogen evidence or an explicit residue_states entry. Optional protein_states_path and protein_links_path must be provided together and match the input structure checksum. Covalent target ligands are rejected.

Automatic preparation uses ff14SB, GAFF2/AM1-BCC, TIP3P retained waters, and OBC2 with mbondi2 radii, ACE surface area, solute dielectric 1, solvent dielectric 78.5, and zero salt screening. It is nonperiodic with NoCutoff; no solvent box or neutralizing ions are added. Retained waters are explicit solute particles in the GB model, a hybrid approximation requiring application-specific validation. All force-field choices, parameterization commands, checksums, and available software versions are retained. Both atom typing and missing-parameter lookup explicitly select GAFF2. Unresolved parmchk2 parameter warnings fail preparation and require reviewed parameters.

Generated GAFF2/AM1-BCC charges are checked and, when necessary, normalized independently for each organic component. Minimize and OpenBPMD apply a uniform per-atom offset only when the total correction is at most 0.005 e and each atom changes by at most 0.0001 e. These are conservative engineering limits, not universal scientific guarantees. Final MOL2 component charges must sum to the authoritative formal charge within 1e-8 e. After Amber topology construction, mapped charges are checked using each CHARGE token's E16.8 rounding bound (including the Amber charge scale); the total allows the sum of those bounds in addition to the strict MOL2 tolerance. This accounts for serialization, changes no charges, and still rejects atom mapping errors and charge changes beyond rounding. Invalid chemistry or larger generation residuals fail preparation; supplied Amber charges are never normalized.

Preparation retains the original *.raw.mol2, the final MOL2, and a *.charge_validation.json report with raw/final sums, correction, policy limits, checksums, and the decision. charge_validation in the preparation summary links the reports, including rejected corrections. Applied corrections also produce a log warning. A residual within the charge-token rounding bound is distinguished from a larger generation residual; the latter is not assumed to be rounding. Changing ligand_net_charge or disabling quality checks is not a remedy for this error. These rules also apply to pipeline and scatter jobs without new YAML options.

Automatic preparation also retains Antechamber's ANTECHAMBER_AC.AC bond evidence. The shared validator checks mapped atoms, coordinates, atom types, connectivity (including hydrogen attachments), and total formal charge against the authoritative ligand. A missing or inconsistent AC file fails preparation.

Amber MOL2 bond tokens are not always literal chemical bond orders: for example, carboxylate C–O bonds can both be written as single bonds. Validation accepts supported Amber encodings only in their permitted chemical environments and requires one complete authoritative or RDKit resonance form to explain every bond. Aromatic/Kekulé alternatives are supported; arbitrary bond-order changes, tautomers, and changed protonation are not accepted. At most 1,000 candidate forms are examined. An inconclusive capped search fails explicitly.

The charge report contains a graph_validation record with source checksums, atom mapping, candidate count, interpreted bonds, and the acceptance or rejection reason. The validators never rewrite bond records, atom types, coordinates, or the authoritative ligand. Charge normalization runs only after graph validation. These rules apply equally to minimize, OpenBPMD, organic cofactors, and pipeline jobs; no configuration override is needed for supported representations.

Noncovalent organic cofactors require cofactors entries with residue_index and chemistry_path; optional atom_map_path uses the shared explicit atom-map schema against the original complex. Residue and atom indices are zero-based indices in preparation/inputs/input_identity.json, not PDB serial numbers. Automatic isolated ions are restricted to Na+, K+, and Cl- and require explicit isolated_ion_residue_indices. These declarations must not be used to stand in for a coordinated metal-site model.

Coordinated metals, metall cofactors, and other supported supplied components use all three fields: amber_topology_path, amber_coordinates_path, and amber_mapping_path, alongside the complete input complex. The topology must be nonperiodic, contain all bonded/nonbonded parameters and positive GB radii/screening factors, and have finite charges and positive masses. Unsupported force forms and virtual sites fail explicitly. The supplied radii and charges are used without substituting automatic values. Every non-isolated metal needs a metal_sites entry containing atom_index, oxidation_state, coordinating_atom_indices, and a descriptive parameter_source.

The prepared Amber mapping is JSON:

{
  "schema_version": 1,
  "input_sha256": "SHA256 of the complex PDB",
  "topology_sha256": "SHA256 of the Amber topology",
  "coordinates_sha256": "SHA256 of the Amber coordinates",
  "input_atom_indices": [0, 1, 2, null],
  "input_residue_indices": [0]
}

The arrays follow Amber topology order and must cover every input atom/residue exactly once. null is allowed only for an added hydrogen. Array lengths must match the actual topology; the short arrays above illustrate the schema only. Parameter sources and oxidation states are declarations, not an automatic validation of a metal model's physical accuracy.

Minimize regions and modes

Pocket residues have any heavy atom within pocket_radius_angstrom: 5.0 of any ligand heavy atom. The shell contains other protein residues with any heavy atom within shell_radius_angstrom: 5.0 of any pocket heavy atom. Both selections expand to whole residues and stay fixed during minimization. An explicit pocket_residues: ["A:42", "A:43:B"] replaces automatic pocket selection; _ denotes a blank chain. Unknown, duplicate, ambiguous, or empty selections fail.

mode Pocket side chains Pocket backbone Shell
ligand_only (default) Fixed Fixed Fixed
sidechains_free_backbone_fixed Free Fixed Fixed
sidechains_free_backbone_restrained Free Restrained Fixed
pocket_restrained Free Restrained Strongly restrained
pocket_free_shell_restrained Free Free Strongly restrained

The target ligand is free and distant protein is fixed in every mode. Backbone atoms are N/CA/C/O/OXT; terminal caps count as backbone. Hydrogens inherit their bonded parent's region. Waters, ions, metals, and cofactors are fixed by default; component_mobility permits explicit whole-residue fixed, free, or restrained overrides keyed by input residue index.

Positional restraints use E = ½ k |r − r₀|², with k in kJ mol⁻¹ nm⁻². Named strengths are weak: 100, moderate: 1000, and very_strong: 10000; positive numeric strengths are accepted. backbone_restraint_strength defaults to moderate, and shell_restraint_strength to very_strong. They are starting regimes, not universally validated settings. Only heavy atoms are restrained unless restrain_hydrogens: true. Fixed regions include their hydrogens.

Fixed particles have zero mass in a private minimization-system copy. The exported physical system retains original masses. Bonds and water geometry are flexible by default. constraints: mobile_hbonds constrains bonds involving hydrogen only when both endpoints are mobile, using their force-field equilibrium lengths and retaining the physical bonded terms. Constraints involving fixed atoms are rejected. Disulfide connectivity is preserved across region boundaries.

Minimize convergence, diagnostics, and quality

Defaults are tolerance_kj_mol_nm: 10.0, max_iterations: 1000, constraint_tolerance: 0.00001, platform: CPU, and cpu_threads: 1. GPU platforms accept precision: single|mixed|double where supported. Explicitly requested unavailable platforms or precision settings fail instead of falling back.

The iteration budget spans OpenMM constraint restarts. The trace distinguishes the physical-plus-positional objective from OpenMM's temporary bond-constraint penalty. Final convergence is independently checked using RMS force components over mobile atoms, projected onto the allowed constraint tangent space when needed, plus maximum relative constraint error. A normal OpenMM return alone does not establish convergence. Status is verified_converged, iteration_limit, not_verified, or failed; the record also reports a reached budget even if the last iterate independently satisfies the convergence tests. The implementation targets the OpenMM 8.2 minimizer and reporter behavior.

Diagnostics include initial/final molecular-mechanics, GB, physical, positional, and total objective energies; physical/total RMS and maximum forces for all, mobile, and fixed atoms; iteration counts; constraint errors; heavy-atom ligand, pocket, backbone, shell, receptor, and component RMSDs without alignment; and maximum displacements with atom indices. Preparation displacement is separate. Ordinary nonbonded clashes, 1–4 overlaps, and declared metal coordination are reported separately. Bonded and angle-connected contacts are excluded.

Default review triggers under quality_thresholds are:

Field Default
ligand_rmsd_angstrom 1.0
ligand_max_displacement_angstrom 2.0
pocket_backbone_rmsd_angstrom 0.5
receptor_max_displacement_angstrom 2.0
absolute_energy_per_atom_kj_mol 10000
maximum_force_kj_mol_nm 100000
allowed_vdw_overlap_angstrom 0.6
coordination_distance_change_angstrom 0.3
objective_increase_absolute_kj_mol 0.01
objective_increase_relative 1e-8

These are review triggers, not universal validity bounds; geometric overlaps, especially 1–4 contacts, need chemical interpretation. Nonfinite states, invalid chemistry, or any fixed-atom movement always fail. Other findings produce machine-readable quality_flags. Set strict_quality: true to fail on every flag, or combine strict_quality: true with strict_quality_flags to fail only on selected codes such as convergence_unverified, large_ligand_displacement, or residual_nonbonded_clashes. Finite strict-failure poses remain available.

Minimize artifacts and pipelines

Canonical results are saved in results/result_record.json. Scientific artifacts are under results/minimize/: structures/ contains minimized PDB/SDF files and fresh handoff records; preparation/ contains the physical system, initial coordinates, atom mapping, and provenance; minimization/ contains diagnostics, full-precision final coordinates, and the iteration trace. Exact region membership is in results/minimize/regions.json.

Pipeline input names differ from config fields:

Input port Config field
complex complex_pdb_path
protein protein_pdb_path
ligand ligand_path
ligand_atom_map ligand_atom_map_path
protein_states, protein_links protein_states_path, protein_links_path
amber_topology, amber_coordinates, amber_mapping amber_topology_path, amber_coordinates_path, amber_mapping_path

Supply exactly one structure input and a ligand chemistry file. The paired protein-state/link inputs and the three prepared-Amber inputs must be complete when provided.

Output port Result.paths key
complex minimized_complex
protein minimized_protein
ligand minimized_ligand
result_record result_record
diagnostics diagnostics

All other output ports below use the same name as their result-path key. Output ports expose complex, protein, ligand, diagnostics, regions, atom_mapping, output_mapping, preparation_summary, physical_system, prepared_positions, minimized_positions, amber_topology, amber_coordinates, structure_manifest, protein_states, protein_links, receptor_protein_states, receptor_protein_links, optional iteration_trace, result_record, and output_dir. The complex handoff records match the complex checksum; receptor_* records match the protein output. A covalently connected environment component is retained in the receptor export to avoid cutting chemical bonds, and this is recorded.

The ligand SDF preserves chemistry, title, and user properties. PDB coordinates are rounded to 0.001 Å and SDF coordinates to 0.0001 Å; NumPy coordinate artifacts retain full precision in nanometers, in physical-system particle order. The Amber coordinate artifact is the prepared starting configuration. Use the separate minimized coordinate artifact for the final pose. The exported physical system contains no zero-mass freezes or positional restraints and still needs an appropriate MD protocol before dynamics.

Download example configurations for ligand only, free side chains/fixed backbone, free side chains/restrained backbone, restrained pocket, free pocket/restrained shell, component overrides, and supplied metal parameters. See the minimize pipeline examples for complete YAML and artifact flow. The pipeline uses existing scatter/collect/filter stages and preserves per-pose provenance. Filtering quality flags does not establish pose accuracy; do not rank unrelated ligands by total minimization energy.

Validation in the caddforge-md checkout: python -m pytest tests/test_minimize_*.py. Scientific fixtures use generated peptides/ligands and are marked external; optional GPU comparison tests skip with an explicit reason when no usable GPU platform exists.

openbpmd

Coordinate and scoring correctness correction

The bundled implementation preserves continuous solute coordinates through minimization, equilibration and production. DCD output explicitly disables molecule-wise periodic wrapping and is never re-imaged or overwritten after production. Coordinates may lie outside the primary unit cell; this is valid. Preparation continues to preserve the supplied coordinate origin. Moving the ligand to the nearest protein image on every saved frame would hide dissociation and is deliberately avoided.

The metadynamics CV remains a joint, unweighted RMSD fit of ligand heavy atoms and protein backbone anchors within 10 Å of the protein centre of mass. PoseScore is ligand heavy-atom RMSD in Å after fitting protein N/CA/C/O to the first saved production frame. These are different observables. ContactScore selects native heavy-atom pairs within 3.5 Å in that frame, counts pairs no farther apart than their individual reference distances using periodic distances, normalizes by the native early-window average, and caps at one. A zero early average retains the unnormalized fraction. Heavy atoms are selected by element, not atom-name patterns. Supported protein protonation variants retain their identities.

Scores omit the reference frame. Final means use the last rounded fifth of scored frames; SD is the population SD pooled over frames and replicas. All configured replicas must have matching timelines. With standard production settings, scored times are 0.2–10 ns and the final 20 frames are retained. Engine step mappings, units, atom selections, native-contact counts, source/reference checksums and CV agreement diagnostics accompany each replica in scoring_manifest.json and the runtime summary. The shared policy identifier is openbpmd-continuous-native-1.

Before scores are accepted, the saved trajectory must reproduce the engine's joint CV at the same integration steps (2e-4 nm absolute plus 2e-4 relative precision tolerance). Empty contact sets, invalid cells, split initial site images, non-finite values and incomplete replicas fail explicitly. Large RMSD with retained contacts alone is not a universal error criterion. Existing or partial native outputs without compatible checksummed provenance are rejected: start a new run. Custom openbpmd_script_path overrides remain supported and are explicitly marked scientific_validation: unverified; bundled validated results are verified.

These corrections apply to future runs. Correcting old trajectory analysis cannot retroactively establish that its metadynamics bias was correct. No automatic rescoring or migration is provided. See the vendored modification notice and packaged OpenBPMD MIT licence. Native CUDA validation uses generated fixtures; a missing CUDA runtime must be reported as pending external validation.

Runs OpenBPMD preprocessing, simulations, and averaged multi-replica analysis.

CLI:

caddforge run md openbpmd --config openbpmd.yaml

YAML:

backend: local
complex_pdb_path: data/complex.pdb
lig_resname: MOL
ligand_net_charge: 0
nreps: 10
hill_height: 0.05
deposit_interval_ps: 1.0
log_sync_interval_seconds: 30
output_dir_name: output
analysis_dir_name: analysis

Python:

from caddforge.core.execution import load_result_for_job, submit_workflow
from caddforge.plugins import get_tool

spec = get_tool("md", "openbpmd")
cfg = spec.config_cls(
    complex_pdb_path="data/complex.pdb",
    lig_resname="MOL",
    nreps=10,
    hill_height=0.05,
    deposit_interval_ps=1.0,
    backend="local",
)
workflow = spec.workflow_cls(cfg)
job = submit_workflow(
    workflow, cfg, backend_name=cfg.backend,
    input_ports=tuple(getattr(spec.plugin, "input_ports", ())),
)
result = load_result_for_job(job)
if result is not None:
    print(result.paths)

Outputs to inspect: prep/, results/output/, results/analysis/results.csv, results/analysis/multi_rep_timeseries.csv, results/progress.json, results/result_record.json.

OpenBPMD streams subprocess output to scratch-first logs and publishes best-effort replica progress from the per-replica simulation logs. log_sync_interval_seconds controls publication frequency; temporary shared-filesystem failures are retried without changing the scientific outcome. Current source preserves that CSV fallback and adds production step measurements after the vendored engine's existing metadynamics calls. The shared GUI and caddforge logs JOB_ID --follow expose replica-local measured ETAs, with telemetry cadence set by progress_update_interval_seconds and scratch publication set by log_sync_interval_seconds. Stopped measurements invalidate the ETA even while worker heartbeats continue. Blocking equilibration and scoring remain explicitly indeterminate. Dynamics, trajectories, native CSV/bias writes and scoring are unchanged. Install matching updated core and MD workers; existing processes keep their original reporting behavior.

grand

Runs Grand Canonical Monte Carlo (GCMC) water sampling in a ligand-centred pocket region and then selects a single representative protein-ligand-water structure from the resulting trajectory, all within one job. The tool combines two stages so you obtain a usable representative hydration state without a separate manual step.

GCMC sampling stage. The first stage prepares the input protein-ligand complex (adds hydrogens at the configured pH, optionally solvates with padding and ionic strength, restrains solute heavy atoms, and adds ghost waters) and then performs GCMC insertion and deletion sampling inside a ligand-centred spherical region defined by sphere_radius_angstrom. It uses the configured initialization passes and maximum production passes with a running water-count convergence check. The stage writes the final-state checkpoint before any trajectory readback, then produces a trajectory, a per-frame ghost-water state file (one row per frame listing the inactive ghost-water residue indices for that frame), and a hydrated-complex structure. Post-processing is non-strict: if it fails, the error is recorded in the stage summary while the completed checkpoint and trajectory are preserved so the run can continue.

Representative-selection stage. The second stage runs on the produced trajectory and uses the per-frame ghost-water state file to exclude, for each analysed frame, that frame's ghost waters from all downstream selection and output. It deterministically selects exactly one representative frame from within the configured frame analysis interval (repeated runs on the same trajectory and configuration select the same frame) and writes a representative complex structure containing the ligand residue, the protein atoms, and the active non-ghost water residues present at the selected frame. When a ligand template SDF and ligand_resname are configured, it also writes a template-corrected ligand SDF whose bond orders and chemistry come from the template and whose coordinates come from the selected frame, plus an optional protein-only structure. Template ligand export is non-strict: on failure the error is recorded in the selection summary and the representative complex is still written.

CLI:

caddforge run md grand --config grand.yaml
caddforge run md grand --config grand.yaml --backend slurm --slurm-time 24:00:00

YAML:

backend: local
complex_pdb_path: data/complex.pdb
ligand_template_sdf: data/ligand_template.sdf
ligand_resname: LIG
sphere_radius_angstrom: 10.0
n_ghost_waters: 150
nonbonded_cutoff_nm: 0.9
temperature_kelvin: 300.0
initialization_passes: 7500
max_production_passes: 100000
ph: 7.4
padding_nm: 1.2
ionic_strength_molar: 0.15
ligand_selection: null
align_selection: null
frame_analysis_interval: 1
log_sync_interval_seconds: 30
output_dir_name: output
trajectory_filename: gcmc_trajectory.dcd
ghost_water_filename: ghost_water_state.txt
checkpoint_filename: gcmc_checkpoint.chk
hydrated_complex_filename: hydrated_complex.pdb
gcmc_summary_filename: gcmc_summary.json
representative_complex_filename: representative_complex.pdb
representative_protein_filename: representative_protein.pdb
representative_ligand_filename: representative_ligand.sdf
selection_summary_filename: selection_summary.json

Python:

from caddforge.core.execution import load_result_for_job, submit_workflow
from caddforge.plugins import get_tool

spec = get_tool("md", "grand")
cfg = spec.config_cls(
    complex_pdb_path="data/complex.pdb",
    ligand_template_sdf="data/ligand_template.sdf",
    ligand_resname="LIG",
    sphere_radius_angstrom=10.0,
    frame_analysis_interval=1,
    backend="local",
)
workflow = spec.workflow_cls(cfg)
job = submit_workflow(
    workflow, cfg, backend_name=cfg.backend,
    input_ports=tuple(getattr(spec.plugin, "input_ports", ())),
)
result = load_result_for_job(job)
if result is not None:
    print(result.metrics)

Configuration options

GCMC sampling:

  • complex_pdb_path: input protein-ligand complex PDB (required, must exist, .pdb).
  • ligand_template_sdf: ligand template SDF providing bond orders and chemistry for ligand export (required, must exist, .sdf/.sd).
  • ligand_resname: residue name identifying the ligand in the complex (required, 1-4 characters, no whitespace or path separators). Used by both stages.
  • sphere_radius_angstrom: radius of the ligand-centred sampling region (default 10.0, > 0).
  • n_ghost_waters: number of ghost waters added for insertion/deletion (default 150, >= 1).
  • nonbonded_cutoff_nm: nonbonded interaction cutoff in nanometres (default 0.9, > 0).
  • temperature_kelvin: simulation temperature in kelvin (default 300.0, > 0).
  • initialization_passes: equilibration passes before production sampling (default 7500, >= 1).
  • max_production_passes: maximum production passes (default 100000, >= 1).
  • ph: pH used when adding hydrogens during preparation (default 7.4).
  • padding_nm: solvent box padding in nanometres (default 1.2, > 0).
  • ionic_strength_molar: ionic strength in molar used when solvating (default 0.15, >= 0).

Representative selection:

  • ligand_selection: atom selection for the ligand. Derived from ligand_resname (resname <ligand_resname>) when left unset.
  • align_selection: optional atom selection used to align frames; blank is normalized to none.
  • frame_analysis_interval: analyse every Nth trajectory frame (default 1, positive integer).

Log syncing and output:

  • log_sync_interval_seconds: interval between periodic log-sync copies (default 30, 1-3600 inclusive).
  • output_dir_name: directory under results/ that holds stage outputs (default output, no path separators).
  • Output filename fields (trajectory_filename, ghost_water_filename, checkpoint_filename, hydrated_complex_filename, gcmc_summary_filename, representative_complex_filename, representative_protein_filename, representative_ligand_filename, selection_summary_filename): plain filenames only, each with a documented default.

All input file paths are validated and normalized to absolute paths at configuration time, so invalid inputs are reported before any compute job is submitted and inputs resolve correctly when the run executes from a scratch directory.

Slurm scratch execution

On the Slurm backend under an allocated runtime, the workflow executes both stages inside a node-local scratch working directory (rooted at SLURM_TMPDIR) rather than on shared storage, so intermediate I/O does not stress the shared filesystem. When both stages finish successfully, the complete produced output directory is copied back from scratch to the job directory results output directory, preserving its relative structure, and a completeness check verifies every produced file was reproduced. If a stage fails after producing some outputs, those partial outputs are copied back on a best-effort basis and the result records whether the partial copy succeeded. The scratch working directory is removed after the copy-back attempt. When not running under an allocated runtime (for example on the local backend), both stages execute directly in the job directory results output directory and no copy-back is needed.

Log syncing

During long runs under an allocated runtime, the stdout and stderr logs are written in the scratch working directory and periodically copied back to the job directory once per log_sync_interval_seconds, so you can monitor progress while the job is still running. Log-sync copying is resilient: a temporary copy failure is logged as a warning and never crashes the job or changes its status, and the next copy is attempted at the following interval. When a stage finishes, whether it succeeds or fails, a final copy is performed so the job directory logs reflect the final state of the run.

Outputs

Stage outputs are written under results/<output_dir_name>/:

  • gcmc_trajectory.dcd: the GCMC sampling trajectory.
  • ghost_water_state.txt: per-frame ghost-water state file (one row per trajectory frame).
  • gcmc_checkpoint.chk: final-state checkpoint written before trajectory readback.
  • hydrated_complex.pdb: the hydrated-complex structure.
  • gcmc_summary.json: GCMC stage summary (produced paths, frame count, success/failure).
  • representative_complex.pdb: the selected representative protein-ligand-water complex.
  • representative_protein.pdb: optional protein-only representative structure.
  • representative_ligand.sdf: optional template-corrected representative ligand.
  • selection_summary.json: selection stage summary (selected frame index, success/failure).
  • results/result_record.json and results/results.json: the standardized result and a human-readable summary.
  • results/progress.json: best-effort stage, pass-count, acceptance-rate, water-count, and ETA snapshot.

The standardized result exposes representative_complex, representative_protein, representative_ligand, trajectory, checkpoint, and output_dir as pipeline-ready result paths, and its metrics include n_frames_sampled and representative_frame_index.

Compressed inputs

Declared MD structure, molecule, topology, trajectory, checkpoint, and restart inputs may use a trailing .gz. CADDForge expands transparent wrappers at runtime while preserving the original paths. Plain inputs retain their existing behavior.

inducia

Inherited worker reporting uses progress_update_interval_seconds (5 seconds), heartbeat_interval_seconds (30 seconds) and log_sync_interval_seconds (30 seconds). These settings remain separate from the method-specific progress mapping and are included in the complete configuration examples.

Inducia is a composite induced-fit docking and pose-stability workflow built from PheSA, GNINA, GRAND, and OpenBPMD. One job accepts one three-dimensional query ligand; use pipeline scatter for a multi-record query library.

The modes are:

  • template: run PheSA at the fixed pharmacophore-point weights 0.00 through 1.00 in steps of 0.05, cluster the resulting poses by direct heavy-atom RMSD in the binding coordinate frame, identify clashing protein residues, and minimize each representative with those residues flexible in GNINA.
  • independent: run full flexible GNINA docking in an explicit box or autobox. The flexible-residue radius and maximum residue count are configurable.

Every surviving GNINA pose is hydrated by GRAND. Hydrated poses with finite GNINA CNNscores are ordered from highest to lowest, and openbpmd.max_input_complexes limits how many continue to OpenBPMD. Final structures are ranked by ascending OpenBPMD CompScore.

CLI:

caddforge show-config md inducia
caddforge run md inducia --config inducia.yaml

Template-mode configuration shape:

mode: template
backend: local
receptor_pdb_path: data/receptor.pdb
query_ligand_sdf_path: data/query.sdf
template_ligand_sdf_path: data/known_binder.sdf
ligand_resname: LIG
max_local_workers: 1
phesa:
  max_confs: 200
clustering:
  rmsd_cutoff_angstrom: 1.0
clash_detection:
  allowed_vdw_overlap_angstrom: 0.4
gnina:
  cnn_scoring: rescore
  pose_sort_order: CNNscore
grand:
  sphere_radius_angstrom: 10.0
  n_ghost_waters: 150
  initialization_passes: 7500
  max_production_passes: 100000
openbpmd:
  max_input_complexes: null
  nreps: 10
  hill_height: 0.05
  deposit_interval_ps: 1.0
progress:
  interval_seconds: 30

Independent mode replaces template_ligand_sdf_path with either autobox_ligand_path or both box_center and box_size. Its GNINA settings include independent_flex_radius_angstrom (default 3.5) and independent_max_flexible_residues (default 12).

Child phases use at most max_local_workers locally. With Slurm, all siblings in a phase are submitted before monitoring begins. Parent stdout records phase lifecycle, child IDs and statuses, heartbeats, concise child progress, completion, and failure information. Follow it with caddforge logs <job-id> --follow; detailed command logs remain in the child directories.

Structured events are written to results/inducia_progress.jsonl. Temporary registry or shared filesystem failures are treated as monitoring outages and retried. Allocated-runtime publication copies file content without filesystem metadata for CIFS compatibility and verifies it by SHA-256.

Primary outputs are best_complex, best_protein, best_ligand, ranking_table, pose_manifest, ranked complex/protein/ligand path collections, and output_dir. The complete pose manifest retains PheSA scores, cluster membership, flexible residues, all child jobs and statuses, CNNscore shortlist rank, GRAND/OpenBPMD artifacts, CompScore, and failure provenance.

MD 0.15.0, including Inducia, requires caddforge-core>=0.24.0, caddforge-descriptors>=0.12.0, and caddforge-docking>=0.8.0, plus the external scientific runtimes required by PheSA, GNINA, GRAND, OpenMM, AmberTools, and OpenBPMD.

gamd

md/gamd prepares solvated proteins and ordinary noncovalent protein–ligand complexes, runs independent GaMD replicas, and analyzes production samples. GaMD is included in MD 0.15.0 with core 0.24.0 and bundle 0.25.0.

Installation and inputs

Install caddforge-md[gamd]==0.15.0 and provide AmberTools (tleap, and for ligands antechamber, parmchk2, sqm) on the worker PATH. OpenMM 8.2–8.x, ParmEd, RDKit, MDTraj, NumPy, SciPy and Matplotlib are used. CUDA requires a compatible OpenMM installation and driver. platform: CUDA fails if unavailable; auto chooses CUDA when present and otherwise CPU. CPU thread count follows the allocated runtime context. All scientific programs run in workers, including Slurm preparation.

Supply a protein PDB or a complex PDB plus an authoritative, single-molecule ligand SDF. Resolve protonation, termini, disulfides, missing heavy atoms and alternate conformations first. Existing fix-structure outputs and paired protein_states_path / protein_links_path records are supported. The ligand SDF supplies bond orders, stereochemistry and formal charges; atom mapping must be unambiguous. Preparation preserves supplied coordinates up to the documented solvation translation. Added hydrogens, solvent, ions and virtual sites are recorded in atom_mapping.json.

The automatic model is Amber ff19SB (including CMAP), GAFF2/AM1-BCC, four-site OPC, neutralization and configurable NaCl. Metal sites, covalent ligands, cofactors, membranes, arbitrary force fields, HMR and timesteps above 2 fs are outside this first version. Unsupported components fail explicitly.

Prepared Amber input requires all three of amber_topology_path, amber_coordinates_path and amber_mapping_path, alongside the original PDB/SDF inputs. The supported mapping is the atom_mapping.json produced by this tool, tied to the exact source/topology/coordinate checksums and declared model. Atom correspondence, ligand connectivity, charge, force forms, hydrogen masses, OPC charges, rigid geometry, virtual-site weights and Lennard-Jones parameters are rechecked. An imported model declaration still requires the scientist to know how those parameters were generated.

GaMD workbench setup, monitoring and analysis

The workbench exposes GaMD (md/gamd) and the independent GaMD analysis (md/gamd-analysis) tool. Use core 0.24.0, MD 0.15.0 and GUI 0.7.0 in matching controller and worker installations. Existing CLI/Python md/gamd configurations, including mode: analyze, remain supported.

Choose Protein or Protein–ligand complex in Inputs. Complexes require an authoritative ligand SDF; supply charge/mapping details explicitly. Prepared Amber inputs require topology, coordinates and mapping together, with the original structure/chemistry records for validation. All inherited backend settings and compute profiles use the shared Compute step; resources apply to each worker. Local replicas run serially, while Slurm schedules them independently.

Production duration is required and is per replica. The Review step displays requested production, phase overhead, pilot bounds, preparation model, storage and analysis choices. The optional Collective variables step starts in Diagnostics only mode. Add distance, dihedral, RMSD or external-observation CVs, then explicitly configure any 1D/2D profile axes and bins. A backbone RMSD template is available only on request. Save validated edits before submission. Actual prepared-topology selections and reference identities are checked in the worker.

Monitoring shows the pilot and paginated replica tasks with current stages, measured advancement and stage-local ETAs. The convergence-driven pilot estimate is to its maximum duration. Quiet preparation stays indeterminate; heartbeats do not imply scientific advancement. A parent finalizer can remain queued while replicas run; the workflow overview explains this without changing native status. caddforge logs JOB_ID --follow includes declared child logs.

Results contain replica outcomes and quality diagnostics, boost and configured CV traces, exact-data CSV downloads, and configured free-energy profiles with recorded confidence intervals and support gaps. Select a view/source/profile to load bounded previews, rather than all replica data. Two-dimensional profiles use an enlargeable recorded figure and numeric bin table. Screening flags do not prove convergence. These are marginal CV free energies conditional on common supported bins, not binding affinity or kinetics.

End-of-run analysis automatically writes per-replica calibration diagnostics. In Results, select Diagnostics and Replica N · Calibration to inspect full-history and final-20-window figures, interactive total/dihedral energy means and standard deviations, and a table explaining the last-five-window screening thresholds. The five screened records are highlighted in orange in both figures. Exact data are retained in analysis/replica_N-calibration.csv and analysis/replica_N-calibration-screen.csv; the PNGs use -history and -recent suffixes. Full history includes earlier preparation/statistics phases where recorded. These are range checks, not automatic trend classifications or convergence tests. The independent GaMD analysis tool also generates these artifacts for existing runs with saved calibration history, without rerunning dynamics. Missing legacy history is reported as unavailable. Existing completed result views are not modified in place.

Analyze trajectory prepares a separate md/trajectory-analysis draft with exact bonded topology and frame-time mappings. Its RMSD/RMSF and bounded playback are descriptive measurements of biased GaMD samples; no reweighting is applied. The full trajectory is never loaded automatically into the browser. Each replica retains its own physical time, including DCD sources and recorded attempt boundaries.

GaMD analysis prepares an independent CPU-oriented reanalysis draft with source provenance, CVs, references, bins and analysis seed. It does not rerun dynamics or create another combined full trajectory. A complete successful source ensemble is the default. For failed ensembles, explicitly select completed replica indices; no subset is silently chosen. The selected indices, original outcomes and provenance are retained. Legacy sources without interactive manifests can be reanalyzed; missing authoritative topology mappings remain unavailable rather than guessed.

caddforge show-config md gamd-analysis > analysis.yaml
caddforge run md gamd-analysis --config analysis.yaml

Failed/cancelled GaMD workflows offer Resume workflow, separate from Retry as new job. Review which tasks will be reused, continued from native checkpoints, started or finalized. Original scientific and compute settings remain read-only. Core rechecks the review under submission locks, preserves attempts and prevents duplicate submission after uncertain acknowledgement. Workers verify checkpoint checksums, prepared inputs, native engine/platform compatibility and archives before loading. Interrupted chemical preparation requires a new workflow. Completed dynamics can be reused for finalization-only recovery; legacy coordinate-storage policy is preserved. A missing/uncertain backend observation blocks unsafe resume.

GaMD configuration examples

caddforge show-config md gamd emits every user-settable field, including backend/job settings, all phase durations, synchronization controls and nested analysis options. The template uses a protein input and editable RMSD/profile examples; customize the selections and bin edges for your system, or set analysis.cvs: [] and analysis.profiles: [] for boost diagnostics only. The model defaults for those lists are empty. Optional fields remain visible as null, empty mappings or empty lists. CV kinds are distance, dihedral, rmsd and external; column and explicit units apply to external CVs, while reference_path applies to RMSD.

Download the protein–ligand configuration example:

complex_pdb_path: complex.pdb
ligand_path: ligand.sdf
lig_resname: LIG
production_ns: 200
trajectory_format: xtc
repeats: 3
seed: 42
platform: CUDA
backend: local
analysis:
  cvs:
    - name: separation
      kind: distance
      selections: ["protein and name CA", "resname LIG and element C"]
  profiles:
    - name: separation
      cvs: [separation]
      edges: [[0, 0.5, 1, 1.5, 2, 2.5, 3, 4]]

Running replicas

caddforge show-config md gamd
caddforge run md gamd --config md-gamd.yaml
caddforge run md gamd --config md-gamd.yaml --backend slurm
caddforge status JOB_ID
caddforge logs JOB_ID
from cadd_md.gamd import GaMDConfig, GaMDWorkflow
from caddforge.core.execution import load_result_for_job

config = GaMDConfig(
    complex_pdb_path="complex.pdb", ligand_path="ligand.sdf",
    production_ns=200, repeats=3, seed=42, platform="CUDA",
)
job = GaMDWorkflow(config).submit()
result = load_result_for_job(job)

production_ns is required and is the production duration per replica. repeats defaults to one. A master seed is persisted before submission, with distinct labelled nonzero streams for velocities, thermostats, barostat and analysis. The pilot prepares the chemical model once, including GAFF2/AM1-BCC charges, solvation and ion placement. Replicas stage the pilot's checksum-verified prepared.prmtop, prepared.inpcrd and atom_mapping.json through the validated Amber import route. They use identical parameters and the pristine pre-dynamics coordinates; charge fitting is not repeated. Each replica independently minimizes, heats, equilibrates and calibrates its boost. Equilibrated pilot coordinates, velocities and boost statistics are never reused as starting states.

Local execution runs children serially. The core submission API's local_async=True detaches one coordinator that completes the whole graph. Slurm submits the conventional pilot, all replicas and a terminal analysis job immediately, with native afterok/afterany dependencies. Replicas can run concurrently after the pilot. Scheduler options stay in core. The reducer uses the same resource options as the other nodes; account for that allocation. Status queries only inspect execution evidence and do not trigger analysis. The Python core API cancel_task_graph(job, config) cancels persisted child and coordinator/reducer handles. Pipeline scatter remains a separate core feature; each scattered GaMD job owns its requested replicas.

Use caddforge logs <parent-job-id> -f to monitor the whole graph. Core combines pilot, replica and parent stdout/stderr with source labels, including while the parent's analysis job is waiting on dependencies. No additional monitoring allocation is required. GaMD events have UTC timestamps and execution-attempt identities. Preparation commands report their start/end; quiet work emits heartbeats. Dynamics report the active phase, step count, percentage, measured rate and stage-local ETA. The pilot ETA targets its maximum allowed duration and can end earlier on convergence. ETA excludes queue time and subsequent phases; minimization has no reliable completion estimate. Reporting and log copy-back use log_sync_interval_seconds (30 seconds by default).

Protocol and scientific controls

Setting Default
Temperature / pilot pressure 310 K / 1 bar
Timestep / friction 2 fs / 1 ps⁻¹
PME cutoff / LJ switch / tolerance 1.2 nm / 1.0 nm / 0.0005
Solvent padding / NaCl 1.5 nm / 0.15 M
Heating / restraint release / NVT relaxation 0.1 / 0.3 / 1 ns
Conventional preparation / statistics 0.5 / 5 ns
Boost preparation / adaptation 0.5 / 5 ns
Fixed-bias relaxation 0.5 ns
Averaging / reporting / checkpoints 100 / 5 / 100 ps
Boost type / sigma targets lower-dual / 6 kcal mol⁻¹ for each boost

Pilot and replica minimization/heating use temporary solute heavy-atom restraints with minimum-image distances, so wrapping a molecule into another periodic image does not change its restraint energy or forces. Restraints are released before the NPT pilot and each replica's unrestrained NVT relaxation.

The unrestrained conventional NPT pilot starts with 2 ns and extends in 1 ns increments up to 10 ns. Screening requires the last three 0.5 ns mean volumes to span no more than 1% of their mean. The mean volume over the last 1 ns defines a common orthogonal box. These criteria screen volume stability; they do not demonstrate conformational equilibration. Replica solvent molecule centres are scaled to this box; the protein–ligand assembly is translated intact and independently relaxed. Every GaMD stage then uses fixed-volume NVT, with no barostat or production restraints.

Public boost choices are lower-total, lower-dihedral and lower-dual. Dual boosting applies a torsion boost to periodic torsions and CMAP, then a total boost to physical energy plus the torsion boost. Forces include the dependent chain rule. After adaptation the parameters are frozen; fixed-bias relaxation is discarded. All recorded biases are recomputed at the exact saved coordinates from immutable parameters, in kJ/mol. Runtime guards reject invalid calibration, nonfinite states, negative force scaling at any integration step, unsafe boxes and protein contacts with periodic images within the cutoff. Periodic-image validation makes bonded protein molecules whole and places separate components into one nearest-contact periodic assembly on a temporary float64 view. Molecular wrapping therefore does not create false image contacts; the actual engine coordinates, velocities, box and integration schedule are unchanged. Genuine contacts with another assembly copy still fail, reporting zero-based atom indices, distance, image translation, step, time and box lengths. Periodically winding bonded cycles are rejected because they cannot form a whole finite assembly. Do not reinterpret a failed monotonicity check as a usable trajectory: improve calibration or lower the boost strength in a new run.

Recent calibration-window drift is reported as a screening flag. strict_quality: true makes such flags fatal. Defaults are starting values; increase statistics and equilibration when the target system requires it. The volume and drift criteria are explicit heuristics, not universal convergence tests. GaMD time does not directly yield unbiased kinetics or binding affinity.

Outputs, restart and provenance

The parent canonical results/result_record.json points to results/gamd/replicas_manifest.csv and analysis artifacts. Each pilot/replica has its own registered child job, logs and preparation evidence. Replica results/gamd/simulation/ contains trajectory.xtc, topology.pdb, bias.csv, boost_parameters.json, production_system.xml, simulation.json, native checkpoints and atomic commit journals.

coordinate_storage: trajectory is the default for new jobs. During production and after a scientific failure, committed NPY chunks remain the full-precision recovery source. After a replica completes production, the worker verifies every archived frame against those chunks: atom inventory/order, frame count, step/time, box, bounded format rounding, and exact bias rows. Version-2 simulation.json and committed.json declare the authoritative trajectory, checksums, precision and frame/bias offsets. Only after the archive and manifests are verified on persistent storage are superseded NPY files retired in scratch and on the share. Cleanup retries separately and cannot invalidate stored science. artifact_retirement.json records pending cleanup. Exports exclude authorized superseded NPY files even if physical deletion is delayed.

Analysis and combined-trajectory export stream through the same bounded reader. XTC uses 0.001 nm coordinate precision; DCD stores float32 Angstrom coordinates. Coordinate rounding may slightly change CVs, bins and derived profiles; original bias energies and reweighting inputs remain exact. Set coordinate_storage: full_precision to retain float64 NPY analysis coordinates. Legacy jobs without a pinned storage policy retain full precision on resume; changing a new job's pinned policy/format on resume is rejected. There is no migration of existing completed runs. Completed archived replicas can recover interrupted framework finalization without NPY files or reintegration.

Peak storage during production still includes NPY chunks and the trajectory assembled at completion. Once verified publication finishes, the entire redundant NPY allocation is removed: an 11 GB NPY collection releases approximately 11 GB. Per-replica and combined trajectories, native checkpoints and small exact bias CSVs remain.

Only the three most recent native checkpoints per pilot or replica are retained, ordered by simulation advancement. Replica checkpoints follow checkpoint_interval_ps (and phase boundaries); pilot checkpoints are written every 0.5 ns. Trajectories and exact bias chunks are retained in full. NPY retention follows the coordinate storage policy above. The commit journal records the retained checkpoints and drops expired checkpoint hashes without dropping scientific data hashes. On Slurm, cleanup in scratch and persistent storage follows verified publication of the replacement journal and its dependencies. During a storage outage, additional checkpoints are kept for recovery and pruned after synchronization succeeds. Commit publication cannot be starved by continuously arriving checkpoint updates: one pending journal is published before its coalesced latest successor. Deletion errors are retried even while dynamics is quiet, with bounded final retries. Cleanup-only failures leave scientific success intact and are recorded in extra.checkpoint_retention, the parent warning summary and caddforge logs. Missing required scientific files still fail persistence and retain recovery evidence. Older runs are migrated after successful resume validation; completed child jobs reused without execution are left unchanged. This reporting capability requires matching updated core and MD workers.

With export_results: true, only the parent exports when it finishes. Its existing named export directory contains combined gamd/ results and separate pilot/, replica_0/, etc. subdirectories with each child's results and logs. The export includes diagnostics from failed children; export_index.json identifies each component. Canonical records keep their original provenance paths. Copies are verified without preserving filesystem metadata. Interrupted exports retry into the same reserved directory; the run's results_export.json records per-file progress, pending components, errors and the next retry. Transient failures get five immediate passes (1, 2, 4, 8 second delays), then the running GUI's shared maintenance worker retries in the background (30 seconds to five minutes). Permission/ownership/quota errors need attention. caddforge export JOB_ID --status only reads state; caddforge export JOB_ID retries the same destination without rerunning science. The manual GUI export card is currently hidden; automatic exports and background recovery remain available. Older partial exports are adopted automatically. Unknown child state keeps family export incomplete. Refreshing an export removes only obsolete, unmodified files recorded in its inventory, so expired checkpoints do not accumulate there. User files and old standalone export directories are preserved. Explicit manual child export remains available.

The parent also contains topology.pdb, topology.prmtop, trajectory.xtc and trajectory_manifest.csv. The trajectory contains all saved production frames from all replicas, streamed in replica-manifest order. It excludes preparation and equilibration frames. The manifest records zero-based start/end frame offsets, replica identities and sampling intervals: replica boundaries are independent runs, not continuous dynamics, and the concatenated trajectory clock is an indexing convenience. Each frame carries the common production box; the Amber topology retains the original prepared parameters. Individual replica trajectories remain available through replicas_manifest.csv and pipeline collection ports. The combined trajectory is an additional copy, so allow storage for both it and the original per-replica trajectories (and optional full-precision chunks).

trajectory_format: xtc is the default. Set trajectory_format: dcd for DCD exports. Simulations use the selected format for both replica and combined files; analysis-only jobs use it for the new combined export. XTC uses standard 0.001 nm coordinate precision and stores each frame's time and step explicitly. Replica export times match the GaMD phase clock in bias.csv; the combined export starts at one reporting interval and advances across replica boundaries for indexing. The manifest preserves each replica's original step range. Bias weights always use the exact original energy/bias observations; CVs use the authoritative coordinate source declared by the storage policy. Keep the matching topology with either format.

For downstream time-based selections, prefer XTC: current MDTraj-based tools do not recover DCD frame times, and center-and-align DCD output currently defaults to 1 ps spacing. DCD frame-index selections do not depend on that clock.

The pilot Result exposes prepared_topology, prepared_coordinates, atom_mapping and preparation_summary. Replica Results record preparation_source_job_id in their extra metadata, linking shared parameters to the pilot's original charge-fitting and preparation evidence.

Resume with the same explicit run_directory and resume: true. Configurations, source checksums, prepared files, integrator identity and committed chunks must match. Native OpenMM checkpoint compatibility (platform/version/hardware) is required; failures do not fall back to velocities-only or XML restarts. Resume starts at the last committed GaMD/NPT checkpoint; earlier warm-up without a checkpoint is repeated. Interrupted pilot chemical preparation requires a fresh run. A completed pilot can also be reused from runs made before the shared-model handoff was introduced: if a replica has no committed GaMD checkpoint, an incompatible preparation is archived under preparation-attempt-* before importing the pilot model. A differing model with a committed checkpoint is rejected. Finished replicas are reused. Submission/resume is serialized by a per-run advisory lock. A live coordinator is not submitted twice. Uncertain scheduler state or lost submission acknowledgement blocks automatic resubmission until execution is reconciled through core's execution_state.reconcile_submission API. The scheduler must independently confirm a handle or absence; a failed query does not establish absence. Failed attempt results are archived before resubmission. Uncommitted orphan chunks are ignored. Outputs are never silently overwritten by a new job.

To continue a crashed run, create resume.yaml from the original YAML configuration (or convert the saved parent config.json to YAML), keep the original scientific settings and inputs, and set:

run_directory: /absolute/path/to/original/parent-run
resume: true

Then submit it through the same interface:

caddforge run md gamd --config resume.yaml
caddforge status ORIGINAL_PARENT_JOB_ID
caddforge logs ORIGINAL_PARENT_JOB_ID --follow

The original parent/child identities and persisted seed streams are reused; unfinished children load their latest committed native checkpoints. Supply the parent directory, not replica_0/ or a .chk filename, and keep the entire run directory, including preparation files, journals and scientific chunks. A GUI Restart creates a fresh run; it does not continue this existing checkpoint history. There is no automatic fallback to an older checkpoint if the latest committed checkpoint is corrupt or incompatible: validation fails explicitly.

On Slurm, all preparation, dynamics and analysis execute in the scratch directory provided by core's RuntimeContext (the backend-selected SLURM_TMPDIR). Required inputs are staged and checksum-verified before calculation. Stage-in reads retry up to input_retry_attempts: 3 times with exponential delays starting at input_retry_delay_seconds: 1.0, capped at 30 seconds per delay. The existing core scratch-selection policy applies to GaMD as it does to other tools.

Core LogSync mirrors stdout/stderr and progress every log_sync_interval_seconds: 30. Core ArtifactSyncQueue copies closed artifacts in the background, retrying every result_sync_interval_seconds: 5.0 seconds. Transient copy errors do not interrupt the calculation after inputs are staged. Changing manifests are queued as immutable local snapshots; preparation records and checkpoint/commit manifests publish only after their dependencies have been copied and SHA-256 verified. Consolidated trajectories and analysis outputs are published at completion. These operational settings can change on resume without changing the scientific configuration fingerprint.

Final publication and log synchronization must succeed before a job reports success. Pending artifacts or logs fail the job and preserve scratch with a .caddforge-retain marker and local recovery.json containing the hostname, paths, result and pending-copy details. Failure to save final shared metadata also preserves this record. The outer worker also writes recovery-JOB_ID.json if its own final publication fails; it releases scratch protection only after framework persistence completes. Recover files from that node before site cleanup; the marker controls CADDForge's cleanup, not a cluster epilog. Submission, stage-in and final metadata still require shared storage. These helpers tolerate copy errors and recovery during a running allocation; they cannot impose a timeout on a hung filesystem call or guarantee recovery after node loss, allocation teardown or site removal of scratch.

The terminal reducer retains every child outcome. Any missing/failed/cancelled replica fails the requested ensemble and suppresses combined analysis. Analysis failure retains successful simulation outputs and the complete replica manifest; reanalyze those files independently after correcting the analysis specification.

Free-energy analysis

Configure analysis.cvs and analysis.profiles before simulation, or use mode: analyze and source_result_path in a new job. The Python API is:

from pathlib import Path
from cadd_md.gamd import AnalysisConfig, CV, Profile, analyze_gamd

analysis = AnalysisConfig(
    cvs=[CV(name="separation", kind="distance", selections=[
        "protein and name CA", "resname LIG and element C",
    ])],
    profiles=[Profile(name="separation", cvs=["separation"],
                      edges=[[0, 0.5, 1, 1.5, 2, 2.5, 3, 4]])],
)
report = analyze_gamd(Path("RUN/results/result_record.json"), analysis,
                      Path("new-analysis"), seed=42)

To regenerate outputs from a completed run, submit mode: analyze with its canonical parent result as source_result_path, the desired analysis settings, and a new run_directory. This exports the complete production trajectory/PDB in the selected trajectory_format, the replica-boundary manifest and new plots, without rerunning dynamics. The Python analyze_gamd function writes analysis only. Resuming a completed simulation reuses its existing result and does not regenerate plots. The format setting does not change dynamics or invalidate older resume identities; completed child outputs are reused in their existing format. Use a new analysis job to convert a completed ensemble, including older DCD-only runs.

Selections use MDTraj syntax and resolve to audited atom indices. Distances are minimum-image distances between geometric centroids of reconstructed groups (nm). Each centroid must belong to one bonded molecule; select a protein chain explicitly for multichain systems. Dihedrals require four single atoms and full 360° periodic profile domains (degrees). RMSD uses selected atoms after fitting at least three atoms from align_selection, with bonded molecules reconstructed and ligand images placed near the protein before fitting. Use a reference with the exact topology atom order. One common pilot reference is chosen for automatic ensemble RMSD. External CV CSVs require unique (replica_index, step) rows and explicitly named units/column; row order and nearest-time matching are never used.

Profiles need explicit edges and support one or two CVs. Reweighting uses the combined boost with the second-order cumulant expansion (CE2), including dual-boost covariance. Each replica's probabilities are normalized on the same supported domain and then averaged with equal replica weights. Free energies are calculated from this mixture with explicit bin-volume normalization and one common reference bin. Unsupported bins remain blank; no arbitrary energy cap is applied. These are marginal CV free energies in the stated measure, without geometric Jacobian corrections.

Each configured CV also gets analysis/cv_diagnostics/<cv-name>.png, showing production time traces and unweighted sampled distributions for every replica. These diagnostics do not require a supported reweighting histogram. In particular, backbone_rmsd.png in the profile directory is a free-energy profile, whereas cv_diagnostics/backbone_rmsd.png shows the sampled RMSD in nm. Single supported bins are shown as points and flagged single_supported_bin; zero supported bins produce an explanatory figure rather than empty axes. Observed CV ranges and out-of-domain counts are recorded in analysis.json. Sampling thresholds remain enforced; no unsupported free-energy values are drawn.

Retained frame fractions and out-of-domain counts describe the fraction of production represented by each surface. Minimum bin occupancy defaults to 50 frames in every replica. Uncertainty uses 1,000 hierarchical bootstrap draws: resample replicas and correlated circular blocks within each replica. Block length is at least 100 ps and five estimated integrated autocorrelation times. Confidence intervals require at least ten blocks in every replica; otherwise they remain absent. Fewer than three replicas, replica disagreement and conditional boost anharmonicity above 0.1 are reported. Saved-frame autocorrelation estimates and occupancy/entropy thresholds cannot certify adequate sampling.

Outputs include per-replica/combined profile CSVs, combined 1D/2D PNGs, confidence limits, counts, conditional boost moments, anharmonicity, direct exponential weight diagnostics/ESS, block sizes, resolved CV definitions, and per-replica CV/bias tables and boost plots. With no profiles the run produces boost diagnostics only. Inspect support coverage, replica consistency and CE2 assumptions before interpreting a surface.

Scientific qualification

Automated checks exercise formulas, energy-offset invariance, actual OpenMM force weights, every GaMD phase, fixed parameters, checkpoint replay, frame/bias alignment, analysis and generated protein/complex Amber preparation. They establish implementation behavior, not scientific convergence for a target. Long alanine-dipeptide free-energy benchmarks against conventional MD, timestep sensitivity, and CUDA/cluster qualification remain required before calling this implementation scientifically qualified for production decisions. Keep external runtime and long sampling tests separate from lightweight CI.

The vendored MIT integrator subset is pinned to fb738c9037a48800ddba726657db3a19e394ebad. Its NOTICE lists local numerical/ordering corrections; upstream defaults and interfaces are not exposed wholesale. Cite Miao, Feher and McCammon (2015) for GaMD and Copeland et al. (2022) for the OpenMM implementation, along with the force-field and preparation methods.

GUI workbench

The workbench exposes OpenBPMD, plain MD and reusable trajectory analysis through the shared Inputs, Method, Compute and Review flow. Results retain the recorded score metrics and existing analysis plots, with common job monitoring and logs. Missing score measurements are omitted from canonical metrics rather than written as non-finite JSON numbers.

See the GUI walkthrough and tool authoring contract.

Shared monitoring in current source

The GUI-exposed workflows use common activity events, canonical stage snapshots and live engine log discovery, also available with caddforge logs JOB_ID --follow. Use --registry-path to select the GUI's registry when it differs from the default. Measured percentages/ETAs describe the current stage; unknown engine work remains indeterminate. Parent/replica/edge counts do not imply a scientific percentage. See the tool authoring contract.