|
Project Information
Featured
Downloads
Links
|
CinfonyCinfony presents a common API to several cheminformatics toolkits. It uses the Python programming language, and builds on top of Open Babel, RDKit, the CDK, Indigo, OPSIN and cheminformatics webservices. It's open source so you can install it now for free on Windows or Linux. Or you can use it online through the Interactive Cheminformatics Tutorial (Windows only).
Documentation
ExampleHere's a short example to get the juices flowing. Let's read an IUPAC name with OPSIN, use Webel to find out its offical IUPAC name, draw it with Indigo, calculate its fingerprint with the RDKit, calculate descriptor values with the CDK, and write it out as an SDF file using Open Babel: C:\> cinfony # Set environment variables
C:\> python
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from cinfony import obabel, rdk, cdk, indy, opsin, webel
>>> opsinmol = opsin.readstring("iupac", "2,4,6-trinitrotoluene")
>>> opsinmol.write("smi")
'[N+](=O)([O-])C1=C(C(=CC(=C1)[N+](=O)[O-])[N+](=O)[O-])C'
>>> webel.Molecule(opsinmol).write("iupac")
'2-Methyl-1,3,5-trinitrobenzene'
>>> indy.Molecule(opsinmol).draw(filename="indy.png", show=False)
>>> rdk.Molecule(opsinmol).calcfp().bits
[4, 11, 13, 16, 19, 24, 32, 33, 35, 40, 47, 53, 56, 62, 68, 71, 78, 94, 97, 102,
...
1969, 1972, 1979, 1985, 1990, 1992, 2004, 2010, 2016, 2021, 2023, 2028, 2034]
>>> cdkdescs = cdk.Molecule(opsinmol).calcdesc()
{'WHIM.13': nan, 'kierHallSmarts.49': 0, 'kierHallSmarts.48': 0, 'BCUT.4': 3.783
4783086527555, 'BCUT.5': 8.8565180117573092, ...}
>>> obabelmol = obabel.Molecule(opsinmol)
>>> obabelmol.make3D()
>>> obabelmol.title = "TNT"
>>> obabelmol.data.update(cdkdescs)
>>> obabelmol.write("sdf", "TNT.sdf")
|