The **vop** command edits
volume data
to create a new volume data set.
The original map is undisplayed and the new map
is displayed with the same threshold and color as the original.
Map display can be adjusted
and the map saved to a file using
**Volume Viewer**
or the command **volume**.
See also: **mask**,
**sop**,
**Volume
Filter**,
**Volume
Eraser**,
**Segment Map**

Examples:

vop add #1-25 onGrid #0

vop add #1,2,5 onGrid #5 inPlace true

vop add #1,2 boundingGrid false

vop gaussian #3 sd 5

vop subtract #2 #4 modelId #5

vop unbend #0 #1 z 200 200

**add**- add two or more maps**bin**- reduce data size by averaging over cells of multiple grid points**boxes**- extract cubic regions centered on markers**cover**- extend map to cover specified atoms or box**falloff**- smooth the boundaries of masked density**flatten**- scale values to flatten map baseline**fourier**- Fourier transform**gaussian**- Gaussian smoothing or sharpening**laplacian**- Laplacian filtering**localCorrelation**- calculate map-map correlation over a sliding box**maximum**- take the maximum values pointwise from two or more maps**median**- set each value to the median of values in a surrounding box**minimum**- take the minimum values pointwise from two or more maps**morph**- morph (interpolate) between two or more maps**multiply**- multiply values in two or more maps**new**- create empty (zero-valued) map**~octant**- erase positive octant**octant**- erase all but the positive octant**permuteAxes**- permute axes**resample**- resample on the grid of another map**ridges**- skeletonize; emphasize ridges or filaments in the density**scale**- scale, shift, normalize, and/or cast to a different data value type**subtract**- subtract another map from the first**threshold**- reassign values that are below a specified minimum and/or above a specified maximum**tile**- make a single-plane volume from tiled slices of another volume**unbend**- unbend a map near a path formed by markers/links or atoms/bonds**unroll**- unroll a cylindrical slab into a flat slab**zFlip**- reverse order of Z planes**zone**- zero the values at grid points within or beyond a cutoff distance from specified atoms

•
**vop add** *volume-spec*
[ **scaleFactors** *f1,f2,...* ]
[ **onGrid** *gridmap* ]
[ **boundingGrid** true|false ]
[ **gridStep** *N* | *Nx,Ny,Nz* ]
[ **gridSubregion** *name* | *i1,j1,k1,i2,j2,k2* | **all** ]
[ **valueType** *value-type* ]
*general-options*

Add two or more maps to create a new map. Option keywords are the same as for•vop minimum,vop maximum, andvop multiply:The

scaleFactorskeyword specifies a multiplier for each map (default1.0); as many values as input maps must be supplied, separated by commas but not spaces.The new map can be created on the grid of another map specified with

onGrid, wheregridmapis a model number preceded by #. Ifgridmapis not specified, it defaults to the first involume-spec(the first of the maps being added). The input maps are resampled on the grid by trilinear interpolation, and the resulting values summed for each grid point. Note resampling causes some loss in resolution (details...). Further options related togridmap:The

boundingGrid- whether to adjust (extend or shrink) the grid ofgridmapto bound the input maps (defaulttruewhen adding maps without specifying agridmap, otherwisefalse)gridStep- whether to use the full resolution ofgridmap(step size1, default) or a specified subsample (step size > 1). Step sizes must be integers. If a single number is supplied, it is used along all three axes; if three numbers are supplied (separated by commas but not spaces), they are used along the X, Y, and Z axes, respectively.gridSubregion- whether to use the full extents ofgridmap(all, default) or a specified subregion. A subregion can be specified by:

namepreviously assigned withvolume(seenameRegion) orVolume Viewer(seeNamed regions)- grid indices
i1–i2along the X axis,j1–j2along the Y axis, andk1–k2along the Z axis. Grid indices must be integers separated by commas but not spaces.value-typedefaults to the current type of theonGridmap (if any), otherwise the first involume-spec, and can be 8-, 16-, or 32-bit signed integer (int8,int16, orint32), 8-, 16-, or 32-bit unsigned integer (uint8,uint16, oruint32), or 32- or 64-bit floating-point (float32orfloat64).If the new map is large, for example a whole tomogram, the command may fail for lack of memory. The whole new map must fit in memory.

Average over cells of multiple grid points in the original map to produce a smaller map. Supplying a single integer N (default•2) indicates partitioning the map into bins of NxNxN grid points and averaging the N^{3}values per bin to produce a new map with 1/N as many points in each dimension. Cells with different numbers of grid points in each dimension can be specified by supplying three integersNseparated by commas only._{x},N_{y},N_{z}See also:

