You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Viewer: bonds poorly visible on a white background #227
Reported by Andy (2026-10-04): with the viewer background set to white, bonds are hard to see.
Likely cause: bonds are drawn in the colours of their atoms, so bonds to hydrogen (white) and other light-coloured elements have almost no contrast against white, and thin wireframe/stick bonds have little shading to separate them from the background.
Possible fixes, to decide with the viewer look work (#210, Jmol colours) and the Coin port (#166):
a thin dark outline or silhouette on bonds (and atoms), as many molecular viewers use on light backgrounds;
adjust colours that are too close to the background (contrast check against the background colour);
stronger shading/specular on sticks so their form is visible.
To check first: which display styles are affected (Ball and Stick, Stick, Wireframe), and whether it is the same in the Coin build.
Narrowed after two rejected attempts (darker bond colours on light backgrounds; a dark outline on bonds and atoms): the colours stay as they are. The problem is the default view: the default style is Ball And Wireframe, which draws bonds as ~1 px GL lines, too thin to read, especially on white. Next: renders of the default view with thicker wireframe lines (2 and 3 px, scaled for HiDPI) against Ball And Stick as the default style, for a decision.
Decided: wireframe bonds become 3 px with line smoothing (scaled for HiDPI). Ball And Stick is to become the default display style once vibration arrows read well in it (today an arrow along a bond is hidden inside the stick); two options for that are being rendered for comparison.
Merged to main (b521d77, merge f7aecc8): wireframe bonds (Ball And Wireframe, Wireframe) now default to 3 px with line smoothing (depth comparison), multiplied by the canvas content scale for HiDPI; saved per-style line widths are read as before (a saved width of 1 equals the old default and was never written, so it now reads as 3). Checked on radium: ctest look_*|guivalues pass (look_offscreen_shading skipped there), tests/apps 29 checked, 0 failures. Before/after renders (ethanol, glycine; white and black background): /home/andy/tmp/ecce/g1-pngs/227-wire3/before-after.png. Ball And Stick arrow options are being rendered next.
Merged to main: Ball And Stick is now the default style (descriptor, atom/fragment/residue constructors, container, viewer fallbacks; a style a user saved still wins, which includes Ball And Wireframe saved on exit by earlier versions). While normal-mode arrows are shown the bond cylinders are drawn at 0.25 of their radius and restored when the arrows are hidden (0.15 erases the bond, 0.4 leaves the shaft half inside the stick; factors: /home/andy/tmp/ecce/g1-pngs/227-bs-arrows/factors.png). New test look_nm_sticks. Radium: look_*/guivalues and tests/apps (29 checked, 0 failures) pass; look_nm_sticks skips there (no Xvfb), passed locally. Default view before/after: /home/andy/tmp/ecce/g1-pngs/227-bs-default/before-after.png. Nothing else remains for this issue.
Related: on a white background the whole molecule looks weak, not only the bonds. See the comment on #210 (faceted spheres, flat shading, white hydrogens on white).
Activity
ohlincha commentedon Oct 6, 2026
Narrowed after two rejected attempts (darker bond colours on light backgrounds; a dark outline on bonds and atoms): the colours stay as they are. The problem is the default view: the default style is Ball And Wireframe, which draws bonds as ~1 px GL lines, too thin to read, especially on white. Next: renders of the default view with thicker wireframe lines (2 and 3 px, scaled for HiDPI) against Ball And Stick as the default style, for a decision.
ohlincha commentedon Oct 7, 2026
Decided: wireframe bonds become 3 px with line smoothing (scaled for HiDPI). Ball And Stick is to become the default display style once vibration arrows read well in it (today an arrow along a bond is hidden inside the stick); two options for that are being rendered for comparison.
docs/claude: wireframe bond width and HiDPI scale (#227)
ohlincha commentedon Oct 7, 2026
Merged to main (b521d77, merge f7aecc8): wireframe bonds (Ball And Wireframe, Wireframe) now default to 3 px with line smoothing (depth comparison), multiplied by the canvas content scale for HiDPI; saved per-style line widths are read as before (a saved width of 1 equals the old default and was never written, so it now reads as 3). Checked on radium: ctest look_*|guivalues pass (look_offscreen_shading skipped there), tests/apps 29 checked, 0 failures. Before/after renders (ethanol, glycine; white and black background): /home/andy/tmp/ecce/g1-pngs/227-wire3/before-after.png. Ball And Stick arrow options are being rendered next.
Ball And Stick is the default style; sticks are thin while normal-mod…
ohlincha commentedon Oct 7, 2026
Merged to main: Ball And Stick is now the default style (descriptor, atom/fragment/residue constructors, container, viewer fallbacks; a style a user saved still wins, which includes Ball And Wireframe saved on exit by earlier versions). While normal-mode arrows are shown the bond cylinders are drawn at 0.25 of their radius and restored when the arrows are hidden (0.15 erases the bond, 0.4 leaves the shaft half inside the stick; factors: /home/andy/tmp/ecce/g1-pngs/227-bs-arrows/factors.png). New test look_nm_sticks. Radium: look_*/guivalues and tests/apps (29 checked, 0 failures) pass; look_nm_sticks skips there (no Xvfb), passed locally. Default view before/after: /home/andy/tmp/ecce/g1-pngs/227-bs-default/before-after.png. Nothing else remains for this issue.
Viewer: a saved DefaultStyle of Ball And Wireframe moves to Ball And …
ohlincha commentedon Oct 10, 2026
Related: on a white background the whole molecule looks weak, not only the bonds. See the comment on #210 (faceted spheres, flat shading, white hydrogens on white).