Hide hydrogens when using interactive_plot to render 2D image of molecules
Hi mcsorkun,
Thanks a lot for the great tool.
Just wondering, what would be the best way to hide all the hydrogens when using the interactive_plot?
I tried to preprocess the smiles by rdkit.Chem.rdmolops.RemoveHs, but in the bokeh HTML the 2D images rendered by interactive_plot are still with hydrogens, for example:

Would be great to have an option in interactive_plot to do this.
Hi @shkao,
Apologizes for the late reply!
Currently each Plotter object keep track of the rdkit Mol objects within an attribute __mols. The latter is used by interactive_plot() in order to draw the molecules. Therefore currently in order to remove the hydrogens you will need to modify this attribute before calling interactive_plot() with, for example, the following line:
plotter_instance._Plotter__mols = [Chem.RemoveHs(mol) for mol in plotter_instance._Plotter__mols]
Thank you for the suggestion! We discuss adding an option to remove hydrogens in interactive_plot() for the next sub-release!
Hi @dajtmullaj,
Thank you, works like a charm now! And I also found it integrated perfectly with Streamlit. A very nice package, thanks again! :-) Do you want me to close this issue now, or wait until the enhancement feature is done?
@shkao I'll prefer to leave it open for now! We will soon start development on small enhancement features as the one we just discussed and I will close it then as you suggested :) I am glad you are enjoying the package :) Don't hesitate to let us know future suggestions!