BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
FORMAT
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
9
# include <
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
27
class
BALL_EXPORT
MOLFile
28
:
public
GenericMolFile
29
{
30
public
:
31
35
44
BALL_EXPORT
struct
Property
45
{
47
static
const
String
ATOM_MASS_DIFFERENCE
;
49
static
const
String
ATOM_HYDROGEN_COUNT
;
51
static
const
String
ATOM_STEREO_CARE_BOX
;
53
static
const
String
ATOM_VALENCE
;
55
static
const
String
ATOM_H0_DESIGNATOR
;
57
static
const
String
ATOM_REACTION_COMPONENT_TYPE
;
59
static
const
String
ATOM_REACTION_COMPONENT_NUMBER
;
61
static
const
String
ATOM_INVERSION_RETENTION
;
63
static
const
String
ATOM_EXACT_CHANGE
;
64
66
static
const
String
BOND_STEREO
;
68
static
const
String
BOND_TOPOLOGY
;
70
static
const
String
BOND_REACTING_CENTER_STATUS
;
71
};
72
74
class
BALL_EXPORT
CountsStruct
75
{
76
public
:
77
Size
number_of_atoms
;
78
Size
number_of_bonds
;
79
Size
number_of_atom_lists
;
80
bool
chiral
;
81
Size
number_of_stext_entries
;
82
Size
number_of_reaction_components
;
83
Size
number_of_reactants
;
84
Size
number_of_products
;
85
Size
number_of_intermediates
;
86
String
version
;
87
};
88
90
class
BALL_EXPORT
AtomStruct
91
{
92
public
:
93
Vector3
position
;
94
String
symbol
;
95
Index
mass_difference
;
96
Index
charge
;
97
Index
parity
;
98
Size
hydrogen_count
;
99
bool
stereo_care_box
;
100
Size
valence
;
101
bool
H0_designator
;
102
Position
reaction_component_type
;
103
Position
reaction_component_number
;
104
Position
number
;
105
Position
inversion_retention
;
106
bool
exact_change
;
107
};
108
110
class
BALL_EXPORT
BondStruct
111
{
112
public
:
113
Position
first_atom
;
114
Position
second_atom
;
115
Position
type
;
116
Position
stereo
;
117
Position
topology
;
118
Position
reacting_center_status
;
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
174
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
Generated by
1.8.3.1