On 11/21/2013 02:10 AM, Greg Landrum wrote: > How would you like the number to be displayed at the same time as the > symbol? In parens perhaps: "C(2)"?
C2 would work best for me. (And I've no problem if it's not perfectly
aligned & the bond goes to the middle of 'C' instead of the middle of
'C2'.) Related questions:
- if I read the molecule from (e.g.) SDF, will the numbers match atom
order in the input? I.e. rdkit won't reorder the atoms, correct?
- rdkit seems to be numbering atoms from 0, can I renumber them before
drawing?
> 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.
I forgot to mention I tried noCarbonSymbols, too.
Attached CID_5950_OB.svg was generated by OpenBabel. I'm not too happy
with OB's indexes in superscript, I'd much prefer "O2" to O-squared, but
it has all Hs and atom labels drawn.
c.f. CID_5950_1.svg generated by
mol = rdkit.Chem.SupplierFromFilename("CID_5950.sdf").next()
rdkit.Chem.FindMolChiralCenters(mol)
rdkit.Chem.AddHs(mol)
rdkit.Chem.Draw.MolToFile(mol,"CID_5950_1.sdf",noCarbonSymbols=False)
Andd with
rdkit.Chem.Draw.MolToFile(mol,"CID_5950_2.sdf",noCarbonSymbols=False,includeAtomNumbers=True)
I get the attached CID_5950_2.sdf -- the numbering seems to match OB's
except theirs starts with 1, but of course it doesn't have hydrogens so
I can't tell about those.
Thanks
--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
<<attachment: CID_5950_OB.svg>>
<<attachment: CID_5950_1.svg>>
<<attachment: CID_5950_2.svg>>
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ 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

