Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2737 closed defect (not a bug)

Normals reversed for negative contours

Reported by: Tristan Croll Owned by: Tom Goddard
Priority: normal Milestone:
Component: Volume Data Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Linux-3.10.0-1062.9.1.el7.x86_64-x86_64-with-centos-7.7.1908-Core
ChimeraX Version: 0.91 (2019-12-23)
Description
When displaying a volume surface in wireframe representation, negative contours appear to have their normals reversed (what is light should be dark and vice versa). The red surface in the attached image is an example (the -3 sigma Fo-Fc contour in a crystallographic map). Solid/transparent surfaces seem fine.

A related question: is it possible to have the option to exclude wireframe surfaces from directional lighting entirely, so they're only affected by the depth cueing fog?

Log:
UCSF ChimeraX version: 0.91 (2019-12-23)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open LTA-R3_refine_14.pdb

Summary of feedback from opening LTA-R3_refine_14.pdb  
---  
warnings | Ignored bad PDB record found on line 1  
REMARK Date 2020-01-10 Time 18:35:56 GMT +0000 (1578681356.67 s)  
  
Ignored bad PDB record found on line 2  
REMARK PHENIX refinement  
  
Ignored bad PDB record found on line 4  
REMARK ****************** INPUT FILES AND LABELS
******************************  
  
Ignored bad PDB record found on line 5  
REMARK Reflections:  
  
Ignored bad PDB record found on line 6  
REMARK file name :
/run/media/tic20/storage/structure_dump/review/2020_burmeister/revised_model/LTA-R3.mtz  
  
48 messages similar to the above omitted  
  
Chain information for LTA-R3_refine_14.pdb #1  
---  
Chain | Description  
A B | No description available  
X | No description available  
Y | No description available  
  

> open LTA-R3_refine_14.pdb

Summary of feedback from opening LTA-R3_refine_14.pdb  
---  
warnings | Ignored bad PDB record found on line 1  
REMARK Date 2020-01-10 Time 18:35:56 GMT +0000 (1578681356.67 s)  
  
Ignored bad PDB record found on line 2  
REMARK PHENIX refinement  
  
Ignored bad PDB record found on line 4  
REMARK ****************** INPUT FILES AND LABELS
******************************  
  
Ignored bad PDB record found on line 5  
REMARK Reflections:  
  
Ignored bad PDB record found on line 6  
REMARK file name :
/run/media/tic20/storage/structure_dump/review/2020_burmeister/revised_model/LTA-R3.mtz  
  
48 messages similar to the above omitted  
  
Chain information for LTA-R3_refine_14.pdb #2  
---  
Chain | Description  
A B | No description available  
X | No description available  
Y | No description available  
  

> matchmaker #2/B to #1/A

Parameters  
---  
Chain pairing | bb  
Alignment algorithm | Needleman-Wunsch  
Similarity matrix | BLOSUM-62  
SS fraction | 0.3  
Gap open (HH/SS/other) | 18/18/6  
Gap extend | 1  
SS matrix |  |  | H | S | O  
---|---|---|---  
H | 6 | -9 | -6  
S |  | 6 | -6  
O |  |  | 4  
Iteration cutoff | 2  
  
