Hi Sergio,

here is a solution that uses a free web service offered by the NIH.

It's independent of the rdkit but rather slow. Anyway, if you don't need to process too many molecules at a time or if time is not the critical factor maybe it could serve as an intermediate solution:


import urllib2

def smi_to_iupac(smi):

    try:
url = 'http://cactus.nci.nih.gov/chemical/structure/'+smi+'/iupac_name'

        iupacName = urllib2.urlopen(url).read()
        #print iupacName
        return iupacName

    except urllib2.HTTPError, e:
        print "HTTP error: %d" % e.code
        return None
    except urllib2.URLError, e:
        print "Network error: %s" % e.reason.args[1]
        return None
    except:
        print "conversion failed for smiles "+ smi
        return None

smiles = ["CC(O)C","CC(=O)O", "O=C2OCC(=C2\c1ccccc1)\c3ccc(cc3)S(=O)(=O)C"]

for s in smiles:
    print smi_to_iupac(s)


returns

Propan-2-ol
acetic acid
4-(4-methylsulfonylphenyl)-3-phenyl-5H-furan-2-one


By the way, this service offers conversions between many different molecule formats/identifiers. I have used it in the past for CAS number look-up.

Best,
Markus


On 08/27/2013 05:21 PM, Sergio Martinez Cuesta wrote:
Hi,

is there any IUPAC name generator in RDKit?

e.g. for transforming "CC(C)O" into "propan-2-ol" ?

Many thanks
Sergio


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk


_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to