22 #ifndef OST_IO_SDF_READER_HH
23 #define OST_IO_SDF_READER_HH
26 #include <boost/iostreams/filtering_stream.hpp>
27 #include <boost/filesystem/fstream.hpp>
32 namespace ost {
namespace io {
40 SDFReader(
const boost::filesystem::path& loc);
48 typedef std::tuple<int, String, String, String, String, String> atom_data;
49 typedef std::tuple<String, String, String> bond_data;
50 typedef std::tuple<String, String> charge_data;
51 typedef std::tuple<std::vector<String>, std::map<String, String>> v3000_line_tokens;
53 boost::iostreams::filtering_stream<boost::iostreams::input>& GetLine(
54 boost::iostreams::filtering_stream<boost::iostreams::input>& in,
57 void ClearState(
const boost::filesystem::path& loc);
62 void SetCounts(
const String& anum,
const String bnum,
int line_num);
64 atom_data ParseAtom(
const String& line,
int line_num);
68 bond_data ParseBond(
const String& line,
int line_num);
72 std::vector<charge_data> ParseMCharge(
const String& line,
int line_num);
73 void AddCharge(
const charge_data& charge_tuple,
int line_num,
mol::EntityHandle& ent,
78 v3000_line_tokens TokenizeV3000Line(
const String& line,
int line_num,
83 atom_data ParseV3000Atom(
const String& line,
int line_num);
84 bond_data ParseV3000Bond(
const String& line,
int line_num);
85 std::tuple<String, String> ParseV3000Counts(
const String& line,
int line_num);
86 void VerifyV3000Counts();
97 boost::filesystem::ifstream infile_;
98 std::istream& instream_;
99 boost::iostreams::filtering_stream<boost::iostreams::input> in_;
101 bool v3000_atom_block_;
102 bool v3000_bond_block_;
external coordinate system editor