# HG changeset patch
# User bgruening
# Date 1367082927 14400
# Node ID 45b822b9d5225f866c2cc7284455a450a7aeee66
# Parent 764340994e7176e61f10d3fa461dbbe2f741b15b
Uploaded
diff -r 764340994e71 -r 45b822b9d522 rdkit_descriptors.py
--- 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] ) )
diff -r 764340994e71 -r 45b822b9d522 repository_dependencies.xml
--- 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 @@
-
+
diff -r 764340994e71 -r 45b822b9d522 tool_dependencies.xml
--- 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 @@
-
+