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>
33 namespace ost {
namespace io {
47 typedef std::tuple<int, String, String, String, String, String> atom_data;
48 typedef std::tuple<String, String, String> bond_data;
49 typedef std::tuple<String, String> charge_data;
50 typedef std::tuple<std::vector<String>, std::map<String, String>> v3000_line_tokens;
52 boost::iostreams::filtering_stream<boost::iostreams::input>& GetLine(
53 boost::iostreams::filtering_stream<boost::iostreams::input>& in,
56 void ClearState(
const boost::filesystem::path& loc);
61 void SetCounts(
const String& anum,
const String bnum,
int line_num);
63 atom_data ParseAtom(
const String& line,
int line_num);
67 bond_data ParseBond(
const String& line,
int line_num);
71 std::vector<charge_data> ParseMCharge(
const String& line,
int line_num);
72 void AddCharge(
const charge_data& charge_tuple,
int line_num,
mol::EntityHandle& ent,
77 v3000_line_tokens TokenizeV3000Line(
const String& line,
int line_num,
82 atom_data ParseV3000Atom(
const String& line,
int line_num);
83 bond_data ParseV3000Bond(
const String& line,
int line_num);
84 std::tuple<String, String> ParseV3000Counts(
const String& line,
int line_num);
85 void VerifyV3000Counts();
96 boost::filesystem::ifstream infile_;
97 std::istream& instream_;
98 boost::iostreams::filtering_stream<boost::iostreams::input> in_;
101 bool v3000_atom_block_;
102 bool v3000_bond_block_;
void Import(mol::EntityHandle &ent)
SDFReader(const boost::filesystem::path &loc, const IOProfile &profile)
SDFReader(std::istream &instream, const IOProfile &profile)
SDFReader(const String &filename, const IOProfile &profile)
external coordinate system editor