Functions | |
bool | parse_smarts (char const *str) |
mySMARTS parser any_atom ::= "*" atom_symbol ::= any_atom | "H" | "He" | "Li" | "Be" | "B" | "C" | "N" | "O" | "F" | "Ne" | "Na" | "Mg" | "Al" | "Si" | "P" | "S" | "Cl" | "Ar" | "K" | "Ca" | "Sc" | "Ti" | "V" | "Cr" | "Mn" | "Fe" | "Co" | "Ni" | "Cu" | "Zn" | "Ga" | "Ge" | "As" | "Se" | "Br" | "Kr" | "Rb" | "Sr" | "Y" | "Zr" | "Nb" | "Mo" | "Tc" | "Ru" | "Rh" | "Pd" | "Ag" | "Cd" | "In" | "Sn" | "Sb" | "Te" | "I" | "Xe" | "Cs" | "Ba" | "La" | "Ce" | "Pr" | "Nd" | "Pm" | "Sm" | "Eu" | "Gd" | "Tb" | "Dy" | "Ho" | "Er" | "Tm" | "Yb" | "Lu" | "Hf" | "Ta" | "W" | "Re" | "Os" | "Ir" | "Pt" | "Au" | "Hg" | "Tl" | "Pb" | "Bi" | "Po" | "At" | "Rn" | "Fr" | "Ra" | "Ac" | "Th" | "Pa" | "U" | "Np" | "Pu" | "Am" | "Cm" | "Bk" | "Cf" | "Es" | "Fm" | "Md" | "No" | "Lr" | "Rf" | "Db" | "Sg" | "Bh" | "Hs" | "Mt" | "Ds" | "Rg" atom_number ::= "#1" | "#2" | ... | "#110" | "#111" atom ::= open_square_bracket ( ([negation | return_sign] atom_symbol) | ([negation | return_sign] atom_number)) [atom_property] close_square_bracket open_square_bracket ::= "[" close_square_bracket ::= "]" negation ::= "!" open_branch ::= "(" close_branch ::= ")" bond ::= [negation] "-" | [negation] "=" | [negation] "#" | [negation] ":" | "~" digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" atom_property ::= charge | attached_hydrogens | (charge attached_hydrogens) | (attached_hydrogens charge) charge ::= "+"[digit] | "-"[digit] attached_hydrogens ::= "H"[digit] simple_branch ::= open_branch bond atom[digit] (bond atom[digit])* close_branch multiple_branch ::= open_branch bond atom[digit] (simple_branch | multiple_branch | bond atom[digit])* close_branch molecule ::= atom[digit] ( multiple_branch | simple_branch | (bond atom [digit]) )* operator ::= "or" query ::= molecule (operator molecule)* return_sign ::= "§" |