By default, the SMARTS atoms will match any number of rings, so a very simple SMARTS matching pyridine would be:
n1ccccc1
If you want to prevent any ring fusions, then you need to set the βRβ on each atom to 1, e.g.
[nR1]1[cR1][cR1][cR1][cR1][cR1]1
This is specifying that each atom is in exactly 1 ring - i.e. no fusion is possible.
If you want to allow fusion in a specific position, then you will either have to create separate SMARTS for each fusion position:
n1c[cR1][cR1][cR1][cR1]1 - Allows fusion on the N-C bond (i.e. 1,2- or 'a' or 'f')
[NR1]1cc[cR1][cR1][cR1]1 - Allows fusion on the 2,3- C-C bond ('b' or 'e')
[NR1]1[cR1]cc[cR1][cR1]1 - Allows fusion on the 3,4- C-C bond ('c' or 'd')
If you want to force fusion, then you need to specify βR2β in those positions:
[nR2]1[cR2][cR1][cR1][cR1][cR1]1 - Forces fusion on the N-C bond (i.e. 1,2- or 'a' or 'f')
[nR1]1[cR2][cR2][cR1][cR1][cR1]1 - Forces fusion on the 2,3- C-C bond ('b' or 'e')
[nR1]1[cR1][cR2][cR2][cR1][cR1]1 - Forcesfusion on the 3,4- C-C bond ('c' or 'd')
If you want a single SMARTS that will give you a pyridine that must be fused somewhere, then you will need to use recursive SMARTS, e.g.
[$([nR2]1[cR2][cR1][cR1][cR1][cR1]1),$([nR1]1[cR2][cR2][cR1][cR1][cR1]1),$([nR1]1[cR1][cR2][cR2][cR1][cR1]1)]
NB the last SMARTS will only match a single atom, the βNβ atom of the pyridine ring - all the others will match the whole pyridine ring.
https://www.daylight.com/dayhtml/doc/theory/theory.smarts.html
Steve