ChimeraX docs icon

Command: swapaa

swapaa  residue-spec  new-type  options

swapaa mousemode  residue-spec  new-type

The swapaa command performs a virtual mutation by replacing one type of amino acid sidechain with another. A residue can be changed to a different sidechain conformation (rotamer) of the same type of amino acid or mutated into a different type; backbone atoms are not replaced. The new-type can be the three-letter code for any of the 20 standard amino acids (with or without capitalization), and one or more protein residues to change to that type can be specified in a single command. See also: torsion

The command swapaa mousemode simply matches a single conformation of the new residue type onto the backbone atoms of the existing residue. The swapaa mouse mode uses this “quick and dirty” method.

The main swapaa command uses a rotamer library and several criteria for choosing the best rotamer: lowest clash score, most H-bonds, best fit to an electron density map, and/or highest probability according to the library. Bond lengths and angles are taken from the Amber parameter files all*94.lib, and hydrogens are not included.

Although sidechains at multiple positions can be replaced simultaneously, swapaa is not recommended for predicting the conformations of multiple sidechains in an interacting cluster. Programs such as SCWRL are more appropriate for that purpose.


The following options can be used with the main swapaa command. They do not apply to the simpler swapaa mousemode method.

lib  rotamer-library
What rotamer library to use; the source of rotamer torsion angles and probabilities. Possible values of rotamer-library (capitalization optional):
criteria  method | N
How to choose the rotamer. The preserve option can be used to filter the set of rotamers by chi angle similarity to the current sidechain before the method is applied. The method can be any combination, without spaces, of one or more of the following letters (default dchp):

Each successive method is only used when the previous method(s) have produced a tie. For example, with the default criteria but no map open, clashes will be evaluated; if the clash scoring method is num and more than one rotamer ties for the lowest number of clashes, H-bonds will be evaluated to break the tie; if the lowest-clashing rotamers also have equal numbers of H-bonds, the one with the highest probability will be used.

Only the sidechain atoms of a rotamer are evaluated. For clash and H-bond detection, interactions with other rotamers in the same set and the current residue at that position are disregarded, but all other atoms in the vicinity will be included unless ignoreOtherModels is used. In addition, atoms in the same model that are unwanted for such calculations (for example, solvent) should be deleted beforehand.

Alternatively, an integer N can be given instead of the method. This indicates ignoring all criteria other than probability and choosing the rotamer with the Nth highest probability. Specifying N as 0 (zero) indicates the rotamer with the lowest probability.

preserve  angle
Whether to discard rotamers (regardless of the criteria) with any chi angle > angle° different from that in the current sidechain. If the current sidechain has symmetrical branching (as in Asp, Glu, Phe, Tyr), the chi angle for comparison is calculated in both possible ways.
retain  true | false
What to do with the pre-existing sidechain(s): retain or replace (default). Regardless of this setting, sidechains will always be replaced where the incoming residue type is glycine or alanine. When there will be multiple sidechains at a given residue position, the new sidechain(s) will be assigned different alternative location identifiers.
bfactor   value
Specify a bfactor value for the new sidechain atoms; if this option is not used, the atoms will be assigned the highest bfactor value found in the residue before the swap.
log  true | false
Whether to report torsion angles in the Log. Values are reported for the backbone (phi, psi, and whether the peptide bond is cis or trans) and the chosen sidechain rotamer (chi angles) for each swapped residue. Pre-swap chi angles are also reported when the preserve option is used.
ignoreOtherModels  true | false
In clash and H-bond detection, whether to include only atoms in the same model as the residue being swapped; useful for preventing superimposed related proteins or additional copies of the starting structure from affecting the results.
Density parameters:
density  map-model
Specify a map (volume data) to use for the density criterion.
Clash parameters:
overlapCutoff  cutoff
The cutoff is how much VDW overlap should count as a clash (default 0.6 Å). A larger positive cutoff restricts the results to more severe clashes (details).
hbondAllowance  allowance
When VDW overlap is calculated, an allowance (default 0.4 Å) is subtracted for atom pairs comprised of a possible hydrogen bond donor (or its hydrogen) and a possible acceptor (details).
scoreMethod  sum | num
How to calculate the clash score: as a simple count of the number of clashes (num) or a sum of all overlaps ≥ cutoff (sum).
H-bond parameters:
relax  true | false
Whether to relax the precise criteria for hydrogen bonding.
distSlop  tolerance
The tolerance is how much to relax the distance criteria if relax is true (default 0.4 Å).
angleSlop  tolerance
The tolerance is how much to relax the angle criteria if relax is true (default 20.0°).

UCSF Resource for Biocomputing, Visualization, and Informatics / September 2019