Created
February 18, 2015 14:17
-
-
Save ejmurray/1bb6790253d262d4fa37 to your computer and use it in GitHub Desktop.
Uses the webel module to search for chemicals.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# encoding: utf-8 | |
""" | |
Output the structure and other information on a chemical that is entered in line 9 of the code. | |
""" | |
__author__ = 'Ernest' | |
from cinfony import webel | |
mol = webel.readstring("name", "Oestradiol") | |
print "The molecular weight is %.1f" % mol.molwt | |
print "The InChI is %s" % mol.write("inchi") | |
print "The InChiKey is %s" % mol.write("inchikey") | |
# print "LogP values are %s" % mol.calcdesc(["ALOGPDescriptor"]) | |
print "It is also known as: %s" % mol.write("names") | |
mol.draw(filename="molecule.png", show=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment