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 vary from good to poor. The program aims at obtaining a model that fits the map as good as possible while posessing a meaningful geometry (no validation outliers, such as Ramachandran plot or rotamer outliers).

Contact author

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



No GUI available yet. Command line only.

Usage examples

  1. Running with default settings:

    phenix.real_space_refine model.pdb map.ccp4 resolution=4.2
    phenix.real_space_refine model.pdb map_coefficients.mtz

    This will do 5 macro-cycles of global real-space refinement with rotamer, Ramachandran plot and C-beta deviations restraints enabled. If NCS is present it will be used as constraints with NCS groups found by the program automatically. Note: if map is used then resolution needs to be provided.

  2. Rotamer, c-beta and Ramachandran plot restraints as well as using NCS constraints are enabled by default. To disable these restraints:

    phenix.real_space_refine model.pdb map.mtz ncs_constraints=False \
    rotamer_restraints=False ramachandran_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.mtz target_bonds_rmsd=0.01 \
  4. Specify Fourier map coefficients to use:

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

    phenix.real_space_refine model.pdb map.mtz \
  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.mtz 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
  8. Running rigid-body refinement. Rigid body refinement can be run alone or in combination with other refinement strategies:

    phenix.real_space_refine model.pdb map.mtz run=rigid_body rigid.eff

    where rigid.eff contains definitions of rigid body groups:

    rigid_body {
      group = chain A
      group = chain B or chain C
      group = chain Z
  9. In case NCS is present the program will attempt to determine NCS groups. Automatically found definitions for NCS groups will be printed to the log. It is possible to provide NCS group definitions manually:

    phenix.real_space_refine model.pdb map.mtz ncs.eff

    where ncs.eff contains definitions of NCS groups:

    pdb_interpretation {
      ncs_group {
        reference = chain A
        selection = chain B
      ncs_group {
        reference = chain C or chain D
        selection = chain X
        selection = chain Y
        selection = chain Z
  10. Use if secondary structure restraints is controlled by secondary_structure.enabled keyword:

    phenix.real_space_refine model.pdb map.mtz \

    If HELIX/SHEET records are present in PDB file they will be used to construct restraints. Otherwise one of Phenix tools will be run internally to derive secondary structure information from the input model. DNA/RNA specific restraints will be generated internally. For more details on secondary structure restraints see separate documentation referenced below.