segment

For each marker or atom in•atom-spec, extract a surrounding cube of data. The edge length of each cube can be specified in physical units of length withsizeor in grid units withisize. IfuseMarkerSizeis true, the diameter of its central marker or atom is used as the edge length or added to thesizevalue if also given (defaultd=0.0). Theisizeoption facilitates getting the same-sized cubes for each marker, except where a marker is too close to the edge of the density map to obtain a cube of the requested size. Ifsizeis used instead, rounding may yield edges that differ slightly in grid dimensions.

Extend a map to cover specified atoms or to fill a rectangular box, using map symmetries and periodicity. The output dimensions can be specified as:•Unspecified dimensions will be kept the same as the input map. The output grid will have the same spacing and alignment as the grid of the input map. The

atomBoxspanning the specified atoms plus any extrapadin each dimension (dis in units of physical distance, default5.0)boxor just individual dimensionsx,y, and/orzin the X,Y,Z coordinate system of the input mapfboxor just individual dimensionsfxetc.in fractional coordinates where 0.0-1.0 spans each dimension of the input mapiboxor just individual dimensionsixetc.in grid indices of the input map. The input map's grid indices start at 0.cellSizeoption specifies unit cell dimensions in grid units along the X, Y, and Z axes. The default unit cell dimensions correspond to the full size of the map, or for CCP4 and MRC maps, are taken from the header. TheuseSymmetryoption indicates whether to use any symmetries associated with the map (defaulttrue); if false, only unit cell periodicity will be used. Map symmetries are read from the CCP4 or MRC file header, or can be assigned manually with thesymmetryoption ofvolumeor automatically withmeasure symmetry.Values from symmetry copies are determined by trilinear interpolation (with potential loss in resolution, see details). Where symmetries and periodicity give multiple copies of the input map overlapping a grid point, the average value will be assigned. The maximum difference between values from different copies at a grid point will be reported in the

Reply Log. If there are grid points not covered by symmetry or unit cell periodicity, a message will be sent to theReply Logand status line, and the points will be assigned values of 0.0. To ensure complete coverage by symmetry copies, the asymmetric unit of the map should extend far enough that its symmetry copies overlap by a non-zero amount. For example, if the unit cell is 100 grid points wide and there is two-fold symmetry along the X axis, the asymmetric unit would need to contain at least 52 grid points along the X axis. If it contains only 50, the two symmetric copies will not overlap, and values in the space between the copies cannnot be determined because the current code cannot interpolate between different copies of the map. If it contains 51, the two copies will have a single plane of grid points in common. Although that would be sufficient with exact arithmetic, the copies still might not overlap given the rounding errors inherent in computer calculations.

Smooth the boundaries of a masked map by replacing the value at each grid point outside the boundary with the average of the values of its six nearest neighbors, for•Miterations (default10). All grid points with values of zero before the first iteration are taken to be outside the boundary, thus assigned a new value at each iteration. Thanks to Greg Pintilie for the initial implementation.

If the•methodismultiply, scale data values by factor (a*i + b*j + c*k + d) where i,j,k are the grid indices and a,b,c,d are calculated to zero out the first moments of the resulting map (make its mass balance at the center of the grid). If themethodisdivide, data values are divided by the factor (a*i + b*j + c*k + d), which is a least-squares fit to the map data values. For both methods, the a,b,c,d coefficients are scaled to make (a*i + b*j +c*k + d) equal to 1 at the center of the map. If afitregionis specified, the calculation of the a,b,c,d coefficients uses only the data values in the specified region, while the scaling operation applies to the entire map or the part specified by thesubregiongeneral option. Thefitregioncan be the full extents of the data (all, default) or a subregion specified by:

namepreviously assigned withvolume(seenameRegion) orVolume Viewer(seeNamed regions)- grid indices
i1–i2along the X axis,j1–j2along the Y axis, andk1–k2along the Z axis. Grid indices must be integers separated by commas but not spaces.

Calculate the 3D Fourier transform. If•phaseis false (default), generate a magnitude map; ifphaseis true, generate a map of phase values (–π to π) instead.

