Functions for User Commands¶
The chimera.core.commands module contains Python functions for the core commands available from the Chimera command-line. Tools define additional commands noted with a (*) and their code location is described with the function descriptions.
buriedarea¶
-
buriedarea
(session, atoms1, with_atoms2=None, probe_radius=1.4)¶ Compute buried solvent accessible surface (SAS) area between two sets of atoms. This is the sum of the SAS area of each set of atoms minus the SAS area of the combined sets of atoms, that difference divided by two since each set of atoms has surface at the interface, so the interface area is defined as half the buried area. Atoms not specified in either atom set are ignored when considering where the probe sphere can reach.
Parameters: atoms1 : Atoms
First set of atoms.
with_atoms2 : Atoms
Second set of atoms – must be disjoint from first set.
probe_radius : float
Radius of the probe sphere.
camera¶
-
camera
(session, mode=None, field_of_view=None, eye_separation=None, screen_width=None, depth_scale=None)¶ Change camera parameters.
Parameters: mode : N/A
Currently not used.
field_of_view : float
Horizontal field of view in degrees.
eye_separation : float
Distance between eyes for stereo camera modes. Can use any units and must specify screen width too. Only eye_separation divided by screen width is used.
screen_width : float
Width of screen in same units as eye separation. Only used for stereo camera modes.
depth_scale : float
Scale the eye separation by this factor. Only used in stereo camera modes.
close¶
-
close
(session, model_ids=None)¶ Close models.
Parameters: model_ids : list of model ids
These models and any submodels are closed. If no model ids are specified then all models are closed.
color¶
-
color
(session, spec, color=None, target=None, sequential=None, cmap=None, cmap_range=None)¶ Color atoms, ribbons, surfaces, ....
Parameters: spec : specifier
Which objects to color.
color : Color
Color can be a standard color name or “byelement”, “byhetero” or “bychain” .
target : string
Characters indicating what to color, a = atoms, c = cartoon, s = surfaces, m = models, n = non-molecule models, l = labels, r = residue labels, b = bonds, p = pseudobonds, d = distances. Everything is colored if no target is specified.
sequential : string
Value can only be “chains”, assigns each chain a color from a color map.
cmap : Colormap
Color map to use with sequential coloring
cmap_range : 2 comma-separated floats or “full”
Specifies the range of value used for sampling from a color map.
colordef¶
-
colordef
(session, name, color=None)¶ Create a user defined color.
-
uncolordef
(session, name)¶ Remove a user defined color.
command_line¶
Functions defined in chimera.cmd_line.cmd
-
command_line_hide
(session)¶ Hide the command line.
-
command_line_show
(session)¶ Show the command line.
contacts¶
Function found in chimera.contacts.cmd
-
contacts
(session, atoms=None, probe_radius=1.4)¶ Compute buried solvent accessible surface areas between chains and show a 2-dimensional network graph depicting the contacts.
Parameters: atoms : Atoms
probe_radius : float
crossfade¶
-
crossfade
(session, frames=30)¶ Fade from the current view to the next drawn view. Used in movie recording.
Parameters: frames : integer
Linear interpolate between the current and next image over this number of frames.
crosslinks¶
-
crosslinks
(session, pbgroups=None, color=None, radius=None, minimize=None, iterations=10, frames=None)¶ Move atomic models to minimize crosslink lengths.
Parameters: pbgroups : PseudobondGroups or None
Pseudobond groups containing crosslinks. If None then all pseudbond groups are used.
color : Color
Set the pseudobonds to this color
radius : float
Set pseudobond cylinder radius.
minimize : bool
Move each atomic structure model rigidly to minimize the sum of squares of link distances to other models. Each model is moved one time. This does not produce minimum sum of squares of all links, but multiple iterations converge to that result.
iterations : int
Minimize the sequence of atomic structures this many times.
frames : int
If minimize is true then move the atomic structures gradually to their minimized positions over this many frames.
delete¶
-
delete
(session, atoms)¶ Delete atoms.
Parameters: atoms : Atoms collection
Delete these atoms. If all atoms of a model are closed then the model is closed.
display¶
-
display
(session, spec=None)¶ Display specified atoms.
Parameters: spec : atom specifier
Show the specified atoms. If no atom specifier is given then all atoms are shown. Atoms that are already shown remain shown.
-
undisplay
(session, spec=None)¶ Hide specified atoms.
Parameters: spec : atom specifier
Hide the specified atoms. If no atom specifier is given then all atoms are hidden.
fitmap¶
-
fitmap
(session, atoms_or_map, in_map=None, subtract_maps=None, metric=None, envelope=True, resolution=None, shift=True, rotate=True, symmetric=False, move_whole_molecules=True, search=0, placement='sr', radius=None, cluster_angle=6, cluster_shift=3, asymmetric_unit=True, level_inside=0.1, sequence=0, max_steps=2000, grid_step_min=0.01, grid_step_max=0.5, list_fits=None, each_model=False)¶ Fit an atomic model or a map in a map using a rigid rotation and translation by locally optimizing correlation. There are four modes: 1) fit all models into map as a single rigid group, 2) fit each model into the map separately, 3) fit each model separately while subtracting others (sequence mode), or 4) use random starting positions when fitting (search mode).
Parameters: atoms_or_map
Atoms or map that will be moved.
in_map : Volume
Target density map to fit into.
subtract_maps : Atoms
Subtract map for these atoms from the target map before fitting.
—————————————————————————-
Mode
—————————————————————————-
each_model : bool
Whether to fit each model independently or all as one rigid group.
sequence : integer
Fit each model in sequence subtracting other models first for this number of specified fits.
search : integer
Fit using N randomized initial placements and cluster similar results.
—————————————————————————-
Fitting settings
—————————————————————————-
metric : ‘overlap’, ‘correlation’, or ‘cam’
Optimization function to use. Overlap is pointwise sum. Cam is correlation about mean (ie. mean value is subtracted from maps before computing correlation).
envelope : bool
Whether to consider fit only within lowest displayed contour level if moving map.
resolution : float
Resolution for making simulated maps from atomic models. Required when correlation or cam metric is used and atomic models are being fit.
shift : bool
Allow translation when fitting.
rotate : bool
Allow rotation when fitting.
symmetric : bool
Whether to use symmetry of the target map to take account of clashes between copies of the fit models.
max_steps: integer
Maximum number of gradient ascent steps to take
grid_step_max : float
Maximum motion during a fitting step in grid index units.
grid_step_min : float
The fit is considered converged when Motion less than this value (grid index units).
—————————————————————————-
Search options
—————————————————————————-
placement : ‘sr’, ‘s’, or ‘r’
Whether random placements should include shift and rotation
radius : float
Limits the random placements to within this distance of the starting position.
cluster_angle : float
Rotational difference for a fit to form a new cluster.
cluster_shift : float
Shift difference for a fit to form a new cluster.
asymmetric_unit : bool
List only one symmetrically equivalent fit position if the target map has symmetry.
level_inside : float
Fraction of fit atoms or map that must be inside the target map contour level in order to keep the fit.
—————————————————————————-
Output options
—————————————————————————-
move_whole_molecules : bool
Move entire molecules, or only the atoms that were specified.
list_fits : bool
Show the fits in a dialog.
help¶
-
help
(session, command_name=None)¶ Display help.
Parameters: command_name : string
Show documentation for the specified command. If no command is specified then the names of all commands are shown. If the command name “all” is given then a synopsis for each command is shown. The command name can be abbreviated.
ks¶
-
ks
(session, shortcut=None)¶ Enable keyboard shortcuts. Keys typed in the graphics window will be interpreted as shortcuts.
Parameters: shortcut : string
Keyboard shortcut to execute. If no shortcut is specified switch to shortcut input mode.
lighting¶
-
lighting
(session, preset=None, direction=None, intensity=None, color=None, fill_direction=None, fill_intensity=None, fill_color=None, ambient_intensity=None, ambient_color=None, fixed=None, shadows=None, quality_of_shadows=None, depth_bias=None, multi_shadow=None, ms_map_size=None, ms_depth_bias=None)¶ Set lighting parameters. There are 2 directional lights, a key light and a fill light, in addition to ambient lighting. The key light can cast a shadow, and shadows cast from multiple uniformly distributed directions can produce ambient shadowing (aka “ambient occlusion”). Parameters that are not specified retain their current value. If no options are specified then the current settings are printed to the log.
Parameters: preset : string
Names a standard set of lighting parameters. Allowed values are “default”, “simple”, “full”, “soft” and “flat”. Simple is the same as default and has no shadows. Full includes direct and ambient shadows. Soft includes ambient shadows from 64 directions and no direct lighting. Flat has only anbient lighting and no shadows with silhouettes enabled. Specifying a preset only specifies some of the lighting parameters. Specifying other options overrides the preset values.
direction : 3 floats
Key light direction as vector. Does not have to have unit length – it will be normalized. Points in the direction the light shines. The viewing direction is along -z. Initially is pointing down to the right (1,-1,-1).
intensity : float
Key light intensity. This is a brightness scale factor. Initial value 1.
color : Color
Key light color, initial value RGB = (1,1,1).
fill_direction : 3 floats
Fill light direction. Initially is pointing from lower left (-0.2,-0.2,-0.959).
fill_intensity : float
Fill light intensity. Initial value 0.5.
fill_color : Color
Fill light color, initial value RGB = (1,1,1).
ambient_intensity : float
Ambient light intensity. Initial value 0.4.
ambient_color : Color
Ambient color, initial value RGB = (1,1,1).
fixed : bool
Whether light directions are fixed in scene coordinates or move with the camera. Initial value fixed = false.
shadows : bool
Whether to show shadows. Initial value false.
quality_of_shadows : string or int
Shadows are rendered with a 2 dimensional texture. Pixelated shadow edges result from using small texture sizes. Value can be “coarse” (1024), “normal” (2048), “fine” (4096), “finer” (8192), or an integer value can be specified.
depth_bias : float
To avoid a surface shadowing itself due to numerical rounding errors an bias distance is used. This is a fraction of the scene diameter. Initial value 0.005.
multi_shadow : int
How many directions to use for casting ambient shadows. Value 0 means no ambient shadows. The soft preset uses 64 directions. Initial value 0.
ms_map_size : int
Size of one 2-dimensional texture holding all the ambient shadow maps. Small values give coarser shadows that give a smoother appearance when many shadows ar rendered. Initial value 128.
ms_depth_bias : float
Depth bias to avoid surface self shadowing for ambient shadows as a fraction of the scene diameter. Because small shadow map sizes are typically used a larger bias is needed than for directional shadows. Initial value 0.05.
log¶
Function found in chimera.log.cmd
-
log
(session, show=None, hide=None, warning_dialog=None, error_dialog=None, test=None)¶ Control setting for the Log window.
Parameters: show : bool
hide : bool
warning_dialog : bool
If true, warnings popup a separate dialog, if false no warning dialog is shown. In either case the warning appears in the log text.
error_dialog : bool
If true, errors popup a separate dialog, if false no error dialog is shown. In either case the errors appears in the log text.
test : bool
Test logging of various types of messages.
material¶
-
material
(session, preset=None, reflectivity=None, specular_reflectivity=None, exponent=None, ambient_reflectivity=None)¶ Change surface material properties controlling the reflection of light. Currently all models use the same material properties.
Parameters: preset : string
Can be “default”, “shiny” or “dull”. Default sets all material properties to there default values. Shiny sets specular reflectivity to 1. Dull sets specular reflectivity to 0.
reflectivity : float
Fraction of directional light reflected diffusely (reflected equally in all directions). Initial value 0.8.
specular_reflectivity : float
Fraction of key light reflected specularly (mirror reflection with some spread given by exponent. Initial value 0.8.
exponent : float
Controls specularly reflected light scaling intensity by a factor of cosine(x) raised to the exponent power, where x is the between the mirror reflection direction and the view direction. Larger values produce smaller specular highlight spots on surfaces. Initial value 30.
ambient_reflectivity : float
Fraction of ambient light reflected. Initial value 0.8.
molmap¶
-
molmap
(session, atoms, resolution, gridSpacing=None, edgePadding=None, cutoffRange=5, sigmaFactor=0.22507907903927651, balls=False, symmetry=None, center=(0, 0, 0), axis=(0, 0, 1), coordinateSystem=None, displayThreshold=0.95, modelId=None, replace=True, showDialog=True)¶ Create a density map by placing Gaussians centered on atoms.
Parameters: atoms : Atoms
resolution : float
grid_spacing : float
Default is 1/3 resolution.
edge_padding : float
Default is 3 times resolution.
cutoff_range : float
In standard deviations.
sigma_factor : float
Scale factor equal to standard deviation / resolution, default 1/(pi*sqrt(2)).
balls : bool
Use balls instead of Gaussians
symmetry : not supported
Apply symmetry operations to atoms
center : 3 floats or atom spec
Center of symmetry.
axis : 3 floats
Axis of symmetry.
coordinate_system : model spec
Coordinate system of symmetry.
display_threshold : float
Initial contour level as fraction of total density, default 0.95.
model_id : list of integers
replace : bool
Default true
show_dialog : bool, not supported
mousemodes¶
Functions defined in chimera.mouse_modes.cmd
-
mousemodes_hide
(session)¶ Hide the mouse modes icon panel.
-
mousemodes_show
(session)¶ Show the mouse modes icon panel.
move¶
-
move
(session, axis, distance, frames=None)¶ Shift the scene. Actually the camera is shifted and the models stay fixed.
Parameters: axis : 3 comma-separated numbers
Defines the axis in scene coordinates to shift along.
distance : float
Distance to shift in scene units.
frames : integer
Repeat the shift for N frames.
movie¶
Functions defined in chimera.movie.moviecmd
-
movie_record
(session, directory=None, pattern=None, format=None, size=None, supersample=1, limit=15000)¶ Start recording a movie.
Parameters: directory : string
A temporary directory for saving image files before the movie is encoded. By default a temporary system directory is created.
pattern : string
File name including a printf style specification like “%04d” for the frame number for saving images.
format : string
Image file format (default ppm) for saving frames.
size : 2 int
Width and height in pixels of movie.
supersample : int
Amount of supersampling when saving individual image frames.
limit : int
Maximum number of frames to save. This is a safe guard so that the entire computer disk storage is not filled with images if a movie recording is never stopped.
-
movie_encode
(session, output=None, format=None, quality=None, qscale=None, bitrate=None, framerate=25, round_trip=False, reset_mode='clear', wait=False)¶ Enode images captured with movie record command creating a movie file. This uses the standalone video encoding program ffmpeg which is included with Chimera.
Parameters: output : list of strings
Filenames of movie output files. By specifying multiple files, different video encoding formats can be made.
format : string
Format of video file to write. If not specified, the file suffix determines the format.
quality : string
Quality of video, higher quality results in larger file size. Qualities are “highest”, “higher”, “high”, “good”, “medium”, “fair”, “low”. Default “good”. This overrides the qscale and bitrate options.
qscale : int
Quality scale parameter used by some video codecs. This overrides the bitrate option.
bitrate : int
Target bit rate for video encoding in Kbits/second.
framerate : int
Frames per second that video should playback at in a video player.
round_trip : bool
If true, the images are played forward and than backward so movie ends where it began. This is used for making movies that loop without a jump between the last frame and first frame.
reset_mode : string
Whether to keep or delete the image files that were captured after the video files is made. Values are “clear”, “keep” or “none”. Default “clear” means the image files are deleted.
wait : bool
Whether to wait until movie encoding is finished before the command returns. Default false means the command can return before the video encoding is complete.
-
movie_crossfade
(session, frames=25)¶ Linear interpolate between the current graphics image and the next image over a specified number of frames.
-
movie_duplicate
(session, frames=25)¶ Repeat the current image frame a specified number of frames so that the video does not change during playback.
-
movie_stop
(session)¶ Stop recording video frames. Using the movie encode command also stops recording.
-
movie_abort
(session)¶ Stop movie recording and delete any recorded frames.
-
movie_reset
(session, reset_mode='clear')¶ Clear images saved with movie record.
-
movie_ignore
(session, ignore=True)¶ Ignore subsequent movie commands except for the movie ignore command. This can be used to run a movie recording script without recording the movie.
-
movie_status
(session)¶ Report recording status such as number of frames saved to the log.
-
movie_formats
(session)¶ Report the available video formats to the log.
oculus¶
-
oculus
(session, enable, pan_speed=None)¶ Enable stereo viewing and head motion tracking with an Oculus Rift headset.
Parameters: enable : bool
Enable or disable use of an Oculus Rift headset. The device must be connected and powered on to enable it. A new full screen window will be created on the Oculus device. Graphics will not be updated in the main Chimera window because the different rendering rates of the Oculus and a conventional display will cause stuttering of the Oculus graphics. Also the Side View panel in the main Chimera window should be closed to avoid stuttering.
pan_speed : float
Controls how far the camera moves in response to tranlation head motion. Default 5.
open¶
-
open
(session, filename, id=None, as_=None)¶ Open a file.
Parameters: filename : string
A path to a file (relative to the current directory), or a database id code to fetch prefixed by the database name, for example, pdb:1a0m, mmcif:1jj2, emdb:1080. A 4-letter id that is not a local file is interpreted as an mmCIF fetch.
id : tuple of integer
The model id number to use for this data set.
as_ : Not sure what this is
pdbimages¶
-
pdbimages
(session, directory='.', subdirectories=True, width=400, height=400, supersample=2, image_suffix='.png', exclude=['1m4x.cif'], log_file=None)¶ Assembly images command for batch rendering mmCIF assembly images. This is for the Protein DataBank to render images.
Parameters: directory : string
Find all files with suffix .cif in this directory and recursively in subdirectories.
subdirectories : bool
Whether to recursively search subdirectories for .cif files.
width : integer
Width in pixels of saved image.
height : integer
Height in pixels of saved image.
supersample : integer
Supersampling makes image N-fold larger than averages down to smooth object images.
image_suffix : string
File suffix for images, used to determine image format (e.g. .png, .jpg, .tif)
exclude : list of strings
File names to exclude from rendering (some large files cause graphics crashes).
log_file : string
Path to file to write log messages as each mmCIF file is rendered.
perframe¶
-
perframe
(session, command, frames=None, interval=1, format=None, zero_pad_width=None, range=None, show_commands=False)¶ Execute specified command each frame, typically used during movie recording.
Parameters: command : string
The command to be run each frame, optionally containing “$1” which will be replaced by the frame number starting at 0.
frames : int
Number of frames to execute the specified command.
interval : int
Run the command only every Kth frame.
format : string
Printf style format (e.g. %d, %.3f) for substituting value in for $1.
zero_pad_width : int
Field width in characters used when substituting $1 left padded with zeros.
range : 2 or 3 int
start,end[,step] integer or float range of values to substitute for $1 instead of frame number.
show_commands : bool
Whether to echo commands to log.
rcolor¶
-
rcolor
(session, color, spec=None)¶ Color ribbons.
Parameters: color : Color
spec : atom specifier
Set ribbon color for these residues.
roll¶
-
roll
(session, axis=(0, 1, 0), angle=1.5, frames=-1)¶ Rotate the scene. Same as the turn command with infinite frames argument.
Parameters: axis : 3 comma-separated numbers
Defines the axis in scene coordinates to rotate about.
angle : float
Rotation angle in degrees.
frames : integer
Repeat the rotation for N frames.
ribbon¶
-
ribbon
(session, spec=None)¶ Display ribbons for specified residues.
Parameters: spec : atom specifier
Show ribbons for the specified residues. If no atom specifier is given then ribbons are shown for all residues. Residues that are already shown as ribbons remain shown as ribbons.
-
unribbon
(session, spec=None)¶ Undisplay ribbons for specified residues.
Parameters: spec : atom specifier
Hide ribbons for the specified residues. If no atom specifier is given then all ribbons are hidden.
run¶
-
run
(session, text, downgrade_errors=False)¶ execute a textual command
Parameters: text : string
The text of the command to execute.
downgrade_errors : bool
True if errors in the command should be logged as informational.
sasa¶
-
sasa
(session, atoms=None, probe_radius=1.4)¶ Compute solvent accessible surface area.
Parameters: atoms : Atoms
A probe sphere is rolled over these atoms ignoring collisions with any other atoms.
probe_radius : float
Radius of the probe sphere.
save¶
-
save
(session, filename, width=None, height=None, supersample=None, format=None)¶ Save data, sessions, images.
Parameters: filename : string
File to save. File suffix determines what type of file is saved unless the format option is given. For sessions the suffix is .c2ses. Image files can be saved with .png, .jpg, .tif, .ppm, .gif suffixes.
width : integer
Width of image in pixels for saving image files. If width is not specified the current graphics window width is used.
height : integer
Height of image in pixels for saving image files.
supersample : integer
Supersampling for saving images. Makes an image N times larger in each dimension then averages to requested image size to produce smoother object edges. Values of 2 or 3 are most useful, with little improvement for larger values.
format : string
File format for saving images. If not specified then the filename suffix is used to identify the format.
scolor¶
-
scolor
(session, atoms=None, color=None, byatom=False, esp=None)¶ Color surfaces using a variety of methods, for example, to match nearby atom colors, or use a single color, or color by electrostatic potential, or color radially. TODO: Only a few options are currently supported.
set¶
-
set
(session, bg_color=None, silhouettes=None)¶ Set global parameters. With no options reports the current settings.
Parameters: bg_color : Color
Set the graphics window background color.
silhouettes : bool
Enable or disable silhouette edges (black lines drawn at boundaries of objects where the depth of the scene jumps.
split¶
-
split
(session, molecules=None, chains=None, ligands=False, connected=False, atoms=None)¶ Split an atomic structure into separate structures, for example one for each chain.
Parameters: molecules : AtomicStructures
Structures to split.
chains : bool
Split each chain into a separate atomic structure.
ligands : bool
Split each ligand into a separate atomic structure.
connected : bool
Split each connected set of atoms into a separate atomic structure.
atoms : Atoms
Split the specified atoms into a separate atomic structure.
style¶
-
style
(session, atom_style, atoms=None)¶ Set the atom display style.
Parameters: atom_style : “sphere”, “ball” or “stick”
Controls how atoms and bonds are depicted.
atoms : atom specifier
Change the style of these atoms. If not specified then all atoms are changed.
surface¶
-
surface
(session, atoms=None, enclose=None, include=None, probe_radius=1.4, grid_spacing=None, resolution=None, level=None, color=None, transparency=None, visible_patches=None, sharp_boundaries=None, nthread=None, replace=True, show=False, hide=False, close=False)¶ Compute and display solvent excluded molecular surfaces.
Parameters: atoms : Atoms
Atoms controlling which surface patch is shown. Surfaces are computed for each chain these atoms belong to and patches of these surfaces near the specifed atoms are shown. Solvent, ligands and ions are excluded from each chain surface.
enclose : Atoms
Make a surface enclosing exactly these specified atoms excluding solvent, ligands and ions
include : Atoms
Solvent, ligands or ions to include in the surface.
probe_radius : float
Radius of probe sphere rolled over atoms to produce surface. Only used for solvent excluded surfaces.
grid_spacing : float
Surface is computed on 3-dimensional grid with this spacing between grid points along each axis.
resolution : float
Specifying a resolution value (Angstroms) causes the surface calculation to use a contour surface of a 3-d grid of a sum of Gaussians one centered at each atom instead of a solvent excluded surface. See the molmap command for details.
level : float
Contour level for Gaussian surface in atomic number units. Each Gaussian has height scaled by the atom atomic number.
color : Color
Colors surfaces using this color.
transparency : float
Percentage transparency for surfaces.
visible_patches : int
Maximum number of connected surface pieces per chain to show.
sharp_boundaries : bool
Make the surface triangulation have edges exactly between atoms so per-atom surface colors and surface patches have smoother edges.
nthread : int
Number of CPU threads to use in computing surfaces.
replace : bool
Whether to replace an existing surface for the same atoms or make a copy.
show : bool
Show patches for existing surfaces without computing any new surface.
hide : bool
Undisplay surfaces or patches of surfaces.
close : bool
Close surfaces for the specified atoms.
sym¶
-
sym
(session, molecules, assembly=None, clear=False, surface_only=False)¶ Show molecular assemblies of molecular models defined in mmCIF files. These can be subassemblies or symmetrical copies with individual chains placed according to matrices specified in the mmCIF file.
Parameters: molecules : list of AtomicStructure
List of molecules to show as assemblies.
assembly : string
The name of assembly in the mmCIF file. If this parameter is None then the names of available assemblies are printed in log.
clear : bool
Revert to displaying no assembly, resets the use of any symmetry matrices.
surface_only : bool
Instead of showing instances of the molecule, show instances of surfaces of each chain. The chain surfaces are computed if they do not already exist.
title¶
Function found in chimera.title.label
-
title_create
(session, name, text='', color=None, size=24, typeface='Arial', xpos=0.5, ypos=0.5, visibility=True)¶ Create a label at a fixed position in the graphics window.
Parameters: name : string
Identifier for the label used to change or delete label.
text : string
Displayed text of the label.
color : Color
Color of the label text. If no color is specified black is used on light backgrounds and white is used on dark backgrounds.
size : int
Font size in pixels.
typeface : string
Font name. This must be a true type font installed on Mac in /Library/Fonts and is the name of the font file without the ”.ttf” suffix.
xpos : float
Placement of left edge of text. Range 0 - 1 covers full width of graphics window.
ypos : float
Placement of bottom edge of text. Range 0 - 1 covers full height of graphics window.
visibility : bool
Whether or not to display the label.
-
title_change
(session, name, text=None, color=None, size=None, typeface=None, xpos=None, ypos=None, visibility=None)¶ Change label parameters.
-
title_delete
(session, name)¶ Delete label.
toolshed¶
Function defined in chimera.toolshed.cmd
-
ts_list
(session, tool_type='installed')¶ List installed tools in the log.
Parameters: tool_type : string
Types are “installed”, “available”, or “all”
-
ts_refresh
(session, tool_type='installed')¶ Check for new tools or new tool vesions on server and display them in the tool shed window.
Parameters: tool_type : string
Types are “installed”, “available”, or “all”
-
ts_install
(session, tool_name, user_only=True, version=None)¶ Install a tool.
Parameters: tool_name : string
user_only : bool
Install for this user only, or install for all users.
version : string
-
ts_remove
(session, tool_name)¶ Remove an installed tool.
Parameters: tool_name : string
-
ts_start
(session, tool_name, *args, **kw)¶ Start a tool.
Parameters: tool_name : string
-
ts_update
(session, tool_name, version=None)¶ Update a tool to the latest version.
Parameters: tool_name : string
version : string
-
ts_hide
(session)¶ Hide the Tool Shed user interface.
-
ts_show
(session)¶ Show the Tool Shed user interface.
turn¶
-
turn
(session, axis=(0, 1, 0), angle=1.5, frames=None)¶ Rotate the scene. Actually the camera is rotated about the scene center of rotation.
Parameters: axis : 3 comma-separated numbers
Defines the axis in scene coordinates to rotate about.
angle : float
Rotation angle in degrees.
frames : integer
Repeat the rotation for N frames, typically used in recording movies.
volume¶
-
volume
(session, volumes, style=None, show=None, hide=None, level=None, enclose_volume=None, fast_enclose_volume=None, color=None, brightness=None, transparency=None, step=None, region=None, name_region=None, expand_single_plane=None, origin=None, origin_index=None, voxel_size=None, planes=None, symmetry=None, center=(0, 0, 0), center_index=None, axis=(0, 0, 1), coordinate_system=None, save=None, save_format=None, save_region=None, save_step=None, mask_zone=True, chunk_shapes=None, append=None, compress=None, base_index=1, data_cache_size=None, show_on_open=None, voxel_limit_for_open=None, show_plane=None, voxel_limit_for_plane=None, show_outline_box=None, outline_box_rgb=None, outline_box_linewidth=None, limit_voxel_count=None, voxel_limit=None, color_mode=None, projection_mode=None, bt_correction=None, minimal_texture_memory=None, maximum_intensity_projection=None, linear_interpolation=None, dim_transparency=None, dim_transparent_voxels=None, line_thickness=None, smooth_lines=None, mesh_lighting=None, two_sided_lighting=None, flip_normals=None, subdivide_surface=None, subdivision_levels=None, surface_smoothing=None, smoothing_iterations=None, smoothing_factor=None, square_mesh=None, cap_faces=None, box_faces=None, orthoplanes=None, position_planes=None)¶ Control the display of density maps.
Parameters: volumes : list of maps
style : “surface”, “mesh”, or “solid”
show : bool
hide : bool
level : sequence of 1 or 2 floats
In solid style 2 floats are used the first being a density level and second 0-1 brightness value.
enclose_volume : float
fast_enclose_volume : float
color : Color
brightness : float
transparency : float
step : sequence of 3 integers
region : sequence of 6 integers
3 minimum grid indices and 3 maximum grid indices for x,y,z axes.
name_region : string
expand_single_plane : bool
origin : sequence of 3 floats
origin_index : sequence of 3 floats
voxel_size : sequence of 3 floats
planes : not currently supported
————————————————————————————————
Symmetry assignment options
————————————————————————————————
symmetry : string
center : string
Parsed as 3 comma-separated floats, or an atom specifier
center_index : sequence of 3 floats
axis : sequence of 3 floats
coordinate_system : not supported, model specifier
————————————————————————————————
File saving options
————————————————————————————————
save : string
File name
save_format : string
save_region : sequence of 6 integers
save_step : sequence of 3 integers
mask_zone : bool
chunk_shapes : list of “zyx”, “zxy”, “yxz”, “yzx”, “xzy”, “xyz”
append : bool
compress : bool
base_index : integer
————————————————————————————————
Global options
————————————————————————————————
data_cache_size : float
In Mbytes
show_on_open : bool
voxel_limit_for_open : float
show_plane : bool
voxel_limit_for_plane : float
————————————————————————————————
Rendering options
————————————————————————————————
show_outline_box : bool
outline_box_rgb : Color
outline_box_linewidth : float
limit_voxel_count : bool
Auto-adjust step size.
voxel_limit : float (Mvoxels)
color_mode : string
Solid rendering pixel formats: ‘auto4’, ‘auto8’, ‘auto12’, ‘auto16’, ‘opaque4’, ‘opaque8’, ‘opaque12’, ‘opaque16’, ‘rgba4’, ‘rgba8’, ‘rgba12’, ‘rgba16’, ‘rgb4’, ‘rgb8’, ‘rgb12’, ‘rgb16’, ‘la4’, ‘la8’, ‘la12’, ‘la16’, ‘l4’, ‘l8’, ‘l12’, ‘l16’
projection_mode : string
One of ‘auto’, ‘2d-xyz’, ‘2d-x’, ‘2d-y’, ‘2d-z’, ‘3d’
bt_correction : bool
Brightness and transparency view angle correction for solid mode.
minimal_texture_memory : bool
Reduce graphics memory use for solid rendering at the expense of rendering speed.
maximum_intensity_projection : bool
linear_interpolation : bool
Interpolate gray levels in solid style rendering.
dim_transparency : bool
Makes transparent surfaces dimmer
dim_transparent_voxels : bool
For solid rendering.
line_thickness : float
smooth_lines : bool
mesh_lighting : bool
two_sided_lighting : bool
flip_normals : bool
subdivide_surface : bool
subdivision_levels : integer
surface_smoothing : bool
smoothing_iterations : integer
smoothing_factor : float
square_mesh : bool
cap_faces : bool
box_faces : bool
orthoplanes : One of ‘xyz’, ‘xy’, ‘xz’, ‘yz’, ‘off’
position_planes : sequence of 3 integers
Intersection grid point of orthoplanes display
vop¶
-
vop_add
(session, volumes, on_grid=None, bounding_grid=None, subregion='all', step=1, grid_subregion='all', grid_step=1, in_place=False, scale_factors=None, model_id=None)¶ Add maps.
-
vop_bin
(session, volumes, subregion='all', step=1, bin_size=(2, 2, 2), model_id=None)¶ Reduce map by averaging over rectangular bins.
-
vop_boxes
(session, volumes, markers, size=0, use_marker_size=False, subregion='all', step=1, model_id=None)¶ Extract boxes centered at marker positions.
-
vop_cover
(session, volumes, atom_box=None, pad=5.0, box=None, x=None, y=None, z=None, f_box=None, fx=None, fy=None, fz=None, i_box=None, ix=None, iy=None, iz=None, use_symmetry=True, cell_size=None, step=1, model_id=None)¶ Extend a map using symmetry to cover a specified region.
-
vop_falloff
(session, volumes, iterations=10, in_place=False, subregion='all', step=1, model_id=None)¶ Smooth edges of a masked map.
-
vop_flatten
(session, volumes, method='multiplyLinear', fitregion=None, subregion='all', step=1, model_id=None)¶ Make map background flat.
-
vop_flip
(session, volumes, axis='z', subregion='all', step=1, in_place=False, model_id=None)¶ Flip a map axis reversing the hand.
-
vop_fourier
(session, volumes, subregion='all', step=1, model_id=None, phase=False)¶ Fourier transform a map
-
vop_gaussian
(session, volumes, s_dev=(1.0, 1.0, 1.0), subregion='all', step=1, value_type=None, model_id=None)¶ Smooth maps by Gaussian convolution.
-
vop_laplacian
(session, volumes, subregion='all', step=1, model_id=None)¶ Detect map edges with Laplacian filter.
-
vop_local_correlation
(session, volumes, window_size=5, subtract_mean=False, model_id=None)¶ Compute correlation between two maps over a sliding window.
-
vop_maximum
(session, volumes, on_grid=None, bounding_grid=None, subregion='all', step=1, grid_subregion='all', grid_step=1, in_place=False, scale_factors=None, model_id=None)¶ Pointwise maximum of maps.
-
vop_median
(session, volumes, bin_size=3, iterations=1, subregion='all', step=1, model_id=None)¶ Replace map values with median of neighboring values.
-
vop_morph
(session, volumes, frames=25, start=0, play_step=0.04, play_direction=1, play_range=None, add_mode=False, constant_volume=False, scale_factors=None, hide_original_maps=True, interpolate_colors=True, subregion='all', step=1, model_id=None)¶ Linearly interpolate pointwise between maps.
-
vop_multiply
(session, volumes, on_grid=None, bounding_grid=None, subregion='all', step=1, grid_subregion='all', grid_step=1, in_place=False, scale_factors=None, model_id=None)¶ Pointwise multiply maps.
-
vop_octant
(session, volumes, center=None, i_center=None, subregion='all', step=1, in_place=False, fill_value=0, model_id=None)¶ Extract an octant from a map.
-
vop_octant_complement
(session, volumes, center=None, i_center=None, subregion='all', step=1, in_place=False, fill_value=0, model_id=None)¶ Zero an octant of a map.
-
vop_permute_axes
(session, volumes, axis_order='xyz', subregion='all', step=1, model_id=None)¶ Permute map axes.
-
vop_resample
(session, volumes, on_grid=None, bounding_grid=False, subregion='all', step=1, grid_subregion='all', grid_step=1, model_id=None)¶ Interoplate a map on a new grid.
-
vop_ridges
(session, volumes, level=None, subregion='all', step=1, model_id=None)¶ Find ridges in a map.
-
vop_scale
(session, volumes, shift=0, factor=1, sd=None, rms=None, value_type=None, type=None, subregion='all', step=1, model_id=None)¶ Scale, shift and convert number type of map values.
-
vop_subtract
(session, volumes, on_grid=None, bounding_grid=False, subregion='all', step=1, grid_subregion='all', grid_step=1, in_place=False, scale_factors=None, min_rms=False, model_id=None)¶ Subtract two maps.
-
vop_threshold
(session, volumes, minimum=None, set=None, maximum=None, set_maximum=None, subregion='all', step=1, model_id=None)¶ Set map values below or above a threshold to a constant.
-
vop_tile
(session, volumes, axis='z', pstep=1, trim=0, columns=None, rows=None, fill_order='ulh', subregion='shown', step=1, model_id=None)¶ Concatenate maps along an axis.
-
vop_unbend
(session, volumes, path, yaxis, xsize, ysize, grid_spacing=None, subregion='all', step=1, model_id=None)¶ Unbend a map near a smooth splined path.
-
vop_unroll
(session, volumes, inner_radius=None, outer_radius=None, length=None, grid_spacing=None, axis=(0, 0, 1), center=(0, 0, 0), subregion='all', step=1, model_id=None)¶ Flatten a cylindrical shell within a map.
-
vop_zone
(session, volumes, atoms=None, radius=None, bond_point_spacing=None, minimal_bounds=False, invert=False, subregion='all', step=1, model_id=None)¶ Mask a map keeping only parts close to specified atoms.
vseries¶
-
vseries_align
(session, series, enclose_volume=None, fast_enclose_volume=None)¶ Align each frame of a map series to the preceeding frame.
-
vseries_measure
(session, series, output=None, centroids=True, color=(0.7, 0.7, 0.7, 1), radius=None)¶ Report centroid motion of a map series.
-
vseries_play
(session, series, direction='forward', loop=False, max_frame_rate=None, jump_to=None, range=None, start=None, normalize=False, markers=None, preceding_marker_frames=0, following_marker_frames=0, color_range=None, cache_frames=1)¶ Show a sequence of maps from a volume series.
-
vseries_save
(session, series, path, subregion=None, step=None, value_type=None, threshold=None, zero_mean=False, scale_factor=None, enclose_volume=None, fast_enclose_volume=None, normalize_level=None, align=False, on_grid=None, mask=None, final_value_type=None, compress=False)¶ Process the frames of a map series and save the result to a a file. Processing can normalize, align, mask and change the numeric value type of maps.
-
vseries_slider
(session, series)¶ Display a graphical user interface slider to play through frames of a map series.
-
vseries_stop
(session, series)¶ Stop playing a map series.