The view command can:
See also: getcrd, zoom, camera, clip, windowsize, save, matchmaker, align, fitmap, sym, vr, making images, making movies, ChimeraX positions format, Model Panel, Graphics icons
Usage: view spec [ orient ] [ pad fraction ] [ clip true | false ] [ cofr true | false ]
Usage: view initial model-spec
The view spec command translates the scene, zooms in or out, and (unless clip is false) places the near/far clipping planes to bracket the displayed parts of the specified items. Setting clip false will deactivate any pre-existing near/far clipping and set the center of rotation depth to match that of the center of the bounding box of the specified items. If nothing is specified (spec is blank), all displayed items will be included in the view and near/far clipping deactivated regardless of the clip setting.
The zoom level is adjusted to make the bounding box of the relevant items abut the edges of the graphics window minus a pad fraction (allowed values < 1.0, default 0.05 of the window width and height). The desired fraction will usually be positive, but negative values can be used to zoom in further.
With cofr true (default):
With cofr false, the pre-existing center of rotation method will not be changed. The current center of rotation and the method used to determine it can be reported with the cofr command.
The orient option additionally rotates the scene to a standard orientation with X-axis horizontal increasing rightward, Y-axis vertical increasing upward, and Z-axis perpendicular to the screen increasing toward the viewer; in other words, it aligns scene coordinates with screen coordinates.
The view initial command removes rotations and translations of models relative to the scene (aligns individual model coordinates with scene coordinates). An overall reset can be achieved with:
view orient; view initial
...where the second command only has an effect if a model has been moved separately, as in matching or fitting.
Usage: view name view-name
Usage: view view-name [ frames ]
Usage: view delete ( view-name | all )
Usage: view list
The name option assigns view-name to the current view, including the positions of any models that have been moved separately. Subsequently, that view can be restored over a specified number of image update frames (default 1 frame). The delete option can be used to “forget” a specific view or all views. The list option reports the names of all currently saved views in the Log, and clicking a name therein restores the corresponding view. User-defined views are saved in sessions.
Rotations and translations of the scene as a whole can be described as motions of the viewer or “camera.” For gradual changes between views (frames > 1), the camera is rotated with a linear change in angle from its orientation in the first view to its orientation in the second view, and simultaneously translated so that the center of rotation in the first view moves in a straight line in screen coordinates to the center of rotation in the second view. At the same time, the positions of any models that have been moved relative to the scene are interpolated between the two views.
The scene coordinate system is subject to any global manipulations (rotations and translations of the scene as a whole) and is the same as the coordinate system of a model that has not been moved relative to other models.
The screen coordinate system has:
Usage: view position model-spec sameAsModels ref-model-spec
The view position command applies the transformation (rotation and translation relative to the scene) of a reference model to other models. Multiple reference models can be specified, in which case they will be paired in the given order with the models to be moved. Models with the same transformation will not necessarily be superimposed. For superposition, see: matchmaker, align, fitmap
Usage: view matrix [ camera matrixC ] [ models #N,matrixN,#M,matrixM, ... ]
The view matrix command uses input rotation-translation matrices to position the camera (thus the global scene) and/or individual models relative to the scene.
Without arguments, view matrix shows the current rotation and translation of the camera and of each model relative to the scene as matrices in the Log. Each matrix is reported as 12 comma-separated numbers, corresponding to a 3x3 rotation matrix and a translation vector in the fourth column. Ordering is row-by-row, such that the translation vector is given as the fourth, eighth, and twelfth numbers. The same format of each matrix as 12 comma-separated numbers is required to set the position of the camera and/or individually specified models #N, #M, etc. The numbers should be separated by commas only (no spaces).
The following commands are equivalent:
view matrix mod #1,1,0,0,0,0,1,0,0,0,0,1,0
view initial #1
Alternatively, current model positions can be saved to a ChimeraX positions file and later applied from such a file.