Opened 6 years ago

Closed 6 years ago

#2021 closed defect (fixed)

"cofr centerofview" not honoring clip changes

Reported by: olibclarke@… 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
Bug: Center of rotation does not remain locked to the center of view when "cofr centerofview" is used.

See screen recording: https://www.dropbox.com/s/dnoig3j3hoa2ivq/cofr_centerofview_bug.mov?dl=0

Basically, if I have cofr centerofview on, and then adjust the near/far clip planes, the cofr remains in its old position - even if I execute "cofr centerofview on" a second time. It should I think remain locked to the xy screen center, equidistant between the near/far clip planeswhen used in this mode.

Cheers
Oli

Log:
> camera ortho

> cofr centerOfView

> volume voxelLimit 100000 showPlane false limitVoxelCount false
voxelLimitForOpen 10000

> alias crosshairs_on cofr centerofview showpivot 5,0.2

> alias crosshairs_off cofr centerofview showpivot false

> alias cootmode volume style mesh squaremesh false meshlighting true
twosidedlighting false capfaces false; surface cap false; size stickradius
0.05; ~rib; color gold target a; color byhet; lighting flat; lighting
depthcuestart 0.2 depthcueend 0.7; set silhouettes false; set subdivision 1;
crosshairs_on; color #3333851effff target s; style stick; set bgcolor black

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/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 level 0.0177, step 4, values float32  

> 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 #2  
---  
Chain | Description  
A B G I | No description available  
F | No description available  
H J O | No description available  
  

> cootmode

Changed 143964 bond radii  
Changed 141366 atom styles  

> select #2

141366 atoms, 143964 bonds, 88 pseudobonds, 1 model selected  

> ui mousemode rightMode "translate selected models"

> fitmap #2 inMap #1

Fit molecule model_moved.pdb_modified.pdb (#2) to map
4cmc_apocam_combined_map.mrc (#1) using 141366 atoms  
average map value = 0.05699, steps = 52  
shifted from previous position = 0.412  
rotated from previous position = 0.00375 degrees  
atoms outside contour = 39682, contour level = 0.032805  
  
Position of model_moved.pdb_modified.pdb (#2) relative to
4cmc_apocam_combined_map.mrc (#1) coordinates:  
Matrix rotation and translation  
1.00000000 -0.00003598 -0.00005438 -4.92470927  
0.00003598 1.00000000 0.00000632 -4.25555325  
0.00005437 -0.00000632 1.00000000 -7.78825804  
Axis -0.09646757 -0.83003535 0.54930440  
Axis point 140494.43927345 0.00000000 -91055.00597494  
Rotation angle (degrees) 0.00375341  
Shift along axis -0.27079003  
  

> select clear

> toolshed show "Side View"

> cofr centerOfView

> crosshairs_on

> cofr centerOfView showPivot 10,0.4

> cofr centerOfView showPivot 10,0.4

> view cofr false

> cofr centerOfView showPivot 10,0.5

> cofr centerOfView showPivot 10,0.5

> cofr centerOfView showPivot 10,0.5

> help cofr

> cofr centerOfView showPivot 10,0.5

> cofr centerOfView showPivot 10,0.5




OpenGL version: 4.1 ATI-2.9.26
OpenGL renderer: AMD Radeon Pro 580 OpenGL Engine
OpenGL vendor: ATI Technologies Inc.

Change History (4)

in reply to:  1 ; comment:1 by olibclarke@…, 6 years ago

To be clear, if I just adjust the near front clip planes, I don’t expect the cofr to change - but I expect if I run "cofr centerofview" the cofr should be reset to be located equidistant between the near/far clip planes, unless I am misunderstanding.

Cheers
Oli


comment:2 by pett, 6 years ago

Component: UnassignedGeneral Controls
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submission"cofr centerofview" not honoring clip changes

comment:3 by Tom Goddard, 6 years ago

The center-of-view center of rotation method does not keep the center mid-way between near and far clip planes. It keeps the center at the same depth in the scene centered just in screen x and y dimensions.

https://www.cgl.ucsf.edu/chimerax/docs/user/commands/cofr.html

It might be simpler if it were also centered half way between near / far clip planes. I think the trouble with that is that when near/far clip planes are not enabled then the near/far bounds constantly vary as the model is rotated, and using half-way between near/far bounds then causes the rotation center move during a rotation. Possibly the mode could use one rule when near and far planes are enabled and a different rule when they are not enabled.

comment:4 by Tom Goddard, 6 years ago

Cc: Elaine Meng added
Resolution: fixed
Status: assignedclosed

Fixed.

Made center of view rotation method use depth halfway between near and far clip planes if both are enabled, or if only one clip plane enabled use depth on that plane, or if no clip planes enabled depth matches center of bounding box.

Note: See TracTickets for help on using tickets.