Trying to understand SMILES(?) patterns
First off this is SMARTS not SMILES.

Think of SMARTS as like a regular expression language for molecules (e.g., SMILES).

So let's break down some of those characters:


~ is "any bond"
! is "not"
$ indicates a recursive SMARTS expression.
@ indicates "any ring bond"


The $(*#*) means "two atoms with a triple bond between them". The !D1 means and not an atom with one explicit bond.

Taken as a whole, [*]~[!$(*#*)&amp;!D1] means any atom with a bond to an atom that doesn't have just one explicit bond or a triple bond.

Basically, the pattern is trying to find a single bond in the middle with some rotatable side-groups:
[*]~[...]-&amp;[..]~[*]

There's a very nice tool called SMARTS Viewer that can help to debug and construct SMARTS.



Seems like there are also now more polished commercial versions called SMARTStools through BioSolveIT including an editor.