00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_FORMAT_HINFILE_H 00006 #define BALL_FORMAT_HINFILE_H 00007 00008 #ifndef BALL_FORMAT_GENERICMOLFILE_H 00009 # include <BALL/FORMAT/genericMolFile.h> 00010 #endif 00011 00012 #ifndef BALL_MATHS_SIMPLEBOX3_H 00013 # include <BALL/MATHS/simpleBox3.h> 00014 #endif 00015 00016 namespace BALL 00017 { 00029 class BALL_EXPORT HINFile 00030 : public GenericMolFile 00031 { 00032 public: 00033 00037 00040 HINFile(); 00041 00044 HINFile(const String& filename, File::OpenMode open_mode = std::ios::in) 00045 throw(Exception::FileNotFound); 00046 00049 virtual ~HINFile(); 00050 00052 00055 00058 const HINFile& operator = (const HINFile& rhs) 00059 throw(Exception::FileNotFound); 00060 00062 00065 00069 virtual bool write(const Molecule& molecule) 00070 throw(File::CannotWrite); 00071 00075 virtual bool write(const System& system) 00076 throw(File::CannotWrite); 00077 00080 virtual Molecule* read() 00081 throw(Exception::ParseError); 00082 00085 virtual bool read(System& system) 00086 throw(Exception::ParseError); 00087 00089 00092 00095 bool hasPeriodicBoundary() const; 00096 00101 SimpleBox3 getPeriodicBoundary() const; 00102 00109 float getTemperature() const; 00110 00112 00113 protected: 00114 00115 SimpleBox3 box_; 00116 00118 virtual void initRead_(); 00119 00120 float temperature_; 00121 00122 void writeAtom_(const Atom& atom, Size number, Size atom_offset); 00123 }; 00124 } // namespace BALL 00125 00126 #endif // BALL_FORMAT_HINFILE_H