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>
32 namespace ost {
namespace io {
41 HetEntry(
char c, mol::ResNum n): chain(c), num(n) {}
45 typedef std::vector<HSEntry> HSList;
46 typedef std::vector<HetEntry> HetList;
48 PDBReader(
const String& filename,
const IOProfile& profile);
49 PDBReader(
const boost::filesystem::path& loc,
const IOProfile& profile);
50 PDBReader(std::istream& instream,
const IOProfile& profile);
54 void Import(mol::EntityHandle& ent,
55 const String& restrict_chains=
"");
59 void AssignSecStructure(mol::EntityHandle ent);
60 void ParseAndAddAtom(
const StringRef& line,
int line_num,
61 mol::EntityHandle& h,
const StringRef& record_type);
64 bool ParseAtomIdent(
const StringRef& line,
int line_num,
65 String& chain_name, StringRef& res,
66 mol::ResNum& resnum, StringRef& atom_name,
char& alt_loc,
67 const StringRef& record_type);
68 void ParseAnisou(
const StringRef& line,
int line_num,
69 mol::EntityHandle& h);
70 void ParseHelixEntry(
const StringRef& line);
71 void ParseStrandEntry(
const StringRef& line);
72 void Init(
const boost::filesystem::path& loc);
73 bool EnsureLineLength(
const StringRef& line,
size_t size);
74 mol::ChainHandle curr_chain_;
75 mol::ResidueHandle curr_residue_;
81 int num_model_records_;
85 boost::filesystem::ifstream infile_;
86 std::istream& instream_;
87 boost::iostreams::filtering_stream<boost::iostreams::input> in_;
96 bool warned_name_mismatch_;