Max ring size 20?


It seems that the Functional Group Filter and Substructure Filter nodes have a limit of ring size 20. Is this deliberate or a bug?

I discovered this when trying to implement the Vertex REOS filters, which have a max ring size of 7 filter:


This works for ring sizes up to 20 but not above.


Sorry for the extremely late reply. Our system for monitoring the blog broke down.

There is currently a technical (as opposed to theoretical) limit on ring size of 20 with SMARTS r and R primitives. If you want to search for rings larger than this, you will need to either use a very ugly recursive SMARTS (for single atom matches) or do something like *1********************1. 

Some of the REOS filters (this is one of them) don't lend themselves cleanly to implementation using SMARTS.

As long as the large ring is part of the molecule's set of smallest rings, you can use the RingInfo structure in a Python Scripting node. This bit of code returns a list of the size (in atoms) of all of a molecule's rings:

[len(x) for x in m.GetRingInfo().AtomRings()]

Hope this helps,