Matchmaker LTA-R3_refine_14.pdb, chain A (#1) with LTA-R3_refine_14.pdb, chain
B (#2), sequence alignment score = 1890.7  
RMSD between 361 pruned atom pairs is 0.480 angstroms; (across all 362 pairs:
0.496)  
  

> ~cartoon #2/A

> hide #2

> hide

> ~cartoon #1/B

> show #1/A

> show #2/B

> show nucleic

> usage matchmaker

matchmaker matchAtoms to an atoms specifier [pairing a text string] [alg a
text string] [verbose true or false] [ssFraction ssFraction] [matrix a text
string] [gapOpen a number] [hgap a number] [sgap a number] [ogap a number]
[cutoffDistance cutoffDistance] [gapExtend a number] [bring a models
specifier] [showAlignment true or false] [computeSs true or false] [matHh a
number] [matSs a number] [matOo a number] [matHs a number] [matHo a number]
[matSo a number]  
— Align atomic structures using sequence alignment  
ssFraction: a number or true or false  
cutoffDistance: a number or none  

> toolshed show Shell

/opt/UCSF/ChimeraX/lib/python3.7/site-packages/IPython/core/history.py:226:
UserWarning: IPython History requires SQLite, your history will not be saved  
warn("IPython History requires SQLite, your history will not be saved")  

> select #1/A

2962 atoms, 3021 bonds, 6 pseudobonds, 2 models selected  

> select #1/A&protein

2933 atoms, 2992 bonds, 1 model selected  

> select #2/B&protein

2933 atoms, 2992 bonds, 1 model selected  

> isolde start

> set selectionWidth 4

Chain information for LTA-R3_refine_14.pdb  
---  
Chain | Description  
1.1/A 1.1/B | No description available  
1.1/X | No description available  
1.1/Y | No description available  
  
Done loading forcefield  

> close #1.2-3#2#1.1

> open 3io0 structureFactors true

Summary of feedback from opening 3io0 fetched from pdb  
---  
warning | WARNING: multiple experimental reflection datasets found:  
F_meas_au, F_meas_sigma_au,  
pdbx_F_plus, pdbx_F_plus_sigma, pdbx_F_minus, pdbx_F_minus_sigma,  
pdbx_anom_difference, pdbx_anom_difference_sigma,  
intensity_meas, intensity_sigma,  
pdbx_I_plus, pdbx_I_plus_sigma, pdbx_I_minus, pdbx_I_minus_sigma  
Automatically choosing "intensity_meas, intensity_sigma".  
notes | Resolution: 3.003  
Reflection data provided as intensities. Performing French & Wilson scaling to
convert to amplitudes...  
  
3io0 title:  
Crystal structure of EtuB from Clostridium kluyveri [more info...]  
  
Chain information for 3io0  
---  
Chain | Description  
2.1/A | EtuB protein  
  
3io0 mmCIF Assemblies  
---  
1| author_and_software_defined_assembly  
  
  

> close #1

> clipper spotlight radius 13.00

> clipper spotlight radius 14.00

> clipper spotlight radius 15.00

> clipper spotlight radius 16.00

> clipper spotlight radius 17.00

> clipper spotlight radius 18.00

> clipper spotlight radius 19.00

> clipper spotlight radius 20.00

> clipper spotlight radius 21.00

> clipper spotlight radius 22.00

> clipper spotlight radius 21.00

> clipper spotlight radius 20.00

> clipper spotlight radius 19.00

> clipper spotlight radius 18.00

> clipper spotlight radius 17.00

> clipper spotlight radius 16.00

> clipper spotlight radius 15.00

> clipper spotlight radius 14.00

> clipper spotlight radius 20

> clipper spotlight radius 15

> hide #2.3 models

> show #2.3 models

> hide #2.3 models

> show #2.3 models

> hide #2.3 models

> show #2.3 models

> set bgColor white

> set bgColor black

> set bgColor white

> set bgColor black

> hide #!2.2.1.2 models

> show #!2.2.1.2 models

> hide #!2.2.1.4 models

> select clear

> select clear

> color bychain

> color bychain

> color byhetero

> color bfactor

1658 atoms, 230 residues, atom bfactor range 27.5 to 73.7  

> color bychain

> color byhetero

> color byattribute occ

No known/registered attribute occ  

> color byattribute occupancy #1

No atoms specified  

> color byattribute occupancy #2

1658 atoms, 230 residues, atom occupancy range 1 to 1  

> set bgColor white

QWidget::repaint: Recursive repaint detected  

> color bychain

> color byhetero

> set bgColor black

> select clear

> select clear

> save /home/tic20/Desktop/wireframe_lighting.jpg

> show #!2.2.1.4 models




OpenGL version: 3.3.0 NVIDIA 440.33.01
OpenGL renderer: TITAN Xp/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation
File attachment: wireframe_lighting.jpg

wireframe_lighting.jpg

Attachments (1)

wireframe_lighting.jpg (621.3 KB ) - added by Tristan Croll 6 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (7)

by Tristan Croll, 6 years ago

Attachment: wireframe_lighting.jpg added

Added by email2trac

comment:1 by pett, 6 years ago

Component: UnassignedVolume Data
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionNormals reversed for negative contours

comment:2 by Tom Goddard, 6 years ago

Resolution: not a bug
Status: assignedclosed

There are Volume options that control these behaviors and there are reasons that the default behaviors are as they are. The options are flip_normals and mesh_lighting described with the volume command

https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/volume.html#dispsurf

and in the code map/volume.py the RenderingOptions class whose values are set with volume.set_parameters(flip_normals = True, mesh_lighting = False).

ChimeraX does not know your data is signed and negative thresholds should use negative gradient for the outward direction while positive thresholds should use positive gradient. EM density is the most often viewed in ChimeraX and it usually has positive and negative values but it is not signed and zero has no special significance so the default behavior is normals always point in positive gradient direction.

in reply to:  4 comment:3 by Tristan Croll, 6 years ago

Ah - thanks! Should’ve known you’d be on top of that.
 

 


in reply to:  5 ; comment:4 by Tom Goddard, 6 years ago

Let me know if it doesn't work!  It came over from Chimera 1 but some of those options never got implemented.  I'm also not sure if the mesh_lighting is going to keep depth cue, a quick look at the code suggests no, as ChimeraX turns of "use_lighting" for the mesh and the OpenGL code considers depth cue part of lighting.  So improvements maybe be needed.

in reply to:  6 ; comment:5 by Tristan Croll, 6 years ago

Quick trial via the shell: flip_normals=True fixes the lighting issue, 
and mesh_lighting=False indeed turns off depth cueing so I'll avoid that 
for the time being.

On 2020-01-13 21:45, ChimeraX wrote:

comment:6 by Tom Goddard, 6 years ago

Should make mesh_lighting option not effect depth cueing. Made a new ticket for taht #2738.

Note: See TracTickets for help on using tickets.