phenix.real_space_refine: a tool for refinement a model against a map


The program refines a model into a map. The map can be derived from X-ray or neutron crystallography, or Electron Microscopy, and its quality can be from very good to poor. The goal is to obtain a model that fits map as good as possible and that has a meaningful geometry (no stereochemically impossible outliers, such as Ramachandran plot outliers, etc that are not justified by the map).

Contact author

For questions, bug reports, feature requests: Pavel Afonine (


Usage examples

  1. Running with default settings:

    phenix.real_space_refine model.pdb map.ccp4
    phenix.real_space_refine model.pdb map_coefficients.mtz

    This will do several macro-cycles of global real-space refinement with secondary structure, rotamer, Ramachandran plot and C-beta deviations restraints enabled.

  2. Disabling secondary structure, rotamer and Ramachandran plot restraints:

    phenix.real_space_refine model.pdb map.ccp4 \
    secondary_structure.enabled=False use_rotamer_restraints=False \
  3. Request output model to have bond and angle rmsd from ideal not greater than certain values:

    phenix.real_space_refine model.pdb map.ccp4 target_bonds_rmsd=0.01 \
  4. Specify which Fourier map coefficients to use:

    phenix.real_space_refine model.pdb map.mtz label='2FOFCWT,PH2FOFCWT'
  5. Run refinement using global minimization (default), local fitting, morphing, and simulated annealing:

    phenix.real_space_refine model.pdb map.ccp4 \
  6. If PDB file contains unknown to Phenix ligand a ligand CIF file needs to be provided. Ligand CIF file can be obtained using one of corresponding tools in Phenix (see documentation for more details). Once CIF file is available it can be used as following:

    phenix.real_space_refine model.pdb map.ccp4 ligands.cif
  7. Group ADP (B-factor) refinement. Currently only one option availbale: restrained group ADP refinement with two B-factors per residue (one for main and one for side chains):

    phenix.real_space_refine model.pdb map.mtz run=adp