The **shape** command creates a surface model of the specified shape.
See also:
**volume mask**,
**marker fromMesh**,
**cartoon**,
**define**,
**Marker Placement**,
3D object formats,
surface operations

The *shape* can be:

**sphere****ellipsoid****cylinder****cone****icosahedron****triangle****rectangle****ribbon**– a ribbon of rectangular cross-section connecting a series of atoms or markers**tube**– a tube connecting a series of atoms or markers**boxPath**– zigzag “beams” connecting a series of atoms or markers

The default•radiusris1.0in units of physical distance (typically Å).

The default•radiusris1.0along each axis. If a single value is specified, the result is a sphere. Specifying three values (rx,ry,rz) sets ellipsoid radii along the X, Y, and Z axes, respectively. See also:measure inertia

The default•radiusrandheighthare both1.0. The default orientation is with the axis of symmetry (heightdimension) along the Z axis. Thecapsoption indicates whether to cap the cylinder or leave it open-ended. Some options are mutually exclusive:

- the orientation can be given with the
axisoption instead of rotation values (in general options)- the endpoints can be specified directly with
fromPointandtoPointinstead of with height, center, and rotation values

The default•radiusrbaseandheighthare both1.0. The default orientation is with the axis of symmetry (heightdimension) along the Z axis and top towards +Z. ThetopRadiusrtopdefaults to0.0, giving a pointed cone, but values > 0 can be used to produce a truncated cone. Thecapsoption indicates whether to cap the end(s) of the cone or leave them open. Some options are mutually exclusive:

- the orientation can be given with the
axisoption instead of rotation values (in general options)- the endpoints can be specified directly with
fromPoint(base) andtoPoint(tip) instead of with height, center, and rotation values

The•radiusris the distance from the center to a 5-fold vertex (default1.0). Theorientationtypecan be:The

222(default) – with two-fold symmetry axes along the X, Y, and Z axes- 2n5 – with two-fold symmetry along X and 5-fold along Z
- n25 – with two-fold symmetry along Y and 5-fold along Z
- 2n3 – with two-fold symmetry along X and 3-fold along Z
- 222r – same as 222 except rotated 90° about Z
- 2n5r – same as 2n5 except rotated 180° about Y
- n25r – same as n25 except rotated 180° about X
- 2n3r – same as 2n3 except rotated 180° about Y
sphereFactoroption allows generating a shape that is an interpolation between an icosahedron and a sphere of equal radius. The factorfis the weight of the sphere component in the interpolation and can range from0.0(default, icosahedron) to 1.0 (sphere). The interpolation only affects vertex positions and will not generate curved mesh lines or curved surface triangles. Thelatticeoption allows showing the icosahedron surface with hexagons and pentagons instead of triangles. A shape with icosahedral symmetry (like many virus capsids) can be idealized as a sheet of hexagons in which curvature is introduced by replacing certain hexagons with pentagons, as in a geodesic dome. The pentagons occupy the points of the icosahedron, while the indiceshandkrefer to the number and arrangement of hexagons in each face (details...). Hexagons are bent where they cross from one triangular face to another. The indiceshandkcan each be zero (but not both zero) or a positive integer. Surface generation can be slow if large values are used. See also:hkcage,Cage Builder

The vertices of the triangle can be supplied as a specification of three atoms or with three separate uses of the•pointoption. If neither of those are used, an equilateral triangle of side length 1 will be created.

^{*}The general optionscenter,rotation,qrotation, andcoordinateSystemdo not apply if theatomsoption is used.

The•widthwandheighthare the X and Y dimensions of the rectangle (both default to1.0). The number of surface points in the rectangle along the X dimension will equal 1 +dwand along the Y dimension will equal 1 +dh. Both thewidthDivisionsdwandheightDivisionsdhdefault to10, and these settings override thedivisionsgeneral option.

