Re: [Rdkit-discuss] Change font size in atom.SetProp("atomNote")

2022-03-28 Thread Gianmarco Ghiandoni
Great. Thanks. I will test this out straight away.

Giammy

On Mon, 28 Mar 2022 at 16:11, Paolo Tosco 
wrote:

> Hi Gianmarco,
>
> sure, e.g.:
>
> d2d = rdMolDraw2D.MolDraw2DSVG(200, 200)
> d2d.drawOptions().annotationFontScale = 0.7
> d2d.drawOptions().addAtomIndices = True
> d2d.DrawMolecule(Chem.MolFromSmiles("c1n1"))
> d2d.FinishDrawing()
> SVG(d2d.GetDrawingText())
> [image: image.png]
>
> Cheers,
> p.
>
> On Mon, Mar 28, 2022 at 5:03 PM Gianmarco Ghiandoni 
> 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 
>> wrote:
>>
>>> Hi Gianmarco,
>>>
>>> the setting that you need to adjust is
>>>
>>> annotationFontScale
>>> 
>>>
>>> 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


Re: [Rdkit-discuss] Change font size in atom.SetProp("atomNote")

2022-03-28 Thread Paolo Tosco
Hi Gianmarco,

sure, e.g.:

d2d = rdMolDraw2D.MolDraw2DSVG(200, 200)
d2d.drawOptions().annotationFontScale = 0.7
d2d.drawOptions().addAtomIndices = True
d2d.DrawMolecule(Chem.MolFromSmiles("c1n1"))
d2d.FinishDrawing()
SVG(d2d.GetDrawingText())
[image: image.png]

Cheers,
p.

On Mon, Mar 28, 2022 at 5:03 PM Gianmarco Ghiandoni 
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 
> wrote:
>
>> Hi Gianmarco,
>>
>> the setting that you need to adjust is
>>
>> annotationFontScale
>> 
>>
>> 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*
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Change font size in atom.SetProp("atomNote")

2022-03-28 Thread Gianmarco Ghiandoni
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 
wrote:

> Hi Gianmarco,
>
> the setting that you need to adjust is
>
> annotationFontScale
> 
>
> 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 
> 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*
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Change font size in atom.SetProp("atomNote")

2022-03-28 Thread Gianmarco Ghiandoni
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