- Author:
- Matthew O'Meara and Steven Lewis
This page describes the resfile format, syntax, and conventions. The resfile contains information which is input into the PackerTask and controls the Packer. Internal details for the commands can be found at the
How to write new resfile commands residue-level options how-to.
There are new features compared to the resfile format in Rosetta++:
- Comments are allowed in arbitrary locations
- The content is not column-delimited, different pieces of information are separated by (arbitrary amounts of) whitespace
- The resfile no longer requires a specification for every residue in the protein; instead it requires
- a default, and
- individual lines only for those residues not obeying the default
- Residue-level rotamer level selection is now supported (possible to allow more rotamers for residue 28 than for residue 15)
- The interface is extensible so that other residue-level selections are supportable
The outline of a resfile is
Throughout, the resfile has the following convetions:
- The resfile is case-insensitive.
- Comments begin with the '#' symbol and continue to the end of the line.
- Tokens are white space delimited.
- The order in which the residues are specified in the body does not matter.
- The order in which the commands are specified does not matter.
- A warning is generated if no 'start' token is found, though no 'start' token is required
Specify in the <header> section the commands that should be applied to all residues by default if no other commands are specified in the body. NOTE: Commands in this section are not applied to any residue which has a line in the body section. As a consequence, if the header commands include "EX 1" and then residue 10 has the behavior "ALLAAxc" in the body, then residue 10 will NOT get EX 1 behavior. Command line flags (e.g. "-ex1") will apply to all residues and can be used when the user wants to quickly specify global behavior.
For example:
# These commands will be applied to all residue positions that lack a specified behavior in the body:
ALLAA # allow all amino acids
EX 1 EX 2 # allow extra chi rotameters at chi-id 1 and 2
USE_INPUT_SC # allow the use of the input side chain conformation ( see below for more detailed description of commands)
start
#... the body would continue here.
Specify in the <body> section residue level information to be sent to the packer. Each line should have the following format,
<res-id> <one or more commands>
The <res-id> should be of the form <PDB residue id[insertion code]> <chain>. If the pose you are working with does not have chain information put "_" in for the chain. Insertion code is (of course) optional, and should only be one character. For example
10 _ PIKAA W # Allow only Trp at residue 10 in the unlabeled chain
0 A NOTAA W # ERROR: residue 0 is not allowed!
40 B NC ZN # Allow zinc at residue 40 chain B
40A Q ALLAA # Residue 40, insertion code A, on chain Q, use any residue type
You can use resfiles with silent files, even though there's no PDB numbering or chain. Use raw residue numbering for the number field and count chains from A for the chains field.
Each command acts to restrict the allowed amino acids allowable at each position. If multiple commands are combined, only amino acids that are allowed by each command individually are included. This is a consequence of the commutativity property for operations on the PackerTask class.
- ALLAA ................ allow all 20 amino acids INCLUDING the cystein amino acid (same as ALLAAwc)
- ALLAAwc .............. allow all 20 amino acids ( default )
- ALLAAxc .............. allow all amino acids except cystein
- POLAR ................ allow only canonical polar amino acids
- APOLAR ............... allow only canonical non polar amino acids
- NOTAA <list of AAs> .. disallow only the specified amino acids ( use one letter codes )
- PIKAA <list of AAs> .. allow only the specified amino acids ( use one letter codes )
- NATAA ................ allow only the natural amino acid
- NATRO ................ preserve the input rotamer (do not pack at all)
- EMPTY ................ disallow all canonical amino acids ( for use with non canonicals )
- NC <ResidueTypeName> . allow the specific possibly non canonical residue type
NATROT #default command that applies to everything without a non-default setting; do not repack
begin
10 A POLAR # consider polar amino acids at position 10
11 A POLAR PIKAA ACDEFGH # allow mutations to those in the intersection of two sets:
# ........................ the polar amino acids and { ALA, CYS, ASP, GLU, PHE, GLY & HIS}
# ........................ the intersection set {ASP, GLU, HIS}
- NATRO ...................................... fix natural rotamer ( fix identity and conformation )
- EX (ARO) <chi-id> ( LEVEL <sample level> ) .. ( see below for detailed description
- EX_CUTOFF <num-neighbors> .................. about how to specify EX commands )
- USE_INPUT_SC ................................ include native rotamer
- AUTO ......... add the behavior 'AUTO'
- SCAN ......... add the behavior 'SCAN'
- NO_ADDUCTS .... disallow DNA adducts
- TARGET <AA> ... specify target amino acid ( use one letter codes )
This miscellaneous commands have meanings to particular protocols, but not to all.
The packer considers discrete sampling of sidechain conformations; it samples discretely from the Dunbrack rotamer library, and by default, samples only at the center of the rotamer wells. The "extra" flags below control the inclusion of additional discrete samples.
- The command "EX <chi-id>" specifies that a extra samples are to be considered for a particular chi angle ( only numbers 1-4 are allowed ) for BURIED residues (see EX_CUTOFF below). There are additional options that can be given for the EX command, but it is sufficient to state only "EX <chi-id>" and to mean "Consider additional rotamers for chi <chi-id> at +/- 1 standard deviation from the mean chi angle for each rotamer well for buried residues."
- The ARO flag can be included in the EX command, e.g. "EX ARO <chi-id >", thereby limiting the effect of the command to only aromatic amino acids (FHWY). For instance, if you would like to entertain extra rotamers at chi 1 for all residues and at chi 2 for only the aromatic residues, then the two commands together in the string "EX 1 EX ARO 2" state this. NOTE: Using "EX ARO <chi-id>" does not increase the number of rotamers for FHWY amino acids any more than simply using "EX <chi-id>"; both commands would state that additional rotamers should be sampled at +/- 1 standard deviation for buried residues. NOTE: the ARO flag can be combined with the LEVEL flag (below)
- The LEVEL <sample-level> flag can be included in the EX command specifies how many extra chi angles to sample for each allowed rotamer. The higher the sample-level given, the more rotamers the packer will build.
- 0 ...... no extra chi angles
- 1 ...... sample at 1 standard deviation
- 2 ...... sample at 1/2 standard deviation
- 3 ...... sample at two full standard deviations
- 4 ...... sample at two 1/2 standard deviations
- 5 ...... sample at four 1/2 standard deviations
- 6 ...... sample at three 1/3 standard deviations
- 7 ...... sample at six 1/4 standard deviations
- NOTE: When combining multiple EX levels for a single chi for a single amino acid, the maximum value is taken. This means that the level for PHE chi 1 when the commands "EX 1 LEVEL 4 EX ARO 1 LEVEL 3" will be 4 and not 3. When extra-chi flags are given without the ARO restriction, they apply to all residues, including aromatic residues.
- The EX_CUTOFF <num-neighbors> command specifies the number of neighbors (counting itself) each residue must have within a 10 Angstrom cutoff to be considered "buried" for the purpose of including extra rotamers. Rosetta will not include extra rotamers for surface positions unless explicitly directed to do so (by setting the EX_CUTOFF to a small value >= 1). The EX_CUTOFF command in the resfile allows per-position control over where extra rotamers should be considered; the command-line option -extrachi_cutoff <num-neighbors> can be used to apply the same cutoff to all residues.
Here are some examples:
10 B EX 1 EX 2
9 B EX 3 # WARNING: probably want to include EX 1 and EX 2 if EX 3 is specified!
8 B EX ARO 2
7 B EX ARO 3 # ERROR: ARO only works for chi ids 1 and 2
6 B EX 1 LEVEL 7
13 B EX 1 EX ARO 1 LEVEL 4 # include extra rotamers at chi 1 for all amino acids,
# but use sample level 4 for the aromatic amino acids
This resfile will provide packability at most locations, fixed rotamers at a few, and designability at a few. Note the liberal use of comments for clarity. NOTAA C is equivalent to ALLAAxc.
NATAA # this default command applies to all residues that are not given non-default commands
start
#anchor
81 B NATAA #anchor
82 B NATAA #anchor
83 B NATRO #anchor
84 B NATRO #anchor
85 B NATRO #anchor
86 B NATRO #anchor
#loops
#133 B NOTAA C #loop
134 B NOTAA C #loop
135 B NOTAA C #loop
136 B NOTAA C #loop
137 B NOTAA C #loop
138 B NOTAA C #loop
139 B NOTAA C #loop
140 B NOTAA C #loop
141 B NOTAA C #loop
142 B NOTAA C #loop
#143 B NOTAA C #loop
#144 B NOTAA C #loop
#145 B NOTAA C #loop
#77 B NOTAA C #loop
#78 B NOTAA C #loop
#79 B NOTAA C #loop
80 B NOTAA C #loop
#ANCHOR
87 B NOTAA C #loop
88 B NOTAA C #loop
#89 B NOTAA C #loop