19 #ifndef OST_CONOP_CHEMDICT_PARSER_HH
20 #define OST_CONOP_CHEMDICT_PARSER_HH
32 namespace ost {
namespace io {
44 bool ignore_reserved=
false,
bool ignore_obsolete=
false):
45 StarParser(stream), compound_(new conop::Compound(
"UNK")),
46 last_(0), loop_type_(
DONT_KNOW), dialect_(dialect),
47 ignore_reserved_(ignore_reserved), ignore_obsolete_(ignore_obsolete)
50 this->InitPDBXTypeMap();
58 const std::vector<StringRef>& columns);
70 void InitPDBXTypeMap();
71 bool IsNameReserved(
const String& data_name);
91 static std::map<String, mol::ChemClass> tm_;
92 static std::map<String, mol::ChemType> xtm_;
93 std::map<String, int> atom_map_;
97 bool ignore_reserved_;
98 bool ignore_obsolete_;
convenient datatype for referencing character data
virtual bool OnBeginData(const StringRef &data_name)
invoked when a new data control structure is encountered
virtual void OnEndData()
called when leaving a datasection. Will only be invoked when OnBeginData() returned true.
virtual void OnDataItem(const StarDataItem &item)
invoked when a data item is encountered
virtual void OnDataRow(const StarLoopDesc &header, const std::vector< StringRef > &columns)
invoked when a data row in a loop is encountered.
ChemdictParser(std::istream &stream, conop::Compound::Dialect dialect, bool ignore_reserved=false, bool ignore_obsolete=false)
virtual bool OnBeginLoop(const StarLoopDesc &header)
called when a loop is encountered
void SetCompoundLib(const conop::CompoundLibPtr &lib)
parser for the STAR file format
boost::shared_ptr< Compound > CompoundPtr
boost::shared_ptr< CompoundLib > CompoundLibPtr