ChimeraX docs icon

Command: swapaa

swapaa  residue-spec  new-typerotLib  rotamer-library ] [ criteria  method | N ]  other-options

swapaa interactive  residue-spec  new-typerotLib  rotamer-library ] [ log  true | false ]

swapaa mousemode  residue-spec  new-type

The main 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. 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. See also: modeller comparative, alphafold, torsion, hbonds, clashes, build, altlocs

The swapaa interactive command or the related Rotamers tool can be used to show the entire “bouquet” of rotamers at a position (with an associated rotamer list dialog) so that they can be inspected and chosen interactively.

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.

One or more protein residues to change can be specified in a single command, and the new-type can be the three-letter code for any of the 20 standard amino acids, with or without capitalization. Except for swapaa mousemode, new-type may also be given as:

The main swapaa command uses several criteria to choose the best rotamer for a given type and position: lowest clash score, most H-bonds, best agreement with a density map, and/or highest prevalence according to the library. Bond lengths and angles are taken from the Amber parameter files all*94.lib, and hydrogens are not included.


The following options apply to the main swapaa command. The swapaa interactive command to show rotamers without swapping only uses the rotLib and log options, and swapaa mousemode does not have any options.

rotLib  rotamer-library
What rotamer library to use; the source of rotamer torsion angles and prevalence values. 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 prevalence 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 nearby atoms will be included (at least those in the same model; see ignoreOtherModels). 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 prevalence and choosing the rotamer with the Nth highest prevalence. Specifying N as 0 (zero) indicates the rotamer with the lowest prevalence.

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). Retention (setting retain true) can only be used when the incoming residue type is the same as the pre-existing type, i.e., the residue is not being “mutated.” Further, the option is ignored/irrelevant if the residue type is alanine or glycine. When the result 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 the rotamer library and various torsion angle values in the Log. Torsion angle values are given 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. In the case of swapaa interactive, only the backbone angles are reported, since no swap has yet occurred when the rotamer list dialog is shown.
ignoreOtherModels  true | false
In clash and H-bond detection, whether to ignore atoms that are not 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 / April 2022