Perform Gaussian filtering, where•σis one standard deviation of the 3D Gaussian function in physical units such as Å (default1.0). Different standard deviations along X,Y,Z can be specified as three values separated by commas only. Gaussian filtering (invert false, default) attenuates high frequencies to smooth the map. Usinginvert trueinstead amplifies the high frequencies to sharpen the map. Sharpening withσvalues smaller than the pixel size is most useful; larger values overemphasize high frequencies, in effect amplifying noise. Thevalue-typedefaults to the current type and can be 8-, 16-, or 32-bit signed integer (int8,int16, orint32), 8-, 16-, or 32-bit unsigned integer (uint8,uint16, oruint32), or 32- or 64-bit floating-point (float32orfloat64).

Perform Laplacian filtering.•

Calculate the correlation between two maps over a sliding box of NxNxN grid points, generating a new map by assigning the correlation value to the box center. The sliding box is based on the grid of the first map, and•N=5grid units by default. If the grids of the two input maps do not coincide, the values of the second map will be interpolated. ThesubtractMeanoption specifies subtracting the mean of the values in the window from each value in the window before calculating the correlation. The output map will beN–1 smaller in each dimension than the first map. It will be opened as model numberM, or if not specified, the lowest unused model number.

Set each value to the maximum at that point in two or more input maps. See•vop addfor descriptions of the options.

Smooth the data by setting each value to the median of the values in a box centered at that point. Values at points for which the surrounding box extends outside the data are simply set to zero. Box dimensions are specified in grid units with•binSizeand must be odd integers. Supplying a single integer N (default3) indicates a box size of NxNxN grid points. Boxes with different numbers of grid points in each dimension can be specified by supplying three integersNseparated by commas only. The_{x},N_{y},N_{z}iterationsoption indicates how many cycles of smoothing to perform (default1).

Set each value to the minimum at that point in two or more input maps. See•vop addfor descriptions of the options.

Morph between two or more maps (this is the command-line implementation of•Morph Map, except that more than two maps can be handled). For a reasonable result, the input maps should have the same grids: dimensions, spacing, and numbers of points. Notevop resamplecan be used to make a copy of one map that has the same grid as another. A morphing fraction of 0.0 corresponds to the first map and a fraction of 1.0 corresponds to the last, with intermediate maps evenly spaced within that range. There is smooth interpolation between each adjacent pair of maps. See the video mini-example.The morph display will proceed from

start-fraction(default0.0) in steps ofincrement(default0.04) forNframes(default25). By default (playDirection 1), the initial direction of play is from low to high fractions. If the number of frames and step increment are more than needed to reach theplayRangebounds (default is the entire range:0.0,1.0), the morph display will “bounce” back and forth. ThescaleFactorskeyword specifies a multiplier for each map (default1.0); as many values as input maps must be supplied. TheconstantVolumeoption specifies adjusting the threshold (contour level) automatically to keep the enclosed volume constant. TheaddModeoption specifies treating the second map as a delta to be added to the first instead of linearly interpolating between the two. It is not recommended for inputs of >2 maps. ThehideOriginalMapsoption specifies hiding the input maps. TheinterpolateColorsoption only applies when the maps have the same number of coloring thresholds (contour levels for surface/mesh display, coloring control nodes for solid display).The morph is created as a new map (volume) model. However, if the

modelIdof an existing morph map is given, the new calculation will reuse the memory already allocated to that map, and the size of the input maps must match that of the existing map. Thevop morphsettings are not retained, however, and must be specified anew in the command.See also:

morph,vseries, movie-related commands, the ParM filament tutorial at the Chimera web site

Multiply the values pointwise in two or more maps. This is used to apply a mask (values 0,1) to a map. See•vop addfor descriptions of the options.

Create an “empty” zero-valued map named•map-namewith the specifiedsize(number of grid points along each axis, default100),gridSpacingin physical distance units (default1.0along each axis),origincoordinates (default0.0,0.0,0.0), andcellAngles(default90,90,90°). Grid size and spacing can each be given as a single value to apply to all three axes or as three values separated by commas only. Ifmap-nameincludes spaces, it must be enclosed in quotation marks. Thevalue-typedefaults tofloat32and can be 8-, 16-, or 32-bit signed integer (int8,int16, orint32), 8-, 16-, or 32-bit unsigned integer (uint8,uint16, oruint32), or 32- or 64-bit floating-point (float32orfloat64). ThemodelIdoption assigns model numberNto the new map; the default is the lowest unused model number.

Erase values inside the positive octant (all grid points with X,Y,Z coordinates greater than the center). The center can be specified in physical units (such as Å) with•centeror in grid units withiCenter. The default is the center of the volume data box. The coordinates should be separated by commas but not spaces, and the values can be fractional.iCenteroverridescenterif both are given. The values in the erased regions will be set tovalue(default0). A different value may improve contour surface appearance; for example, large negative values produce flatter surfaces where an octant has been cut away from a map of positive values.

Erase values outside the positive octant. Options are as described for•vop ~octantabove.

Permute grid axes to the specified•order, which can be any of the 6 ordered combinations ofx,y, andz. The original order isxyz.

Resample values on the grid of another map specified with•onGrid, wheregridmapis a model number preceded by #. Values on the grid are obtained by trilinear interpolation of the input map. The other arguments are as described above forvop add. Note resampling causes some loss in resolution (details...).

Skeletonize map(s) by tracing along high-density grid points to identify ridges or filamentous structures in the density. At each grid point, the value is compared to the values of all the points in the surrounding 3x3x3 box, and the count of how many directions (up to 13) along which the value is a local maximum is assigned as that point's value in the new map. The•levelkeyword indicates aminimumvalue in the original map below which to automatically set the new value to 0, essentially ignoring those points in the skeletonization. The defaultminimumis the lowest display threshold (contour level) in the original map. Viewing the new skeleton map with a threshold of 6-10 highlights ridgelike features in the original map.See also:

Volume Tracer

Shift values by adding a•constant(default0.0), scale values by a multiplicative factorf(default1.0), and/or cast them to a different data value type. When values are both shifted and scaled, the shift is applied first. Two normalization options calculate a scaling factor from the data:If a

rms- scale values to makenew-rms= ((∑x^{2})/N)^{½}wherexis each value and N is the total number of valuessd- first shift values so that the mean is 0.0, then scale values to makenew-std-dev= ((∑x^{2})/N)^{½}factorfis also specified, it is applied last. Thevalue-typedefaults to the current type and can be 8-, 16-, or 32-bit signed integer (int8,int16, orint32), 8-, 16-, or 32-bit unsigned integer (uint8,uint16, oruint32), or 32- or 64-bit floating-point (float32orfloat64).See also:

measure mapStats

Subtract the values of•othermapfrommap, both specified by model number preceded by #. ThescaleFactorskeyword specifies multipliersf1andf2formapandothermap, respectively; two values must be supplied, separated by a comma but not spaces. Alternatively, theminRMSoption can be used to scaleothermapautomatically to minimize the root-mean-square sum of the resulting (subtracted) values at grid points within the lowest contour ofothermap.The new map can be created on the grid of another map specified with

onGrid, wheregridmapis a model number preceded by #. Ifgridmapis not specified, it defaults tomap. The input maps are resampled on the grid by trilinear interpolation, and the resulting values subtracted for each grid point. Note resampling causes some loss in resolution (details...).The remaining arguments are as described above for

vop add, except thatboundingGridalways defaults tofalse. When subtraction from an unsigned-integer map could give negative numbers, thevalueTypeoption should be used to specify a signed data type for the result.

Replace all values that are below a•mininumvalue (min) withnewmin(default equal tomin), and/or replace all values that are above amaximumvalue (max) withnewmax(default equal tomax).

Create a single-plane volume by tiling slices of a specified volume perpendicular to the specified•axis(defaultz). The spacing of slices (default1grid unit) is given with thepstepkeyword. Thetrimkeyword indicates each slice should be trimmed on all four edges byigrid units (default0). The slices are arranged into a single plane with number ofrowsrand number ofcolumnsc. If neither the number of rows nor the number of columns is supplied, they are computed to produce as near a square tiling as possible. If one or the other is supplied, the remaining parameter is adjusted to accommodate the total number of slices. ThefillOrdersetting (defaultulh) specifies the tiling pattern, including the starting corner, the tiling direction (horizontal or vertical), and whether to reverse the order of slices. The first two characters specify the corner for the first tile, the first character beingufor upper orlfor lower and the second beinglfor left orrfor right. These directions are defined with the specified axis pointing at the viewer and the remaining two axes pointing up and right. The third character ishfor horizontal tiling orvfor vertical tiling. The optional fourth characterrindicates that the order of the slices should be reversed. The resulting volume data set has the same origin and orientation of axes as the original volume, and grid size 1 along the specified axis.See also:

segment sliceimage,topography,tile

Unbend a map near a path formed by markers/links or equivalently, atoms/bonds. The•path-specshould be anatom-specthat specifies a single chain of atoms (markers) connected by bonds (links). The path will be mapped to the Z axis of the result. Thenew-yparameter defines what axis in the existing volume will be mapped to the Y axis of the result, and can be given as:The

