Generated on Wed Apr 29 2015 11:51:41 for GGL-4.1.2 by doxygen 1.8.3.1
Data Structures | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
ggl::chem::SMILES_grammar::definition< ScannerT > Struct Template Reference

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< AtomInfoatoms_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
 

Detailed Description

template<typename ScannerT>
struct ggl::chem::SMILES_grammar::definition< ScannerT >

Definition at line 184 of file SMILES_grammar.hh.

Member Typedef Documentation

template<typename ScannerT >
typedef std::vector< AtomInfo > ggl::chem::SMILES_grammar::definition< ScannerT >::atoms_t
protected

Definition at line 362 of file SMILES_grammar.hh.

template<typename ScannerT >
typedef std::pair<int,int> ggl::chem::SMILES_grammar::definition< ScannerT >::bond_t
protected

Definition at line 352 of file SMILES_grammar.hh.

template<typename ScannerT >
typedef std::vector<std::pair<bond_t,std::string> > ggl::chem::SMILES_grammar::definition< ScannerT >::bonds_t
protected

Definition at line 353 of file SMILES_grammar.hh.

template<typename ScannerT >
typedef std::vector<std::pair<int,int> > ggl::chem::SMILES_grammar::definition< ScannerT >::hcount_t
protected

Definition at line 364 of file SMILES_grammar.hh.

template<typename ScannerT >
typedef std::map<int,std::string> ggl::chem::SMILES_grammar::definition< ScannerT >::rcb_t
protected

Definition at line 385 of file SMILES_grammar.hh.

template<typename ScannerT >
typedef std::map<int,int> ggl::chem::SMILES_grammar::definition< ScannerT >::rcs_t
protected

Definition at line 384 of file SMILES_grammar.hh.

template<typename ScannerT >
typedef NS_BOOSTSPIRIT::rule< ScannerT , typename Atom_closure::context_t > ggl::chem::SMILES_grammar::definition< ScannerT >::rule_t
protected

Definition at line 349 of file SMILES_grammar.hh.

template<typename ScannerT >
typedef std::vector<int> ggl::chem::SMILES_grammar::definition< ScannerT >::stack_t
protected

Definition at line 363 of file SMILES_grammar.hh.

Constructor & Destructor Documentation

template<typename ScannerT >
ggl::chem::SMILES_grammar::definition< ScannerT >::definition ( SMILES_grammar const &  self)

Member Function Documentation

template<typename ScannerT >
void ggl::chem::SMILES_grammar::definition< ScannerT >::add_explicit_hydrogens ( void  )
protected

Function called by the parser to add explicit hydrogens from complex atoms to constructed graph

template<typename ScannerT >
void ggl::chem::SMILES_grammar::definition< ScannerT >::close_branch ( void  )
protected

Function called by the parser to report that the last molecule branching is ended

template<typename ScannerT >
void ggl::chem::SMILES_grammar::definition< ScannerT >::memorize_atom ( int  atom,
std::string &  alabel,
std::string &  blabel 
) throw (std::invalid_argument)
protected

Function called by the parser to report the next atom.

Parameters
atomthe atom to add
alabelthe label of the atom
blabelthe label of the bond to the last reported atom
Exceptions
std::invalid_argumentin case a check fails
template<typename ScannerT >
void ggl::chem::SMILES_grammar::definition< ScannerT >::memorize_explicit_H ( int  atom,
int  hcount 
)
protected

Function called by the parser to report the explicit hydrogen count for complex atoms

Parameters
atomthe complex atom with explicit hydrogens
hcountthe number of explicit hydrogens
template<typename ScannerT >
void ggl::chem::SMILES_grammar::definition< ScannerT >::memorize_rc ( int  rc,
int  atom1,
std::string  blabel 
) throw (std::invalid_argument)
protected

Function called by the parser to report a ring closure.

Parameters
rcthe ring closure index that was closed
atom1the first atom of the ring
blabelthe optional given label of the ring closing bond
Exceptions
std::invalid_argumentin case a check fails
template<typename ScannerT >
void ggl::chem::SMILES_grammar::definition< ScannerT >::open_branch ( int  atom)
protected

Function called by the parser to report the opening of a molecule branching

Parameters
atomthe atom id where the branching occured
template<typename ScannerT >
void ggl::chem::SMILES_grammar::definition< ScannerT >::parser_warning ( std::string  msg)
protected

Function called by the parser that reports warnings to the standard error handle

template<typename ScannerT >
void ggl::chem::SMILES_grammar::definition< ScannerT >::reset_data_structures ( void  )
protected

Resets the local data structures to allow for the parsing of the next SMILES string

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> const& ggl::chem::SMILES_grammar::definition< ScannerT >::start ( ) const

Field Documentation

template<typename ScannerT >
atom1_parser const ggl::chem::SMILES_grammar::definition< ScannerT >::atom1_p
protected

Definition at line 252 of file SMILES_grammar.hh.

