fix_pdb_structure
Corrects common PDB structural errors—missing atoms, nonstandard residues, unwanted heterogens—and adds hydrogens to prepare files for OpenMM simulation.
Instructions
Prepare a PDB file for OpenMM by correcting common structural problems.
WHEN TO USE
Run this after query_pdb_structure (and optionally split_pdb) and before relax_pdb_structure. It is required before relaxation because OpenMM needs: (a) standard residue names, (b) all heavy atoms present, (c) hydrogen atoms added.
WORKFLOW POSITION
Step 3 (or step 2 if no splitting is needed). Input is typically the raw PDB or the protein-only file produced by split_pdb.
DECISION GUIDANCE
chains_to_keep / chains_to_remove: Decide based on query_pdb_structure output. For a standard relaxation workflow keep only the biological unit (usually protein chains). Remove chains that are crystallographic symmetry mates or that lack force-field parameters.
ph (default 7.0): Controls protonation states of HIS, ASP, GLU, LYS, CYS. Use 7.4 for physiological simulation. Use the experimental pH if known from the paper. Histidine protonation is particularly sensitive — consider whether HID/HIE/HIP matters for your system.
remove_heterogens (default True): Set False only if ligands have been separately parameterised and the assembled structure is ready for a non-standard force field. For standard AMBER/CHARMM relaxation, ligands without parameters will cause createSystem() to fail.
keep_water (default False): Set True only when crystallographic waters are meaningful (e.g. active-site waters). Waters slow minimisation and are usually re-added during explicit-solvent solvation later.
fix_missing_residues (default False): Only enable for gaps ≤ ~5 residues or when the user explicitly requests loop modelling. Modelled loops have roughly-placed atoms and require extensive MD to be meaningful. Large gaps (> 10 residues) will produce severe clashes and should be left open.
fix_terminal_residues (default False): Disordered termini are almost never worth modelling; leave False unless specifically requested.
OUTPUT — WHAT TO CHECK
nonstandard_residues: List what was converted. Flag any unexpected conversions to the user (e.g. a bound cofactor being converted to a standard amino acid). missing_atoms_added: Review side-chains added. A large number (> 20) suggests significant disorder in the crystal structure. heterogens_removed: If this is 0 when ligands were present, something was misclassified — re-check with query_pdb_structure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ph | No | pH for protonation assignment (default 7.0). | |
| notes | No | Record key decisions, e.g. "keeping only chain A, pH 7.4 for physiological simulation, not modelling 22-residue loop as it is far from the active site". | |
| input_pdb | Yes | Path to input PDB or mmCIF file. | |
| keep_water | No | Preserve crystallographic waters when removing heterogens (default False). | |
| output_pdb | No | Output path (default: <stem>_fixed.pdb). | |
| add_hydrogens | No | Add H atoms at the given pH (default True). | |
| chains_to_keep | No | Retain only these chain IDs. | |
| chains_to_remove | No | Remove these chain IDs. | |
| remove_heterogens | No | Remove ligands and ions (default True). | |
| fix_missing_residues | No | Model missing internal loops (default False; requires SEQRES records). | |
| fix_terminal_residues | No | Also model missing terminal residues (default False; only with fix_missing_residues=True). | |
| add_missing_heavy_atoms | No | Add absent side-chain heavy atoms (default True). | |
| replace_nonstandard_residues | No | Map modified residues to standard ones (default True). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||