# HG changeset patch # User bgruening # Date 1366984713 14400 # Node ID bc6a7eeb7c322c58cd4ad848ae0c88ad22a78d18 # Parent dbf93116a809c593be8ff05073cac43b99f32132 Uploaded diff -r dbf93116a809 -r bc6a7eeb7c32 molecules.py --- a/molecules.py Tue Mar 26 13:00:19 2013 -0400 +++ b/molecules.py Fri Apr 26 09:58:33 2013 -0400 @@ -70,6 +70,19 @@ def get_mime(self): return 'text/plain' +class MOL( GenericMolFile ): + file_ext = "mol" + def sniff( self, filename ): + if count_special_lines("^M\s*END", filename) = 1: + return True + else: + return False + + def set_meta( self, dataset, **kwd ): + """ + Set the number molecules, in the case of MOL its always one. + """ + dataset.metadata.number_of_molecules = 1 class SDF( GenericMolFile ): @@ -82,9 +95,9 @@ def set_meta( self, dataset, **kwd ): """ - Set the number of lines of data in dataset. + Set the number of molecules in dataset. """ - dataset.metadata.number_of_molecules = count_special_lines("^\$\$\$\$", dataset.file_name)#self.count_data_lines(dataset.file_name) + dataset.metadata.number_of_molecules = count_special_lines("^\$\$\$\$", dataset.file_name) def split( cls, input_datasets, subdir_generator_function, split_params): """ diff -r dbf93116a809 -r bc6a7eeb7c32 repository_dependencies.xml --- a/repository_dependencies.xml Tue Mar 26 13:00:19 2013 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ - - - - diff -r dbf93116a809 -r bc6a7eeb7c32 tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Fri Apr 26 09:58:33 2013 -0400 @@ -0,0 +1,4 @@ + + + +