I am currently working on selecting a screening collection using scaffolds. I am afraid that your identifier for smallest of smallest rings, and consequently the count for the number of rings is not entirely correct.It is absolutely stunning that the same molecule, once considered with stereochemistry and once without, yields two different ringcounts.
I have added a couple of files - illustrating the issue.
Version of Jchem: 5.12.1
First file: structure_to_study_wrong_rincount.smi
The files shows the input structure, followed by the four rings tagged by colouring the ring atoms using boron atoms. Obviously, ring1 and ring2 are identical (proof 1). If the four bridge (3 single-atom bridges; 1 double-atom bridge) get removed from the molecule, I perfectly end up with bicyclic system. It is very unlikely, except some rare exceptional cases, that the addition of one bridging atom between two atoms instanteneously increases the number of rings in the molecule from 2 to 4 (proof 2). Additionally, I have made an analogue of the molecule and reduced two double-C bridge between the two Ns to a single-C bridge. Upon removal of all substituents and changing all atoms to C, this molecule yields adamante. Both molecules have ringcount 3 which is correct. However, when considering the structure including stereochemistry, the ring count changes.
Second file: structure_to_study_analogue.ringcount.smi
The molecules shown in this file come in pairs: structure 1 is the structure with stereochemistry and structure 2 its analogue with wedged bonds to indicate the stereochemistry. Identical is true for structure 3 and 4, of which the core ring system without substituent corresponds to the ringsystem of tricyclic adamantane. What is very miracolous: introduction of stereochemistry increases the ringcount from 3 to 4, even when no new rings are created in the molecule.
Third file: structure_to_study_coloured_rings.png
File contains an image with a 3D-pose of the molecule. One ring is coloured orange, one green and one purple. All atoms are included in those three rings.
I think from the second file it is apparent that the determination of rings is correct, if the calculation is performed with astructure in which the stereochemistry is ignored.
I hope this example is a welcome addition for improving parts of the software.
Ruud van Deursen