On 22/01/13 05:40, Greg Landrum wrote: > Hi Paul, > > On Mon, Jan 21, 2013 at 4:13 PM, Paul Emsley <pems...@mrc-lmb.cam.ac.uk> > wrote: >> I am making heavy weather of the following problem - and am wondering if I >> am missing something (such as a useful RDKit function). >> >> I am working on this beasty (as an example): >> >> http://www.rcsb.org/pdb/ligand/ligandsummary.do?hetId=0CP >> >> COc1ccc(cc1O[C@H]1C[C@@H]2CC[C@H]1C2)C1CNC(=O)NC1 >> >> which has a norbornane substituent. I am trying to prepare input for a >> downstream program that needs to know if the norbornane atoms are in a >> 6-membered ring [1]. RingInfo gives me the 2 5-membered rings. I am >> strugging to make use of that information to find 6-membered rings. I have >> been using makeRingNeighborMap() and pickFusedRings(). Am I missing an >> RDKit function that finds all rings? > There's not currently any RDKit functionality which finds all rings. > It wouldn't be terribly difficult to add, but it could return a huge > number of rings (imagine the results for C60). Another option would be > to add a function > bool atomIsInAnyRingOfSize(const Atom *at,unsigned int size) > that does the check on demand.
Not terribly difficult, as you say, but easier for you than me, I imagine. I had a bash with the trace_path() and handle_bigger_rings_from_fused_rings() methods, for the record, here: http://code.google.com/p/coot/source/browse/trunk/lidia-core/cod-types.cc I'll try and get it released under the same licence as the RDKit, fwtw. The thing that was non-trivial (for me) was the "shall we recur deeper?" rule. Cheers, Paul. ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss