Loading...
Searching...
No Matches
GAMESSDatFile.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_FORMAT_GAMESSDATFILE_H
#define BALL_FORMAT_GAMESSDATFILE_H
#ifndef BALL_FORMAT_GENERICMOLFILE_H
# include <BALL/FORMAT/genericMolFile.h>
#endif
#ifndef BALL_DATATYPE_STRINGHASHMAP_H
# include <BALL/DATATYPE/stringHashMap.h>
#endif
namespace BALL
{
class BALL_EXPORT GAMESSDatFile
: public GenericMolFile
{
public:
class block
{
public:
String blockname;
StringHashMap<String> data;
void operator >> (std::ostream& os) const;
};
struct State
{
GAMESSDatFile* current_parser;
};
GAMESSDatFile();
GAMESSDatFile(const String& filename, File::OpenMode open_mode = std::ios::in);
virtual ~GAMESSDatFile();
const GAMESSDatFile& operator = (const GAMESSDatFile& rhs);
virtual bool write(const Molecule& molecule);
virtual bool write(const System& molecule);
virtual Molecule* read();
virtual bool read(System& system);
void newMolecule();
void setMoleculeName(char* name);
void insertAtom(char* element, float charge, float x, float y, float z);
void insertBond(Index a1, Index a2);
void inBlock(const char* blockname);
void insertBlockedData(const char* key, const char* value);
void insertBlockedData(const String& key, const String& value);
String& getBlockedData(const String& block, const String& key);
const String& getBlockedData(const String& block, const String& key) const;
void clearParameters();
static State state;
protected:
virtual void initRead_();
Molecule* molecule_;
String current_block_;
StringHashMap<block> blocks_;
String symmetry_group_;
};
}
#endif // BALL_FORMAT_GAMESSDATFILE_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::File::OpenMode
std::ios::openmode OpenMode
Definition file.h:165
BALL::GAMESSDatFile::block
Definition GAMESSDatFile.h:30
BALL::GAMESSDatFile::block::data
StringHashMap< String > data
Definition GAMESSDatFile.h:35
BALL::GAMESSDatFile::block::blockname
String blockname
Definition GAMESSDatFile.h:33
BALL::GAMESSDatFile::insertAtom
void insertAtom(char *element, float charge, float x, float y, float z)
BALL::GAMESSDatFile::insertBond
void insertBond(Index a1, Index a2)
BALL::GAMESSDatFile::blocks_
StringHashMap< block > blocks_
Definition GAMESSDatFile.h:143
BALL::GAMESSDatFile::insertBlockedData
void insertBlockedData(const String &key, const String &value)
BALL::GAMESSDatFile::insertBlockedData
void insertBlockedData(const char *key, const char *value)
BALL::GAMESSDatFile::inBlock
void inBlock(const char *blockname)
BALL::GAMESSDatFile::getBlockedData
String & getBlockedData(const String &block, const String &key)
BALL::GAMESSDatFile::symmetry_group_
String symmetry_group_
Definition GAMESSDatFile.h:144
BALL::GAMESSDatFile::write
virtual bool write(const Molecule &molecule)
BALL::GAMESSDatFile::molecule_
Molecule * molecule_
Definition GAMESSDatFile.h:140
BALL::GAMESSDatFile::state
static State state
Definition GAMESSDatFile.h:135
BALL::GAMESSDatFile::initRead_
virtual void initRead_()
BALL::GAMESSDatFile::~GAMESSDatFile
virtual ~GAMESSDatFile()
BALL::GAMESSDatFile::getBlockedData
const String & getBlockedData(const String &block, const String &key) const
BALL::GAMESSDatFile::GAMESSDatFile
GAMESSDatFile(const String &filename, File::OpenMode open_mode=std::ios::in)
BALL::GAMESSDatFile::write
virtual bool write(const System &molecule)
BALL::GAMESSDatFile::current_block_
String current_block_
Definition GAMESSDatFile.h:142
BALL::GAMESSDatFile::newMolecule
void newMolecule()
BALL::GAMESSDatFile::read
virtual Molecule * read()
BALL::GAMESSDatFile::GAMESSDatFile
GAMESSDatFile()
BALL::GAMESSDatFile::read
virtual bool read(System &system)
BALL::GAMESSDatFile::clearParameters
void clearParameters()
BALL::GAMESSDatFile::setMoleculeName
void setMoleculeName(char *name)
BALL::GenericMolFile::GenericMolFile
GenericMolFile()
BALL::Molecule
Definition molecule.h:31
BALL::StringHashMap
Definition stringHashMap.h:42
BALL::String
Definition string.h:57
BALL::System
Definition KERNEL/system.h:40
genericMolFile.h
BALL
Definition constants.h:13
BALL::Index
BALL_INDEX_TYPE Index
Definition COMMON/global.h:105
stringHashMap.h
BALL::GAMESSDatFile::State
Definition GAMESSDatFile.h:43
BALL::GAMESSDatFile::State::current_parser
GAMESSDatFile * current_parser
Definition GAMESSDatFile.h:44