x- X-axisy- Y-axisz- Z-axisx,y,z(three values separated by commas only) - an arbitrary vector- an
atom-specof exactly two atoms (not necessarily bonded or in the same model) or one bond. A bond can only be specified by selecting it and using the wordselected,sel, orpicked; any atoms also selected at the time will be ignored.xsizeandysizeparameters give the X and Y dimensions of the new map in physical units (typically Å). ThegridSpacingsis the separation between grid points in the new map (default is the minimum spacing along the three axes of the input map). A cubic spline is placed through the path points and the input volume is interpolated on planes perpendicular to the splined path.See also:

segment sliceimage

Unroll a hollow cylindrical section of the map into a flat slab. The cylinder•axiscan be given as:Cylinder

x- X-axisy- Y-axisz(default) - Z-axisx,y,z(three values separated by commas only) - an arbitrary vector- an
atom-specof exactly two atoms (not necessarily bonded or in the same model) or one bond. A bond can only be specified by selecting it and using the wordselected,sel, orpicked; any atoms also selected at the time will be ignored.axisandcenter(default0,0,0) coordinates are interpreted in the coordinate system of the input map, unless another reference model is specified withcoordinateSystem. The dimensions of the cylindrical slab are given in physical units of length, typically Å:lengthd(default is the map extent parallel to the cylinder axis) and inner and outer radiir1andr2(defaults are 90% of the smallest radius and 110% of the largest radius of the displayed isosurface, respectively, given the cylinder center and axis direction). The flattening is done by interpolating values from the original map on a cylindrical grid of points, then unwrapping the cylindrical grid into a rectangular grid. The cylinder radial direction becomes the X-axis of the new map, circumference the Y-axis, and cylinder axis direction the Z-axis. ThegridSpacingsis the requested separation of grid points along each axis in the new map (default is the minimum spacing along the three axes of the input map). The actual spacing may be slightly different because the dimensions of the new map may not be an exact multiple of the requested value; the number of grid divisions along each axis is chosen to give spacing as close as possible to the requested value without being smaller.

Reverse the order of the Z planes.•

Set the values of grid points farther thanradiusÅ from any atom inatom-spec(those beyond the zone) to zero, or ifinvertis true, set the values of grid points within the zone to zero. IfminimalBoundsis true, make the resulting map as small as possible while enclosing the zone; otherwise, the dimensions will be the same as for the input map. IfbondPointSpacingsis specified, use points along bonds in addition to the atoms to define the zone. The points along the bonds will be placeds× (bond radius) apart. Link radii inVolume Tracerare equivalent to bond radii, except when a link radius is 0.0, the corresponding bond radius is 1.0.See also: the

Zonefeature inVolume Viewer

modelIdN

Open the new data set as model numberN(an integer, optionally preceded by #). The default is the lowest unused number.

stepN|Nx,Ny,Nz

Whether to use the full resolution of the data (step size1, default) or a specified subsample (step size > 1). Step sizes must be integers. A step size of 1 indicates all data points, 2 indicates every other data point, 3 every third point,etc.If a single number is supplied, it is used along all three axes; if three numbers are supplied (separated by commas but not spaces), they are used along the X, Y, and Z axes, respectively.

subregionname|i1,j1,k1,i2,j2,k2|all

Whether to use the full extents of the data (all, default) or a specified subregion. A subregion can be specified by:

namepreviously assigned withvolume(seenameRegion) orVolume Viewer(seeNamed regions)- grid indices
i1–i2along the X axis,j1–j2along the Y axis, andk1–k2along the Z axis. Grid indices must be integers separated by commas but not spaces.

inPlacetrue|false

Whether to overwrite the existing data set in Chimera instead of creating a new one. Not all operations accept this option. Regardless of this setting, the existing data will only be overwritten if it was created in Chimera (for example with a previousvopcommand) rather than read from a file. In the case of map addition, the model to overwrite is thegridmap(the model whose grid will be used for the result).

**Resampling and loss of resolution**.
There is some loss of resolution with resampling a map on a different grid
with trilinear interpolation. The effect is similar to smoothing.
The amount of reduction in resolution depends on
the initial resolution, the initial and final grid spacing,
the “bumpiness” of the data, and the shift between the grids.
For example, starting with a 6-Å resolution map with 2-Å
spacing from **molmap** and resampling on
a grid (with the same spacing) shifted by 1 Å reduced resolution
to approximately 7.7 Å. Starting with a 6-Å resolution map with
1-Å spacing and resampling on a grid shifted by 0.5 Å reduced
resolution to approximately 6.4 Å.