Hi Dimitri,
On Wednesday, November 20, 2013, Dimitri Maziuk wrote:
> Hi all,
>
> is there a way to generate an image with all atoms (incl. hydrogens) and
> their indexes drawn?
Not easily. You can hack it by setting a property named "molAtomMapNumber"
on each atom with its index value (convert to a string first).
How would you like the number to be displayed at the same time as the
symbol? In parens perhaps: "C(2)"?
>
> I tried several variations along the lines of
> rdkit.Chem.Draw.MolToFile( mol, "out.svg" )
> and
>
> 1. the output either has atom numbers (with includeAtomNumbers = True)
> or atom symbols (without includeAtomNumbers), but not both. I tried a
> couple of different atomNumberOffset settings in case the number is
> written on top of the symbol, but they didn't do anything.
>
> 2. I didn't find an option to draw all atoms (all hydrogens, all
> backbone carbons, etc.) anywhere. Does that exist?
Hydrogens will be drawn if they are present in the molecular graph (use
Chem.AddHs()). What do you mean by backbone carbons? Include atom labels
for carbons too? You do that by setting the noCarbonSymbols drawing option
to False.
>
> 3. size = (300,300) makes a 300x300 rectangle with a molecule in the
> middle. Size = (800,800) seems to make a 800x800 rectangle with the same
> size molecule drawing in the middle. Setting fitImage = True doesn't
> seem to do anything. Is there a way to have the molecule fill the entire
> rectangle?
The maximum length of a bond is determined by the dotsPerAngstrom drawing
parameter. Increasing that will allow the molecule to be larger.
> Thanks in advance,
> --
> Dimitri Maziuk
> Programmer/sysadmin
> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
>
>
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss