changeset 1:45b822b9d522

Uploaded
author bgruening
date Sat, 27 Apr 2013 13:15:27 -0400
parents 764340994e71
children ba209f6d2fac
files rdkit_descriptors.py repository_dependencies.xml tool_dependencies.xml
diffstat 3 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/rdkit_descriptors.py	Sat Apr 27 09:01:41 2013 -0400
+++ b/rdkit_descriptors.py	Sat Apr 27 13:15:27 2013 -0400
@@ -7,6 +7,10 @@
 import inspect
 
 def get_supplier( infile, format = 'smiles' ):
+    """
+    Returns a generator over a SMILES or InChI file. Every element is of RDKit 
+    molecule and has its original string as _Name property.
+    """
     with open(infile) as handle:
         for line in handle:
             line = line.strip()
@@ -22,6 +26,9 @@
 
 
 def get_rdkit_descriptor_functions():
+    """
+    Returns all descriptor functions under the Chem.Descriptors Module as tuple of (name, function)
+    """
     ret = [ (name, f) for name, f in inspect.getmembers( Descriptors ) if inspect.isfunction( f ) and not name.startswith( '_' ) ]
     ret.sort()
     return ret
@@ -31,7 +38,6 @@
     """
     Calculates the descriptors of a given molecule.
     """
-
     for name, function in functions:
         yield (name, function( mol ))
 
@@ -66,6 +72,6 @@
         if not mol:
             continue
         descs = descriptors( mol, functions )
-        name = mol.GetProp("_Name")
-        args.outfile.write( "%s\n" % '\t'.join( [name]+ [str(res) for name, res in descs] ) )
+        molecule_id = mol.GetProp("_Name")
+        args.outfile.write( "%s\n" % '\t'.join( [molecule_id]+ [str(res) for name, res in descs] ) )
 
--- a/repository_dependencies.xml	Sat Apr 27 09:01:41 2013 -0400
+++ b/repository_dependencies.xml	Sat Apr 27 13:15:27 2013 -0400
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
 <repositories description="This requires the Molecule datatype definitions (e.g. SMILES, InChI, SD-format).">
-    <repository toolshed="http://testtoolshed.g2.bx.psu.edu/" name="molecule_datatypes" owner="bgruening" changeset_revision="e533de975501" />
+    <repository toolshed="http://testtoolshed.g2.bx.psu.edu/" name="molecule_datatypes" owner="bgruening" changeset_revision="31d2baa37efe" />
 </repositories> 
--- a/tool_dependencies.xml	Sat Apr 27 09:01:41 2013 -0400
+++ b/tool_dependencies.xml	Sat Apr 27 13:15:27 2013 -0400
@@ -1,5 +1,5 @@
 <tool_dependency>
     <package name="rdkit" version="2012_12_1">
-        <repository toolshed="http://testtoolshed.g2.bx.psu.edu/" name="package_rdkit_2012_12" owner="bgruening" changeset_revision="0adc830e7d71" prior_installation_required="True" />
+        <repository toolshed="http://testtoolshed.g2.bx.psu.edu/" name="package_rdkit_2013_03" owner="bgruening" changeset_revision="2afc5219c053" prior_installation_required="True" />
     </package>
 </tool_dependency>