A•ribbonis a smooth path with rectangular cross-section connecting a series of atoms or markers. The defaultwidthwandheighthof the cross-section are1.0and0.1, respectively. Theyaxisandtwistoptions control ribbon orientation and how it varies along the path. If neither is specified, the ribbon normal varies along the path so that there is no local twist. Theyaxisvector (default none) is specified as three numbers separated by commas only, and is interpreted in the coordinate system of the model containing the first atom in the path. If the vector is specified, the ribbon normal is aligned with it as closely as possible within the constraints of the path. A constanttwistanglet(default0°) is applied at each point along the path.The

segmentSubdivisionssetting controls how many straight segments are used to form the curve between a consecutive pair of atoms; higher values give smoother curves. The number of straight segments forming the curve between a pair of atoms will equaldivisions+ 1 (default10+ 1 = 11). ThebandLengthoption specifies whatlengthof ribbon centered on an atom should be colored to match that atom (default0.0). ThefollowBondsoption indicates whether the ribbon should follow the directions of the bonds connecting the atoms; the option should be set to false for atoms that are not bonded.

^{*}The general optionscenter,rotation,qrotation,coordinateSystem, andslabdo not apply toribbonshapes.

A•tubeis a smooth path with circular cross-section connecting a series of atoms or markers. The defaultradiusris1.0. ThesegmentSubdivisionssetting controls how many straight segments are used to form the curve between a consecutive pair of atoms; higher values give smoother curves. The number of straight segments forming the curve between a pair of atoms will equaldivisions+ 1 (default10+ 1 = 11). ThebandLengthoption specifies whatlengthof tube centered on an atom should be colored to match that atom (default0.0). ThefollowBondsoption indicates whether the tube should follow the directions of the bonds connecting the atoms; the option should be set to false for atoms that are not bonded.

^{*}The general optionscenter,rotation,qrotation,coordinateSystem, andslabdo not apply totubeshapes.

AboxPathis a 3D zigzag of “beam” segments connecting a series of atoms or markers. The beam has a square cross-section ofwidthw(default1.0), and thetwistt(default0.0°) sets the rotational orientation of the segments about their long axes. To make a physical replica of the boxpath (see the sculpture at DePauw), the segments could be generated by angled cuts along a single straight beam. SettingreportCutstotruegives the locations of such cuts along the four edges of a hypothetical beam; thecutScales(default1.0) is a factor for converting these distances from Å to the appropriate physical units.

^{*}The general optionscenter,rotation,qrotation,coordinateSystem,divisions, andslabdo not apply toboxPathshapes.

centerpoint-spec

Thecenterlocation of the shape (default0,0,0).

rotationax,ay,az,angle

Rotate the shapeangledegrees around the specified axis (ax,ay,az). The default is no rotation.

qrotationqx,qy,qz,qw

Apply the rotation specified as a quaternion. The default is no rotation.

coordinateSystemmodel-number

Specify a coordinate system for the shape surface model (default is its own coordinate system, but a different reference model can be specified). A model's coordinate system defines the X, Y, and Z directions and the position of the origin, and is generally aligned with the scene coordinates unless the model has been moved separately.

colorcolor-spec

Specify the color of the surface (default#bebebe).

namemodel-name

Specify a name for the surface model. If no name is specified, a generic shape name will be used (for example, “sphere”).

modelIdmodel-number

Specify an ID number for the surface model. The default is the lowest unused number. If the specified model already exists, it will be replaced.

divisionsd

Set the fineness of surface triangulation;dis the number of square mesh cells around the circumference (default72). The number of triangles around the circumference is roughly 2-4 times higher, depending on the shape and on the value ofd. This setting does not apply to anicosahedronwithlatticespecified, as it will be shown with the indicated numbers of hexagons and pentagons rather than with triangles.

meshtrue | false

Whether to display the surface as a mesh or as a solid surface. The default isfalseexcept for anicosahedronwithlatticespecified.

slabwidth|d1,d2

Theslaboption indicates that a shell or slab of finite thickness should be created instead of a single layer of surface. If a single value (width) is supplied, the inner and outer layers of the slab will be offset from the nominal radiusrby ±½(width). Alternatively, two values separated by a comma but no spaces can be used to specify the offsets of the two layers independently. Offsets can be positive (outward) or negative (inward).

UCSF Resource for Biocomputing, Visualization, and Informatics / August 2020