ChimeraX docs icon

Command: define

The define command calculates and displays geometric objects based on atomic coordinates:

The objects are listed in the Axes/Planes/Centroids tool (which can also be used to define them) and can be used in distance and angle measurements. An axis or plane object can also be used to orient the view. See also: measure inertia, shape, cartoon style, 3D object formats, measurements, defattr (attribute assignment) files

define axis  atom-spec  [ perHelix true | false ] [ padding offset ] [ length  d ] [ primary  true | false ] [ secondary  true | false ] [ tertiary  true | false ] [ massWeighting  true | false ] general-options
define axis  fromPoint  point-spec  toPoint  point-spec  [ padding offset ] [ length  d ] general-options
define axis  plane-spec  [ padding offset ] [ length  d ]  general-options
Axes can be defined: Axes are displayed as cylindrical rods (surface models). The default length d is the minimum needed to span the projections of the specified atoms or points, or if the axis is defined from a plane object, equal to the plane's disk radius. An extra margin (padding, default 0.0 Å) can be added to both ends when the default length is used, but will be ignored if the length is specified. To produce a specified length, the center will stay the same, but the ends will be adjusted symmetrically.

Setting perHelix to true indicates defining an axis for each peptide/protein helix in the entire atomic model(s) containing the specified atoms, even if only parts were specified. Peptide/protein helix assignments are taken from the input structure file or generated with dssp. Only the backbone atoms N, CA, C are used to define the axes. Sometimes two helices are adjacent in sequence (not separated by any other residues), and the integer-valued residue attribute ss_id is automatically used to distinguish them. To force combining adjacent helices or breaking a longer helix into shorter ones, ss_id can be changed “manually” with setattr.

Eigenvectors/values are calculated from the coordinates of the set of atoms or points after subtracting the position of their collective centroid. Axes are anchored at the corresponding collective centroid and aligned with the first (if primary is true, default), second (secondary true), and/or third (tertiary true) eigenvector of the corresponding coordinates. If massWeighting is true (default false), the specification must contain either only “real” atoms or only markers (which could include centroid objects). The radius of a marker (Å) is used as its “mass.”

define centroid  atom-spec  [ massWeighting  true | false ] general-options
Define the centroid of the specified atoms with or without mass-weighting (default without). The centroid is added as a marker. The related command measure center can also calculate center of mass for density maps. To simply add a marker at a specified point, see the marker command.
define plane  atom-spec  [ thickness d ] [ padding offset ] general-options
Define a plane for the specified atoms. Eigenvectors/values are calculated from the atomic coordinates after subtracting the position of their non-mass-weighted centroid. The plane is anchored at the centroid and aligned with the first two eigenvectors (the third eigenvector is normal to the plane). The plane is added as a surface model shaped like a disk. The default thickness is 0.1 Å. The disk center is the non-mass-weighted centroid of the atoms; disk radius can be set to a fixed value as described below or set automatically to enclose the projections of the atoms (default). An extra margin (padding, default 0.0 Å) can be added to the automatically determined radius, but is ignored if a fixed radius is supplied.

General Options

color  color-spec
Object color (default the most prevalent color among the specified atoms, if at least 30% share that color, otherwise #909090
id  model-id
Model identifier (model number, as shown in the Model Panel) to use for the object, if possible. If the same command generates multiple models or the model-id is already “taken,” submodel numbers will be used. If model-id is not specified, the object will be made a submodel of the atomic model used to define it, or if defined from atoms in multiple models, assigned the lowest available top-level number. See also: rename
radius  r
Object radius in Å. Defaults:
name  name
Object model name (default centroid for a centroid, plane for a plane). A user-specified name for a centroid model is also assigned as its atom name. Default axis model names: See also: rename
showTool  true | false
Whether to show the Axes/Planes/Centroids tool, which lists the objects and allows modifying (name, color, etc.), deleting, or using them for measurements.

UCSF Resource for Biocomputing, Visualization, and Informatics / April 2024