[adding the mailing list back in] Hi Alexis,
It's not currently possible to change the colormap that's being used with the new drawing code. It should be, so I created an issue for it: https://github.com/rdkit/rdkit/issues/2904 -greg On Thu, Jan 23, 2020 at 7:00 PM Alexis Parenty < alexis.parenty.h...@gmail.com> wrote: > Hi again, one last question, I used to use the colorMap argument "RdBu" to > get a nice blue against red color coding rather than the default green / > purple (that I also use to highlight another property). The following does > not produce blue/red color code anymore: > > d = Draw.MolDraw2DCairo(400, 400) > SimilarityMaps.GetSimilarityMapFromWeights(mol, coverage_list, draw2d=d, > colorMap='RdBu') > d.FinishDrawing() > img = show_png(d.GetDrawingText()) > img.save("applicability_domain_glowing_molecule.png") > > How can I recover the blue/red colors? > Many thanks, > Alexis > > On Thu, 23 Jan 2020 at 17:09, Alexis Parenty < > alexis.parenty.h...@gmail.com> wrote: > >> Hi Greg, many thanks for your quick response. That's exactly what I was >> after. In addition, the quality of the new drawing code is superb. >> Best, >> Alexis >> >> On Thu, 23 Jan 2020 at 10:03, Greg Landrum <greg.land...@gmail.com> >> wrote: >> >>> Hi Alexis, >>> >>> It's not currently possible to control the widths or colors of >>> particular bonds in the molecular renderings, but you can certainly >>> highlight arbitrary bonds (and the color of those highlights) in the >>> molecular drawing. >>> This is controlled using the highlightBondColors argument to >>> DrawMolecule. >>> Here's an example of that: >>> https://gist.github.com/greglandrum/baafb4810aab474a0dd96dae9e34fcaf >>> >>> The Python code that actually generates the similarity map using the new >>> drawing code (described in this blog post: >>> http://rdkit.blogspot.com/2020/01/similarity-maps-with-new-drawing-code.html) >>> is here: >>> >>> https://github.com/rdkit/rdkit/blob/master/rdkit/Chem/Draw/SimilarityMaps.py#L152 >>> >>> At the moment you'd need to duplicate that and add the >>> highlightBondColors argument to the call to DrawMolecules() >>> >>> thinking about adding an API to allow bond widths and colors to be >>> directly changed is interesting... >>> >>> -greg >>> >>> >>> >>> >>> >>> On Wed, Jan 22, 2020 at 6:17 PM Alexis Parenty < >>> alexis.parenty.h...@gmail.com> wrote: >>> >>>> Hi everyone, >>>> >>>> I use SimilarityMaps.GetSimilarityMapFromWeights(mol, atom_ids) to >>>> highlight some parts of a structure, but is it also possible to change the >>>> thickness of some bonds of a structure knowing their atom IDs? If selected >>>> bonds cannot be bold, can we change their color? >>>> >>>> Many thanks and regards, >>>> >>>> Alexis >>>> _______________________________________________ >>>> Rdkit-discuss mailing list >>>> Rdkit-discuss@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >>>> >>>
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss