19 #ifndef OST_IO_PDB_READER_HH
20 #define OST_IO_PDB_READER_HH
25 #include <boost/iostreams/filtering_stream.hpp>
26 #include <boost/filesystem/fstream.hpp>
37 namespace ost {
namespace io {
46 HetEntry(
char c, mol::ResNum n): chain(c), num(n) {}
51 CompndEntry(std::vector<String> c,
int n): chains(c), mol_id(n) {}
52 std::vector<String> chains;
55 typedef std::vector<HSEntry> HSList;
56 typedef std::vector<HetEntry> HetList;
57 typedef std::vector<CompndEntry> CompndList;
59 PDBReader(
const String& filename,
const IOProfile& profile);
60 PDBReader(
const boost::filesystem::path& loc,
const IOProfile& profile);
61 PDBReader(std::istream& instream,
const IOProfile& profile);
65 void Import(mol::EntityHandle& ent,
66 const String& restrict_chains=
"");
72 void ParseSeqRes(
const StringRef& line,
int line_num);
74 void ParseCompndEntry(
const StringRef& line,
int line_num);
79 void ParseAndAddAtom(
const StringRef& line,
int line_num,
81 void ThrowFaultTolerant(
const String& msg);
83 bool ParseAtomIdent(
const StringRef& line,
int line_num,
86 const StringRef& record_type,
int& serial);
87 void ParseAnisou(
const StringRef& line,
int line_num,
89 void ParseHelixEntry(
const StringRef& line);
90 void ParseStrandEntry(
const StringRef& line);
91 void Init(
const boost::filesystem::path& loc);
92 bool EnsureLineLength(
const StringRef& line,
size_t size);
94 std::map<int, mol::AtomHandle> amap_;
102 int num_model_records_;
106 boost::filesystem::ifstream infile_;
107 std::istream& instream_;
108 boost::iostreams::filtering_stream<boost::iostreams::input> in_;
112 std::pair <bool, int> mol_id_;
114 bool data_continues_;
122 bool warned_name_mismatch_;
124 bool warned_rule_based_;
convenient datatype for referencing character data
bool GetReadSeqRes() const
pointer_it< T > end(const std::vector< T > &values)
void SetReadSeqRes(bool flag)
seq::SequenceList GetSeqRes() const