/ . / ModelClip / mclipcmd.py
Functions
|
|
|
parse_model_spec
|
parse_model_spec ( mspec )
|
|
mclip_command
|
mclip_command ( cmdname, args )
Per-model clipping Chimera command mclip.
mclip #1-3 # Model specifier can be "all".
axis 0,0,1 # Can also be "x", "y", or "z".
origin 3.2,1,5 # Can also be "center" (of bounding box).
coords local # Can be "local" or "screen".
offset 5.0
stagger 0.1 # Make non-coincident planes for multiple models.
match #0 # Match clip plane of a specified model.
# Can also be "focalplane", "near", or "nearfar".
flip false # Flip plane 180 degrees.
slab false
thickness 10.0 # Slab thickness.
Only specified clipping parameters are changed, while unspecified ones
remain at their current values. If a model has not been clipped before
and the axis is not specified it defaults to "z", and if origin has not been
specified it defaults to "center". The offset is not a remembered parameter
-- it alters the origin which is remembed. The match option overrides other
options except for offset, stagger and flip. Specifying no arguments
turns on clipping for all models.
~mclip #2-4 # Turn off per-model clipping.
|
|
unclip_models
|
unclip_models ( models )
Exceptions
|
|
MidasError, 'No models specified by "%s"' % str( models )
|
|
|
match_settings
|
match_settings (
match,
axis,
origin,
coord,
slab,
thickness,
)
Exceptions
|
|
MidasError, 'match value must be a model id or "near", "nearfar" or "focal", got "%s"' % str( match )
|
|
|
center_of_models
|
center_of_models ( models )
Screen coordinates.
Transform each model box to coordinates of first box to compute center.
Transforming boxes to screen coordinates is not as good as the result
depends on the overall rotation.
|
|
mclip
|
mclip (
models,
axis=None,
origin=None,
coords=None,
offset=None,
stagger=None,
match=None,
flip=None,
slab=None,
thickness=None,
)
Exceptions
|
|
MidasError, 'No models specified by "%s"' % str( models )
MidasError, ('coords must be %s, got "%s"' %(' or '.join( csys ), str( coords ) ) )
MidasError, ('%s must be true/false, got "%s"' %(name, str( val ) ) )
MidasError, '%s must be number, got "%s"' %(name, str( val ) )
|
|
|
clip_models
|
clip_models (
models,
axis,
origin,
coord,
offset,
stagger,
flip,
slab,
thickness,
)
|
|
clip_model
|
clip_model (
m,
axis,
origin,
offset,
slab,
thickness,
flip,
)
|
|
parse_floats
|
parse_floats (
value,
name,
count,
default=None,
)
Exceptions
|
|
MidasError, ('%s value must be %d comma-separated numbers, got %s' %(name, count, str( value ) ) )
|
|
|
apply_offset
|
apply_offset (
origin,
axis,
offset,
)
|
|
unclip_command
|
unclip_command ( cmdname, args )
|
|
|