template<typename ScannerT >
char ggl::chem::SMILES_grammar::definition< ScannerT >::atom2_firstChar
protected

Definition at line 255 of file SMILES_grammar.hh.

template<typename ScannerT >
char ggl::chem::SMILES_grammar::definition< ScannerT >::atom2_tmp
protected

Definition at line 197 of file SMILES_grammar.hh.

template<typename ScannerT >
int ggl::chem::SMILES_grammar::definition< ScannerT >::atom_count
protected

Definition at line 403 of file SMILES_grammar.hh.

template<typename ScannerT >
atoms_t ggl::chem::SMILES_grammar::definition< ScannerT >::atoms
protected

Definition at line 408 of file SMILES_grammar.hh.

template<typename ScannerT >
rule_t ggl::chem::SMILES_grammar::definition< ScannerT >::bond
protected

Definition at line 395 of file SMILES_grammar.hh.

template<typename ScannerT >
bond_parser const ggl::chem::SMILES_grammar::definition< ScannerT >::bond_p
protected

Definition at line 311 of file SMILES_grammar.hh.

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> ggl::chem::SMILES_grammar::definition< ScannerT >::bond_symbol
protected

Definition at line 398 of file SMILES_grammar.hh.

template<typename ScannerT >
bonds_t ggl::chem::SMILES_grammar::definition< ScannerT >::bonds
protected

Definition at line 409 of file SMILES_grammar.hh.

template<typename ScannerT >
rule_t ggl::chem::SMILES_grammar::definition< ScannerT >::branch
protected

Definition at line 395 of file SMILES_grammar.hh.

template<typename ScannerT >
rule_t ggl::chem::SMILES_grammar::definition< ScannerT >::chain
protected

Definition at line 395 of file SMILES_grammar.hh.

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> ggl::chem::SMILES_grammar::definition< ScannerT >::charge
protected

Definition at line 399 of file SMILES_grammar.hh.

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> ggl::chem::SMILES_grammar::definition< ScannerT >::chirality
protected

Definition at line 399 of file SMILES_grammar.hh.

template<typename ScannerT >
rule_t ggl::chem::SMILES_grammar::definition< ScannerT >::complex_atom
protected

Definition at line 395 of file SMILES_grammar.hh.

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> ggl::chem::SMILES_grammar::definition< ScannerT >::complex_symbol
protected

Definition at line 398 of file SMILES_grammar.hh.

template<typename ScannerT >
hcount_t ggl::chem::SMILES_grammar::definition< ScannerT >::explicitH
protected

Definition at line 411 of file SMILES_grammar.hh.

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> ggl::chem::SMILES_grammar::definition< ScannerT >::group_symbol
protected

Definition at line 398 of file SMILES_grammar.hh.

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> ggl::chem::SMILES_grammar::definition< ScannerT >::hcount
protected

Definition at line 399 of file SMILES_grammar.hh.

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> ggl::chem::SMILES_grammar::definition< ScannerT >::isotope
protected

Definition at line 399 of file SMILES_grammar.hh.

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> ggl::chem::SMILES_grammar::definition< ScannerT >::name
protected

Definition at line 399 of file SMILES_grammar.hh.

template<typename ScannerT >
rcs_t ggl::chem::SMILES_grammar::definition< ScannerT >::rc_to_atom
protected

Definition at line 405 of file SMILES_grammar.hh.

template<typename ScannerT >
rcb_t ggl::chem::SMILES_grammar::definition< ScannerT >::rc_to_bond
protected

Definition at line 407 of file SMILES_grammar.hh.

template<typename ScannerT >
rule_t ggl::chem::SMILES_grammar::definition< ScannerT >::ringclosure
protected

Definition at line 395 of file SMILES_grammar.hh.

template<typename ScannerT >
SMILES_grammar const& ggl::chem::SMILES_grammar::definition< ScannerT >::self
protected

Definition at line 392 of file SMILES_grammar.hh.

template<typename ScannerT >
rule_t ggl::chem::SMILES_grammar::definition< ScannerT >::simple_atom
protected

Definition at line 395 of file SMILES_grammar.hh.

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> ggl::chem::SMILES_grammar::definition< ScannerT >::simple_symbol
protected

Definition at line 398 of file SMILES_grammar.hh.

template<typename ScannerT >
simpleSymbol_parser const ggl::chem::SMILES_grammar::definition< ScannerT >::simpleSymbol_p
protected

Definition at line 227 of file SMILES_grammar.hh.

template<typename ScannerT >
NS_BOOSTSPIRIT::rule<ScannerT> ggl::chem::SMILES_grammar::definition< ScannerT >::smiles
protected

Definition at line 397 of file SMILES_grammar.hh.

template<typename ScannerT >
stack_t ggl::chem::SMILES_grammar::definition< ScannerT >::stack
protected

Definition at line 410 of file SMILES_grammar.hh.


The documentation for this struct was generated from the following file: