ChimeraX docs icon

Command: clashes, contacts

clashes | contacts )  atom-spec1  [ restrict  cross | both | any |  atom-spec2 ] select  true | false ] [ reveal  true | false ] [ showDist  true | false ] [ color  color-spec ] [ radius  r ] [ name  name ]  other-options

~clashes | ~contacts ) [ name  name ]
– or –
clashes | contacts ) deletename  name ]

The clashes and contacts commands are the same except for their default interaction criteria, meant to identify:

The corresponding tools are Clashes and Contacts. See also: Select Contacts, hbonds, swapaa, distance, pbond, interfaces, crystalcontacts, crosslinks, altlocs, select by pseudobond length, ViewDockX, Rotamers, measurements, Protein-Ligand Binding Sites tutorial

The restrict option allows finding only interactions within the specified set of atoms (all atoms if atom-spec1 is blank) or between them and a second set.

By default, the clashes/contacts are shown as pseudobonds. The reveal true option can be used to display atoms as needed so that all of the clash/contact pseudobonds will be shown. The pseudobonds can be labeled by distance, and their color, radius, and number of dashes can be specified. Clashes/contacts can also be shown with selection, and detailed results written to the log and/or saved to a file.

The command ~clashes (same as clashes delete) or ~contacts (same as contacts delete) removes the indicated pseudobonds and halts any continuous monitoring. When multiple pseudobond models have the same name, specific models can be removed with the close command.

The overlap between two atoms is defined as the sum of their VDW radii minus the distance between them and minus an allowance for potentially hydrogen-bonded pairs:

overlapij = rVDWi + rVDWj – dijallowanceij

 command  overlapCutoff (Å) hbondAllowance (Å)
default usual range default usual range
clashes 0.6 0.4-1.0 0.4 0.2-0.6
contacts −0.4 0.0-(−1.0) 0.0 0.0

Normally, a clash or contact is identified based on the overlap cutoff, but the distanceOnly option allows using a center-to-center distance cutoff instead. Both measures are reported in the detailed results.


contacts protein restrict ligand reveal true
contacts delete
clashes #1 reveal t showdist t; label height 1


restrict  cross | both | any | atom-spec2
Limit the detection of clashes/contacts to one of the following:    See also options: ignoreHiddenModels, interSubmodel, interModel, intraModel, intraMol, intraRes, resSeparation, bondSeparation
overlapCutoff  cutoff
Pairs of atoms with overlapcutoff will be identified. A larger positive cutoff restricts the results to more severe clashes, whereas a negative cutoff can also identify favorable contacts. (default 0.6 Å for clashes and –0.4 Å for contacts; see above for suggested value ranges).
hbondAllowance  allowance
An allowance > 0 reflects the observation that atoms sharing a hydrogen bond can favorably approach each other more closely than would be expected from their VDW radii (default 0.4 Å for clashes and 0.0 Å for contacts; see above for suggested value ranges). In the calculation of overlap, the allowance is only subtracted for pairs comprised of a donor (or donor-borne hydrogen) and an acceptor. This is equivalent to using smaller radii to characterize hydrogen-bonding interactions (for example, see Li and Nussinov, Proteins 32:111 (1998)). Possible donor groups are hydrogen-bearing nitrogen, oxygen, and sulfur atoms, and possible acceptor groups are nitrogen, oxygen, and sulfur atoms with a lone pair.
distanceOnly  dist
Specifying this option indicates ignoring overlap and using center-to-center distance ≤ dist as the interaction criterion instead.
select  true | false
Whether to select the identified clash/contact atoms (and deselect all other atoms).
reveal  true | false
Whether to display all clash/contact atoms to ensure displaying the pseudobonds between them. (Hiding an atom also hides its bonds and pseudobonds.) To avoid showing disconnected atoms, the entire residue will be shown, except that amino acid and nucleic acid residues are split into sidechain and backbone moieties separately displayed by this option. Displayed backbone atoms may still be invisible where cartoon is shown, unless their simultaneous display has been enabled with cartoon suppress false.
makePseudobonds  true | false
Whether to create pseudobonds to show contacts/clashes. Pseudobonds are only displayed when both endpoint atoms are displayed, but the reveal option can be used to ensure showing all of the identified interactions.
showDist  true | false
Whether to label the pseudobonds with the corresponding distances. Label color, size, and font can be adjusted with the label command, which can also be used to add the labels later or to delete them. The distances (pseudobond lengths) can also be plotted as a histogram with crosslinks histogram.
color  color-spec
Color to use for the pseudobonds when makePseudobonds is true (default forest green
for contacts, medium orchid
for clashes); can be changed later with color.
radius  r
Radius in Å to use for the pseudobonds (default 0.075 for contacts, 0.15 for clashes); can be changed later with size.
dashes  N
Number of dashes to use for pseudobonds depicting interactions (default 6 for contacts, 4 for clashes). Only whole numbers are accepted, with 0 indicating solid sticks. Currently, odd numbers are rounded down to give an even number of dashes. The number of dashes can be changed later with style.
name  name
Name for the pseudobond model created to show interactions (default clashes or contacts, also the default name for deletion with ~clashes or ~contacts). Using a new name creates a separate model that can be hidden/shown/closed independently. Names containing spaces must be enclosed in quotation marks.
ignoreHiddenModels  true | false
Whether to ignore models that are hidden at the model level (e.g., with Model Panel show/hide checkbox unchecked).
interSubmodel  true | false
Whether to look for interactions between direct sibling submodels of the same model (those with identical model numbers at all levels except the last, finest level). For example, this setting would affect finding interactions between #1.2.1 and #1.2.2 but not between #1.2.1 and #1.3.1.
interModel  true | false
Whether to look for interactions between models.
intraModel  true | false
Whether to look for interactions within models.
intraMol true | false
Whether to include intramolecular interactions, where a molecule is defined as a covalently bonded set of atoms.
intraRes  true | false
Whether to include intraresidue interactions.
resSeparation  N
If given, only consider interactions between residues at least N apart in sequence.
bondSeparation  N
Interactions between atoms that are ≤ N bonds apart will be ignored (N=4 by default).
continuous  true | false
Whether to initiate continuous checking, which will continue until the specified atoms are removed, or ~clashes (~contacts) is used, or clashes (contacts) is used again without setting this option to true (since false is the default). Only moving a model relative to another will trigger a new check.
setAttrs  true | false
Whether to assign the largest overlap per atom as an attribute. Disallowed with continuous monitoring.
attrName  attr-name
Name for atom attribute (default overlap) assigned when setAttrs is true.
saveFile  file
Specify writing contact/clash information to a file (disallowed with continuous monitoring). The information includes atom specifications (see namingStyle), overlaps, and interatomic distances. File is the output file pathname, enclosed in quotation marks if it includes spaces, or the word browse to specify it interactively in a file browser window.
log  true | false
Whether to write information (as described above for saveFile) to the Log. Disallowed with continuous monitoring.
namingStyle  simple | command | serial
How to describe atoms in contact/clash information written to a file or the log: Model number will be included when multiple models are present. The Labels preference Balloon-help specifier style sets which is the default.
summary  true | false
Whether to write the total number of interactions found to the status line and Log. During continuous monitoring with summary true, summaries are continually sent to the status line, but only the initial and final summaries are reported in the Log.

UCSF Resource for Biocomputing, Visualization, and Informatics / November 2023