The current PubChem Fingerprints are not implemented correctly. The implementation is using SSSR when it should be using ESSSR for the ring perceptions. From the forth page of the [Specifications/Section 2]:(ftp://ftp.ncbi.nlm.nih.gov/pubchem/specifications/pubchem_fingerprints.pdf)
Rings in a canonic Extended Smallest Set of Smallest Rings
(ESSSR) ring set - These bits test for the presence or
count of the described chemical ring system. An ESSSR ring
is any ring which does not share three consecutive atoms
with any other ring in the chemical structure. For
example, naphthalene has three ESSSR rings (two phenyl
fragments and the 10-membered envelope), while biphenyl
will yield a count of only two ESSSR rings.
More info on the KNIME forum:
http://tech.knime.org/forum/cdk/cdk-pubchem-fingerprint-not-matching-chemfp-fingerprint#comment-28842
"Those who don't know history are destined to repeat it." - Edmund Burke
Right, time to fix this once and for all!
Related:
http://sourceforge.net/mailarchive/message.php?msg_id=27600602
From looking at stuff the last couple of days I actually think I understand how this ESSSR is done now. I should also add for future discoveries ESSR != ESSSR although the abbreviations both mean nearly the same thing 'Extended Set of Smallest Rings' and 'Extended Smallest Set of Smallest Rings'. The ESSR is published but not a very nice algorithm, the ESSSR is specific to CACTVS and hence used by PubChem.
For that original post chemfp uses smarts matching. Having done those recent relavent cycle algorithms recently I think I can come up with a concise algorithm.
Going to add some links here for future reference and those who stumble across it.
http://85.214.192.197/Documentation/tcl_reference_online.pdf
http://ctr.wikia.com/wiki/Ring_counts_in_a_SMILES_file
http://www.dalkescientific.com/writings/diary/archive/2011/06/04/dealing_with_sssr.html