So what's the meaning of atom class 6? Well, it's whatever you want - it's simply a label that you use to indicate some related information. For example, you might want to record reaction locations, or locations of common substitutions, or mappings between different molecules (reactant/product, or sub/superstructures).
Anyhoo, here's how you access the atom class information in Open Babel from Python:
>>> import pybel >>> ob = pybel.ob >>> mol = pybel.readstring("smi", "C[CH3:6]") >>> print mol.write("smi") CC >>> print mol.write("smi", opt={"a":True}) C[CH3:6] >>> data = ob.toAtomClassData(mol.OBMol.GetData("Atom Class")) >>> data.HasClass(1) False >>> data.GetClassString(1) '' >>> data.HasClass(2) True >>> data.GetClassString(2) ':6' >>>
I'm old-school in fmcs. I repurpose isotope labels as atom classes.
ReplyDeleteHow does one use SMARTS to match a specific atom class? I thought it would be "[*:6]" but that doesn't work in OB, RD, or OE. That probably means I misunderstand something:
Roger likes to use isotopes too. Maybe it's 0.001% more efficient or something. :-)
ReplyDeleteI think you know more about SMARTS than me, so if you don't know how to match it, I'm guessing it doesn't exist. Kind of a pity.
I believe atom classes were added to SMILES after our formative years, and support for them is less common across the toolkits, so we might not think about it when we should.
ReplyDeleteEven if I might know more about SMARTS, it doesn't mean that I know more about SMARTS-with-atom-classes.