Many packages allow the render of structures with certain atoms highlighted which is useful for visualization purposes. This can be naturally integrated into smilesDrawer.
Atoms can be highlighted by assigning atoms to be highlighted an atom map number (i.e. class). highlight_atoms is now a parameter in the Drawers which allows the assignment of an atom map number to a color which is used to highlight the atom.
An example is [CH2:10]1CCCCC1
Changes required were to save the "class" attribute for each atom which wasn't previously logged, to introduce another graphics object on the svg ("highlights") which exists beneath the path and vertices graphics objects, and a highlight_atoms parameter to specify the atom class to highlight color mapping.
The highlight_atoms parameter, however, may be argued to be better served to live within a Theme. However ,on occasion it may be useful to have a spectrum of colors to highlight with (e.g. a colorscale) or have a discrete range of colors for discrete atom properties, thus making more sense as an inputted property.
Many packages allow the render of structures with certain atoms highlighted which is useful for visualization purposes. This can be naturally integrated into smilesDrawer.
Atoms can be highlighted by assigning atoms to be highlighted an atom map number (i.e. class). highlight_atoms is now a parameter in the Drawers which allows the assignment of an atom map number to a color which is used to highlight the atom.
An example is [CH2:10]1CCCCC1
Changes required were to save the "class" attribute for each atom which wasn't previously logged, to introduce another graphics object on the svg ("highlights") which exists beneath the path and vertices graphics objects, and a highlight_atoms parameter to specify the atom class to highlight color mapping.
The highlight_atoms parameter, however, may be argued to be better served to live within a Theme. However ,on occasion it may be useful to have a spectrum of colors to highlight with (e.g. a colorscale) or have a discrete range of colors for discrete atom properties, thus making more sense as an inputted property.
@daenuprobst