relax_pdb_structure
Energy-minimize and optionally run short restrained molecular dynamics on a prepared PDB to eliminate clashes and produce a relaxed structure ready for production simulations.
Instructions
Energy-minimise and optionally run short restrained MD on a prepared PDB.
WHEN TO USE
Use as the FINAL step after fix_pdb_structure (and optionally assemble_pdb_structures). The input MUST have hydrogens and standard residue names — run fix_pdb_structure first.
Do NOT pass a raw PDB straight to this tool. OpenMM will fail if residues are missing heavy atoms or contain non-standard residue names.
WORKFLOW POSITION
Last step of the cleaning/preparation pipeline. Output is a relaxed PDB ready for production MD setup or coarse-graining.
DECISION GUIDANCE
preset (default "amber14_implicit"): amber14_implicit — use for typical protein relaxation; fast, no periodic box required. Best choice for most users. amber14_explicit — use when the input already has a periodic solvent box (added externally). More accurate but slower. amber99sb_implicit — an older force field; prefer amber14_implicit unless the user specifically requests AMBER99SB. charmm36_explicit — use when downstream simulation will use CHARMM36 and explicit solvent. Call query_ff_presets() to see the full list with descriptions.
run_md (default True): Set False for a minimisation-only run, which is much faster. Use minimisation-only when: (a) the structure is already well-relaxed, (b) a quick clash-removal pass is all that is needed, or (c) compute time is limited.
restrain_backbone (default True): Keep True unless the user wants full unrestrained relaxation. Backbone restraints preserve the experimental fold; without them a very short MD run can distort secondary structure.
restraint_k (default 1000 kJ/mol/nm²): Reduce to 100–200 for softer restraints that allow more backbone movement. Increase to 5000 for near-rigid backbone relaxation of side-chains only.
production_steps (default 25 000 ≈ 100 ps at 4 fs): Sufficient for side-chain relaxation and removal of clashes introduced by adding missing atoms. Increase to 250 000 (1 ns) for more thorough equilibration — note this takes substantially longer on CPU.
temperature (default 300 K): Use 300 K for room-temperature simulation. Some crystallographers prefer 277 K to match cryo conditions.
OUTPUT — WHAT TO CHECK
energy_initial_kJ_mol vs energy_final_kJ_mol: A drop of 10³–10⁶ kJ/mol after minimisation is normal for a raw crystal structure. If the final energy is still very large (> −10 000 kJ/mol for a 500-residue protein), the structure may have unresolved clashes — report to the user and suggest checking with query_pdb_structure. energy_post_md_kJ_mol: Should be more negative than energy_post_min_kJ_mol. If it is more positive, MD is diverging — reduce production_steps or timestep.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Record key decisions, e.g. "using implicit solvent for speed; run_md=False as structure only needed clash removal before coarse-graining". | |
| preset | No | Force-field preset (default "amber14_implicit"). | amber14_implicit |
| run_md | No | Run MD after minimisation (default True). | |
| minimize | No | Run initial energy minimisation (default True). | |
| input_pdb | Yes | Prepared PDB with hydrogens and standard residues. | |
| output_pdb | No | Output path (default: <stem>_relaxed.pdb). | |
| restraint_k | No | Backbone spring constant kJ/mol/nm² (default 1000). | |
| temperature | No | Target temperature in K (default 300). | |
| timestep_fs | No | Integration timestep in fs (default 4.0). | |
| heating_steps | No | Steps for temperature ramp (default 5 000). | |
| platform_name | No | "CUDA", "OpenCL", "CPU", or None for auto. | |
| final_minimize | No | Final minimisation after MD (default True). | |
| heating_stages | No | Number of temperature ramp stages (default 10). | |
| save_minimized | No | Save post-initial-minimisation PDB (default True). | |
| report_interval | No | Log every N steps (default 1 000). | |
| production_steps | No | Steps at target temperature (default 25 000). | |
| minimize_max_iter | No | Max minimisation steps; 0 = until convergence. | |
| restrain_backbone | No | Restrain CA/N/C/O during MD (default True). | |
| heating_start_temp | No | Starting temperature in K (default 10). | |
| minimize_tolerance | No | Convergence criterion kJ/mol/nm (default 10.0). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||