Great. Thanks. I will test this out straight away.

Giammy

On Mon, 28 Mar 2022 at 16:11, Paolo Tosco <paolo.tosco.m...@gmail.com>
wrote:

> Hi Gianmarco,
>
> sure, e.g.:
>
> d2d = rdMolDraw2D.MolDraw2DSVG(200, 200)
> d2d.drawOptions().annotationFontScale = 0.7
> d2d.drawOptions().addAtomIndices = True
> d2d.DrawMolecule(Chem.MolFromSmiles("c1ccccn1"))
> d2d.FinishDrawing()
> SVG(d2d.GetDrawingText())
> [image: image.png]
>
> Cheers,
> p.
>
> On Mon, Mar 28, 2022 at 5:03 PM Gianmarco Ghiandoni <ghiandon...@gmail.com>
> wrote:
>
>> Hello Paolo,
>>
>> Thanks for that. Is it possible to configure that parameter against the
>> rdMolDraw2D? I am using it to get the SVG string for my molecule:
>>
>> d2d = rdMolDraw2D.MolDraw2DSVG(fig_size[0], fig_size[1])
>>     d2d.DrawMolecule(
>>         rwmol,
>>         highlightAtoms=atoms_to_highlight,
>>         highlightAtomColors=idx2rgb,
>>         highlightBonds=None,
>>     )
>>     d2d.FinishDrawing()
>>     return d2d.GetDrawingText()
>>
>> Giammy
>>
>> On Mon, 28 Mar 2022 at 14:00, Paolo Tosco <paolo.tosco.m...@gmail.com>
>> wrote:
>>
>>> Hi Gianmarco,
>>>
>>> the setting that you need to adjust is
>>>
>>> annotationFontScale
>>> <https://www.rdkit.org/docs/cppapi/structRDKit_1_1MolDrawOptions.html#a6cf64fa7c9f2c08870914430f6a46282>
>>>
>>> e.g.
>>> IPythonConsole.drawOptions.annotationFontScale = 0.7
>>>
>>> The default scale is 0.5.
>>>
>>> Cheers,
>>> p.
>>>
>>>
>>> On Mon, Mar 28, 2022 at 2:31 PM Gianmarco Ghiandoni <
>>> ghiandon...@gmail.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I am using RDKit to set calculated values to atoms as shown below and I
>>>> would like to know whether it is possible or not to change the font size to
>>>> make it slightly bigger.
>>>>
>>>> # For each atom, set the property "atomNote" to a index+1 of the atom    
>>>> atom.SetProp("atomNote", str(atom.GetIdx()+1))
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Giammy
>>>>
>>>> --
>>>> *Gianmarco*
>>>> _______________________________________________
>>>> Rdkit-discuss mailing list
>>>> Rdkit-discuss@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>>>
>>>
>>
>> --
>> *Gianmarco*
>>
>

-- 
*Gianmarco*
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to