Hi Christos, I recently did something like this for a fingerprint, I can't say whether or not the way you proposed works (though if it does it's a shortcut on what I did!)
What I did was cfac = ChemicalFeatures.BuildFeatureFactory('/Users/nfirth/Desktop/PythonScripts/ImportantText/featDef.txt') allRDKitFeats = cfac.GetFeaturesForMol(mol) for i in allRDKitFeats: if(i.GetFamily() == 'HBondAcceptor'): hBondAcceptors.append(i.GetAtomIds()[0]) elif(i.GetFamily() == 'HBondDonor'): hBondDonors.append(i.GetAtomIds()[0]) elif(i.GetFamily() == 'Aromatic'): aroAtoms.append(i.GetAtomIds()[0]) Which as you can see is a bit more complicated, but definitely gives the right results. The contents of the file featDef.txt is as follows: DefineFeature HDonor1 [N,O;!H0] Family HBondDonor Weights 1.0 EndFeature DefineFeature HAcceptor1 [N,O] Family HBondAcceptor Weights 1.0 EndFeature DefineFeature AromaticAtom [a] Family Aromatic Weights 1.0 EndFeature Hope that helps if your solution doesn't turn out. If it does then thanks for the shortcut! Best, Nick Nicholas C. Firth | PhD Student | Cancer Therapeutics The Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton | Surrey | SM2 5NG T 020 8722 4033 | E nicholas.fi...@icr.ac.uk<mailto:nicholas.fi...@icr.ac.uk> | W www.icr.ac.uk<http://www.icr.ac.uk/> | Twitter @ICRnews<https://twitter.com/ICRnews> Facebook www.facebook.com/theinstituteofcancerresearch<http://www.facebook.com/theinstituteofcancerresearch> Making the discoveries that defeat cancer [cid:image001.gif@01CE053D.51D3C4E0] On 26 Jul 2013, at 13:54, Christos Kannas <chriskan...@gmail.com<mailto:chriskan...@gmail.com>> wrote: Dear RDKiters, I'm creating a descriptor for estimating water solubility (clogSw) base on the following article of Delaney (doi:10.1021/ci034243x). J. S. Delaney, “ESOL: Estimating Aqueous Solubility Directly from Molecular Structure,” Journal of Chemical Information and Modeling, vol. 44, no. 3, pp. 1000–1005, May 2004. In this paper he proposes an equation to calculate an estimation of the water solubility of molecules based on physio-chemical descriptors. One of the descriptors used is Aromatic Proportion, that is the proportion of heavy atoms of the molecule that are in aromatic ring. So in order to find the aromatic heavy atoms I use GetSubstructMatches(...) with query SMARTS '[a]'. Is that the correct way to find all the aromatic atoms of a molecule? If not what is the correct SMARTS to use? @Greg: When I complete this, can we look into adding it as a new descriptor, clogSw (like clogP), within the RDKit distribution? Kind Regards, Christos -- Christos Kannas Researcher Ph.D Student e-Health Laboratory<http://www.medinfo.cs.ucy.ac.cy/> kannas.chris...@ucy.ac.cy<mailto:kannas.chris...@ucy.ac.cy> kannas.chris...@cs.ucy.ac.cy<mailto:kannas.chris...@cs.ucy.ac.cy> chriskan...@gmail.com<mailto:chriskan...@gmail.com> Mob: (+357) 99530608 ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network.
<<inline: image001.gif>>
------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss