BALL  1.5.0
GAMESSDatFile.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_FORMAT_GAMESSDATFILE_H
6 #define BALL_FORMAT_GAMESSDATFILE_H
7 
8 #ifndef BALL_FORMAT_GENERICMOLFILE_H
10 #endif
11 
12 #ifndef BALL_DATATYPE_STRINGHASHMAP_H
14 #endif
15 namespace BALL
16 {
24  : public GenericMolFile
25  {
26  public:
27 
29  class block
30  {
31  public:
36 
37  void operator >> (std::ostream& os) const;
38 
39  };
40 
42  struct State
43  {
45  };
46 
50 
54 
58  GAMESSDatFile(const String& filename, File::OpenMode open_mode = std::ios::in);
59 
62  virtual ~GAMESSDatFile();
63 
65 
68 
73  const GAMESSDatFile& operator = (const GAMESSDatFile& rhs);
74 
76 
80 
86  virtual bool write(const Molecule& molecule);
87 
93  virtual bool write(const System& molecule);
94 
100  virtual Molecule* read();
101 
107  virtual bool read(System& system);
108 
110 
114  void newMolecule();
115 
116  void setMoleculeName(char* name);
117 
118  void insertAtom(char* element, float charge, float x, float y, float z);
119 
120  void insertBond(Index a1, Index a2);
121 
122  void inBlock(const char* blockname);
123 
124  void insertBlockedData(const char* key, const char* value);
125 
126  void insertBlockedData(const String& key, const String& value);
127 
128  String& getBlockedData(const String& block, const String& key);
129 
130  const String& getBlockedData(const String& block, const String& key) const;
131 
134 
135  static State state;
136 
137  protected:
138  virtual void initRead_();
139 
141 
145  };
146 }
147 
148 #endif // BALL_FORMAT_GAMESSDATFILE_H
Definition: constants.h:13
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
BALL_INDEX_TYPE Index
void insertAtom(char *element, float charge, float x, float y, float z)
void insertBond(Index a1, Index a2)
StringHashMap< block > blocks_
void insertBlockedData(const String &key, const String &value)
void insertBlockedData(const char *key, const char *value)
void inBlock(const char *blockname)
String & getBlockedData(const String &block, const String &key)
virtual bool write(const Molecule &molecule)
const String & getBlockedData(const String &block, const String &key) const
static State state
virtual void initRead_()
virtual ~GAMESSDatFile()
GAMESSDatFile(const String &filename, File::OpenMode open_mode=std::ios::in)
virtual bool write(const System &molecule)
virtual bool read(System &system)
virtual Molecule * read()
void setMoleculeName(char *name)
StringHashMap< String > data
Definition: GAMESSDatFile.h:35
GAMESSDatFile * current_parser
Definition: GAMESSDatFile.h:44
std::ios::openmode OpenMode
Definition: file.h:165
#define BALL_EXPORT
Definition: COMMON/global.h:50