Hi Nick, Here is some code to get you started: In: from rdkit import Chem from rdkit.Chem import AllChem molList = ['Nc1cc(C)cc(Br)c1','CNc1cc(C)cc(Cl)c1', 'CCC'] #create screening dataset mol_DB = [Chem.MolFromSmiles(m) for m in molList] #create query mol from smarts try: substr = AllChem.MolFromSmarts('[#7;H2]c1ccccc1') except: print 'error parsing smarts query' exit(1) #screen for m in mol_DB: try: if (m.HasSubstructMatch(substr)): print Chem.MolToSmiles(m) except: print 'error during substructure matching with mol '+Chem.MolToSmiles(m) continue Out: Cc1cc(N)cc(Br)c1 Is it that what you are looking for? You can find more examples here: http://www.rdkit.org/docs/GettingStartedInPython.html Cheers, Markus On 04/25/2013 02:36 PM, Nicholas Firth wrote: Hi RDKitters, |
------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss