Back to Toolbox

phenix.refine

 

Phenix is a fairly recent software suite that has come out of a number of labs mainly in the US. phenix.refine is the refinement package within the suite. Although there is a phenix GUI, I have found it much easier to run phenix.refine on the command line. The manual can be found here and a pdf of useful tips is here.

Initially all you need to do is type:

setccp4 (important if you want to use mtz files or any cif dictionaries)

setphenix

phenix.refine *.pdb *.mtz

The program can read in pretty much any reflection file format (so no need to convert your mtz files!) and will run using defaults.

 

Output files

Once the program has run it will report the R and Rfree factors on the command line, and also produce the files:

refine_001.eff, refine_001.geo, refine_001.pdb, refine_001_2mFobs-DFmodel.map, refine_001_mFobs-DFmodel.map, refine_001_map_coeffs.mtz, refine_001.log and refine_002.def

where the .eff file tells you the input parameters for the refinement job, the .geo tells you the geometry restraints prior to refinement, the .pdb is the output pdb file, the two map files are your 2Fo-Fc and Fo-FC in xplor format, the .mtz is a new mtz file with phase columns that can be used with coot, the .log is your log file and the 002.def is the defaults file ready for your next job.

 

Running on the command line

If you want to change just a couple parameters you can re-run jobs adding your new parameters on the command line e.g.:

phenix.refine *.pdb *.mtz simulated_annealing=true

This goes for every command, however things get a bit unwieldy if you are starting a job by typing:

phenix.refine data.hkl model.pdb main.refine_site=false main.refine_adp_individual=false main.rigid_body=true rigid_body.selection="chain A" rigid_body.selection="chain B"

In order to simplify things you can instead edit the .def file using the normal text editor, and then change any of the defaults within this file instead. The following sections will all be referring to editing the .def file.

 

ONCE YOU HAVE EDITED YOUR .def FILE YOU MUST RUN THE NEXT ROUND OF REFINEMENT USING THE COMMAND:

phenix.refine *.def

OTHERWISE NONE OF YOUR CHANGES WILL TAKE EFFECT!!

 

Setting the type of refinement

To set the type of refinement find the following section of the .def file:

refine {
strategy = *individual_sites rigid_body *individual_adp group_adp tls \
individual_occupancies group_occupancies group_anomalous none

and simply place a * in front of the types of refinement you want to use. You then need to edit the appropriate part of the file with the parameters for each job e.g. to refine individual bfactors put a star in front of individual_adp, then find the adp section and set whether you want isotropic or anisotropic bfactors.

The only exception is if you want to do simulated annealing where you need to add:

simulated_annealing = True

under the main section and then edit the simulated annealing section further down the file to define the temperatures etc.

 

Dictionaries

You can use the normal CCP4 .cif dictionaries generated on the PRODRG2 website as described on my dictionaries page.

You can tell the program about them either in the .def file e.g.

monomers { file_name = "/home/simon/mydictionary.cif"

or by simply adding the filename or path on the command line:

phenix.refine *.pdb *.mtz *.cif

 

Changing the weighting on the X-ray term

To change the weighting on the X-ray term if you fear your structure is being over-refined (i.e. your Rfree is more than 0.05 higher than your R factor) find the target_weights section and then edit the lines:

wxc_scale = 0.5

wxu_scale = 1

where wxc relates to the weights applied on the coordinate refinement (individual_sites) and wxu relates to your temperature factor (individual_adp or group_adp) weight. Reducing the value will reduce the weighting on the X-ray term.

 

Individual and Group temperature factors

By starring individual_adp or group_adp in the refine strategy section you can select to refine individual or group temperature factors (adp stand for "atomic displacement parameters"). Then simply find the adp section and select isotropic or anisotropic. I think "groups" is the same as bgroup in cns although I cannot find anything in the manual to confirm this.

 

NCS Restraints

phenix.refine can automatically find appropriate ncs groups if under the "main" command you use:

ncs=True

and then under the ncs section you have:

find_automatically = True

Alternatively you can select your own ncs by again making sure ncs=True under the "main" section, change find_automatically to False, and then add a restraint group:

restraint_group {
 reference = chain A
 selection = chain B
 selection = chain C
 selection = chain D  }

The syntax for defining specific residues would be along the lines of:

selection = "chain A and (resseeq 20:50 or resseq 88:299)"

To adjust the weighting change the coordinate_sigma value, or the b_factor_weight value for each group, or alternatively change the global value located a couple lines higher in the file.

 

TLS restraints

To use TLS you have to also run some form of adp refinement so need to add add a * in front of tls and one of the adp options in the refine.strategy section. To manually set the TLS groups use something along the lines of:

tls = "chain A and (resseeq 20:50 or resseq 88:299)"
tls = "chain B"

under the adp section.

 

Other useful parameters

The "main" section has other useful parameters you may want to change such as:

high_resolution

low_resolution

number_of_macro_cycles (I normally use 4)

Scrolling to the top of the file you can also change the input and output files and also the symmetry and also the unit cell and symmetry parameters.

A list of other useful parameters can be found here.

Some other useful command line options include:

phenix.refine --help to get information about command line options.

phenix.refine --dry_run <pdb-file> <reflection-file(s)> to generate the .def file without running the refinement the refinement (useful the first time you run the program on a structure.

Errors

Phenix is fairly good at telling you how to fix problems if it falls over. Here are some common ones I have come across:

 

Back to Toolbox