Re: [Rdkit-discuss] How to turn off labels and bonds coloring when calling Draw.SimilarityMaps.GetS
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Greg L. <gre...@gm...> - 2019-07-12 12:48:27
|
Hi Francois, The important thing here is to pass a DrawingOptions structure that you pass along. Here's an example: drawOptions = Draw.DrawingOptions() drawOptions.elemDict={} drawOptions.bgColor=None fig, maxweight = SimilarityMaps.GetSimilarityMapForFingerprint(refmol, mol, SimilarityMaps.GetMorganFingerprint, options=drawOptions) And a gist which, for some reason, isn't rendering properly for me: https://gist.github.com/greglandrum/99cff91b9f2315cccc7d475b015ffe96 -greg On Thu, Jul 11, 2019 at 10:25 AM Francois Berenger <ml...@li...> wrote: > Dear rdkiters, > > I am playing with rdkit.Chem.Draw: > --- > sim_map = Draw.SimilarityMaps.\ > GetSimilarityMapFromWeights(mol, weights) > --- > > I don't like that in the created figure, the map colors overlap > with atoms and bonds colors. > It makes the map less readable. > I would prefer all labels and bonds to be black, only the map > to bring colors. > > Also, since atoms have labels, I feel that coloring them > (and their bonds) is some unnecessary duplication of information. > > Can the atom labels and bonds default coloring scheme be turned off? > > From my reading of rdkit code, it seems that the elemDict in > Draw.DrawingOptions should be emptied. > > I don't know how to pass such an option, and if this is even possible, > to GetSimilarityMapFromWeights. > > Thanks a lot, > F. > > > _______________________________________________ > Rdkit-discuss mailing list > Rdk...@li... > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > |