Re: [Rdkit-discuss] Plotting values next to atoms

2018-11-09 Thread John Mayfield
Well since someone suggested hacking B factors and using Pymol... not using
RDKit but

CCCOCC |$_AV:;;;3.14$|

AV=Atom Value, round tripped through MOLfile and ChemAxon extended SMILES.

[image: image.png]

Live Depiction:
https://www.simolecule.com/cdkdepict/depict/bow/svg?smi=CCCOCC%20%7C%24_AV%3A%3B%3B%3B3.14%24%7C=on=bridgehead=false=1.6=atomvalue

John

On Tue, 6 Nov 2018 at 02:01, Francois Berenger  wrote:

> On 03/11/2018 04:27, Greg Landrum wrote:
> > Hi Eric,
> >
> > On Fri, Nov 2, 2018 at 2:00 PM Eric Jonas  wrote:
> >
> >> Hello! I'm trying to figure out if there's any known or sane way to
> >> automatically plot numerical values adjacent to atoms using the
> >> rdkit drawing machinery. Ideally I'd like to annotate certain atoms
> >> programmatically with values. I think the conventional way this is
> >> done for publication is post-hoc editing in illustrator but it would
> >> be great if there was an automatic or supported mechanism.
>
> Hi Eric,
>
> One hackish way is to export your molecules in 3D in the PDB format.
> Then shove your numeric value into the B-factor field.
> Then, color your molecules by B-factor using your favorite viewer
> (Chimera, pymol, etc.).
> For this to work correctly, you may have to scale your values so that
> they become in the same
> range than B-factors.
>
> Wit a little programming, you could also export your molecules (in 3D,
> still) directly
> as balls in the BILD format of UCSF Chimera, and look at them into
> Chimera.
>
> https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/bild.html
>
> Regards,
> Francois.
>
> > Doing this correctly is on the list of high-priority things to do, and
> > I really hope to have something done for the 2019.03 release, but
> > there's no way I can guarantee that (it's a hard problem).
> >
> > In the meantime, there's a way to at least do something that is,
> > hopefully, better than nothing:
> > https://gist.github.com/greglandrum/8cf8ecc3253abf0a5139a776a5095163
> > [1]
> >
> > displayed here:
> >
> https://nbviewer.jupyter.org/gist/greglandrum/8cf8ecc3253abf0a5139a776a5095163
> > [2]
> >
> >
> > Links:
> > --
> > [1]
> > https://gist.github.com/greglandrum/8cf8ecc3253abf0a5139a776a5095163
> > [2]
> >
> https://nbviewer.jupyter.org/gist/greglandrum/8cf8ecc3253abf0a5139a776a5095163
> >
> > ___
> > 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
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Plotting values next to atoms

2018-11-05 Thread Francois Berenger

On 03/11/2018 04:27, Greg Landrum wrote:

Hi Eric,

On Fri, Nov 2, 2018 at 2:00 PM Eric Jonas  wrote:


Hello! I'm trying to figure out if there's any known or sane way to
automatically plot numerical values adjacent to atoms using the
rdkit drawing machinery. Ideally I'd like to annotate certain atoms
programmatically with values. I think the conventional way this is
done for publication is post-hoc editing in illustrator but it would
be great if there was an automatic or supported mechanism.


Hi Eric,

One hackish way is to export your molecules in 3D in the PDB format.
Then shove your numeric value into the B-factor field.
Then, color your molecules by B-factor using your favorite viewer 
(Chimera, pymol, etc.).
For this to work correctly, you may have to scale your values so that 
they become in the same

range than B-factors.

Wit a little programming, you could also export your molecules (in 3D, 
still) directly
as balls in the BILD format of UCSF Chimera, and look at them into 
Chimera.


https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/bild.html

Regards,
Francois.


Doing this correctly is on the list of high-priority things to do, and
I really hope to have something done for the 2019.03 release, but
there's no way I can guarantee that (it's a hard problem).

In the meantime, there's a way to at least do something that is,
hopefully, better than nothing:
https://gist.github.com/greglandrum/8cf8ecc3253abf0a5139a776a5095163
[1]

displayed here:
https://nbviewer.jupyter.org/gist/greglandrum/8cf8ecc3253abf0a5139a776a5095163
[2]


Links:
--
[1] 
https://gist.github.com/greglandrum/8cf8ecc3253abf0a5139a776a5095163

[2]
https://nbviewer.jupyter.org/gist/greglandrum/8cf8ecc3253abf0a5139a776a5095163

___
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


Re: [Rdkit-discuss] Plotting values next to atoms

2018-11-02 Thread Greg Landrum
Hi Eric,

On Fri, Nov 2, 2018 at 2:00 PM Eric Jonas  wrote:

> Hello! I'm trying to figure out if there's any known or sane way to
> automatically plot numerical values adjacent to atoms using the rdkit
> drawing machinery. Ideally I'd like to annotate certain atoms
> programmatically with values. I think the conventional way this is done for
> publication is post-hoc editing in illustrator but it would be great if
> there was an automatic or supported mechanism.
>

Doing this correctly is on the list of high-priority things to do, and I
really hope to have something done for the 2019.03 release, but there's no
way I can guarantee that (it's a hard problem).

In the meantime, there's a way to at least do something that is, hopefully,
better than nothing:
https://gist.github.com/greglandrum/8cf8ecc3253abf0a5139a776a5095163
displayed here:
https://nbviewer.jupyter.org/gist/greglandrum/8cf8ecc3253abf0a5139a776a5095163
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Plotting values next to atoms

2018-11-02 Thread Dimitri Maziuk via Rdkit-discuss
On 11/02/2018 07:59 AM, Eric Jonas wrote:
> Hello! I'm trying to figure out if there's any known or sane way to
> automatically plot numerical values adjacent to atoms using the rdkit
> drawing machinery. Ideally I'd like to annotate certain atoms
> programmatically with values.

This draws atom labels:

op = dr.drawOptions()
for i in range( self._mol.GetNumAtoms() ) :
op.atomLabels[i] = self._mol.GetAtomWithIdx( i ).GetSymbol() +
str( (i + 1) )

HTH,
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss