smile strings to unifac subgroups

Hi,

Has anyone seen or written a protocol that can take smiles strings as in input and convert them to unifac subgroups.  

An example would be to input 

Ibuprofen CC(C)Cc1ccc(cc1)C(C)C(=O)O 
Toluene Cc1ccccc1

and output 

    'CH3'  3 0
    'CH'   1 0
    'ACH'  4 5
    'ACCH3' 0 1
    'ACCH2' 1 0
    'ACCH'  1 0
    'HCOOH' 1 0

​where the first column of numbers represents the ibuprofen subgroups and the second column toluene.