23 #ifndef OST_IO_ENTITY_IO_PLUGIN_PQR_H
24 #define OST_IO_ENTITY_IO_PLUGIN_PQR_H
32 #include <boost/iostreams/filtering_stream.hpp>
33 #include <boost/filesystem/fstream.hpp>
35 namespace ost {
namespace io {
40 PQRReader(
const boost::filesystem::path& loc);
42 void Import(mol::EntityHandle& ent);
44 std::vector<mol::AtomHandle> GetSequentialAtoms()
const;
48 void ParseAndAddAtom(
const String& line, mol::EntityHandle& h);
49 void ParseAndAddAtomExpanded(
const String& line, mol::EntityHandle& h);
51 std::vector<mol::AtomHandle> sequential_atom_list_;
52 mol::ChainHandle curr_chain_;
53 mol::ResidueHandle curr_residue_;
57 boost::filesystem::ifstream infile_;
58 boost::iostreams::filtering_stream<boost::iostreams::input> in_;
64 PQRWriter(
const String& filename,
bool ext=
false);
65 PQRWriter(
const boost::filesystem::path& filename,
bool ext=
false);
66 PQRWriter(std::ostream& outstream,
bool ext=
false);
68 void Write(
const mol::EntityView& ent);
69 void Write(
const mol::EntityHandle& ent);
71 virtual bool VisitAtom(
const mol::AtomHandle& atom);
72 virtual bool VisitResidue(
const mol::ResidueHandle& r);
74 void WriteHeader(
const mol::EntityView& ent);
79 std::ofstream outfile_;
80 std::ostream& outstream_;
89 virtual void Import(mol::EntityHandle& ent,
const boost::filesystem::path& loc);
91 virtual void Export(
const mol::EntityView& ent,
92 const boost::filesystem::path& loc)
const;
94 virtual void Import(mol::EntityHandle& ent, std::istream& stream);
96 virtual void Export(
const mol::EntityView& ent, std::ostream& stream)
const;
98 static bool ProvidesImport(
const boost::filesystem::path& loc,
99 const String& format=
"auto");
100 static bool ProvidesExport(
const boost::filesystem::path& loc,
101 const String& format=
"auto");
102 virtual bool RequiresBuilder()
const;
static String GetFormatDescription()
mol::EntityHandle DLLEXPORT_OST_IO LoadPQR(const String &file_name)
EntityIOHandlerFactory< EntityIOPQRHandler > EntityIOPQRHandlerFactory
static String GetFormatName()