schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.15k stars 275 forks source link

grid mode background color per grid cell #268

Closed speleo3 closed 1 year ago

speleo3 commented 1 year ago

This patch is a possible solution for https://github.com/schrodinger/pymol-open-source/issues/267, implemented as a background texture. It adds a new bg_gradient mode.

Example:

fragment ala
fragment cys
fragment gly

set grid_mode
set bg_gradient, 2
set bg_image_linear, 0

To facilitate a nice implementation, I first refactored the bg_grad function in a separate commit.