Consider the following excerpt:
svg = drawer.GetDrawingText()
svg2 = svg.replace('svg:','')
svg3 = SVG(svg2)
print 'displaying svg:'
display(svg)
print 'displaying svg2:'
display(svg2)
print 'displaying svg3:'
display(svg3)
svg and svg2 display as xml text. svg3 displays as the image, in a Jupyte
On 10/24/2016 04:39 PM, Peter S. Shenkin wrote:
> Or is it
> rather because chemists in your target audience will be thinking of the
> first atom in, say, a structure from an sd file as atom #1?
That
> 2. Regarding the last line, most of the RDKit code I've seen in past
> examples displays the m
Hi, Dimitri,
I have two questions about your code.
1. Why are you incrementing the atom index by 1? Are there functions in
RDKit, for example, that use atom indices using index-origin 1? Or is it
rather because chemists in your target audience will be thinking of the
first atom in, say, a structu
Since you already got your answer I'll just post this for posterity:
import sys
import rdkit
import rdkit.Chem
import rdkit.Chem.AllChem
import rdkit.Chem.Draw
import rdkit.Chem.Draw.rdMolDraw2D
mol=rdkit.Chem.SupplierFromFilename(sys.argv[1],removeHs=False).next()
dr=rdkit.Chem.Draw.rdMolDraw2D
ngbin Yang
>
> *From:* Peter S. Shenkin
> *Date:* 2016-10-24 10:18
> *To:* Dimitri Maziuk ; RDKit Discuss
>
> *Subject:* [Rdkit-discuss] 2D drawing with atoms labeled by index
> Hi,
>
> How do you get RDKit to label the atoms in a 2D drawing with their indices?
>
>
Hi,Peter S. Shenkin, I think this blog may help you draw molecule with
labels and it told more about drawing with rdMolDraw2D.
http://rdkit.blogspot.com/2015/02/new-drawing-code.html
Hongbin Yang From: Peter S. ShenkinDate: 2016-10-24 10:18To: Dimitri Maziuk;
RDKit DiscussSubject:
Hi,
How do you get RDKit to label the atoms in a 2D drawing with their indices?
There was some discussion of this that included Dimitri Maziuk in
September, but it wasn't clear to me whether he actually had to modify the
underlying drawing code to get this behavior.
-P.
-
7 matches
Mail list logo