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
BALL::GAMESSDatFile::read
virtual Molecule * read()
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::GAMESSDatFile::block
Definition: GAMESSDatFile.h:30
BALL::GAMESSDatFile::block::data
StringHashMap< String > data
Definition: GAMESSDatFile.h:35
BALL::Molecule
Definition: molecule.h:31
BALL::System
Definition: KERNEL/system.h:40
BALL::GAMESSDatFile::symmetry_group_
String symmetry_group_
Definition: GAMESSDatFile.h:144
BALL::GAMESSDatFile::write
virtual bool write(const Molecule &molecule)
BALL::GAMESSDatFile::insertBlockedData
void insertBlockedData(const char *key, const char *value)
BALL::GAMESSDatFile::insertBond
void insertBond(Index a1, Index a2)
BALL::GenericMolFile
Definition: genericMolFile.h:58
BALL::GAMESSDatFile::insertAtom
void insertAtom(char *element, float charge, float x, float y, float z)
stringHashMap.h
BALL::String
Definition: string.h:57
BALL::GAMESSDatFile::current_block_
String current_block_
Definition: GAMESSDatFile.h:142
BALL::GAMESSDatFile::~GAMESSDatFile
virtual ~GAMESSDatFile()
BALL::GAMESSDatFile::setMoleculeName
void setMoleculeName(char *name)
BALL
Definition: constants.h:13
BALL::GAMESSDatFile::initRead_
virtual void initRead_()
BALL::GAMESSDatFile::write
virtual bool write(const System &molecule)
BALL::File::OpenMode
std::ios::openmode OpenMode
Definition: file.h:165
BALL::GAMESSDatFile::state
static State state
Definition: GAMESSDatFile.h:135
BALL::StringHashMap< String >
BALL_INDEX_TYPE
BALL::GAMESSDatFile::getBlockedData
const String & getBlockedData(const String &block, const String &key) const
BALL::GAMESSDatFile::GAMESSDatFile
GAMESSDatFile()
BALL::GAMESSDatFile::blocks_
StringHashMap< block > blocks_
Definition: GAMESSDatFile.h:143
BALL::GAMESSDatFile::newMolecule
void newMolecule()
BALL::GAMESSDatFile
Definition: GAMESSDatFile.h:25
BALL::GAMESSDatFile::block::blockname
String blockname
Definition: GAMESSDatFile.h:33
BALL::GAMESSDatFile::molecule_
Molecule * molecule_
Definition: GAMESSDatFile.h:140
BALL::GAMESSDatFile::State::current_parser
GAMESSDatFile * current_parser
Definition: GAMESSDatFile.h:44
BALL::GAMESSDatFile::getBlockedData
String & getBlockedData(const String &block, const String &key)
BALL::operator>>
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
Definition: regularData1D.h:802
BALL::GAMESSDatFile::GAMESSDatFile
GAMESSDatFile(const String &filename, File::OpenMode open_mode=std::ios::in)
BALL::GAMESSDatFile::read
virtual bool read(System &system)
BALL::GAMESSDatFile::clearParameters
void clearParameters()
BALL::GAMESSDatFile::State
Definition: GAMESSDatFile.h:43
genericMolFile.h
BALL::GAMESSDatFile::insertBlockedData
void insertBlockedData(const String &key, const String &value)
BALL::GAMESSDatFile::inBlock
void inBlock(const char *blockname)