Skip to main content

Table 6 Jmol SMARTS atom selection primitives

From: Jmol SMILES and Jmol SMARTS: specifications and applications

Note Notation Meaning Example Explanation
S- * Any atom *1**1 Any three-membered ring
S- a Any aromatic atom a1aaaa1 A five-membered aromatic ring
S- A Any non-aromatic atom AAAA A chain of at least four nonaromatic atoms
+- H Hydrogen OH All OH groups; SMARTS only
a+ #-<n> Negative of atom number [#-36] Atom number 36, as defined by the application. (In Jmol, this corresponds to “@36” or “atomno=36”.)
+ <n>? Mass number or unspecified mass number [12?#6] Carbon that isn’t explicitly C13 or C14
[0?] Atom with unspecified mass
[!0?] Any atom with mass specified
S X<n> Total number of connections [X2] This includes all implicit hydrogens, whether in a molecule or SMILES string
+ d<n> Number of non-hydrogen connections [n;d3] Aromatic trivalent nitrogen with no attached H atom. Note that [nd3] would be read as an aromatic neodymium with an atomic mass improperly positioned after it
S D<n> Number of explicit connections [#6D3] Carbon atoms with exactly three connections (either in a molecule with bonds to three atoms or in a SMILES string with three explicit atoms connected to it
S h<n> Number of implicit hydrogens [C;h2] A methylene group written as “C” or [CH2] in a SMILES string; a methylene carbon atom from a PDB file or other file that does not contain hydrogen atoms. (In Jmol, for example, a non-NMR PDB file loaded before issuing SET pdbAddHydrogens TRUE.)
S H<n> Total hydrogen count (sum of attached [H] and implicit) [CH3] A methyl group
[H0] No attached hydrogens
[!H0] At least one attached hydrogen
a* x<n> Total number of bonds that terminate on ring atoms [x1] A non-ring atom that is connected to a ring
[x0] No ring connections
[!x0] or [x] At least one ring connection
a* R<n> Ring membership [R] A ring atom
[!R] A non-ring atom
[R2] An atom in exactly two rings
a* r<n> Ring size [O;r3] An oxygen in a three-membered ring
[O;!r3] An oxygen that is not in a three-membered ring
*+ r500 Five-membered aromatic ring [n;r500] Aromatic nitrogen in a 5-membered aromatic ring (not an aromatic nitrogen in a 500-membered ring)
*+ r600 Six-membered aromatic ring [n;r600] Aromatic nitrogen a 6-membered aromatic ring (not an aromatic nitrogen in a 600-membered ring)
S v<n> Total bond order (valence) [C;v3] Total bond count (note that ill-defined resonance structures such as proteins without hydrogen atoms will overestimate valence for arginine sidechains
+ Xxx#nn^c.yyyy#mm PDB residue name#number^insertionCode. atom name#atomic number   For PDB data:
   [ALA.C]  Carbonyl carbon of all alanines
   [ILE#35.*]  All atoms in ILE35
   [#35.*]  Residue 35
   [*.CA&!CA.CA]  Alpha carbons (not calcium ions)
   [*.CA#6]  Just alpha carbons (atomic number specified)
Note that all matches are by name only, not by analyzing substructure; atom name may include “.” or “*”; residue name may contain “*”
+ =<n> Atom index [=22] Atom with atom index 22, however that is defined by the application
+ “xxx” Atom type [“7”] However that is defined by the application; for example, in Jmol, [“7”] is a carbonyl carbon atom after assignment by MMFF94
$(…) Nesting [$(aaN)$(aaaC)] An aromatic atom that is both ortho to an amino group and meta to a methyl group
+ $(select ….) Processor-specific selection phrase [$(select atomno=x)] Selects the atom with atom number equal to the value of the Jmol variable x
+ $<n>(pattern) A specific number of occurrences of pattern C[$3(C=C)]C Nonterminal conjugated triene
+ $min-max(pattern) A variable number of occurrences of pattern C[$2-3(C=C)]C Nonterminal conjugated diene or triene
+ $<varName> A predefined variable [$a1] Replaces “[$a1]” with whatever $a1 is defined to be (see below)
  1. Note that all patterns in Tables 1 and 2 are also part of Jmol SMARTS
  2. S indicates same as OpenSMARTS; + indicates additions to OpenSMARTS; * indicates modified definition for Jmol SMARTS; “a” indicates result may depend upon application; - indicates does not need brackets