#2020 closed enhancement (fixed)
Clipping relative to center of rotation
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | General Controls | Version: | |
Keywords: | Cc: | Elaine Meng | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Darwin-18.6.0-x86_64-i386-64bit ChimeraX Version: 0.9 (2019-06-05) Description Request: Allow near/far clipping relative to center of rotation. This is useful when viewing models in maps. I would like to be able to use a command like "clip near -5 far 5 position cofr" to clip the view to a 10Å slab centered on the center of rotation. Currently the only way to do this is to get the center of rotation and then specify it as xyz, which is not useful if one wants to use this command frequently. Particularly useful when using "cofr centerofview on". Also, I'm not sure whether this is a bug or as intended, but currently "surface cap" overrides the "capfaces false" option for mesh maps. So if I have a mesh map with "capfaces false", caps will still be shown where the map is clipped by the near clip plane if "surface cap" is on. Cheers Oli Log: > camera ortho > cofr centerOfView > alias crosshairs_on cofr centerofview showpivot 10,0.3 > alias crosshairs_off cofr centerofview showpivot false UCSF ChimeraX version: 0.9 (2019-06-05) © 2016-2019 Regents of the University of California. All rights reserved. How to cite UCSF ChimeraX > open /Users/oliverclarke/Dropbox/Downloads/model_moved.pdb_modified.pdb Summary of feedback from opening /Users/oliverclarke/Dropbox/Downloads/model_moved.pdb_modified.pdb --- warnings | Duplicate atom serial number found: 819 Duplicate atom serial number found: 820 Duplicate atom serial number found: 821 Duplicate atom serial number found: 822 Duplicate atom serial number found: 823 103573 messages similar to the above omitted Chain information for model_moved.pdb_modified.pdb #1 --- Chain | Description A B G I | No description available F | No description available H J O | No description available > help repr No help found for 'repr' > style selAtoms stick Changed 141366 atom styles > color gold > color byhetero > open /Users/oliverclarke/Dropbox/Downloads/4cmc_apocam_combined_map.mrc Opened 4cmc_apocam_combined_map.mrc, grid size 785,781,790, pixel 0.707,0.707,0.707, shown at step 1, values float32 > hide #!2 models > show #!2 models > select #1 141366 atoms, 143964 bonds, 88 pseudobonds, 1 model selected > ui mousemode rightMode "translate selected models" > select #2 3 models selected > select #1 141366 atoms, 143964 bonds, 88 pseudobonds, 1 model selected > select #2 3 models selected > select #1 141366 atoms, 143964 bonds, 88 pseudobonds, 1 model selected Missing required "in_map" argument > help fitmap > fitmap #1 inMap #2 Fit molecule model_moved.pdb_modified.pdb (#1) to map 4cmc_apocam_combined_map.mrc (#2) using 141366 atoms average map value = 0.05699, steps = 72 shifted from previous position = 2.36 rotated from previous position = 0.00377 degrees atoms outside contour = 31542, contour level = 0.027623 Position of model_moved.pdb_modified.pdb (#1) relative to 4cmc_apocam_combined_map.mrc (#2) coordinates: Matrix rotation and translation 1.00000000 -0.00004257 -0.00004754 -4.92281485 0.00004257 1.00000000 0.00001579 -4.25131684 0.00004754 -0.00001579 1.00000000 -7.79360639 Axis -0.24017357 -0.72315004 0.64758835 Axis point 153166.35002518 0.00000000 -107547.54238915 Rotation angle (degrees) 0.00376671 Shift along axis -0.79037876 > fitmap #1 inMap #2 Fit molecule model_moved.pdb_modified.pdb (#1) to map 4cmc_apocam_combined_map.mrc (#2) using 141366 atoms average map value = 0.05699, steps = 28 shifted from previous position = 0.00903 rotated from previous position = 0.00113 degrees atoms outside contour = 31528, contour level = 0.027623 Position of model_moved.pdb_modified.pdb (#1) relative to 4cmc_apocam_combined_map.mrc (#2) coordinates: Matrix rotation and translation 1.00000000 -0.00002610 -0.00005001 -4.91848828 0.00002610 1.00000000 0.00000531 -4.24159143 0.00005001 -0.00000532 1.00000000 -7.79394133 Axis -0.09379795 -0.88262286 0.46062873 Axis point 161511.97918513 0.00000000 -97203.11576919 Rotation angle (degrees) 0.00324637 Shift along axis 0.61495636 > ~select Nothing selected > help volume > volume #2 squareMesh false meshLighting false > volume #2 squareMesh false meshLighting false twoSidedLighting false > volume #2 squareMesh false meshLighting false twoSidedLighting false capFaces false > volume #2 squareMesh false meshLighting false twoSidedLighting false capFaces false Unknown command: collor #2 #00000000cccc > color #2 #00000000cccc > help clip > help section No help found for 'section' > help slab No help found for 'slab' > clip near 10 far 10 clip far plane is in front of near plane > view orient cofr false > view cofr false > clip near 10 far -10 clip far plane is in front of near plane > view cofr false > clip near -10 far 10 > crosshairs_on > set subdivision 1 > lighting simple > volume #2 squareMesh false meshLighting false twoSidedLighting false capFaces false Unknown command: collor #2 #00000000cccc > volume #2 squareMesh false meshLighting false twoSidedLighting false capFaces false > surface cap false > set bgColor black > clip near -5 far 5 > help clip > clip near -5 far 5 > clip near -5 far 5 > clip near -5 far 5 > select clear > select clear > select clear > cofr Center of rotation: 272.96 307.4 234.91 center of view > select up Nothing selected Expected a keyword > cofr Center of rotation: 272.96 307.4 234.91 center of view Expected a keyword Invalid "position" argument: Expected 3 floats or object specifier > clip near -5 far 5 position 272.0, 307, 235 OpenGL version: 4.1 ATI-2.9.26 OpenGL renderer: AMD Radeon Pro 580 OpenGL Engine OpenGL vendor: ATI Technologies Inc.
Attachments (1)
Change History (7)
comment:1 by , 6 years ago
Component: | Unassigned → General Controls |
---|---|
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → Clipping relative to center of rotation |
Type: | defect → enhancement |
comment:2 by , 6 years ago
comment:3 by , 6 years ago
The "surface cap" command and the volume command "capFaces" options do different things and are independent options. "surface cap" controls whether holes made by clip planes are covered by a cap. The volume command "capFaces" option controls whether caps are placed over holes and the boundary of the volume box. This latter option applies only to volume models and the box boundaries are not the same as clip planes, they are the edge of the data set (or subregion of the data set being shown).
One might want to change both these options in unison but I don't see a reasonable way to do that.
follow-up: 4 comment:4 by , 6 years ago
Hi Tom I frequently set clip planes using the command line in Chimera using this alias: alias symclip cofr view; cofr fixed; clip hither $1 fromCenter true; clip yon -$1 fromCenter true; cofr view; clip on This is really useful as it allows one to clip in a slab of defined thickness around the center of rotation. It is *much* better having the center of rotation locked to the center of view when inspecting maps and models, as it allows precise navigation - when using the frontcenter option it is impossible to position the center of rotation for example on a particular atom or residue - the intended center point keeps precessing as one rotates. The clip command *does* have an argument defining what origin to use (“position”), unless I misunderstand, it’s just that right now this can only be specified as xyz. I am suggesting that the user should be able to specify "position cofr", where cofr would be a special variable that grabs the current center of rotation. Cheers Oli
comment:5 by , 6 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I forgot clip had a "position" argument. I added support so "position cofr" works.
In fact all commands that take a CenterArg argument which can be 3 comma-separated numbers, an atom specifier, the word "camera" (meaning at the eye position), can now also take "cofr". Most command options that need to define a point in space use a CenterArg argument, so specifying "cofr" as a point should work in many places now.
comment:6 by , 6 years ago
Fabulous! Thanks Tom! This will see a lot of use from me if no-one else :-) Oli
Currently the clip command plane positions are relative to the center of the bounding box of the displayed scene ignoring clip planes. The proposal is to have the positions be relative to the center of rotation. I guess the main difference is when near/far clipping is enabled the center of the scene box may be outside the clip planes. The rationale for doing it the way it is now was that this gave a fixed reference point for the clip origin. For instance if I used "clip near 10", then moved around and used "clip near 5", the 5 and 10 would be relative to the same origin. If instead the default front-center center of rotation was used then the origin would likely be different for the two commands. It seems the requested behavior is intended to be used with center-of-view center of rotation method. It is hard to optimize behaviors for different center of rotation methods. Since front-center is the default center of rotation most capabilities are optimized for that mode.
Another idea is that the clip origin could be the center of bounding box ignoring anything clipped out of view. This has the same drawbacks and using center-of-rotation as the origin.
Perhaps the clip command could have an option defining what origin to use. This would be cumbersome to use.
I would think clip planes are almost always positioned interactively with the mouse. So I am not clear on what typical circumstances would be where instead they are set by a typed command.