The definition of the SMILES grammar.
#include <SMILES_grammar.hh>
Data Structures | |
struct | atom1_parser |
struct | atom2_parser |
class | Atom_closure |
Utility helper class for parsing. More... | |
struct | AtomInfo |
struct | bond_parser |
struct | simpleSymbol_parser |
Public Member Functions | |
definition (SMILES_grammar const &self) | |
Construction of the SMILES BNF grammar rules. More... | |
NS_BOOSTSPIRIT::rule< ScannerT > const & | start () const |
start parsing More... | |
Protected Types | |
typedef std::vector< AtomInfo > | atoms_t |
typedef std::pair< int, int > | bond_t |
typedef std::vector< std::pair < bond_t, std::string > > | bonds_t |
typedef std::vector< std::pair < int, int > > | hcount_t |
typedef std::map< int, std::string > | rcb_t |
typedef std::map< int, int > | rcs_t |
typedef NS_BOOSTSPIRIT::rule < ScannerT, typename Atom_closure::context_t > | rule_t |
type of rule context of this class More... | |
typedef std::vector< int > | stack_t |
Protected Member Functions | |
void | add_explicit_hydrogens (void) |
void | close_branch (void) |
void | memorize_atom (int atom, std::string &alabel, std::string &blabel) throw (std::invalid_argument) |
void | memorize_explicit_H (int atom, int hcount) |
void | memorize_rc (int rc, int atom1, std::string blabel) throw (std::invalid_argument) |
void | open_branch (int atom) |
void | parser_warning (std::string msg) |
void | reset_data_structures (void) |
Protected Attributes | |
atom1_parser const | atom1_p |
char | atom2_firstChar |
first character of a two letter atom label More... | |
char | atom2_tmp |
int | atom_count |
atoms_t | atoms |
rule_t | bond |
bond_parser const | bond_p |
NS_BOOSTSPIRIT::rule< ScannerT > | bond_symbol |
bonds_t | bonds |
rule_t | branch |
rule_t | chain |
NS_BOOSTSPIRIT::rule< ScannerT > | charge |
NS_BOOSTSPIRIT::rule< ScannerT > | chirality |
rule_t | complex_atom |
NS_BOOSTSPIRIT::rule< ScannerT > | complex_symbol |
hcount_t | explicitH |
NS_BOOSTSPIRIT::rule< ScannerT > | group_symbol |
NS_BOOSTSPIRIT::rule< ScannerT > | hcount |
NS_BOOSTSPIRIT::rule< ScannerT > | isotope |
NS_BOOSTSPIRIT::rule< ScannerT > | name |
rcs_t | rc_to_atom |
map of ring closure numbers to opening atom More... | |
rcb_t | rc_to_bond |
map of ring closure numbers to bond label of closing bond More... | |
rule_t | ringclosure |
SMILES_grammar const & | self |
back reference to enclosing object for molecule creation More... | |
rule_t | simple_atom |
NS_BOOSTSPIRIT::rule< ScannerT > | simple_symbol |
simpleSymbol_parser const | simpleSymbol_p |
NS_BOOSTSPIRIT::rule< ScannerT > | smiles |
stack_t | stack |
Definition at line 184 of file SMILES_grammar.hh.
|
protected |
Definition at line 362 of file SMILES_grammar.hh.
|
protected |
Definition at line 352 of file SMILES_grammar.hh.
|
protected |
Definition at line 353 of file SMILES_grammar.hh.
|
protected |
Definition at line 364 of file SMILES_grammar.hh.
|
protected |
Definition at line 385 of file SMILES_grammar.hh.
|
protected |
Definition at line 384 of file SMILES_grammar.hh.
|
protected |
Definition at line 349 of file SMILES_grammar.hh.
|
protected |
Definition at line 363 of file SMILES_grammar.hh.
ggl::chem::SMILES_grammar::definition< ScannerT >::definition | ( | SMILES_grammar const & | self | ) |
|
protected |
Function called by the parser to add explicit hydrogens from complex atoms to constructed graph
|
protected |
Function called by the parser to report that the last molecule branching is ended
|
protected |
Function called by the parser to report the next atom.
atom | the atom to add |
alabel | the label of the atom |
blabel | the label of the bond to the last reported atom |
std::invalid_argument | in case a check fails |
|
protected |
Function called by the parser to report the explicit hydrogen count for complex atoms
atom | the complex atom with explicit hydrogens |
hcount | the number of explicit hydrogens |
|
protected |
Function called by the parser to report a ring closure.
rc | the ring closure index that was closed |
atom1 | the first atom of the ring |
blabel | the optional given label of the ring closing bond |
std::invalid_argument | in case a check fails |
|
protected |
Function called by the parser to report the opening of a molecule branching
atom | the atom id where the branching occured |
|
protected |
Function called by the parser that reports warnings to the standard error handle
|
protected |
Resets the local data structures to allow for the parsing of the next SMILES string
NS_BOOSTSPIRIT::rule<ScannerT> const& ggl::chem::SMILES_grammar::definition< ScannerT >::start | ( | ) | const |
|
protected |
Definition at line 252 of file SMILES_grammar.hh.
|
protected |
Definition at line 255 of file SMILES_grammar.hh.
|
protected |
Definition at line 197 of file SMILES_grammar.hh.
|
protected |
Definition at line 403 of file SMILES_grammar.hh.
|
protected |
Definition at line 408 of file SMILES_grammar.hh.
|
protected |
Definition at line 395 of file SMILES_grammar.hh.
|
protected |
Definition at line 311 of file SMILES_grammar.hh.
|
protected |
Definition at line 398 of file SMILES_grammar.hh.
|
protected |
Definition at line 409 of file SMILES_grammar.hh.
|
protected |
Definition at line 395 of file SMILES_grammar.hh.
|
protected |
Definition at line 395 of file SMILES_grammar.hh.
|
protected |
Definition at line 399 of file SMILES_grammar.hh.
|
protected |
Definition at line 399 of file SMILES_grammar.hh.
|
protected |
Definition at line 395 of file SMILES_grammar.hh.
|
protected |
Definition at line 398 of file SMILES_grammar.hh.
|
protected |
Definition at line 411 of file SMILES_grammar.hh.
|
protected |
Definition at line 398 of file SMILES_grammar.hh.
|
protected |
Definition at line 399 of file SMILES_grammar.hh.
|
protected |
Definition at line 399 of file SMILES_grammar.hh.
|
protected |
Definition at line 399 of file SMILES_grammar.hh.
|
protected |
Definition at line 405 of file SMILES_grammar.hh.
|
protected |
Definition at line 407 of file SMILES_grammar.hh.
|
protected |
Definition at line 395 of file SMILES_grammar.hh.
|
protected |
Definition at line 392 of file SMILES_grammar.hh.
|
protected |
Definition at line 395 of file SMILES_grammar.hh.
|
protected |
Definition at line 398 of file SMILES_grammar.hh.
|
protected |
Definition at line 227 of file SMILES_grammar.hh.
|
protected |
Definition at line 397 of file SMILES_grammar.hh.
|
protected |
Definition at line 410 of file SMILES_grammar.hh.