Hi Greg and everyone ,

I do have cairo installed

>import cairo

Works fine

To generate the svg , I am using the MolToFile method from Chem.Draw


from rdkit.Chem.Draw import MolToFile

self.rdkitmolecule = rdkit.Chem.MolFromSmiles(self.smiles_string)

def make_svg_file(self):
        return MolToFile(self.rdkitmolecule,"%s.svg" % self.compound_id)

I think its Adobe Illustrator CS3 thats screwing up, since the svg
works just fine in Inkscape, Chrome browser and Firefox and also
validates with the w3c svg validator.
I was just hoping there is a way to tweak the file to have it not blow
up my font characters in Adobe Illustrator.  Its sad that a commercial
solution like Illustrator does not support true SVG.
screenshot attached:
Thanks
Hari
Hari




On Thu, Sep 23, 2010 at 2:08 AM, Greg Landrum <[email protected]> wrote:
> Dear Hari,
>
> On Wed, Sep 22, 2010 at 9:23 PM, hari jayaram <[email protected]> wrote:
>>
>> Adobe illustrator reads in the SVG , however the atom alphabets are a
>> few inches across  despite  the bonds showing  up normally. Adobe
>> Illustrator draws the Oxygen, Nitrogen and Carbon atoms are in
>> font-size 60 or 80 and positioned at a random point above the
>> molecule.
>> The svg does validate with the w3c validator  and is openable with
>> Chrome and Firefox without any distortion ,so it seems that Adobe
>> Illustrator is screwing up.
>>
>> Does anyone know how to correct the SVG file to not have this happen.
>> I apologize that this is not strictly a rdkit question , but just
>> asking in case others have successfully used the rdkit generated svg
>> in a vector drawing program.
>
> I'd like to know if the SVG in question is from my code or from cairo,
> can you please let me know if you have cairo installed (to check start
> python and type "import cairo") and, if so, what you did to generate
> the SVG?
>
> Best,
> -greg
>

<<attachment: screenshot_svg_mol_in_adobe_illustrator.PNG>>

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to