BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MOLFile.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_MOLFILE_H
6 #define BALL_FORMAT_MOLFILE_H
7 
8 #ifndef BALL_FORMAT_GENERICMOLFILE_H
10 #endif
11 
12 #ifndef BALL_MATHS_VECTOR3_H
13 # include <BALL/MATHS/vector3.h>
14 #endif
15 
16 namespace BALL
17 {
18  class System;
19  class Atom;
20  class Molecule;
21 
28  : public GenericMolFile
29  {
30  public:
31 
35 
45  {
53  static const String ATOM_VALENCE;
55  static const String ATOM_H0_DESIGNATOR;
63  static const String ATOM_EXACT_CHANGE;
64 
66  static const String BOND_STEREO;
68  static const String BOND_TOPOLOGY;
71  };
72 
75  {
76  public:
80  bool chiral;
87  };
88 
91  {
92  public:
107  };
108 
111  {
112  public:
119  };
121 
125 
128  MOLFile();
129 
133  MOLFile(const String& filename, File::OpenMode open_mode = std::ios::in);
134 
136  virtual ~MOLFile();
137 
139 
143 
147  virtual bool write(const Molecule& molecule);
148 
152  virtual bool write(const System& system);
153 
157  virtual bool read(System& system);
158 
162  virtual Molecule* read();
163 
165  const MOLFile& operator = (const MOLFile& file);
166 
168 
169  protected:
173  static const String counts_format_;
175 
177  static const String atom_format_;
178 
180  static const String bond_format_;
182 
186  Molecule* readCTAB_(std::vector<Atom*>& atom_map);
187 
189  bool readCountsLine_(CountsStruct& counts);
190 
192  bool readAtomLine_(AtomStruct& atom);
193 
195  bool readBondLine_(BondStruct& bond);
196 
198  void writeCountsLine_(const CountsStruct& counts);
199 
201  void writeAtomLine_(const AtomStruct& atom);
202 
204  void writeBondLine_(const BondStruct& bond);
205  };
206 } // namespace BALL
207 
208 #endif // BALL_FORMAT_MOLFILE_H
static const String ATOM_VALENCE
Definition: MOLFile.h:53
static const String ATOM_H0_DESIGNATOR
Definition: MOLFile.h:55
static const String bond_format_
The format of an entry of the bond block.
Definition: MOLFile.h:180
static const String ATOM_EXACT_CHANGE
Definition: MOLFile.h:63
static const String BOND_STEREO
Definition: MOLFile.h:66
static const String ATOM_STEREO_CARE_BOX
Definition: MOLFile.h:51
std::ios::openmode OpenMode
Definition: file.h:168
static const String ATOM_HYDROGEN_COUNT
Definition: MOLFile.h:49
static const String ATOM_MASS_DIFFERENCE
Definition: MOLFile.h:47
static const String BOND_REACTING_CENTER_STATUS
Definition: MOLFile.h:70
static const String atom_format_
The format of an entry of the atom block.
Definition: MOLFile.h:177
Position reacting_center_status
Definition: MOLFile.h:118
static const String ATOM_INVERSION_RETENTION
Definition: MOLFile.h:61
Position reaction_component_type
Definition: MOLFile.h:102
char Atom[5]
Definition: PDBdefs.h:257
Position reaction_component_number
Definition: MOLFile.h:103
static const String BOND_TOPOLOGY
Definition: MOLFile.h:68
#define BALL_EXPORT
Definition: COMMON/global.h:50
static const String ATOM_REACTION_COMPONENT_NUMBER
Definition: MOLFile.h:59
static const String ATOM_REACTION_COMPONENT_TYPE
Definition: MOLFile.h:57
Position inversion_retention
Definition: MOLFile.h:105