Is it possible to calculate the number of heteroaliphatic rings in a set of molecules that are basic (e.g. contain a positively ionisable amine) and those that are non-basic (e.g. a cyclic amide or an ether).
The question is complex, so the solution is too, but doable. You can first filter out the "set of molecules that are basic (e.g. contain a
positively ionisable amine) and those that are non-basic (e.g. a cyclic
amide or an ether)" using a combination of a query (probably formulated in SMARTS) and a Chemical Terms expression (containing a pKa calculation for example). Then you can use the heteroaliphaticRingCount function of TopologyAnalyser to get the number you want for each structure.
Depending on your preference, you can solve this issue in command line (jcsearch, see its -e swith for additional CT expression) or in a desktop application environment (Instant JChem) or even by developing your own little program on the basis of the the JChem API (Java, .NET or Web Services).
Thanks for that. Could you suggest a SMARTS query to identify basic amines that are cyclic rather than acyclic.
If you mean, that an amino group is connected to a carbon of a cycle, try his:
It means an aliphatic carbon with 4 neighbours (including hydrogens), member of a least a ring, connected a nitrogen wih 3 neighbours and that nitrogen is not connected to a carbon that is connected to a hetero atom
Sorry, I wanted the nitrogen atom to be in the ring, secondary or tertiary, and not part of an amide.
The one I showed is not part of an amide, I am sure, that you can easily move the ring property (R) from the carbon to the nitrogen. I would suggest to take a look a the SMARTS tutorial and examples, it will help you to refine this initial SMARTS further as you wish and design make others in the future.