You are on page 1of 1941

Open Babel: API Documentation

Open Babel: API Documentation

Table of Contents
API Documentation............................................................................................................................................1
2.2.0.........................................................................................................................................................1
Introduction.............................................................................................................................................1

RDKitConv.h.......................................................................................................................................................3

RDKitConv.h File Reference.............................................................................................................................4


Functions..................................................................................................................................................4
Detailed Description................................................................................................................................4
Function Documentation..........................................................................................................................4

alias.cpp File Reference......................................................................................................................................5


Namespaces..............................................................................................................................................5
Detailed Description................................................................................................................................5

alias.h....................................................................................................................................................................6

alias.h File Reference..........................................................................................................................................8


Namespaces..............................................................................................................................................8
Classes.....................................................................................................................................................8
Variables..................................................................................................................................................8
Detailed Description................................................................................................................................8

Class List............................................................................................................................................................10

atom.cpp File Reference...................................................................................................................................14


Namespaces............................................................................................................................................14
Defines...................................................................................................................................................14
Functions................................................................................................................................................14
Variables................................................................................................................................................14
Detailed Description..............................................................................................................................14
Define Documentation...........................................................................................................................14
Function Documentation........................................................................................................................15

atom.h.................................................................................................................................................................16

atom.h File Reference.......................................................................................................................................22


Namespaces............................................................................................................................................22
Classes...................................................................................................................................................22
Defines...................................................................................................................................................22
Typedefs.................................................................................................................................................23
Detailed Description..............................................................................................................................23
Define Documentation...........................................................................................................................23

atomclass.h.........................................................................................................................................................26

i
Open Babel: API Documentation

Table of Contents
atomclass.h File Reference...............................................................................................................................28
Namespaces............................................................................................................................................28
Classes...................................................................................................................................................28
Detailed Description..............................................................................................................................28

base.cpp File Reference....................................................................................................................................30


Namespaces............................................................................................................................................30
Detailed Description..............................................................................................................................30

base.h..................................................................................................................................................................31

base.h File Reference........................................................................................................................................36


Namespaces............................................................................................................................................36
Classes...................................................................................................................................................37
Typedefs.................................................................................................................................................37
Enumerations.........................................................................................................................................37
Detailed Description..............................................................................................................................37

bitvec.cpp File Reference..................................................................................................................................39


Namespaces............................................................................................................................................39
Defines...................................................................................................................................................39
Functions................................................................................................................................................39
Variables................................................................................................................................................39
Detailed Description..............................................................................................................................39
Define Documentation...........................................................................................................................39

bitvec.h...............................................................................................................................................................41

bitvec.h File Reference......................................................................................................................................45


Namespaces............................................................................................................................................45
Classes...................................................................................................................................................45
Defines...................................................................................................................................................45
Functions................................................................................................................................................46
Detailed Description..............................................................................................................................46
Define Documentation...........................................................................................................................46

bond.cpp File Reference...................................................................................................................................48


Namespaces............................................................................................................................................48
Detailed Description..............................................................................................................................48

bond.h.................................................................................................................................................................49

bond.h File Reference.......................................................................................................................................53


Namespaces............................................................................................................................................53
Classes...................................................................................................................................................53
Defines...................................................................................................................................................53
Typedefs.................................................................................................................................................54
Detailed Description..............................................................................................................................54

ii
Open Babel: API Documentation

Table of Contents
bond.h File Reference
Define Documentation...........................................................................................................................54

bondtyper.cpp File Reference..........................................................................................................................56


Namespaces............................................................................................................................................56
Variables................................................................................................................................................56
Detailed Description..............................................................................................................................56

bondtyper.h........................................................................................................................................................58

bondtyper.h File Reference..............................................................................................................................60


Namespaces............................................................................................................................................60
Classes...................................................................................................................................................60
Detailed Description..............................................................................................................................60

builder.cpp File Reference...............................................................................................................................62


Namespaces............................................................................................................................................62
Detailed Description..............................................................................................................................62

builder.h.............................................................................................................................................................63

builder.h File Reference...................................................................................................................................65


Namespaces............................................................................................................................................65
Classes...................................................................................................................................................65
Detailed Description..............................................................................................................................65

canon.cpp File Reference..................................................................................................................................67


Namespaces............................................................................................................................................67
Defines...................................................................................................................................................67
Functions................................................................................................................................................67
Detailed Description..............................................................................................................................68
Define Documentation...........................................................................................................................68

canon.h...............................................................................................................................................................69

canon.h File Reference......................................................................................................................................71


Namespaces............................................................................................................................................71
Functions................................................................................................................................................71
Detailed Description..............................................................................................................................71

chains.cpp File Reference.................................................................................................................................73


Namespaces............................................................................................................................................73
Defines...................................................................................................................................................73
Typedefs.................................................................................................................................................74
Functions................................................................................................................................................75
Variables................................................................................................................................................75
Detailed Description..............................................................................................................................75
Define Documentation...........................................................................................................................75

iii
Open Babel: API Documentation

Table of Contents
chains.cpp File Reference
Variable Documentation........................................................................................................................80

chains.h..............................................................................................................................................................82

chains.h File Reference.....................................................................................................................................85


Namespaces............................................................................................................................................85
Classes...................................................................................................................................................85
Defines...................................................................................................................................................85
Typedefs.................................................................................................................................................85
Detailed Description..............................................................................................................................85
Define Documentation...........................................................................................................................86

What's New in Version 2.1...............................................................................................................................87

What's New in Version 2.2...............................................................................................................................89

chiral.cpp File Reference..................................................................................................................................90


Namespaces............................................................................................................................................90
Functions................................................................................................................................................90
Detailed Description..............................................................................................................................90

chiral.h...............................................................................................................................................................92

chiral.h File Reference......................................................................................................................................94


Namespaces............................................................................................................................................94
Functions................................................................................................................................................94
Detailed Description..............................................................................................................................94

DLHandler Member List.................................................................................................................................96

DLHandler Class Reference.............................................................................................................................97


Static Public Member Functions............................................................................................................97
Detailed Description..............................................................................................................................97
Member Function Documentation.........................................................................................................97

AliasData Member List..................................................................................................................................100

AliasData Class Reference.............................................................................................................................102


Public Member Functions....................................................................................................................102
Protected Attributes.............................................................................................................................102
Detailed Description............................................................................................................................103
Constructor & Destructor Documentation...........................................................................................103
Member Function Documentation.......................................................................................................103
Member Data Documentation..............................................................................................................105

iv
Open Babel: API Documentation

Table of Contents
FastSearch Member List................................................................................................................................107

FastSearch Class Reference...........................................................................................................................108


Public Member Functions....................................................................................................................108
Detailed Description............................................................................................................................108
Using FastSearch and FastSearchIndexer in a program................................................................109
Constructor & Destructor Documentation...........................................................................................111
Member Function Documentation.......................................................................................................111

FastSearchIndexer Member List...................................................................................................................114

FastSearchIndexer Class Reference..............................................................................................................115


Public Member Functions....................................................................................................................115
Detailed Description............................................................................................................................115
Constructor & Destructor Documentation...........................................................................................115
Member Function Documentation.......................................................................................................116

FilteringInputStreambuf Member List.........................................................................................................117

FilteringInputStreambuf Class Template Reference..................................................................................119


Public Member Functions....................................................................................................................119
Detailed Description............................................................................................................................119
template<class Extractor> class OpenBabel::FilteringInputStreambuf< Extractor >...................119
Constructor & Destructor Documentation...........................................................................................120
Member Function Documentation.......................................................................................................120

GasteigerState Member List..........................................................................................................................122

GasteigerState Class Reference.....................................................................................................................123


Public Member Functions....................................................................................................................123
Public Attributes..................................................................................................................................123
Detailed Description............................................................................................................................123
Constructor & Destructor Documentation...........................................................................................123
Member Function Documentation.......................................................................................................123
Member Data Documentation..............................................................................................................124

LineEndingExtractor Member List..............................................................................................................126

LineEndingExtractor Class Reference.........................................................................................................127


Public Member Functions....................................................................................................................127
Detailed Description............................................................................................................................127
Member Function Documentation.......................................................................................................127

OBAngle Member List...................................................................................................................................129

OBAngle Class Reference...............................................................................................................................131


Public Member Functions....................................................................................................................131
Protected Member Functions...............................................................................................................131

v
Open Babel: API Documentation

Table of Contents
OBAngle Class Reference
Protected Attributes.............................................................................................................................131
Friends.................................................................................................................................................131
Detailed Description............................................................................................................................131
Constructor & Destructor Documentation...........................................................................................132
Member Function Documentation.......................................................................................................132
Friends And Related Function Documentation....................................................................................133
Member Data Documentation..............................................................................................................134

OBAngleData Member List...........................................................................................................................136

OBAngleData Class Reference......................................................................................................................138


Public Member Functions....................................................................................................................138
Protected Member Functions...............................................................................................................138
Protected Attributes.............................................................................................................................138
Friends.................................................................................................................................................139
Detailed Description............................................................................................................................139
Constructor & Destructor Documentation...........................................................................................139
Member Function Documentation.......................................................................................................139
Friends And Related Function Documentation....................................................................................141
Member Data Documentation..............................................................................................................141

OBAromaticTyper Member List...................................................................................................................143

OBAromaticTyper Class Reference..............................................................................................................145


Public Member Functions....................................................................................................................145
Protected Attributes.............................................................................................................................145
Detailed Description............................................................................................................................146
Constructor & Destructor Documentation...........................................................................................146
Member Function Documentation.......................................................................................................146
Member Data Documentation..............................................................................................................148

OBAtom Member List....................................................................................................................................151

OBAtom Class Reference...............................................................................................................................156


Public Member Functions....................................................................................................................156
Static Public Member Functions..........................................................................................................159
Public Attributes..................................................................................................................................159
Protected Member Functions...............................................................................................................159
Protected Attributes.............................................................................................................................160
Detailed Description............................................................................................................................160
Constructor & Destructor Documentation...........................................................................................161
Member Function Documentation.......................................................................................................161
Member Data Documentation..............................................................................................................189

OBAtomAtomIter Member List....................................................................................................................192

vi
Open Babel: API Documentation

Table of Contents
OBAtomAtomIter Class Reference...............................................................................................................193
Public Member Functions....................................................................................................................193
Detailed Description............................................................................................................................193
Constructor & Destructor Documentation...........................................................................................194
Member Function Documentation.......................................................................................................194

OBAtomBondIter Member List....................................................................................................................196

OBAtomBondIter Class Reference...............................................................................................................197


Public Member Functions....................................................................................................................197
Detailed Description............................................................................................................................197
Constructor & Destructor Documentation...........................................................................................198
Member Function Documentation.......................................................................................................198

OBAtomClassData Member List...................................................................................................................200

OBAtomClassData Class Reference..............................................................................................................202


Public Member Functions....................................................................................................................202
Protected Attributes.............................................................................................................................202
Detailed Description............................................................................................................................202
Constructor & Destructor Documentation...........................................................................................203
Member Function Documentation.......................................................................................................203
Member Data Documentation..............................................................................................................204

OBAtomTyper Member List.........................................................................................................................206

OBAtomTyper Class Reference.....................................................................................................................208


Public Member Functions....................................................................................................................208
Protected Attributes.............................................................................................................................208
Detailed Description............................................................................................................................208
Constructor & Destructor Documentation...........................................................................................209
Member Function Documentation.......................................................................................................209
Member Data Documentation..............................................................................................................210

OBBase Member List.....................................................................................................................................213

OBBase Class Reference.................................................................................................................................215


Public Member Functions....................................................................................................................215
Static Public Member Functions..........................................................................................................216
Protected Attributes.............................................................................................................................216
Detailed Description............................................................................................................................216
Constructor & Destructor Documentation...........................................................................................216
Member Function Documentation.......................................................................................................216
Member Data Documentation..............................................................................................................220

OBBitVec Member List..................................................................................................................................222

vii
Open Babel: API Documentation

Table of Contents
OBBitVec Class Reference.............................................................................................................................224
Public Types........................................................................................................................................224
Public Member Functions....................................................................................................................224
Friends.................................................................................................................................................225
Detailed Description............................................................................................................................225
Member Typedef Documentation........................................................................................................225
Constructor & Destructor Documentation...........................................................................................226
Member Function Documentation.......................................................................................................226
Friends And Related Function Documentation....................................................................................234

OBBond Member List....................................................................................................................................238

OBBond Class Reference...............................................................................................................................242


Public Member Functions....................................................................................................................242
Static Public Member Functions..........................................................................................................244
Public Attributes..................................................................................................................................244
Protected Member Functions...............................................................................................................244
Protected Attributes.............................................................................................................................244
Detailed Description............................................................................................................................244
Constructor & Destructor Documentation...........................................................................................245
Member Function Documentation.......................................................................................................245
Member Data Documentation..............................................................................................................259

OBBondTyper Member List..........................................................................................................................262

OBBondTyper Class Reference.....................................................................................................................264


Public Member Functions....................................................................................................................264
Protected Attributes.............................................................................................................................264
Detailed Description............................................................................................................................264
Constructor & Destructor Documentation...........................................................................................265
Member Function Documentation.......................................................................................................265
Member Data Documentation..............................................................................................................266

OBBuilder Member List.................................................................................................................................269

OBBuilder Class Reference............................................................................................................................270


Public Member Functions....................................................................................................................270
Static Public Member Functions..........................................................................................................270
Detailed Description............................................................................................................................270
Member Function Documentation.......................................................................................................271

OBChainsParser Member List......................................................................................................................275

OBChainsParser Class Reference.................................................................................................................276


Public Member Functions....................................................................................................................276
Detailed Description............................................................................................................................276
Constructor & Destructor Documentation...........................................................................................276
Member Function Documentation.......................................................................................................276

viii
Open Babel: API Documentation

Table of Contents
OBChemTsfm Member List..........................................................................................................................278

OBChemTsfm Class Reference.....................................................................................................................279


Public Member Functions....................................................................................................................279
Detailed Description............................................................................................................................279
Constructor & Destructor Documentation...........................................................................................279
Member Function Documentation.......................................................................................................279

OBChiralData Member List..........................................................................................................................282

OBChiralData Class Reference.....................................................................................................................284


Public Member Functions....................................................................................................................284
Protected Attributes.............................................................................................................................284
Friends.................................................................................................................................................285
Detailed Description............................................................................................................................285
Constructor & Destructor Documentation...........................................................................................285
Member Function Documentation.......................................................................................................285
Friends And Related Function Documentation....................................................................................287
Member Data Documentation..............................................................................................................287

OBCommentData Member List....................................................................................................................290

OBCommentData Class Reference...............................................................................................................292


Public Member Functions....................................................................................................................292
Protected Attributes.............................................................................................................................292
Detailed Description............................................................................................................................292
Constructor & Destructor Documentation...........................................................................................293
Member Function Documentation.......................................................................................................293
Member Data Documentation..............................................................................................................294

OBConformerData Member List..................................................................................................................296

OBConformerData Class Reference.............................................................................................................298


Public Member Functions....................................................................................................................298
Protected Attributes.............................................................................................................................299
Detailed Description............................................................................................................................299
Constructor & Destructor Documentation...........................................................................................299
Member Function Documentation.......................................................................................................299
Member Data Documentation..............................................................................................................301

OBConversion Member List..........................................................................................................................304

OBConversion Class Reference.....................................................................................................................308


Option handling...................................................................................................................................308
Convenience functions.........................................................................................................................308
Public Member Functions....................................................................................................................309
Static Public Member Functions..........................................................................................................310
Protected Types....................................................................................................................................310

ix
Open Babel: API Documentation

Table of Contents
OBConversion Class Reference
Protected Member Functions...............................................................................................................310
Static Protected Member Functions.....................................................................................................310
Protected Attributes.............................................................................................................................310
Static Protected Attributes...................................................................................................................311
Detailed Description............................................................................................................................311
Member Typedef Documentation........................................................................................................313
Member Enumeration Documentation.................................................................................................313
Constructor & Destructor Documentation...........................................................................................313
Member Function Documentation.......................................................................................................313
Member Data Documentation..............................................................................................................324

OBDescriptor Member List...........................................................................................................................329

OBDescriptor Class Reference......................................................................................................................331


Public Types........................................................................................................................................331
Public Member Functions....................................................................................................................331
Static Public Member Functions..........................................................................................................331
Static Protected Member Functions.....................................................................................................332
Protected Attributes.............................................................................................................................332
Detailed Description............................................................................................................................332
Member Typedef Documentation........................................................................................................333
Member Function Documentation.......................................................................................................334
Member Data Documentation..............................................................................................................340

OBElement Member List...............................................................................................................................341

OBElement Class Reference..........................................................................................................................343


Public Member Functions....................................................................................................................343
Detailed Description............................................................................................................................343
Constructor & Destructor Documentation...........................................................................................343
Member Function Documentation.......................................................................................................344

OBElementTable Member List.....................................................................................................................348

OBElementTable Class Reference.................................................................................................................350


Public Member Functions....................................................................................................................350
Protected Attributes.............................................................................................................................350
Detailed Description............................................................................................................................351
Constructor & Destructor Documentation...........................................................................................351
Member Function Documentation.......................................................................................................351
Member Data Documentation..............................................................................................................355

OBError Member List...................................................................................................................................358

OBError Class Reference...............................................................................................................................360


Public Member Functions....................................................................................................................360
Protected Attributes.............................................................................................................................360

x
Open Babel: API Documentation

Table of Contents
OBError Class Reference
Friends.................................................................................................................................................360
Detailed Description............................................................................................................................360
Constructor & Destructor Documentation...........................................................................................360
Member Function Documentation.......................................................................................................361
Friends And Related Function Documentation....................................................................................362
Member Data Documentation..............................................................................................................362

OBExternalBond Member List.....................................................................................................................364

OBExternalBond Class Reference.................................................................................................................365


Public Member Functions....................................................................................................................365
Detailed Description............................................................................................................................365
Constructor & Destructor Documentation...........................................................................................365
Member Function Documentation.......................................................................................................366

OBExternalBondData Member List.............................................................................................................368

OBExternalBondData Class Reference........................................................................................................370


Public Member Functions....................................................................................................................370
Protected Attributes.............................................................................................................................370
Detailed Description............................................................................................................................370
Constructor & Destructor Documentation...........................................................................................371
Member Function Documentation.......................................................................................................371
Member Data Documentation..............................................................................................................372

OBFFCalculation2 Member List...................................................................................................................374

OBFFCalculation2 Class Reference..............................................................................................................375


Public Member Functions....................................................................................................................375
Public Attributes..................................................................................................................................375
Detailed Description............................................................................................................................375
Constructor & Destructor Documentation...........................................................................................376
Member Function Documentation.......................................................................................................376
Member Data Documentation..............................................................................................................376

OBFFCalculation3 Member List...................................................................................................................378

OBFFCalculation3 Class Reference..............................................................................................................380


Public Member Functions....................................................................................................................380
Public Attributes..................................................................................................................................380
Detailed Description............................................................................................................................381
Constructor & Destructor Documentation...........................................................................................381
Member Function Documentation.......................................................................................................381
Member Data Documentation..............................................................................................................381

xi
Open Babel: API Documentation

Table of Contents
OBFFCalculation4 Member List...................................................................................................................384

OBFFCalculation4 Class Reference..............................................................................................................386


Public Member Functions....................................................................................................................386
Public Attributes..................................................................................................................................386
Detailed Description............................................................................................................................387
Constructor & Destructor Documentation...........................................................................................387
Member Function Documentation.......................................................................................................387
Member Data Documentation..............................................................................................................387

OBFFConstraint Member List......................................................................................................................390

OBFFConstraint Class Reference.................................................................................................................392


Public Member Functions....................................................................................................................392
Public Attributes..................................................................................................................................392
Detailed Description............................................................................................................................392
Constructor & Destructor Documentation...........................................................................................393
Member Function Documentation.......................................................................................................393
Member Data Documentation..............................................................................................................393

OBFFConstraints Member List.....................................................................................................................396

OBFFConstraints Class Reference................................................................................................................398


Public Member Functions....................................................................................................................398
Detailed Description............................................................................................................................399
Constructor & Destructor Documentation...........................................................................................399
Member Function Documentation.......................................................................................................399

OBFFParameter Member List......................................................................................................................405

OBFFParameter Class Reference.................................................................................................................406


Public Member Functions....................................................................................................................406
Public Attributes..................................................................................................................................406
Detailed Description............................................................................................................................406
Member Function Documentation.......................................................................................................406
Member Data Documentation..............................................................................................................407

OBFingerprint Member List.........................................................................................................................409

OBFingerprint Class Reference.....................................................................................................................411


Public Types........................................................................................................................................411
Public Member Functions....................................................................................................................411
Static Public Member Functions..........................................................................................................412
Static Protected Member Functions.....................................................................................................412
Protected Attributes.............................................................................................................................412
Classes.................................................................................................................................................412
Detailed Description............................................................................................................................412
-- To define a fingerprint type --...................................................................................................413

xii
Open Babel: API Documentation

Table of Contents
OBFingerprint Class Reference
Member Typedef Documentation........................................................................................................414
Member Enumeration Documentation.................................................................................................414
Constructor & Destructor Documentation...........................................................................................414
Member Function Documentation.......................................................................................................415
Member Data Documentation..............................................................................................................419

OBFloatGrid Member List............................................................................................................................421

OBFloatGrid Class Reference.......................................................................................................................425


Public Member Functions....................................................................................................................425
Static Public Member Functions..........................................................................................................427
Protected Attributes.............................................................................................................................427
Friends.................................................................................................................................................427
Detailed Description............................................................................................................................427
Constructor & Destructor Documentation...........................................................................................427
Member Function Documentation.......................................................................................................428
Friends And Related Function Documentation....................................................................................439
Member Data Documentation..............................................................................................................439

OBForceField Member List...........................................................................................................................444

OBForceField Class Reference......................................................................................................................451


Methods for constraints........................................................................................................................451
Public Types........................................................................................................................................451
Public Member Functions....................................................................................................................451
Static Public Member Functions..........................................................................................................454
Protected Member Functions...............................................................................................................455
Static Protected Member Functions.....................................................................................................455
Protected Attributes.............................................................................................................................455
Static Protected Attributes...................................................................................................................456
Detailed Description............................................................................................................................456
Member Typedef Documentation........................................................................................................459
Constructor & Destructor Documentation...........................................................................................459
Member Function Documentation.......................................................................................................459
Member Data Documentation..............................................................................................................495

OBFormat Member List.................................................................................................................................502

OBFormat Class Reference............................................................................................................................504


Public Types........................................................................................................................................504
Public Member Functions....................................................................................................................504
Static Public Member Functions..........................................................................................................505
Static Protected Member Functions.....................................................................................................505
Protected Attributes.............................................................................................................................505
Detailed Description............................................................................................................................505
Member Typedef Documentation........................................................................................................506
Constructor & Destructor Documentation...........................................................................................506

xiii
Open Babel: API Documentation

Table of Contents
OBFormat Class Reference
Member Function Documentation.......................................................................................................506
Member Data Documentation..............................................................................................................511

OBGastChrg Member List.............................................................................................................................513

OBGastChrg Class Reference........................................................................................................................514


Public Member Functions....................................................................................................................514
Detailed Description............................................................................................................................514
Constructor & Destructor Documentation...........................................................................................514
Member Function Documentation.......................................................................................................515

OBGenericData Member List........................................................................................................................516

OBGenericData Class Reference...................................................................................................................518


Public Member Functions....................................................................................................................520
Protected Attributes.............................................................................................................................520
Detailed Description............................................................................................................................520
Constructor & Destructor Documentation...........................................................................................522
Member Function Documentation.......................................................................................................522
Member Data Documentation..............................................................................................................523

OBGlobalDataBase Member List..................................................................................................................525

OBGlobalDataBase Class Reference.............................................................................................................526


Public Member Functions....................................................................................................................526
Protected Attributes.............................................................................................................................527
Detailed Description............................................................................................................................527
Constructor & Destructor Documentation...........................................................................................527
Member Function Documentation.......................................................................................................527
Member Data Documentation..............................................................................................................528

OBGrid Member List.....................................................................................................................................531

OBGrid Class Reference................................................................................................................................533


Public Member Functions....................................................................................................................533
Static Public Member Functions..........................................................................................................534
Protected Attributes.............................................................................................................................534
Detailed Description............................................................................................................................534
Constructor & Destructor Documentation...........................................................................................534
Member Function Documentation.......................................................................................................534
Member Data Documentation..............................................................................................................540

OBGridData Member List.............................................................................................................................542

OBGridData Class Reference........................................................................................................................544


Public Types........................................................................................................................................544
Public Member Functions....................................................................................................................544

xiv
Open Babel: API Documentation

Table of Contents
OBGridData Class Reference
Protected Attributes.............................................................................................................................545
Detailed Description............................................................................................................................545
Member Enumeration Documentation.................................................................................................546
Constructor & Destructor Documentation...........................................................................................546
Member Function Documentation.......................................................................................................546
Member Data Documentation..............................................................................................................552

OBGroupContrib Member List.....................................................................................................................554

OBGroupContrib Class Reference................................................................................................................556


Public Types........................................................................................................................................556
Public Member Functions....................................................................................................................556
Static Public Member Functions..........................................................................................................556
Static Protected Member Functions.....................................................................................................557
Protected Attributes.............................................................................................................................557
Detailed Description............................................................................................................................557
Member Typedef Documentation........................................................................................................557
Constructor & Destructor Documentation...........................................................................................558
Member Function Documentation.......................................................................................................558
Member Data Documentation..............................................................................................................564

OBInternalCoord Member List.....................................................................................................................565

OBInternalCoord Class Reference................................................................................................................566


Public Member Functions....................................................................................................................566
Public Attributes..................................................................................................................................566
Detailed Description............................................................................................................................566
Constructor & Destructor Documentation...........................................................................................567
Member Data Documentation..............................................................................................................567

OBIsotopeTable Member List.......................................................................................................................569

OBIsotopeTable Class Reference..................................................................................................................571


Public Member Functions....................................................................................................................571
Protected Attributes.............................................................................................................................571
Detailed Description............................................................................................................................571
Constructor & Destructor Documentation...........................................................................................572
Member Function Documentation.......................................................................................................572
Member Data Documentation..............................................................................................................573

OBLocale Member List..................................................................................................................................576

OBLocale Class Reference.............................................................................................................................577


Public Member Functions....................................................................................................................577
Protected Attributes.............................................................................................................................577
Detailed Description............................................................................................................................577
Constructor & Destructor Documentation...........................................................................................577

xv
Open Babel: API Documentation

Table of Contents
OBLocale Class Reference
Member Function Documentation.......................................................................................................578
Member Data Documentation..............................................................................................................578

OBMatrixData Member List.........................................................................................................................580

OBMatrixData Class Reference....................................................................................................................582


Public Member Functions....................................................................................................................582
Protected Attributes.............................................................................................................................582
Detailed Description............................................................................................................................582
Constructor & Destructor Documentation...........................................................................................583
Member Function Documentation.......................................................................................................583
Member Data Documentation..............................................................................................................584

OBMessageHandler Member List.................................................................................................................586

OBMessageHandler Class Reference............................................................................................................588


Public Member Functions....................................................................................................................588
Protected Attributes.............................................................................................................................588
Detailed Description............................................................................................................................589
Constructor & Destructor Documentation...........................................................................................590
Member Function Documentation.......................................................................................................590
Member Data Documentation..............................................................................................................593

OBMol Member List.......................................................................................................................................595

OBMol Class Reference..................................................................................................................................602


Molecule modification methods..........................................................................................................602
Public Member Functions....................................................................................................................603
Protected Member Functions...............................................................................................................606
Protected Attributes.............................................................................................................................607
Detailed Description............................................................................................................................607
Constructor & Destructor Documentation...........................................................................................609
Member Function Documentation.......................................................................................................609
Member Data Documentation..............................................................................................................643

OBMolAngleIter Member List......................................................................................................................647

OBMolAngleIter Class Reference.................................................................................................................648


Public Member Functions....................................................................................................................648
Detailed Description............................................................................................................................648
Constructor & Destructor Documentation...........................................................................................649
Member Function Documentation.......................................................................................................649

OBMolAtomBFSIter Member List...............................................................................................................651

xvi
Open Babel: API Documentation

Table of Contents
OBMolAtomBFSIter Class Reference..........................................................................................................652
Public Member Functions....................................................................................................................652
Detailed Description............................................................................................................................652
Constructor & Destructor Documentation...........................................................................................653
Member Function Documentation.......................................................................................................653

OBMolAtomDFSIter Member List...............................................................................................................656

OBMolAtomDFSIter Class Reference..........................................................................................................657


Public Member Functions....................................................................................................................657
Detailed Description............................................................................................................................657
Constructor & Destructor Documentation...........................................................................................658
Member Function Documentation.......................................................................................................658

OBMolAtomIter Member List.......................................................................................................................661

OBMolAtomIter Class Reference..................................................................................................................662


Public Member Functions....................................................................................................................662
Detailed Description............................................................................................................................662
Constructor & Destructor Documentation...........................................................................................663
Member Function Documentation.......................................................................................................663

OBMolBondIter Member List.......................................................................................................................665

OBMolBondIter Class Reference..................................................................................................................666


Public Member Functions....................................................................................................................666
Detailed Description............................................................................................................................666
Constructor & Destructor Documentation...........................................................................................667
Member Function Documentation.......................................................................................................667

OBMolPairIter Member List.........................................................................................................................669

OBMolPairIter Class Reference....................................................................................................................670


Public Member Functions....................................................................................................................670
Detailed Description............................................................................................................................670
Constructor & Destructor Documentation...........................................................................................671
Member Function Documentation.......................................................................................................671

OBMolRingIter Member List........................................................................................................................673

OBMolRingIter Class Reference...................................................................................................................674


Public Member Functions....................................................................................................................674
Detailed Description............................................................................................................................674
Constructor & Destructor Documentation...........................................................................................675
Member Function Documentation.......................................................................................................675

xvii
Open Babel: API Documentation

Table of Contents
OBMolTorsionIter Member List...................................................................................................................677

OBMolTorsionIter Class Reference..............................................................................................................678


Public Member Functions....................................................................................................................678
Detailed Description............................................................................................................................678
Constructor & Destructor Documentation...........................................................................................679
Member Function Documentation.......................................................................................................679

OBMoleculeFormat Member List.................................................................................................................681

OBMoleculeFormat Class Reference............................................................................................................683


Public Types........................................................................................................................................683
Public Member Functions....................................................................................................................683
Static Public Member Functions..........................................................................................................684
Static Protected Member Functions.....................................................................................................684
Protected Attributes.............................................................................................................................684
Detailed Description............................................................................................................................684
Member Typedef Documentation........................................................................................................685
Constructor & Destructor Documentation...........................................................................................685
Member Function Documentation.......................................................................................................685
Member Data Documentation..............................................................................................................692

OBNasaThermoData Member List...............................................................................................................694

OBNasaThermoData Class Reference..........................................................................................................696


Public Member Functions....................................................................................................................696
Protected Attributes.............................................................................................................................696
Detailed Description............................................................................................................................697
Constructor & Destructor Documentation...........................................................................................697
Member Function Documentation.......................................................................................................697
Member Data Documentation..............................................................................................................699

OBOp Member List........................................................................................................................................701

OBOp Class Reference...................................................................................................................................703


Public Types........................................................................................................................................703
Public Member Functions....................................................................................................................703
Static Public Member Functions..........................................................................................................703
Static Protected Member Functions.....................................................................................................704
Protected Attributes.............................................................................................................................704
Detailed Description............................................................................................................................704
Member Typedef Documentation........................................................................................................705
Member Function Documentation.......................................................................................................705
Member Data Documentation..............................................................................................................709

OBPairData Member List..............................................................................................................................710

xviii
Open Babel: API Documentation

Table of Contents
OBPairData Class Reference.........................................................................................................................712
Public Member Functions....................................................................................................................712
Protected Attributes.............................................................................................................................712
Detailed Description............................................................................................................................712
Constructor & Destructor Documentation...........................................................................................713
Member Function Documentation.......................................................................................................713
Member Data Documentation..............................................................................................................714

OBPairTemplate Member List......................................................................................................................716

OBPairTemplate Class Template Reference................................................................................................718


Public Member Functions....................................................................................................................718
Protected Attributes.............................................................................................................................718
Detailed Description............................................................................................................................718
template<class ValueT> class OpenBabel::OBPairTemplate< ValueT >....................................718
Constructor & Destructor Documentation...........................................................................................719
Member Function Documentation.......................................................................................................719
Member Data Documentation..............................................................................................................720

OBPhModel Member List..............................................................................................................................722

OBPhModel Class Reference.........................................................................................................................724


Public Member Functions....................................................................................................................724
Protected Attributes.............................................................................................................................724
Detailed Description............................................................................................................................724
Constructor & Destructor Documentation...........................................................................................725
Member Function Documentation.......................................................................................................725
Member Data Documentation..............................................................................................................726

OBPlugin Member List..................................................................................................................................729

OBPlugin Class Reference.............................................................................................................................731


Public Types........................................................................................................................................731
Public Member Functions....................................................................................................................731
Static Public Member Functions..........................................................................................................731
Static Protected Member Functions.....................................................................................................732
Protected Attributes.............................................................................................................................732
Detailed Description............................................................................................................................732
Member Typedef Documentation........................................................................................................732
Constructor & Destructor Documentation...........................................................................................732
Member Function Documentation.......................................................................................................732
Member Data Documentation..............................................................................................................735

OBPointGroup Member List.........................................................................................................................736

OBPointGroup Class Reference....................................................................................................................737


Public Member Functions....................................................................................................................737
Protected Attributes.............................................................................................................................737

xix
Open Babel: API Documentation

Table of Contents
OBPointGroup Class Reference
Detailed Description............................................................................................................................737
Constructor & Destructor Documentation...........................................................................................737
Member Function Documentation.......................................................................................................737
Member Data Documentation..............................................................................................................738

OBProxGrid Member List.............................................................................................................................739

OBProxGrid Class Reference........................................................................................................................742


Public Member Functions....................................................................................................................742
Static Public Member Functions..........................................................................................................743
Protected Attributes.............................................................................................................................743
Detailed Description............................................................................................................................743
Constructor & Destructor Documentation...........................................................................................744
Member Function Documentation.......................................................................................................744
Member Data Documentation..............................................................................................................750

OBRTree Member List...................................................................................................................................753

OBRTree Class Reference..............................................................................................................................754


Public Member Functions....................................................................................................................754
Detailed Description............................................................................................................................754
Constructor & Destructor Documentation...........................................................................................754
Member Function Documentation.......................................................................................................754

OBRandom Member List...............................................................................................................................756

OBRandom Class Reference..........................................................................................................................757


Public Member Functions....................................................................................................................757
Detailed Description............................................................................................................................757
Constructor & Destructor Documentation...........................................................................................757
Member Function Documentation.......................................................................................................757

OBRateData Member List.............................................................................................................................760

OBRateData Class Reference........................................................................................................................762


Public Types........................................................................................................................................762
Public Member Functions....................................................................................................................762
Public Attributes..................................................................................................................................763
Protected Attributes.............................................................................................................................763
Detailed Description............................................................................................................................763
Member Enumeration Documentation.................................................................................................763
Constructor & Destructor Documentation...........................................................................................763
Member Function Documentation.......................................................................................................764
Member Data Documentation..............................................................................................................766

xx
Open Babel: API Documentation

Table of Contents
OBReaction Member List..............................................................................................................................768

OBReaction Class Reference.........................................................................................................................770


Public Member Functions....................................................................................................................770
Static Public Member Functions..........................................................................................................771
Protected Attributes.............................................................................................................................771
Detailed Description............................................................................................................................771
Constructor & Destructor Documentation...........................................................................................771
Member Function Documentation.......................................................................................................771
Member Data Documentation..............................................................................................................776

OBResidue Member List................................................................................................................................778

OBResidue Class Reference...........................................................................................................................781


Public Member Functions....................................................................................................................781
Static Public Member Functions..........................................................................................................782
Protected Attributes.............................................................................................................................782
Detailed Description............................................................................................................................783
Constructor & Destructor Documentation...........................................................................................783
Member Function Documentation.......................................................................................................783
Member Data Documentation..............................................................................................................792

OBResidueAtomIter Member List................................................................................................................795

OBResidueAtomIter Class Reference...........................................................................................................796


Public Member Functions....................................................................................................................796
Detailed Description............................................................................................................................796
Constructor & Destructor Documentation...........................................................................................797
Member Function Documentation.......................................................................................................797

OBResidueData Member List........................................................................................................................799

OBResidueData Class Reference...................................................................................................................801


Public Member Functions....................................................................................................................801
Protected Attributes.............................................................................................................................801
Detailed Description............................................................................................................................801
Constructor & Destructor Documentation...........................................................................................802
Member Function Documentation.......................................................................................................802
Member Data Documentation..............................................................................................................804

OBResidueIter Member List.........................................................................................................................807

OBResidueIter Class Reference.....................................................................................................................808


Public Member Functions....................................................................................................................808
Detailed Description............................................................................................................................808
Constructor & Destructor Documentation...........................................................................................809
Member Function Documentation.......................................................................................................809

xxi
Open Babel: API Documentation

Table of Contents
OBRing Member List.....................................................................................................................................811

OBRing Class Reference................................................................................................................................813


Public Member Functions....................................................................................................................813
Public Attributes..................................................................................................................................813
Detailed Description............................................................................................................................813
Constructor & Destructor Documentation...........................................................................................814
Member Function Documentation.......................................................................................................815
Member Data Documentation..............................................................................................................817

OBRingData Member List.............................................................................................................................819

OBRingData Class Reference........................................................................................................................821


Public Member Functions....................................................................................................................821
Protected Attributes.............................................................................................................................821
Detailed Description............................................................................................................................822
Constructor & Destructor Documentation...........................................................................................822
Member Function Documentation.......................................................................................................822
Member Data Documentation..............................................................................................................824

OBRingSearch Member List.........................................................................................................................826

OBRingSearch Class Reference.....................................................................................................................827


Public Member Functions....................................................................................................................827
Detailed Description............................................................................................................................827
Constructor & Destructor Documentation...........................................................................................827
Member Function Documentation.......................................................................................................827

OBRingTyper Member List...........................................................................................................................830

OBRingTyper Class Reference......................................................................................................................832


Public Member Functions....................................................................................................................832
Protected Attributes.............................................................................................................................832
Detailed Description............................................................................................................................832
Constructor & Destructor Documentation...........................................................................................833
Member Function Documentation.......................................................................................................833
Member Data Documentation..............................................................................................................834

OBRotamerList Member List........................................................................................................................837

OBRotamerList Class Reference...................................................................................................................839


Public Member Functions....................................................................................................................839
Protected Attributes.............................................................................................................................840
Detailed Description............................................................................................................................840
Constructor & Destructor Documentation...........................................................................................841
Member Function Documentation.......................................................................................................841
Member Data Documentation..............................................................................................................845

xxii
Open Babel: API Documentation

Table of Contents
OBRotationData Member List......................................................................................................................847

OBRotationData Class Reference.................................................................................................................849


Public Types........................................................................................................................................849
Public Member Functions....................................................................................................................849
Protected Attributes.............................................................................................................................849
Detailed Description............................................................................................................................850
Member Enumeration Documentation.................................................................................................850
Constructor & Destructor Documentation...........................................................................................850
Member Function Documentation.......................................................................................................850
Member Data Documentation..............................................................................................................852

OBRotor Member List...................................................................................................................................854

OBRotor Class Reference...............................................................................................................................856


Public Member Functions....................................................................................................................856
Detailed Description............................................................................................................................857
Constructor & Destructor Documentation...........................................................................................857
Member Function Documentation.......................................................................................................857

OBRotorKeys Member List...........................................................................................................................862

OBRotorKeys Class Reference......................................................................................................................863


Public Member Functions....................................................................................................................863
Detailed Description............................................................................................................................863
Constructor & Destructor Documentation...........................................................................................863
Member Function Documentation.......................................................................................................863

OBRotorList Member List.............................................................................................................................865

OBRotorList Class Reference........................................................................................................................867


Public Member Functions....................................................................................................................867
Detailed Description............................................................................................................................867
Constructor & Destructor Documentation...........................................................................................867
Member Function Documentation.......................................................................................................868

OBRotorRule Member List...........................................................................................................................872

OBRotorRule Class Reference.......................................................................................................................873


Public Member Functions....................................................................................................................873
Detailed Description............................................................................................................................873
Constructor & Destructor Documentation...........................................................................................873
Member Function Documentation.......................................................................................................873

OBRotorRules Member List..........................................................................................................................876

xxiii
Open Babel: API Documentation

Table of Contents
OBRotorRules Class Reference.....................................................................................................................878
Public Member Functions....................................................................................................................878
Protected Attributes.............................................................................................................................878
Detailed Description............................................................................................................................878
Constructor & Destructor Documentation...........................................................................................879
Member Function Documentation.......................................................................................................879
Member Data Documentation..............................................................................................................880

OBSSMatch Member List..............................................................................................................................883

OBSSMatch Class Reference.........................................................................................................................884


Public Member Functions....................................................................................................................884
Protected Attributes.............................................................................................................................884
Detailed Description............................................................................................................................884
Constructor & Destructor Documentation...........................................................................................884
Member Function Documentation.......................................................................................................884
Member Data Documentation..............................................................................................................885

OBScoreGrid Member List............................................................................................................................887

OBScoreGrid Class Reference.......................................................................................................................889


Public Member Functions....................................................................................................................889
Public Attributes..................................................................................................................................889
Protected Attributes.............................................................................................................................889
Detailed Description............................................................................................................................889
Constructor & Destructor Documentation...........................................................................................890
Member Function Documentation.......................................................................................................890
Member Data Documentation..............................................................................................................891

OBSerialNums Member List.........................................................................................................................893

OBSerialNums Class Reference.....................................................................................................................895


Public Member Functions....................................................................................................................895
Protected Attributes.............................................................................................................................895
Detailed Description............................................................................................................................895
Constructor & Destructor Documentation...........................................................................................896
Member Function Documentation.......................................................................................................896
Member Data Documentation..............................................................................................................897

OBSetData Member List................................................................................................................................899

OBSetData Class Reference...........................................................................................................................901


Public Member Functions....................................................................................................................901
Protected Attributes.............................................................................................................................901
Detailed Description............................................................................................................................902
Constructor & Destructor Documentation...........................................................................................902
Member Function Documentation.......................................................................................................902
Member Data Documentation..............................................................................................................904

xxiv
Open Babel: API Documentation

Table of Contents
OBSmartsPattern Member List....................................................................................................................906

OBSmartsPattern Class Reference...............................................................................................................908


Public Member Functions....................................................................................................................908
Protected Attributes.............................................................................................................................908
Detailed Description............................................................................................................................909
Constructor & Destructor Documentation...........................................................................................910
Member Function Documentation.......................................................................................................910
Member Data Documentation..............................................................................................................914

OBSqrtTbl Member List................................................................................................................................916

OBSqrtTbl Class Reference...........................................................................................................................917


Public Member Functions....................................................................................................................917
Detailed Description............................................................................................................................917
Constructor & Destructor Documentation...........................................................................................917
Member Function Documentation.......................................................................................................917

OBStopwatch Member List...........................................................................................................................919

OBStopwatch Class Reference.......................................................................................................................920


Public Member Functions....................................................................................................................920
Detailed Description............................................................................................................................920
Member Function Documentation.......................................................................................................920

OBSymmetryData Member List...................................................................................................................922

OBSymmetryData Class Reference...............................................................................................................924


Public Member Functions....................................................................................................................924
Protected Attributes.............................................................................................................................924
Detailed Description............................................................................................................................925
Constructor & Destructor Documentation...........................................................................................925
Member Function Documentation.......................................................................................................925
Member Data Documentation..............................................................................................................926

OBTorsion Member List................................................................................................................................929

OBTorsion Class Reference...........................................................................................................................931


Public Member Functions....................................................................................................................931
Protected Member Functions...............................................................................................................931
Protected Attributes.............................................................................................................................931
Friends.................................................................................................................................................931
Detailed Description............................................................................................................................932
Constructor & Destructor Documentation...........................................................................................932
Member Function Documentation.......................................................................................................932
Friends And Related Function Documentation....................................................................................934
Member Data Documentation..............................................................................................................934

xxv
Open Babel: API Documentation

Table of Contents
OBTorsionData Member List........................................................................................................................936

OBTorsionData Class Reference...................................................................................................................938


Public Member Functions....................................................................................................................938
Protected Member Functions...............................................................................................................938
Protected Attributes.............................................................................................................................938
Friends.................................................................................................................................................939
Detailed Description............................................................................................................................939
Constructor & Destructor Documentation...........................................................................................939
Member Function Documentation.......................................................................................................939
Friends And Related Function Documentation....................................................................................941
Member Data Documentation..............................................................................................................941

OBTypeTable Member List...........................................................................................................................943

OBTypeTable Class Reference......................................................................................................................945


Public Member Functions....................................................................................................................945
Protected Attributes.............................................................................................................................945
Detailed Description............................................................................................................................946
Constructor & Destructor Documentation...........................................................................................947
Member Function Documentation.......................................................................................................947
Member Data Documentation..............................................................................................................949

OBUnitCell Member List...............................................................................................................................952

OBUnitCell Class Reference..........................................................................................................................955


Public Types........................................................................................................................................955
Public Member Functions....................................................................................................................955
Protected Attributes.............................................................................................................................956
Detailed Description............................................................................................................................956
Member Enumeration Documentation.................................................................................................956
Constructor & Destructor Documentation...........................................................................................957
Member Function Documentation.......................................................................................................957
Member Data Documentation..............................................................................................................962

OBVectorData Member List..........................................................................................................................965

OBVectorData Class Reference.....................................................................................................................967


Public Member Functions....................................................................................................................967
Protected Attributes.............................................................................................................................967
Detailed Description............................................................................................................................967
Constructor & Destructor Documentation...........................................................................................968
Member Function Documentation.......................................................................................................968
Member Data Documentation..............................................................................................................969

OBVibrationData Member List.....................................................................................................................971

xxvi
Open Babel: API Documentation

Table of Contents
OBVibrationData Class Reference................................................................................................................973
Public Member Functions....................................................................................................................973
Protected Attributes.............................................................................................................................973
Detailed Description............................................................................................................................974
Constructor & Destructor Documentation...........................................................................................974
Member Function Documentation.......................................................................................................974
Member Data Documentation..............................................................................................................976

OBVirtualBond Member List........................................................................................................................978

OBVirtualBond Class Reference...................................................................................................................980


Public Member Functions....................................................................................................................980
Protected Attributes.............................................................................................................................980
Detailed Description............................................................................................................................981
Constructor & Destructor Documentation...........................................................................................981
Member Function Documentation.......................................................................................................981
Member Data Documentation..............................................................................................................982

OpTransform Member List...........................................................................................................................985

OpTransform Class Reference......................................................................................................................987


Public Types........................................................................................................................................987
Public Member Functions....................................................................................................................987
Static Public Member Functions..........................................................................................................988
Static Protected Member Functions.....................................................................................................988
Protected Attributes.............................................................................................................................988
Detailed Description............................................................................................................................988
Member Typedef Documentation........................................................................................................988
Constructor & Destructor Documentation...........................................................................................988
Member Function Documentation.......................................................................................................989
Member Data Documentation..............................................................................................................992

SpaceGroup Member List..............................................................................................................................994

SpaceGroup Class Reference.........................................................................................................................996


Public Member Functions....................................................................................................................996
Static Public Member Functions..........................................................................................................996
Detailed Description............................................................................................................................996
Constructor & Destructor Documentation...........................................................................................997
Member Function Documentation.......................................................................................................997

XMLBaseFormat Member List...................................................................................................................1000

XMLBaseFormat Class Reference..............................................................................................................1003


Public Types......................................................................................................................................1003
Public Member Functions..................................................................................................................1003
Static Public Member Functions........................................................................................................1004
Protected Member Functions.............................................................................................................1004

xxvii
Open Babel: API Documentation

Table of Contents
XMLBaseFormat Class Reference
Static Protected Member Functions...................................................................................................1004
Protected Attributes...........................................................................................................................1004
Detailed Description..........................................................................................................................1005
Member Typedef Documentation......................................................................................................1005
Constructor & Destructor Documentation.........................................................................................1005
Member Function Documentation.....................................................................................................1005
Member Data Documentation............................................................................................................1011

XMLConversion Member List....................................................................................................................1013

XMLConversion Class Reference...............................................................................................................1018


Option handling.................................................................................................................................1018
Convenience functions.......................................................................................................................1018
Public Types......................................................................................................................................1019
Public Member Functions..................................................................................................................1019
Static Public Member Functions........................................................................................................1020
Public Attributes................................................................................................................................1020
Protected Types..................................................................................................................................1020
Protected Member Functions.............................................................................................................1021
Static Protected Member Functions...................................................................................................1021
Protected Attributes...........................................................................................................................1021
Static Protected Attributes.................................................................................................................1021
Detailed Description..........................................................................................................................1022
Member Typedef Documentation......................................................................................................1022
Member Enumeration Documentation...............................................................................................1022
Constructor & Destructor Documentation.........................................................................................1022
Member Function Documentation.....................................................................................................1023
Member Data Documentation............................................................................................................1035

XMLMoleculeFormat Member List...........................................................................................................1040

XMLMoleculeFormat Class Reference.......................................................................................................1043


Public Types......................................................................................................................................1043
Public Member Functions..................................................................................................................1043
Static Public Member Functions........................................................................................................1044
Protected Member Functions.............................................................................................................1044
Static Protected Member Functions...................................................................................................1044
Protected Attributes...........................................................................................................................1044
Detailed Description..........................................................................................................................1044
Member Typedef Documentation......................................................................................................1045
Constructor & Destructor Documentation.........................................................................................1045
Member Function Documentation.....................................................................................................1045
Member Data Documentation............................................................................................................1051

matrix3x3 Member List................................................................................................................................1053

xxviii
Open Babel: API Documentation

Table of Contents
matrix3x3 Class Reference...........................................................................................................................1055
Public Member Functions..................................................................................................................1055
Static Public Member Functions........................................................................................................1056
Friends...............................................................................................................................................1056
Detailed Description..........................................................................................................................1056
Constructor & Destructor Documentation.........................................................................................1056
Member Function Documentation.....................................................................................................1057
Friends And Related Function Documentation..................................................................................1063

obLogBuf Member List................................................................................................................................1065

obLogBuf Class Reference...........................................................................................................................1066


Public Member Functions..................................................................................................................1066
Protected Member Functions.............................................................................................................1066
Detailed Description..........................................................................................................................1066
Constructor & Destructor Documentation.........................................................................................1066
Member Function Documentation.....................................................................................................1066

patty Member List........................................................................................................................................1068

patty Class Reference...................................................................................................................................1069


Public Member Functions..................................................................................................................1069
Detailed Description..........................................................................................................................1069
Constructor & Destructor Documentation.........................................................................................1070
Member Function Documentation.....................................................................................................1070

quad Member List.........................................................................................................................................1072

transform3d Member List............................................................................................................................1073

transform3d Class Reference.......................................................................................................................1077


Public Member Functions..................................................................................................................1077
Friends...............................................................................................................................................1077
Detailed Description..........................................................................................................................1077
Constructor & Destructor Documentation.........................................................................................1078
Member Function Documentation.....................................................................................................1078
Friends And Related Function Documentation..................................................................................1079

triple Member List........................................................................................................................................1081

vector3 Member List.....................................................................................................................................1082

vector3 Class Reference................................................................................................................................1084


Public Member Functions..................................................................................................................1084
Detailed Description..........................................................................................................................1085
Constructor & Destructor Documentation.........................................................................................1085
Member Function Documentation.....................................................................................................1086

xxix
Open Babel: API Documentation

Table of Contents
Class Index.....................................................................................................................................................1094

data.cpp File Reference................................................................................................................................1096


Namespaces........................................................................................................................................1096
Functions............................................................................................................................................1096
Detailed Description..........................................................................................................................1096
Function Documentation....................................................................................................................1096

data.h..............................................................................................................................................................1098

data.h File Reference....................................................................................................................................1102


Namespaces........................................................................................................................................1102
Classes...............................................................................................................................................1102
Detailed Description..........................................................................................................................1103

Deprecated List.............................................................................................................................................1104

descriptor.cpp File Reference......................................................................................................................1110


Namespaces........................................................................................................................................1110
Detailed Description..........................................................................................................................1110

descriptor.h....................................................................................................................................................1111

descriptor.h File Reference..........................................................................................................................1114


Namespaces........................................................................................................................................1114
Classes...............................................................................................................................................1114
Functions............................................................................................................................................1114
Detailed Description..........................................................................................................................1114

dlhandler.h.....................................................................................................................................................1116

dlhandler.h File Reference...........................................................................................................................1118


Classes...............................................................................................................................................1118
Detailed Description..........................................................................................................................1118

dlhandler_unix.cpp File Reference..............................................................................................................1120


Namespaces........................................................................................................................................1120
Defines...............................................................................................................................................1120
Functions............................................................................................................................................1120
Detailed Description..........................................................................................................................1120
Define Documentation.......................................................................................................................1120
Function Documentation....................................................................................................................1120

dlhandler_win32.cpp File Reference...........................................................................................................1122


Defines...............................................................................................................................................1122
Detailed Description..........................................................................................................................1122
Define Documentation.......................................................................................................................1122

xxx
Open Babel: API Documentation

Table of Contents
File List..........................................................................................................................................................1124

fingerprint.cpp File Reference.....................................................................................................................1128


Namespaces........................................................................................................................................1128
Detailed Description..........................................................................................................................1128

fingerprint.h..................................................................................................................................................1129

fingerprint.h File Reference.........................................................................................................................1133


Namespaces........................................................................................................................................1133
Classes...............................................................................................................................................1133
Detailed Description..........................................................................................................................1133

forcefield.cpp File Reference........................................................................................................................1135


Namespaces........................................................................................................................................1135
Functions............................................................................................................................................1135
Detailed Description..........................................................................................................................1135

forcefield.h.....................................................................................................................................................1137

forcefield.h File Reference............................................................................................................................1151


Namespaces........................................................................................................................................1151
Classes...............................................................................................................................................1151
Defines...............................................................................................................................................1152
Detailed Description..........................................................................................................................1152
Define Documentation.......................................................................................................................1152

format.cpp File Reference............................................................................................................................1157


Namespaces........................................................................................................................................1157
Detailed Description..........................................................................................................................1157

format.h..........................................................................................................................................................1158

format.h File Reference................................................................................................................................1161


Namespaces........................................................................................................................................1161
Classes...............................................................................................................................................1161
Defines...............................................................................................................................................1161
Detailed Description..........................................................................................................................1162
Define Documentation.......................................................................................................................1162
- _ -..............................................................................................................................................1164
- j -...............................................................................................................................................1169
- k -..............................................................................................................................................1170
- l -...............................................................................................................................................1172
- m -.............................................................................................................................................1174
- n -..............................................................................................................................................1175
- o -..............................................................................................................................................1178
- z -...............................................................................................................................................1182
- ~ -..............................................................................................................................................1183

xxxi
Open Babel: API Documentation

Table of Contents
format.h File Reference
- a -...............................................................................................................................................1186
- b -..............................................................................................................................................1189
- c -...............................................................................................................................................1191
- d -..............................................................................................................................................1193
- e -...............................................................................................................................................1195
- f -...............................................................................................................................................1198
- g -..............................................................................................................................................1200
- h -..............................................................................................................................................1207
- i -...............................................................................................................................................1210
- p -..............................................................................................................................................1213
- q -..............................................................................................................................................1215
- r -...............................................................................................................................................1217
- s -...............................................................................................................................................1219
- t -...............................................................................................................................................1225
- u -..............................................................................................................................................1227
- v -..............................................................................................................................................1229
- w -.............................................................................................................................................1231
- x -..............................................................................................................................................1233
- y -..............................................................................................................................................1234
- a -...............................................................................................................................................1238
- j -...............................................................................................................................................1240
- k -..............................................................................................................................................1241
- l -...............................................................................................................................................1243
- m -.............................................................................................................................................1244
- n -..............................................................................................................................................1246
- o -..............................................................................................................................................1248
- z -...............................................................................................................................................1252
- ~ -..............................................................................................................................................1253
- b -..............................................................................................................................................1256
- c -...............................................................................................................................................1258
- d -..............................................................................................................................................1260
- e -...............................................................................................................................................1262
- f -...............................................................................................................................................1264
- g -..............................................................................................................................................1266
- h -..............................................................................................................................................1274
- i -...............................................................................................................................................1276
- p -..............................................................................................................................................1279
- q -..............................................................................................................................................1281
- r -...............................................................................................................................................1282
- s -...............................................................................................................................................1284
- t -...............................................................................................................................................1290
- u -..............................................................................................................................................1292
- v -..............................................................................................................................................1294
- w -.............................................................................................................................................1296
- x -..............................................................................................................................................1297
- y -..............................................................................................................................................1299
- _ -..............................................................................................................................................1302

xxxii
Open Babel: API Documentation

Table of Contents
format.h File Reference
- l -...............................................................................................................................................1307
- m -.............................................................................................................................................1308
- n -..............................................................................................................................................1309
- o -..............................................................................................................................................1311
- a -...............................................................................................................................................1312
- b -..............................................................................................................................................1313
- c -...............................................................................................................................................1315
- d -..............................................................................................................................................1316
- e -...............................................................................................................................................1317
- f -...............................................................................................................................................1319
- g -..............................................................................................................................................1320
- h -..............................................................................................................................................1322
- i -...............................................................................................................................................1323
- p -..............................................................................................................................................1324
- q -..............................................................................................................................................1326
- r -...............................................................................................................................................1327
- s -...............................................................................................................................................1329
- t -...............................................................................................................................................1330
- v -..............................................................................................................................................1331
- w -.............................................................................................................................................1333

generic.cpp File Reference...........................................................................................................................1334


Namespaces........................................................................................................................................1334
Detailed Description..........................................................................................................................1334

generic.h.........................................................................................................................................................1335

generic.h File Reference...............................................................................................................................1347


Namespaces........................................................................................................................................1347
Classes...............................................................................................................................................1347
Typedefs.............................................................................................................................................1349
Enumerations.....................................................................................................................................1349
Detailed Description..........................................................................................................................1349
- a -...............................................................................................................................................1350
- k -..............................................................................................................................................1352
- l -...............................................................................................................................................1354
- m -.............................................................................................................................................1355
- n -..............................................................................................................................................1356
- o -..............................................................................................................................................1357
- z -...............................................................................................................................................1360
- b -..............................................................................................................................................1361
- c -...............................................................................................................................................1364
- d -..............................................................................................................................................1365
- e -...............................................................................................................................................1366
- f -...............................................................................................................................................1367
- h -..............................................................................................................................................1369
- i -...............................................................................................................................................1370

xxxiii
Open Babel: API Documentation

Table of Contents
generic.h File Reference
- p -..............................................................................................................................................1372
- r -...............................................................................................................................................1373
- s -...............................................................................................................................................1374
- t -...............................................................................................................................................1375
- v -..............................................................................................................................................1377
- w -.............................................................................................................................................1378
- a -...............................................................................................................................................1379
- k -..............................................................................................................................................1381
- l -...............................................................................................................................................1383
- m -.............................................................................................................................................1384
- n -..............................................................................................................................................1385
- o -..............................................................................................................................................1386
- z -...............................................................................................................................................1389
- b -..............................................................................................................................................1390
- c -...............................................................................................................................................1393
- d -..............................................................................................................................................1394
- e -...............................................................................................................................................1395
- f -...............................................................................................................................................1396
- h -..............................................................................................................................................1398
- i -...............................................................................................................................................1399
- p -..............................................................................................................................................1401
- r -...............................................................................................................................................1402
- s -...............................................................................................................................................1403
- t -...............................................................................................................................................1404
- v -..............................................................................................................................................1406
- w -.............................................................................................................................................1407

Graph Legend................................................................................................................................................1410

grid.cpp File Reference.................................................................................................................................1412


Namespaces........................................................................................................................................1412
Functions............................................................................................................................................1412
Detailed Description..........................................................................................................................1412

grid.h..............................................................................................................................................................1413

grid.h File Reference.....................................................................................................................................1419


Namespaces........................................................................................................................................1419
Classes...............................................................................................................................................1419
Defines...............................................................................................................................................1419
Enumerations.....................................................................................................................................1420
Detailed Description..........................................................................................................................1420
Define Documentation.......................................................................................................................1420

griddata.cpp File Reference.........................................................................................................................1421


Namespaces........................................................................................................................................1421
Detailed Description..........................................................................................................................1421

xxxiv
Open Babel: API Documentation

Table of Contents
griddata.h.......................................................................................................................................................1422

griddata.h File Reference.............................................................................................................................1425


Namespaces........................................................................................................................................1425
Classes...............................................................................................................................................1425
Detailed Description..........................................................................................................................1425

groupcontrib.h...............................................................................................................................................1427

groupcontrib.h File Reference.....................................................................................................................1429


Namespaces........................................................................................................................................1429
Classes...............................................................................................................................................1429
Detailed Description..........................................................................................................................1429

Class Hierarchy.............................................................................................................................................1431

API Documentation......................................................................................................................................1435
2.2.0...................................................................................................................................................1435
Introduction.......................................................................................................................................1435

internalcoord.h..............................................................................................................................................1437

internalcoord.h File Reference....................................................................................................................1439


Namespaces........................................................................................................................................1439
Classes...............................................................................................................................................1439
Detailed Description..........................................................................................................................1439

Introduction to Open Babel API.................................................................................................................1441

kekulize.cpp File Reference..........................................................................................................................1442


Namespaces........................................................................................................................................1442
Defines...............................................................................................................................................1442
Detailed Description..........................................................................................................................1442
Define Documentation.......................................................................................................................1442

kinetics.h........................................................................................................................................................1444

kinetics.h File Reference...............................................................................................................................1447


Namespaces........................................................................................................................................1447
Classes...............................................................................................................................................1447
Variables............................................................................................................................................1447
Detailed Description..........................................................................................................................1447

lineend.h.........................................................................................................................................................1449

lineend.h File Reference...............................................................................................................................1453


Namespaces........................................................................................................................................1453
Classes...............................................................................................................................................1453

xxxv
Open Babel: API Documentation

Table of Contents
lineend.h File Reference
Detailed Description..........................................................................................................................1453

locale.cpp File Reference..............................................................................................................................1455


Namespaces........................................................................................................................................1455
Detailed Description..........................................................................................................................1455

locale.h............................................................................................................................................................1456

locale.h File Reference..................................................................................................................................1458


Namespaces........................................................................................................................................1458
Classes...............................................................................................................................................1458
Variables............................................................................................................................................1458
Detailed Description..........................................................................................................................1458

Main Classes..................................................................................................................................................1460

matrix3x3.cpp File Reference......................................................................................................................1462


Namespaces........................................................................................................................................1462
Functions............................................................................................................................................1462
Detailed Description..........................................................................................................................1462

matrix3x3.h....................................................................................................................................................1463

matrix3x3.h File Reference..........................................................................................................................1468


Namespaces........................................................................................................................................1468
Classes...............................................................................................................................................1468
Defines...............................................................................................................................................1468
Functions............................................................................................................................................1468
Detailed Description..........................................................................................................................1468
Define Documentation.......................................................................................................................1469

matrix.cpp File Reference............................................................................................................................1470


Namespaces........................................................................................................................................1470
Functions............................................................................................................................................1470
Detailed Description..........................................................................................................................1470

matrix.h..........................................................................................................................................................1472

matrix.h File Reference................................................................................................................................1474


Namespaces........................................................................................................................................1474
Functions............................................................................................................................................1474
Detailed Description..........................................................................................................................1475

mol.cpp File Reference.................................................................................................................................1476


Namespaces........................................................................................................................................1476
Defines...............................................................................................................................................1476
Functions............................................................................................................................................1476

xxxvi
Open Babel: API Documentation

Table of Contents
mol.cpp File Reference
Variables............................................................................................................................................1477
Detailed Description..........................................................................................................................1477
Define Documentation.......................................................................................................................1477

mol.h...............................................................................................................................................................1478

mol.h File Reference.....................................................................................................................................1486


Namespaces........................................................................................................................................1487
Classes...............................................................................................................................................1487
Defines...............................................................................................................................................1487
Functions............................................................................................................................................1487
Variables............................................................................................................................................1488
Detailed Description..........................................................................................................................1488
Define Documentation.......................................................................................................................1488

molchrg.cpp File Reference..........................................................................................................................1492


Namespaces........................................................................................................................................1492
Detailed Description..........................................................................................................................1492

molchrg.h.......................................................................................................................................................1493

molchrg.h File Reference..............................................................................................................................1495


Namespaces........................................................................................................................................1495
Classes...............................................................................................................................................1495
Defines...............................................................................................................................................1495
Detailed Description..........................................................................................................................1495
Define Documentation.......................................................................................................................1495

OpenBabel Namespace Reference...............................................................................................................1497


Classes...............................................................................................................................................1497
Namespaces........................................................................................................................................1503
Typedefs.............................................................................................................................................1503
Enumerations.....................................................................................................................................1503
Functions............................................................................................................................................1504
Variables............................................................................................................................................1510
Detailed Description..........................................................................................................................1511
Typedef Documentation.....................................................................................................................1511
Enumeration Type Documentation....................................................................................................1512
Function Documentation....................................................................................................................1513
Variable Documentation....................................................................................................................1552

OpenBabel::OBAminoAcidProperty Namespace Reference....................................................................1561


Enumerations.....................................................................................................................................1561
Detailed Description..........................................................................................................................1561
Enumeration Type Documentation....................................................................................................1561

xxxvii
Open Babel: API Documentation

Table of Contents
OpenBabel::OBGenericDataType Namespace Reference........................................................................1563
Enumerations.....................................................................................................................................1563
Detailed Description..........................................................................................................................1563
Enumeration Type Documentation....................................................................................................1563

OpenBabel::OBResidueAtomProperty Namespace Reference................................................................1566


Enumerations.....................................................................................................................................1566
Detailed Description..........................................................................................................................1566
Enumeration Type Documentation....................................................................................................1566

OpenBabel::OBResidueIndex Namespace Reference...............................................................................1568


Enumerations.....................................................................................................................................1568
Detailed Description..........................................................................................................................1568
Enumeration Type Documentation....................................................................................................1568

OpenBabel::OBResidueProperty Namespace Reference..........................................................................1571


Enumerations.....................................................................................................................................1571
Detailed Description..........................................................................................................................1571
Enumeration Type Documentation....................................................................................................1571
- _ -..............................................................................................................................................1573
- k -..............................................................................................................................................1574
- l -...............................................................................................................................................1575
- m -.............................................................................................................................................1577
- n -..............................................................................................................................................1578
- o -..............................................................................................................................................1580
- a -...............................................................................................................................................1582
- b -..............................................................................................................................................1584
- c -...............................................................................................................................................1585
- d -..............................................................................................................................................1588
- e -...............................................................................................................................................1589
- f -...............................................................................................................................................1591
- g -..............................................................................................................................................1592
- h -..............................................................................................................................................1594
- i -...............................................................................................................................................1595
- p -..............................................................................................................................................1597
- q -..............................................................................................................................................1599
- r -...............................................................................................................................................1600
- s -...............................................................................................................................................1602
- t -...............................................................................................................................................1604
- u -..............................................................................................................................................1605
- v -..............................................................................................................................................1607
- w -.............................................................................................................................................1608
- y -..............................................................................................................................................1609
- _ -..............................................................................................................................................1611
- a -...............................................................................................................................................1612
- b -..............................................................................................................................................1612
- c -...............................................................................................................................................1612
- d -..............................................................................................................................................1613

xxxviii
Open Babel: API Documentation

Table of Contents
OpenBabel::OBResidueProperty Namespace Reference
- e -...............................................................................................................................................1613
- f -...............................................................................................................................................1613
- g -..............................................................................................................................................1613
- h -..............................................................................................................................................1613
- i -...............................................................................................................................................1614
- l -...............................................................................................................................................1614
- m -.............................................................................................................................................1614
- n -..............................................................................................................................................1614
- o -..............................................................................................................................................1614
- p -..............................................................................................................................................1614
- r -...............................................................................................................................................1615
- s -...............................................................................................................................................1615
- t -...............................................................................................................................................1615
- u -..............................................................................................................................................1615
- v -..............................................................................................................................................1616
- w -.............................................................................................................................................1616
- y -..............................................................................................................................................1616
- a -...............................................................................................................................................1617
- k -..............................................................................................................................................1618
- l -...............................................................................................................................................1620
- m -.............................................................................................................................................1621
- n -..............................................................................................................................................1622
- o -..............................................................................................................................................1623
- b -..............................................................................................................................................1625
- c -...............................................................................................................................................1626
- d -..............................................................................................................................................1628
- e -...............................................................................................................................................1629
- f -...............................................................................................................................................1631
- g -..............................................................................................................................................1632
- i -...............................................................................................................................................1634
- p -..............................................................................................................................................1635
- q -..............................................................................................................................................1637
- r -...............................................................................................................................................1638
- s -...............................................................................................................................................1639
- t -...............................................................................................................................................1641
- u -..............................................................................................................................................1642
- v -..............................................................................................................................................1643
- w -.............................................................................................................................................1645
- _ -..............................................................................................................................................1647
- a -...............................................................................................................................................1647
- b -..............................................................................................................................................1647
- c -...............................................................................................................................................1647
- d -..............................................................................................................................................1647
- e -...............................................................................................................................................1647
- i -...............................................................................................................................................1647
- l -...............................................................................................................................................1648
- m -.............................................................................................................................................1648

xxxix
Open Babel: API Documentation

Table of Contents
OpenBabel::OBResidueProperty Namespace Reference
- n -..............................................................................................................................................1648
- o -..............................................................................................................................................1648
- p -..............................................................................................................................................1648
- r -...............................................................................................................................................1648
- s -...............................................................................................................................................1648
- t -...............................................................................................................................................1649
- v -..............................................................................................................................................1649

Namespace List..............................................................................................................................................1650

obconversion.cpp File Reference.................................................................................................................1651


Namespaces........................................................................................................................................1651
Defines...............................................................................................................................................1651
Functions............................................................................................................................................1651
Detailed Description..........................................................................................................................1651
Define Documentation.......................................................................................................................1651
Function Documentation....................................................................................................................1651

obconversion.h...............................................................................................................................................1653

obconversion.h File Reference.....................................................................................................................1658


Namespaces........................................................................................................................................1658
Classes...............................................................................................................................................1658
Typedefs.............................................................................................................................................1658
Detailed Description..........................................................................................................................1659

oberror.cpp File Reference..........................................................................................................................1660


Namespaces........................................................................................................................................1660
Detailed Description..........................................................................................................................1660

oberror.h........................................................................................................................................................1661

oberror.h File Reference..............................................................................................................................1665


Namespaces........................................................................................................................................1665
Classes...............................................................................................................................................1665
Enumerations.....................................................................................................................................1666
Detailed Description..........................................................................................................................1666

obiter.cpp File Reference..............................................................................................................................1667


Namespaces........................................................................................................................................1667
Detailed Description..........................................................................................................................1667

obiter.h...........................................................................................................................................................1668

obiter.h File Reference..................................................................................................................................1674


Namespaces........................................................................................................................................1674
Classes...............................................................................................................................................1674

xl
Open Babel: API Documentation

Table of Contents
obiter.h File Reference
Defines...............................................................................................................................................1675
Detailed Description..........................................................................................................................1675
Define Documentation.......................................................................................................................1675

obmolecformat.cpp File Reference..............................................................................................................1678


Namespaces........................................................................................................................................1678
Detailed Description..........................................................................................................................1678

obmolecformat.h...........................................................................................................................................1679

obmolecformat.h File Reference..................................................................................................................1682


Namespaces........................................................................................................................................1682
Classes...............................................................................................................................................1682
Detailed Description..........................................................................................................................1682

obutil.cpp File Reference..............................................................................................................................1684


Namespaces........................................................................................................................................1684
Defines...............................................................................................................................................1684
Functions............................................................................................................................................1684
Variables............................................................................................................................................1685
Detailed Description..........................................................................................................................1685
Define Documentation.......................................................................................................................1685

obutil.h...........................................................................................................................................................1687

obutil.h File Reference..................................................................................................................................1692


Namespaces........................................................................................................................................1692
Classes...............................................................................................................................................1692
Defines...............................................................................................................................................1693
Functions............................................................................................................................................1693
Detailed Description..........................................................................................................................1693
Define Documentation.......................................................................................................................1693

op.h.................................................................................................................................................................1695

op.h File Reference........................................................................................................................................1697


Namespaces........................................................................................................................................1697
Classes...............................................................................................................................................1697
Detailed Description..........................................................................................................................1697

ops.cpp File Reference..................................................................................................................................1699


Namespaces........................................................................................................................................1699
Functions............................................................................................................................................1699
Detailed Description..........................................................................................................................1699

xli
Open Babel: API Documentation

Table of Contents
optransform.h................................................................................................................................................1700

optransform.h File Reference......................................................................................................................1702


Namespaces........................................................................................................................................1702
Classes...............................................................................................................................................1702
Detailed Description..........................................................................................................................1702

Further Information.....................................................................................................................................1703

Related Pages.................................................................................................................................................1704

parsmart.cpp File Reference........................................................................................................................1705


Namespaces........................................................................................................................................1705
Defines...............................................................................................................................................1705
Functions............................................................................................................................................1706
Variables............................................................................................................................................1708
Detailed Description..........................................................................................................................1708
Define Documentation.......................................................................................................................1708

parsmart.h.....................................................................................................................................................1715

parsmart.h File Reference............................................................................................................................1720


Namespaces........................................................................................................................................1720
Classes...............................................................................................................................................1720
Defines...............................................................................................................................................1721
Typedefs.............................................................................................................................................1721
Functions............................................................................................................................................1721
Detailed Description..........................................................................................................................1721
Define Documentation.......................................................................................................................1722

patty.cpp File Reference...............................................................................................................................1725


Namespaces........................................................................................................................................1725
Detailed Description..........................................................................................................................1725

patty.h............................................................................................................................................................1726

patty.h File Reference...................................................................................................................................1728


Namespaces........................................................................................................................................1728
Classes...............................................................................................................................................1728
Defines...............................................................................................................................................1728
Detailed Description..........................................................................................................................1728
Define Documentation.......................................................................................................................1728

phmodel.cpp File Reference.........................................................................................................................1731


Namespaces........................................................................................................................................1731
Detailed Description..........................................................................................................................1731

xlii
Open Babel: API Documentation

Table of Contents
phmodel.h......................................................................................................................................................1732

phmodel.h File Reference.............................................................................................................................1734


Namespaces........................................................................................................................................1734
Classes...............................................................................................................................................1734
Detailed Description..........................................................................................................................1734

plugin.cpp File Reference.............................................................................................................................1736


Namespaces........................................................................................................................................1736
Detailed Description..........................................................................................................................1736

plugin.h..........................................................................................................................................................1737

plugin.h File Reference.................................................................................................................................1740


Namespaces........................................................................................................................................1740
Classes...............................................................................................................................................1740
Defines...............................................................................................................................................1740
Detailed Description..........................................................................................................................1740
Step-by-Step Instructions...................................................................................................................1741
How it works......................................................................................................................................1742
Define Documentation.......................................................................................................................1743

pointgroup.cpp File Reference.....................................................................................................................1744


Namespaces........................................................................................................................................1744
Defines...............................................................................................................................................1744
Variables............................................................................................................................................1744
Detailed Description..........................................................................................................................1744
Define Documentation.......................................................................................................................1744

pointgroup.h..................................................................................................................................................1746

pointgroup.h File Reference.........................................................................................................................1748


Namespaces........................................................................................................................................1748
Classes...............................................................................................................................................1748
Detailed Description..........................................................................................................................1748

rand.cpp File Reference................................................................................................................................1750


Namespaces........................................................................................................................................1750
Defines...............................................................................................................................................1750
Functions............................................................................................................................................1750
Variables............................................................................................................................................1751
Detailed Description..........................................................................................................................1751
Define Documentation.......................................................................................................................1751

rand.h.............................................................................................................................................................1753

xliii
Open Babel: API Documentation

Table of Contents
rand.h File Reference....................................................................................................................................1755
Namespaces........................................................................................................................................1755
Classes...............................................................................................................................................1755
Functions............................................................................................................................................1755
Detailed Description..........................................................................................................................1756

reaction.h.......................................................................................................................................................1757

reaction.h File Reference..............................................................................................................................1760


Namespaces........................................................................................................................................1760
Classes...............................................................................................................................................1760
Detailed Description..........................................................................................................................1760

residue.cpp File Reference...........................................................................................................................1761


Namespaces........................................................................................................................................1761
Functions............................................................................................................................................1761
Detailed Description..........................................................................................................................1761

residue.h.........................................................................................................................................................1763

residue.h File Reference...............................................................................................................................1769


Namespaces........................................................................................................................................1769
Classes...............................................................................................................................................1769
Defines...............................................................................................................................................1770
Typedefs.............................................................................................................................................1771
Enumerations.....................................................................................................................................1771
Variables............................................................................................................................................1772
Detailed Description..........................................................................................................................1772
Define Documentation.......................................................................................................................1772

ring.cpp File Reference.................................................................................................................................1778


Namespaces........................................................................................................................................1778
Defines...............................................................................................................................................1778
Functions............................................................................................................................................1778
Variables............................................................................................................................................1778
Detailed Description..........................................................................................................................1778
Define Documentation.......................................................................................................................1778

ring.h..............................................................................................................................................................1780

ring.h File Reference.....................................................................................................................................1783


Namespaces........................................................................................................................................1783
Classes...............................................................................................................................................1783
Functions............................................................................................................................................1783
Detailed Description..........................................................................................................................1784

xliv
Open Babel: API Documentation

Table of Contents
rotamer.cpp File Reference..........................................................................................................................1785
Namespaces........................................................................................................................................1785
Defines...............................................................................................................................................1785
Functions............................................................................................................................................1785
Variables............................................................................................................................................1785
Detailed Description..........................................................................................................................1785
Define Documentation.......................................................................................................................1785

rotamer.h.......................................................................................................................................................1787

rotamer.h File Reference..............................................................................................................................1790


Namespaces........................................................................................................................................1790
Classes...............................................................................................................................................1790
Functions............................................................................................................................................1790
Detailed Description..........................................................................................................................1790

rotor.cpp File Reference...............................................................................................................................1792


Namespaces........................................................................................................................................1792
Defines...............................................................................................................................................1792
Functions............................................................................................................................................1792
Detailed Description..........................................................................................................................1792
Define Documentation.......................................................................................................................1792

rotor.h............................................................................................................................................................1794

rotor.h File Reference...................................................................................................................................1802


Namespaces........................................................................................................................................1802
Classes...............................................................................................................................................1802
Defines...............................................................................................................................................1802
Typedefs.............................................................................................................................................1803
Detailed Description..........................................................................................................................1803
Define Documentation.......................................................................................................................1803

snprintf.h........................................................................................................................................................1804

snprintf.h File Reference..............................................................................................................................1805


Defines...............................................................................................................................................1805
Functions............................................................................................................................................1805
Define Documentation.......................................................................................................................1805
Function Documentation....................................................................................................................1805

spacegroup.cpp File Reference....................................................................................................................1808


Namespaces........................................................................................................................................1808
Enumerations.....................................................................................................................................1808
Variables............................................................................................................................................1808
Detailed Description..........................................................................................................................1808

xlv
Open Babel: API Documentation

Table of Contents
spacegroup.h..................................................................................................................................................1810

spacegroup.h File Reference........................................................................................................................1813


Namespaces........................................................................................................................................1813
Classes...............................................................................................................................................1813
Detailed Description..........................................................................................................................1813

Getting Started..............................................................................................................................................1815

AtomSpec Member List................................................................................................................................1817

AtomSpec Struct Reference.........................................................................................................................1818


Public Attributes................................................................................................................................1818
Detailed Description..........................................................................................................................1818
Member Data Documentation............................................................................................................1818

BondSpec Member List................................................................................................................................1820

BondSpec Struct Reference..........................................................................................................................1821


Public Attributes................................................................................................................................1821
Detailed Description..........................................................................................................................1821
Member Data Documentation............................................................................................................1821

CharPtrLess Member List...........................................................................................................................1823

CharPtrLess Struct Reference.....................................................................................................................1824


Public Member Functions..................................................................................................................1824
Detailed Description..........................................................................................................................1824
Member Function Documentation.....................................................................................................1824

DoubleType Member List............................................................................................................................1826

DoubleType Struct Reference......................................................................................................................1827


Public Attributes................................................................................................................................1827
Detailed Description..........................................................................................................................1827
Member Data Documentation............................................................................................................1827

FptIndex Member List.................................................................................................................................1829

FptIndex Struct Reference...........................................................................................................................1830


Public Member Functions..................................................................................................................1830
Public Attributes................................................................................................................................1830
Detailed Description..........................................................................................................................1830
Member Function Documentation.....................................................................................................1830
Member Data Documentation............................................................................................................1830

xlvi
Open Babel: API Documentation

Table of Contents
FptIndexHeader Member List.....................................................................................................................1832

FptIndexHeader Struct Reference..............................................................................................................1833


Public Attributes................................................................................................................................1833
Detailed Description..........................................................................................................................1833
Member Data Documentation............................................................................................................1833

LineSearchType Member List.....................................................................................................................1835

LineSearchType Struct Reference...............................................................................................................1836


Public Types......................................................................................................................................1836
Detailed Description..........................................................................................................................1836
Member Enumeration Documentation...............................................................................................1836

Pattern Member List....................................................................................................................................1838

Pattern Struct Reference..............................................................................................................................1839


Public Attributes................................................................................................................................1839
Detailed Description..........................................................................................................................1839
Member Data Documentation............................................................................................................1839

quad Class Template Reference..................................................................................................................1842


Public Types......................................................................................................................................1842
Public Member Functions..................................................................................................................1842
Public Attributes................................................................................................................................1842
Detailed Description..........................................................................................................................1842
template<class T1, class T2, class T3, class T4> class OpenBabel::quad< T1, T2, T3, T4 >....1842
Member Typedef Documentation......................................................................................................1842
Constructor & Destructor Documentation.........................................................................................1843
Member Data Documentation............................................................................................................1843

triple Class Template Reference..................................................................................................................1845


Public Types......................................................................................................................................1845
Public Member Functions..................................................................................................................1845
Public Attributes................................................................................................................................1845
Detailed Description..........................................................................................................................1845
template<class T1, class T2, class T3> class OpenBabel::triple< T1, T2, T3 >.........................1845
Member Typedef Documentation......................................................................................................1845
Constructor & Destructor Documentation.........................................................................................1846
Member Data Documentation............................................................................................................1846

Todo List........................................................................................................................................................1848

tokenst.cpp File Reference...........................................................................................................................1850


Namespaces........................................................................................................................................1850
Functions............................................................................................................................................1850
Detailed Description..........................................................................................................................1850

xlvii
Open Babel: API Documentation

Table of Contents
tokenst.h.........................................................................................................................................................1852

tokenst.h File Reference...............................................................................................................................1854


Namespaces........................................................................................................................................1854
Defines...............................................................................................................................................1854
Functions............................................................................................................................................1855
Detailed Description..........................................................................................................................1855
Define Documentation.......................................................................................................................1855

transform3d.cpp File Reference..................................................................................................................1856


Namespaces........................................................................................................................................1856
Detailed Description..........................................................................................................................1856

transform3d.h................................................................................................................................................1857

transform3d.h File Reference......................................................................................................................1859


Namespaces........................................................................................................................................1859
Classes...............................................................................................................................................1859
Typedefs.............................................................................................................................................1859
Detailed Description..........................................................................................................................1859

transform.cpp File Reference......................................................................................................................1861


Namespaces........................................................................................................................................1861
Detailed Description..........................................................................................................................1861

typer.cpp File Reference...............................................................................................................................1862


Namespaces........................................................................................................................................1862
Detailed Description..........................................................................................................................1862

typer.h............................................................................................................................................................1863

typer.h File Reference...................................................................................................................................1866


Namespaces........................................................................................................................................1866
Classes...............................................................................................................................................1866
Detailed Description..........................................................................................................................1867

_AtomExpr Member List.............................................................................................................................1868

_AtomExpr Union Reference.......................................................................................................................1869


Public Attributes................................................................................................................................1869
Detailed Description..........................................................................................................................1869
Member Data Documentation............................................................................................................1869

_BondExpr Member List.............................................................................................................................1873

_BondExpr Union Reference.......................................................................................................................1874


Public Attributes................................................................................................................................1874
Detailed Description..........................................................................................................................1874

xlviii
Open Babel: API Documentation

Table of Contents
_BondExpr Union Reference
Member Data Documentation............................................................................................................1874

vector3.cpp File Reference...........................................................................................................................1877


Namespaces........................................................................................................................................1877
Functions............................................................................................................................................1877
Detailed Description..........................................................................................................................1877

vector3.h.........................................................................................................................................................1879

vector3.h File Reference...............................................................................................................................1884


Namespaces........................................................................................................................................1884
Classes...............................................................................................................................................1884
Defines...............................................................................................................................................1885
Functions............................................................................................................................................1885
Variables............................................................................................................................................1885
Detailed Description..........................................................................................................................1885
Define Documentation.......................................................................................................................1885

xml.h...............................................................................................................................................................1887

xml.h File Reference.....................................................................................................................................1891


Namespaces........................................................................................................................................1891
Classes...............................................................................................................................................1891
Detailed Description..........................................................................................................................1891

xlix
API Documentation
2.2.0

Introduction
Open Babel is a full chemical software toolbox. In addition to converting file formats, it offers a complete
programming library for developing chemistry software. The library is written primarily in C++ and also
offers interfaces to other languages (e.g., Perl, Python, Ruby, and Java) using essentially the same API.

This documentation outlines the Open Babel programming interface, providing information on all public
classes, methods, and data. In particular, strives to provide as much (or as little) detail as needed. More
information can also be found on the main website and through the openbabel-discuss mailing list.

• General Introduction
(history, design, and rationale, ...)
• Getting Started
(where to begin, example code, using Open Babel in real life, ...)
• Main Classes
(the most important, widely-used public classes)
• All Classes
(all classes with brief descriptions)
• What's New in Version 2.2
(changes since 2.1 releases)
• What's New in Version 2.1
(changes since 2.0 releases)
• Further Information
(other resources, tutorials, mailing lists, ...)

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes

API Documentation 1
Open Babel: API Documentation

• Files

Introduction 2
RDKitConv.h
Go to the documentation of this file.

00001 #include <openbabel/mol.h>


00002 #include <openbabel/obiter.h>
00003 #include <graphmol/RWMol.h>
00004 #include <graphmol/Atom.h>
00005
00007 RDKit::RWMol OBMolToRWMol(OpenBabel::OBMol* pOBMol);
00008

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:51 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

RDKitConv.h 3
RDKitConv.h File Reference
Allow conversion from OBMol to RDKit RWMol. More...

#include <openbabel/mol.h>
#include <openbabel/obiter.h>
#include <graphmol/RWMol.h>
#include <graphmol/Atom.h>

Go to the source code of this file.

Functions
RDKit::RWMol OBMolToRWMol (OpenBabel::OBMol *pOBMol)

Detailed Description
Allow conversion from OBMol to RDKit RWMol.

Function Documentation

RDKit::RWMol OBMolToRWMol ( OpenBabel::OBMol * pOBMol )


Convert OpenBabel OBMol to and from RGKit molecules.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:54 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

RDKitConv.h File Reference 4


alias.cpp File Reference
OBGenericData class to for atom alias data (e.g., in 2D drawing programs for "COOH"). More...

#include <openbabel/babelconfig.h>
#include <openbabel/alias.h>

Namespaces
namespace OpenBabel

Detailed Description
OBGenericData class to for atom alias data (e.g., in 2D drawing programs for "COOH").

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:51 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

alias.cpp File Reference 5


alias.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 alias.h - OBGenericData class to hold alias information on atoms
00003 Copyright (C) Copyright (C) 2007 by Chris Morley
00004
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation version 2 of the License.
00008
00009 This program is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00012 GNU General Public License for more details.
00013 ***********************************************************************/
00014
00015 #ifndef OB_ALIAS_H
00016 #define OB_ALIAS_H
00017
00018
00019 #include <vector>
00020 #include <openbabel/mol.h>
00021
00022 namespace OpenBabel
00023 {
00024 // This macro is used in DLL builds. If it has not
00025 // been set in babelconfig.h, define it as nothing.
00026 #ifndef OBAPI
00027 #define OBAPI
00028 #endif
00029
00030 const unsigned int AliasDataType = 0x7883;
00031
00048 class OBAPI AliasData : public OBGenericData
00049 {
00050 protected:
00051 std::string _alias;
00052 std::vector<unsigned int> _expandedatoms;
00053 public:
00054
00055 AliasData(): OBGenericData("Alias", AliasDataType){ }
00056
00057 virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new AliasData(*this);}
00058
00060 void SetAlias(const std::string& alias) {_alias = alias;}
00061 void SetAlias(const char* alias) {_alias = alias;}
00062
00064 std::string GetAlias()const { return _alias; }
00065
00067 void SetExpandedAtoms(std::vector<unsigned int>& atoms){ _expandedatoms = atoms; }
00068
00070 std::vector<unsigned int> GetExpandedAtoms()const { return _expandedatoms; }
00071
00072 bool IsExpanded()const { return !_expandedatoms.empty(); }
00073
00074
00075 bool Expand(OBMol& mol, const unsigned int atomindex);

alias.h 6
Open Babel: API Documentation
00076
00077 };
00078 } //namespace
00079
00080 #endif // OB_ALIAS_H
00081

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

alias.h 7
alias.h File Reference
OBGenericData class to for atom alias data (e.g., in 2D drawing programs for "COOH"). More...

#include <vector>
#include <openbabel/mol.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class AliasData
Indicate atoms as aliases for larger functional groups. More...

Variables
const unsigned int AliasDataType = 0x7883

Detailed Description
OBGenericData class to for atom alias data (e.g., in 2D drawing programs for "COOH").

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

alias.h File Reference 8


Open Babel: API Documentation

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:51 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Detailed Description 9
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:

_AtomExpr An internal (SMARTS parser) atomic expression


_BondExpr An internal (SMARTS parser) bond expression
AliasData Indicate atoms as aliases for larger functional groups
AtomSpec An internal (SMARTS parser) atom specification
BondSpec An internal (SMARTS parser) bond specification
CharPtrLess Case insensitive string comparison for PluginMapType key
DLHandler Interface for dynamic libraries
Used for internal random number generation OBRandom (unless the system random
DoubleType
generator is used)
FastSearch Class to search fingerprint index files
FastSearchIndexer Class to prepare fingerprint index files See FastSearch class for details
FilteringInputStreambuf Delivers characters from an istream or streambuf from a source while filtering
FptIndex Structure of fastsearch index files
FptIndexHeader Header for fastsearch index file
GasteigerState Helper class for OBGastChrg which stores the Gasteiger states of a given atom
LineEndingExtractor Replaces CRLF (DOS) and CR (Mac OS 9) line endings by LF (POSIX)
LineSearchType The type of line search to be used for optimization -- simple or Newton numeric
matrix3x3 Represents a real 3x3 matrix
OBAngle Used to hold the 3 atoms in an angle and the angle itself
OBAngleData Used to hold all angles in a molecule as generic data for OBMol
OBAromaticTyper Assigns aromatic typing to atoms and bonds
OBAtom Atom class
OBAtomAtomIter Iterate over all neighboring atoms to an OBAtom
OBAtomBondIter Iterate over all bonds on an OBAtom
OBAtomClassData Handle atom classes in reaction SMILES/SMIRKS
OBAtomTyper Assigns atom types, hybridization, implicit valence and formal charges
OBBase Base Class
OBBitVec A speed-optimized vector of bits
OBBond Bond class
OBBondTyper Assigns bond types for file formats without bond information
OBBuilder Class to build 3D structures
OBChainsParser Perceives peptide or nucleotide chains and residues in an OBMol
OBChemTsfm SMARTS based structural modification (chemical transformation)
OBChiralData Used to hold chiral inforamtion about the atom as OBGenericData
OBCommentData Used to store a comment string (can be multiple lines long)
OBConformerData Used to hold data on conformers or geometry optimization steps
OBConversion Class to convert from one format to another
OBDescriptor Base class for molecular properties, descriptors or features

Class List 10
Open Babel: API Documentation

OBElement Individual element data type


OBElementTable Periodic Table of the Elements
Customizable error handling and logging -- store a message, including the method
OBError
yielding the error, causes, etc
OBExternalBond Used to store information on an external bond (e.g., SMILES fragments)
OBExternalBondData Used to store information on external bonds (e.g., in SMILES fragments)
Internal class for OBForceField to hold energy and gradient calculations on specific
OBFFCalculation2
force fields
Internal class for OBForceField to hold energy and gradient calculations on specific
OBFFCalculation3
force fields
Internal class for OBForceField to hold energy and gradient calculations on specific
OBFFCalculation4
force fields
OBFFConstraint Internal class for OBForceField to hold constraints
OBFFConstraints Internal class for OBForceField to handle constraints
OBFFParameter Internal class for OBForceField to hold forcefield parameters
OBFingerprint The base class for fingerprints
Handle double precision floating point 3D grids (e.g., charge density around an
OBFloatGrid
OBMol)
OBForceField Base class for molecular mechanics force fields
OBFormat Base class for file formats
OBGastChrg Assigns Gasteiger partial charges
OBGenericData Base class for generic data
OBGlobalDataBase Base data table class, handles reading data files
OBGrid A base grid class
OBGridData Store values for numeric grids such as orbitals or electrostatic potential
OBGroupContrib Handle group contribution algorithms
OBInternalCoord Used to transform from z-matrix to cartesian coordinates
OBIsotopeTable Table of atomic isotope masses
OBLocale Handle the locale for numeric data parsing
A minimal streambuf derivative to wrap calls to cerr into calls to
obLogBuf
OBMessageHandler as needed
OBMatrixData Used to hold a 3x3 matrix item (e.g., a quadrupole moment)
OBMessageHandler Handle error messages, warnings, debugging information and the like
OBMol Molecule Class
OBMolAngleIter Iterate over all angles in an OBMol
OBMolAtomBFSIter Iterate over all atoms in an OBMol in a breadth-first search (BFS)
OBMolAtomDFSIter Iterate over all atoms in an OBMol in a depth-first search (DFS)
OBMolAtomIter Iterate over all atoms in an OBMol
OBMolBondIter Iterate over all bonds in an OBMol
OBMoleculeFormat An OBFormat convenience subclass for conversion to/from OBMol data
OBMolPairIter Iterate over all pairs of atoms (>1-4) in an OBMol
OBMolRingIter Iterate over all rings in an OBMol
OBMolTorsionIter Iterate over all torsions in an OBMol

Class List 11
Open Babel: API Documentation

OBNasaThermoData Thermodynamic data in old style NASA polynomial form for OBMol
OBOp Operations to modify molecules before output
OBPairData Used to store arbitrary text attribute/value relationships
OBPairTemplate Used to store arbitrary attribute/value relationsips of any type
OBPhModel Corrections for pH used by OBMol::CorrectForPH()
OBPlugin Base class for all types of dynamic classes discovered at runtime
OBPointGroup Brute-force point group symmetry perception
OBProxGrid A grid for determining the proximity of a given point to atoms in an OBMol
OBRandom Random number generator
OBRateData Holds rate constant data for OBReaction
OBReaction Used to store chemical reactions (i.e., reactants -> products)
OBResidue Residue information
OBResidueAtomIter Iterate over all atoms in an OBResidue
OBResidueData Table of common biomolecule residues (for PDB or other files)
OBResidueIter Iterate over all residues in an OBMol
OBRing Stores information on rings in a molecule from SSSR perception
OBRingData Used to store the SSSR set (filled in by OBMol::GetSSSR())
OBRingSearch Internal class to facilitate OBMol::FindSSSR()
OBRingTyper Assigns ring types
Supports a set of rotamer coordinate sets for some number of potentially rotatable
OBRotamerList
bonds
OBRotationData Used to hold the rotational constants and symmetry numbers
OBRotor A single rotatable OBBond as part of rotamer searching
OBRotorKeys A class to generate all possible rotorKeys
OBRotorList Given an OBMol, set up a list of possibly rotatable torsions,
OBRotorRule A rule for torsional conformer searching, defined by a SMARTS pattern
Database of default hybridization torsional rules and SMARTS-defined
OBRotorRules
OBRotorRule objects
Internal class for OBRing search algorithms to create a search tree of OBAtom
OBRTree
objects
OBScoreGrid A base class for scoring docking interactions between multiple molecules
Defines a map between serial numbers (e.g., in a PDB file) and OBAtom objects
OBSerialNums
inside a molecule
Used to store arbitrary attribute/set relationships. Should be used to store a set of
OBSetData
OBGenericData based on an attribute
OBSmartsPattern SMARTS (SMiles ARbitrary Target Specification) substructure searching
OBSqrtTbl Square Root lookup table - given a distance squared returns distance
Internal class: performs fast, exhaustive matching used to find just a single match in
OBSSMatch
match() using recursion and explicit stack handling
OBStopwatch Stopwatch class used for timing length of execution
OBSymmetryData Used to hold the point-group and/or space-group symmetry
OBTorsion Used to hold the torsion data for a single rotatable bond and all four atoms around it
OBTorsionData Used to hold torsions as generic data for OBMol

Class List 12
Open Babel: API Documentation

OBTypeTable Atom Type Translation Table


Used for storing information about periodic boundary conditions with conversion
OBUnitCell
to/from translation vectors and (a, b, c, alpha, beta, gamma)
OBVectorData Used to hold a 3D vector item (e.g., a dipole moment)
OBVibrationData Used to hold the normal modes of a molecule, etc
Used to temporarily store bonds that reference an atom that has not yet been added
OBVirtualBond
to a molecule
OpTransform Applies molecular transforms (OBChemTsfm class) read from a datafile
Pattern A SMARTS parser internal pattern
patty Programmable Atom Typer
quad A 4-element templated, based on the design of the STL pair<>
SpaceGroup Handle crystallographic space group symmetry
transform3d Handle 3D transformations, such as space group definitions
triple A 3-element templated, based on the design of the STL pair<>
vector3 Represents a vector in 3-dimensional real space
XMLBaseFormat Abstract class containing common functionality for XML formats
XMLConversion A subclass for conversion of XML formats
XMLMoleculeFormat Abstract class for XML formats which represent molecules

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:54 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Class List 13
atom.cpp File Reference
Handle OBAtom class. More...

#include <openbabel/babelconfig.h>
#include <openbabel/atom.h>
#include <openbabel/mol.h>
#include <openbabel/molchrg.h>
#include <openbabel/phmodel.h>
#include <openbabel/math/matrix3x3.h>

Namespaces
namespace OpenBabel

Defines
#define ONE_OVER_SQRT3 0.57735026918962576451
#define SQRT_TWO_THIRDS 0.81649658092772603272

Functions
int strncasecmp (const char *s1, const char *s2, size_t n)
static void ApplyRotMatToBond (OBMol &mol, matrix3x3 &m, OBAtom *a1, OBAtom *a2)

Variables
OBPhModel phmodel

Detailed Description
Handle OBAtom class.

Define Documentation

#define ONE_OVER_SQRT3 0.57735026918962576451

Referenced by OBAtom::GetNewBondVector(), and OBAtom::SetHybAndGeom().

#define SQRT_TWO_THIRDS 0.81649658092772603272

Referenced by OBAtom::GetNewBondVector(), and OBAtom::SetHybAndGeom().

atom.cpp File Reference 14


Open Babel: API Documentation

Function Documentation

int strncasecmp ( const char * s1,


const char * s2,
size_t n
)

Referenced by OBAtomTyper::AssignTypes(), OBFormat::Display(), and


OBElementTable::GetAtomicNum().

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:51 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Define Documentation 15
atom.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 atom.h - Handle OBAtom class.
00003
00004 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
00005 Some portions Copyright (C) 2001-2006 by Geoffrey R. Hutchison
00006 Some portions Copyright (C) 2003 by Michael Banck
00007
00008 This file is part of the Open Babel project.
00009 For more information, see <http://openbabel.sourceforge.net/>
00010
00011 This program is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU General Public License as published by
00013 the Free Software Foundation version 2 of the License.
00014
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018 GNU General Public License for more details.
00019 ***********************************************************************/
00020
00021 #ifndef OB_ATOM_H
00022 #define OB_ATOM_H
00023
00024 #include <openbabel/babelconfig.h>
00025
00026 #ifndef EXTERN
00027 # define EXTERN extern
00028 #endif
00029
00030 #include <vector>
00031 #include <string>
00032
00033 #include <openbabel/base.h>
00034 #include <openbabel/residue.h>
00035 #include <openbabel/math/vector3.h>
00036
00037 namespace OpenBabel
00038 {
00039
00040 class OBBond;
00041 class OBMol;
00042
00044 typedef OBAtom OBNodeBase;
00046 typedef std::vector<OBBond*>::iterator OBBondIterator;
00048 typedef std::vector<OBAtom*>::iterator OBAtomIterator;
00049
00050 //ATOM Property Macros (flags)
00052 #define OB_4RING_ATOM (1<<1)
00054 #define OB_3RING_ATOM (1<<2)
00056 #define OB_AROMATIC_ATOM (1<<3)
00058 #define OB_RING_ATOM (1<<4)
00060 #define OB_CSTEREO_ATOM (1<<5)
00062 #define OB_ACSTEREO_ATOM (1<<6)
00064 #define OB_DONOR_ATOM (1<<7)
00066 #define OB_ACCEPTOR_ATOM (1<<8)

atom.h 16
Open Babel: API Documentation
00068 #define OB_CHIRAL_ATOM (1<<9)
00070 #define OB_POS_CHIRAL_ATOM (1<<10)
00072 #define OB_NEG_CHIRAL_ATOM (1<<11)
00074 #define OB_ATOM_HAS_NO_H (1<<12)
00076 #define OB_ATOM_NOT_H_DEFICIENT (1<<13)
00077
00078 // Class OBAtom
00079 // class introduction in atom.cpp
00080 class OBAPI OBAtom: public OBBase
00081 {
00082 protected:
00083 char _ele;
00084 char _impval;
00085 char _type[6];
00086 short _fcharge;
00087 unsigned short _isotope;
00088 short _spinmultiplicity;
00089
00090 unsigned int _idx;
00091 OBMol *_parent;
00092 std::vector<OBBond*> _vbond;
00093
00094 unsigned int _cidx;
00095 unsigned short _hyb;
00096 unsigned short _flags;
00097 double _pcharge;
00098 double **_c;
00099 mutable vector3 _v;
00100 OBResidue *_residue;
00101
00103 int GetFlag() const { return(_flags); }
00105 void SetFlag(int flag) { _flags |= flag; }
00107 bool HasFlag(int flag) { return((_flags & flag) ? true : false); }
00108
00109 public:
00111 bool Visit;
00112
00114 OBAtom();
00116 virtual ~OBAtom();
00118 OBAtom &operator = (OBAtom &);
00121 void Duplicate(OBAtom *);
00124 bool Clear();
00125
00127
00128
00129 void SetIdx(int idx) { _idx = idx; _cidx = (idx-1)*3; }
00131 void SetHyb(int hyb) { _hyb = hyb; }
00133 void SetAtomicNum(int atomicnum) { _ele = (char)atomicnum; }
00135 void SetIsotope(unsigned int iso);
00137 void SetImplicitValence(int val) { _impval = (char)val; }
00139 void IncrementImplicitValence() { _impval++; }
00141 void DecrementImplicitValence() { _impval--; }
00143 void SetFormalCharge(int fcharge) { _fcharge = fcharge; }
00145 void SetSpinMultiplicity(short spin){ _spinmultiplicity = spin; }
00147 void SetType(const char *type);
00149 void SetType(const std::string &type);
00151 void SetPartialCharge(double pcharge){ _pcharge = pcharge; }
00153 void SetVector(const vector3 &v);
00155 void SetVector(const double x,const double y,const double z);
00157 void SetCoordPtr(double **c) { _c = c; _cidx = (GetIdx()-1)*3; }
00159 void SetVector();

atom.h 17
Open Babel: API Documentation
00161 void SetResidue(OBResidue *res) { _residue=res; }
00163 void SetParent(OBMol *ptr) { _parent=ptr; }
00165 void SetAromatic() { SetFlag(OB_AROMATIC_ATOM); }
00167 void UnsetAromatic() { _flags &= (~(OB_AROMATIC_ATOM)); }
00169 void SetClockwiseStereo() { SetFlag(OB_CSTEREO_ATOM|OB_CHIRAL_ATOM); }
00171 void SetAntiClockwiseStereo() { SetFlag(OB_ACSTEREO_ATOM|OB_CHIRAL_ATOM); }
00173 void SetPositiveStereo() { SetFlag(OB_POS_CHIRAL_ATOM|OB_CHIRAL_ATOM); }
00175 void SetNegativeStereo() { SetFlag(OB_NEG_CHIRAL_ATOM|OB_CHIRAL_ATOM); }
00177 void UnsetStereo()
00178 {
00179 _flags &= ~(OB_ACSTEREO_ATOM);
00180 _flags &= ~(OB_CSTEREO_ATOM);
00181 _flags &= ~(OB_POS_CHIRAL_ATOM);
00182 _flags &= ~(OB_NEG_CHIRAL_ATOM);
00183 _flags &= ~(OB_CHIRAL_ATOM);
00184 }
00186 void SetInRing() { SetFlag(OB_RING_ATOM); }
00188 void SetChiral() { SetFlag(OB_CHIRAL_ATOM); }
00190 void ClearCoordPtr() { _c = NULL; _cidx=0; }
00192
00194
00195
00196 int GetFormalCharge() const { return(_fcharge); }
00198 unsigned int GetAtomicNum() const { return((unsigned int)_ele); }
00200 unsigned short int GetIsotope() const { return(_isotope); }
00203 int GetSpinMultiplicity() const { return(_spinmultiplicity); }
00206 double GetAtomicMass() const;
00209 double GetExactMass() const;
00211 unsigned int GetIdx() const { return((int)_idx); }
00214 unsigned int GetCoordinateIdx() const { return((int)_cidx); }
00216 unsigned int GetCIdx() const { return((int)_cidx); }
00218 unsigned int GetValence() const
00219 {
00220 return((_vbond.empty()) ? 0 : _vbond.size());
00221 }
00223 unsigned int GetHyb() const;
00225 unsigned int GetImplicitValence() const;
00227 unsigned int GetHvyValence() const;
00229 unsigned int GetHeteroValence() const;
00231 char *GetType();
00232
00234 double GetX() const { return(x()); }
00236 double GetY() const { return(y()); }
00238 double GetZ() const { return(z()); }
00239
00240 // These methods check to see if there is a coordinate pointer
00241 // or an internal vector (e.g., SetCoordPtr())
00243 double x() const {
00244 if (_c) return((*_c)[_cidx]);
00245 else return _v.x();
00246 }
00248 double y() const {
00249 if (_c) return((*_c)[_cidx+1]);
00250 else return _v.y();
00251 }
00253 double z() const {
00254 if (_c) return((*_c)[_cidx+2]);
00255 else return _v.z();
00256 }
00261 double *GetCoordinate(){
00262 if (_c) return(&(*_c)[_cidx]);

atom.h 18
Open Babel: API Documentation
00263 else return NULL;
00264 }
00266 vector3 &GetVector();
00268 const vector3 &GetVector() const;
00270 double GetPartialCharge();
00272 OBResidue *GetResidue();
00275 OBResidue *GetResidue(bool perception);
00277 OBMol *GetParent() {return((OBMol*)_parent);}
00280 bool GetNewBondVector(vector3 &v,double length);
00283 OBBond *GetBond(OBAtom *);
00288 OBAtom *GetNextAtom();
00290
00292
00293
00294 OBBondIterator BeginBonds()
00295 { return(_vbond.begin()); }
00297 OBBondIterator EndBonds()
00298 { return(_vbond.end()); }
00301 OBBond *BeginBond(OBBondIterator &i);
00304 OBBond *NextBond(OBBondIterator &i);
00307 OBAtom *BeginNbrAtom(OBBondIterator &i);
00310 OBAtom *NextNbrAtom(OBBondIterator &i);
00312
00314 double GetDistance(int index);
00316 double GetDistance(OBAtom*);
00318 double GetAngle(int b, int c);
00320 double GetAngle(OBAtom *b, OBAtom *c);
00321
00323
00324
00326 void NewResidue()
00327 {
00328 if (!_residue)
00329 _residue = new OBResidue;
00330 }
00332 void AddResidue(OBResidue *res) { SetResidue(res); }
00334 void DeleteResidue(){
00335 if (_residue) {
00336 delete _residue;
00337 _residue = NULL; // Make sure to clear that a residue existed
00338 }
00339 }
00341 void AddBond(OBBond *bond) { _vbond.push_back(bond); }
00344 void InsertBond(OBBondIterator &i, OBBond *bond)
00345 {
00346 _vbond.insert(i, bond);
00347 }
00349 bool DeleteBond(OBBond* bond);
00351 void ClearBond() {_vbond.clear();}
00353
00355
00356
00359 bool HtoMethyl();
00362 bool SetHybAndGeom(int);
00364 void ForceNoH() {SetFlag(OB_ATOM_HAS_NO_H);}
00366 bool HasNoHForced() {return HasFlag(OB_ATOM_HAS_NO_H);}
00367
00370 void ForceImplH() {SetFlag(OB_ATOM_NOT_H_DEFICIENT);}
00373 bool HasImplHForced() {return HasFlag(OB_ATOM_NOT_H_DEFICIENT);}
00375
00377

atom.h 19
Open Babel: API Documentation
00378
00379 unsigned int CountFreeOxygens() const;
00381 unsigned int ImplicitHydrogenCount() const;
00383 unsigned int ExplicitHydrogenCount(bool ExcludeIsotopes=false) const;
00385 unsigned int MemberOfRingCount() const;
00387 unsigned int MemberOfRingSize() const;
00389 unsigned int CountRingBonds() const;
00391 double SmallestBondAngle();
00393 double AverageBondAngle();
00395 unsigned int BOSum() const;
00398 unsigned int KBOSum() const;
00400 bool HasResidue() { return(_residue != NULL); }
00402 bool IsHydrogen() { return(GetAtomicNum() == 1); }
00404 bool IsCarbon() { return(GetAtomicNum() == 6); }
00406 bool IsNitrogen() { return(GetAtomicNum() == 7); }
00408 bool IsOxygen() { return(GetAtomicNum() == 8); }
00410 bool IsSulfur() { return(GetAtomicNum() == 16);}
00412 bool IsPhosphorus() { return(GetAtomicNum() == 15);}
00414 bool IsAromatic() const;
00416 bool IsInRing() const;
00418 bool IsInRingSize(int) const;
00421 bool IsHeteroatom();
00423 bool IsNotCorH();
00425 bool IsConnected(OBAtom*);
00428 bool IsOneThree(OBAtom*);
00431 bool IsOneFour(OBAtom*);
00433 bool IsCarboxylOxygen();
00435 bool IsPhosphateOxygen();
00437 bool IsSulfateOxygen();
00439 bool IsNitroOxygen();
00441 bool IsAmideNitrogen();
00444 bool IsPolarHydrogen();
00447 bool IsNonPolarHydrogen();
00450 bool IsAromaticNOxide();
00452 bool IsChiral();
00454 bool IsAxial();
00456 bool IsClockwise() { return(HasFlag(OB_CSTEREO_ATOM)); }
00458 bool IsAntiClockwise() { return(HasFlag(OB_ACSTEREO_ATOM)); }
00460 bool IsPositiveStereo() { return(HasFlag(OB_POS_CHIRAL_ATOM)); }
00462 bool IsNegativeStereo() { return(HasFlag(OB_NEG_CHIRAL_ATOM)); }
00464 bool HasChiralitySpecified()
00465 { return(HasFlag(OB_CSTEREO_ATOM|OB_ACSTEREO_ATOM)); }
00467 bool HasChiralVolume()
00468 { return(HasFlag(OB_POS_CHIRAL_ATOM|OB_NEG_CHIRAL_ATOM)); }
00470 bool IsHbondAcceptor();
00472 bool IsHbondDonor();
00474 bool IsHbondDonorH();
00479 bool HasAlphaBetaUnsat(bool includePandS=true);
00481 bool HasBondOfOrder(unsigned int bo);
00483 int CountBondsOfOrder(unsigned int bo);
00485 bool HasNonSingleBond();
00487 bool HasSingleBond() { return(HasBondOfOrder(1)); }
00489 bool HasDoubleBond() { return(HasBondOfOrder(2)); }
00491 bool HasAromaticBond() { return(HasBondOfOrder(5)); }
00493 bool MatchesSMARTS(const char *);
00495
00496 }; // class OBAtom
00497
00498 }// namespace OpenBabel
00499
00500 #endif // OB_ATOM_H

atom.h 20
Open Babel: API Documentation
00501

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

atom.h 21
atom.h File Reference
Handle atoms. More...

#include <openbabel/babelconfig.h>
#include <vector>
#include <string>
#include <openbabel/base.h>
#include <openbabel/residue.h>
#include <openbabel/math/vector3.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBAtom
Atom class. More...

Defines
#define OB_4RING_ATOM (1<<1)
#define OB_3RING_ATOM (1<<2)
#define OB_AROMATIC_ATOM (1<<3)
#define OB_RING_ATOM (1<<4)
#define OB_CSTEREO_ATOM (1<<5)
#define OB_ACSTEREO_ATOM (1<<6)
#define OB_DONOR_ATOM (1<<7)
#define OB_ACCEPTOR_ATOM (1<<8)

atom.h File Reference 22


Open Babel: API Documentation

#define OB_CHIRAL_ATOM (1<<9)


#define OB_POS_CHIRAL_ATOM (1<<10)
#define OB_NEG_CHIRAL_ATOM (1<<11)
#define OB_ATOM_HAS_NO_H (1<<12)
#define OB_ATOM_NOT_H_DEFICIENT (1<<13)

Typedefs
typedef OBAtom OBNodeBase
typedef std::vector< OBBond * >
::iterator OBBondIterator
typedef std::vector< OBAtom * >
::iterator OBAtomIterator

Detailed Description
Handle atoms.

Define Documentation

#define OB_4RING_ATOM (1<<1)


Atom is in a 4-membered ring.

#define OB_3RING_ATOM (1<<2)


Atom is in a 3-membered ring.

#define OB_AROMATIC_ATOM (1<<3)


Atom is aromatic.

Referenced by OBAtom::IsAromatic(), OBAtom::SetAromatic(), and OBAtom::UnsetAromatic().

#define OB_RING_ATOM (1<<4)


Atom is in a ring.

Referenced by OBAtom::IsInRing(), OBAtom::IsInRingSize(), and OBAtom::SetInRing().

#define OB_CSTEREO_ATOM (1<<5)


Atom has clockwise SMILES chiral stereochemistry (i.e., "@@").

Referenced by OBAtom::HasChiralitySpecified(), OBAtom::IsClockwise(), OBAtom::SetClockwiseStereo(),


and OBAtom::UnsetStereo().

Defines 23
Open Babel: API Documentation

#define OB_ACSTEREO_ATOM (1<<6)


Atom has anticlockwise SMILES chiral stereochemistry (i.e., "@").

Referenced by OBAtom::HasChiralitySpecified(), OBAtom::IsAntiClockwise(),


OBAtom::SetAntiClockwiseStereo(), and OBAtom::UnsetStereo().

#define OB_DONOR_ATOM (1<<7)


Atom is an electron donor.

#define OB_ACCEPTOR_ATOM (1<<8)


Atom is an electron acceptor.

#define OB_CHIRAL_ATOM (1<<9)


Atom is chiral.

Referenced by OBAtom::IsChiral(), OBAtom::SetAntiClockwiseStereo(), OBAtom::SetChiral(),


OBAtom::SetClockwiseStereo(), OBAtom::SetNegativeStereo(), OBAtom::SetPositiveStereo(), and
OBAtom::UnsetStereo().

#define OB_POS_CHIRAL_ATOM (1<<10)


Atom has + chiral volume.

Referenced by OBAtom::HasChiralVolume(), OBAtom::IsPositiveStereo(), OBAtom::SetPositiveStereo(),


and OBAtom::UnsetStereo().

#define OB_NEG_CHIRAL_ATOM (1<<11)


Atom has - chiral volume.

Referenced by OBAtom::HasChiralVolume(), OBAtom::IsNegativeStereo(), OBAtom::SetNegativeStereo(),


and OBAtom::UnsetStereo().

#define OB_ATOM_HAS_NO_H (1<<12)


Atom has no hydrogen attached. Temporary use only during input of some formats.

Referenced by OBAtom::ForceNoH(), and OBAtom::HasNoHForced().

#define OB_ATOM_NOT_H_DEFICIENT (1<<13)


Atom is not hydrogen deficient. (for SMILES input).

Referenced by OBAtom::ForceImplH(), and OBAtom::HasImplHForced().

Define Documentation 24
Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:51 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Define Documentation 25
atomclass.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 Copyright (C) 2007 by Chris Morley
00003
00004 This program is free software; you can redistribute it and/or modify
00005 it under the terms of the GNU General Public License as published by
00006 the Free Software Foundation version 2 of the License.
00007
00008 This program is distributed in the hope that it will be useful,
00009 but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00011 GNU General Public License for more details.
00012 ***********************************************************************/
00013
00014 #ifndef OB_ATOMCLASS_H
00015 #define OB_ATOMCLASS_H
00016
00017 #include <vector>
00018 #ifdef HAVE_SSTREAM
00019 #include <sstream>
00020 #endif
00021 #include <openbabel/base.h>
00022
00023 namespace OpenBabel
00024 {
00025 // This macro is used in DLL builds. If it has not
00026 // been set in babelconfig.h, define it as nothing.
00027 #ifndef OBAPI
00028 #define OBAPI
00029 #endif
00030
00040 class OBAPI OBAtomClassData : public OBGenericData
00041 {
00042 protected:
00043 std::map<int,int> _map; //index is atom index; value is class
00044 public:
00045 OBAtomClassData(): OBGenericData("Atom Class", 0x7882){ }
00046 virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBAtomClassData(*this)
00047
00049 void Clear(){ _map.clear(); }
00050
00052 void Add(int indx, int cl) { _map[indx] = cl;}
00053
00055 bool HasClass(int indx)const { return _map.find(indx)!=_map.end(); }
00057 int GetClass(int indx)const
00058 {
00059 std::map<int,int>::const_iterator pos = _map.find(indx);
00060 if(pos!=_map.end())
00061 return pos->second;
00062 return -9999;
00063 }
00064
00067 std::string GetClassString(int indx)
00068 {
00069 std::stringstream ss;
00070 std::map<int,int>::const_iterator pos = _map.find(indx);

atomclass.h 26
Open Babel: API Documentation
00071 if(pos!=_map.end())
00072 ss << ':' << pos->second;
00073 return ss.str();
00074 }
00075 int size(){ return _map.size(); }
00076
00077 };
00078 } //namespace
00079
00080 #endif // OB_ATOMCLASS_H
00081

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

atomclass.h 27
atomclass.h File Reference
Handle atom classes in reaction SMILES/SMIRKS. More...

#include <vector>
#include <openbabel/base.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBAtomClassData
Handle atom classes in reaction SMILES/SMIRKS. More...

Detailed Description
Handle atom classes in reaction SMILES/SMIRKS.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:51 2008 by 1.5.6.

atomclass.h File Reference 28


Open Babel: API Documentation
• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Detailed Description 29
base.cpp File Reference
Implementation of base classes. More...

#include <openbabel/babelconfig.h>
#include <openbabel/base.h>

Namespaces
namespace OpenBabel

Detailed Description
Implementation of base classes.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:51 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

base.cpp File Reference 30


base.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 base.h - Base class for OpenBabel objects
00003
00004 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
00005 Some portions Copyright (C) 2001-2006 by Geoffrey R. Hutchison
00006
00007 This file is part of the Open Babel project.
00008 For more information, see <http://openbabel.sourceforge.net/>
00009
00010 This program is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU General Public License as published by
00012 the Free Software Foundation version 2 of the License.
00013
00014 This program is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017 GNU General Public License for more details.
00018 ***********************************************************************/
00019
00020 #ifndef OB_BASE_H
00021 #define OB_BASE_H
00022
00023 #include <openbabel/babelconfig.h>
00024
00025 #include <vector>
00026 #include <map>
00027 #include <string>
00028 #include <iostream>
00029 #include <openbabel/tokenst.h>
00030
00031 namespace OpenBabel
00032 {
00033
00034 //Forward declaration of the base class for OBMol OBReaction, OBAtom, etc.
00035 //Declaration later in this file.
00036 class OBBase;
00037
00049 namespace OBGenericDataType
00050 {
00051 enum
00052 {
00054 UndefinedData = 0,
00055
00057 PairData = 1,
00058
00060 EnergyData = 2,
00061
00063 CommentData = 3,
00064
00066 ConformerData = 4,
00067
00069 ExternalBondData = 5,
00070
00072 RotamerList = 6,
00073

base.h 31
Open Babel: API Documentation
00075 VirtualBondData = 7,
00076
00078 RingData = 8,
00079
00081 TorsionData = 9,
00082
00084 AngleData = 10,
00085
00087 SerialNums = 11,
00088
00090 UnitCell = 12,
00091
00093 SpinData = 13,
00094
00096 ChargeData = 14,
00097
00099 SymmetryData = 15,
00100
00102 ChiralData = 16,
00103
00105 OccupationData = 17,
00106
00108 DensityData = 18,
00109
00111 ElectronicData = 19,
00112
00114 VibrationData = 20,
00115
00117 RotationData = 21,
00118
00120 NuclearData = 22,
00121
00123 SetData = 23,
00124
00126 GridData = 24,
00127
00129 VectorData = 25,
00130
00132 MatrixData = 26,
00133
00134 // space for up to 2^14 more entries...
00135
00137 CustomData0 = 16384,
00138 CustomData1 = 16385,
00139 CustomData2 = 16386,
00140 CustomData3 = 16387,
00141 CustomData4 = 16388,
00142 CustomData5 = 16389,
00143 CustomData6 = 16390,
00144 CustomData7 = 16391,
00145 CustomData8 = 16392,
00146 CustomData9 = 16393,
00147 CustomData10 = 16394,
00148 CustomData11 = 16395,
00149 CustomData12 = 16396,
00150 CustomData13 = 16397,
00151 CustomData14 = 16398,
00152 CustomData15 = 16399
00153 };
00154 } // end namespace
00155 enum DataOrigin {

base.h 32
Open Babel: API Documentation
00156 any,
00157 fileformatInput,
00158 userInput,
00159 perceived,
00160 external
00161 };
00162
00164 // Class introduction in generic.cpp
00165 // This base class declaration has no dependence on mol.h
00166 class OBAPI OBGenericData
00167 {
00168 protected:
00169 std::string _attr;
00170 unsigned int _type;
00171 DataOrigin _source;
00172 public:
00173 OBGenericData(const std::string attr = "undefined",
00174 const unsigned int type = OBGenericDataType::UndefinedData,
00175 const DataOrigin source = any);
00176 //Use default copy constructor and assignment operators
00177 //OBGenericData(const OBGenericData&);
00178
00179 /* Virtual constructors added. see
00180 http://www.parashift.com/c++-faq-lite/abcs.html#faq-22.5
00181 to allow copying given only a base class OBGenericData pointer.
00182 It may be necessary to cast the return pointer to the derived class
00183 type, since we are doing without Covariant Return Types
00184 http://www.parashift.com/c++-faq-lite/virtual-functions.html#faq-20.8
00185
00186 A derived class may return NULL if copying is inappropriate */
00187 virtual OBGenericData* Clone(OBBase* /*parent*/) const
00188 { return NULL; }
00189 virtual ~OBGenericData() {}
00190 //Use default copy constructor and assignment operators
00191 //OBGenericData& operator=(const OBGenericData &src);
00192
00194 void SetAttribute(const std::string &v)
00195 { _attr = v; }
00197 void SetOrigin(const DataOrigin s) { _source = s; }
00199 virtual const std::string &GetAttribute() const
00200 { return(_attr); }
00202 unsigned int GetDataType() const
00203 { return(_type); }
00206 virtual const std::string &GetValue() const
00207 { return _attr; }
00208 virtual DataOrigin GetOrigin() const
00209 { return _source; }
00210 };
00211
00213 typedef std::vector<OBGenericData*>::iterator OBDataIterator;
00214
00216 // introduction in base.cpp
00217 class OBAPI OBBase
00218 {
00219 public:
00220 virtual ~OBBase()
00221 {
00222 if (!_vdata.empty())
00223 {
00224 std::vector<OBGenericData*>::iterator m;
00225 for (m = _vdata.begin();m != _vdata.end();m++)

base.h 33
Open Babel: API Documentation
00226 delete *m;
00227 _vdata.clear();
00228 }
00229 }
00230
00232 virtual bool Clear();
00233
00238 virtual OBBase* DoTransformations(const std::map<std::string,std::string>* /*pOptio
00239 {
00240 return this;
00241 }
00242
00243 //Base type does nothing
00245 static const char* ClassDescription()
00246 {
00247 return "";
00248 }
00249
00251 template< class T >
00252 T* CastAndClear(bool clear=true)
00253 {
00254 T* pOb = dynamic_cast<T*>(this);
00255 if(pOb && clear)// Clear only if this is of target class
00256 Clear();
00257 return pOb;
00258 }
00259
00260
00262
00263
00264 bool HasData(const std::string &);
00266 bool HasData(const char *);
00268 bool HasData(const unsigned int type);
00270 void DeleteData(unsigned int type);
00272 void DeleteData(OBGenericData*);
00274 void DeleteData(std::vector<OBGenericData*>&);
00276 bool DeleteData(const std::string& s);
00278 void SetData(OBGenericData *d)
00279 {
00280 if(d) _vdata.push_back(d);
00281 }
00284 void CloneData(OBGenericData *d);
00286 unsigned int DataSize() const
00287 { return(_vdata.size()); }
00290 OBGenericData *GetData(const unsigned int type);
00292 OBGenericData *GetData(const std::string&);
00294 OBGenericData *GetData(const char *);
00298 std::vector<OBGenericData*> GetAllData(const unsigned int type);
00300 std::vector<OBGenericData*> &GetData() { return(_vdata); }
00302 std::vector<OBGenericData*> GetData(DataOrigin source);
00304 OBDataIterator BeginData()
00305 { return(_vdata.begin()); }
00307 OBDataIterator EndData()
00308 { return(_vdata.end()); }
00310 protected:
00311 std::vector<OBGenericData*> _vdata;
00312
00313 };
00314
00315 } //namespace OpenBabel
00316

base.h 34
Open Babel: API Documentation
00317 #endif // OB_BASE_H
00318

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

base.h 35
base.h File Reference
Base classes to build a graph. More...

#include <openbabel/babelconfig.h>
#include <vector>
#include <map>
#include <string>
#include <iostream>
#include <openbabel/tokenst.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel
namespace OpenBabel::OBGenericDataType

base.h File Reference 36


Open Babel: API Documentation

Classes
class OBGenericData
Base class for generic data. More...
class OBBase
Base Class. More...

Typedefs
typedef std::vector
< OBGenericData * >::iterator OBDataIterator

Enumerations
enum {
UndefinedData = 0, PairData = 1, EnergyData = 2, CommentData = 3,
ConformerData = 4, ExternalBondData = 5, RotamerList = 6,
VirtualBondData = 7,
RingData = 8, TorsionData = 9, AngleData = 10, SerialNums = 11,
UnitCell = 12, SpinData = 13, ChargeData = 14, SymmetryData = 15,
ChiralData = 16, OccupationData = 17, DensityData = 18, ElectronicData =
19,
VibrationData = 20, RotationData = 21, NuclearData = 22, SetData = 23,
GridData = 24, VectorData = 25, MatrixData = 26, CustomData0 = 16384,
CustomData1 = 16385, CustomData2 = 16386, CustomData3 = 16387,
CustomData4 = 16388,
CustomData5 = 16389, CustomData6 = 16390, CustomData7 = 16391,
CustomData8 = 16392,
CustomData9 = 16393, CustomData10 = 16394, CustomData11 = 16395,
CustomData12 = 16396,
CustomData13 = 16397, CustomData14 = 16398, CustomData15 = 16399
}
enum DataOrigin {
any, fileformatInput, userInput, perceived,
external
}

Detailed Description
Base classes to build a graph.

Classes 37
Open Babel: API Documentation
This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:51 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Detailed Description 38
bitvec.cpp File Reference
Fast and efficient bitstring class. More...

#include <openbabel/babelconfig.h>
#include <openbabel/bitvec.h>
#include <openbabel/oberror.h>
#include <cstdlib>

Namespaces
namespace OpenBabel

Defines
#define LowBit(set, bit)

Functions
OBBitVec operator| (const OBBitVec &bv1, const OBBitVec &bv2)
OBBitVec operator & (const OBBitVec &bv1, const OBBitVec &bv2)
OBBitVec operator^ (const OBBitVec &bv1, const OBBitVec &bv2)
OBBitVec operator- (const OBBitVec &bv1, const OBBitVec &bv2)
bool operator== (const OBBitVec &bv1, const OBBitVec &bv2)
bool operator< (const OBBitVec &bv1, const OBBitVec &bv2)
std::istream & operator>> (std::istream &is, OBBitVec &bv)
std::ostream & operator<< (std::ostream &os, const OBBitVec &bv)
OBERROR double Tanimoto (const OBBitVec &bv1, const OBBitVec &bv2)

Variables
static int bitsoff [SETWORD]
const unsigned nibble_bit_count [0x10]

Detailed Description
Fast and efficient bitstring class.

Define Documentation

#define LowBit ( set,


bit )
Value:
{register int m; \

bitvec.cpp File Reference 39


Open Babel: API Documentation
if (set != 0) \
{ \
bit = 31; \
if (set != 0x80000000) { \
if ((m = (set & 0x0000ffff))!=0) {set = m; bit -= 16;} \
if ((m = (set & 0x00ff00ff))!=0) {set = m; bit -= 8;} \
if ((m = (set & 0x0f0f0f0f))!=0) {set = m; bit -= 4;} \
if ((m = (set & 0x33333333))!=0) {set = m; bit -= 2;} \
if ((m = (set & 0x55555555))!=0) {set = m; bit -= 1;}}} \
else bit = -1;}

Referenced by OBBitVec::NextBit().

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:51 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Define Documentation 40
bitvec.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 bitvec.h - Vector of bits.
00003
00004 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
00005 Some portions Copyright (C) 2001-2006 by Geoffrey R. Hutchison
00006
00007 This file is part of the Open Babel project.
00008 For more information, see <http://openbabel.sourceforge.net/>
00009
00010 This program is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU General Public License as published by
00012 the Free Software Foundation version 2 of the License.
00013
00014 This program is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017 GNU General Public License for more details.
00018 ***********************************************************************/
00019
00020 #ifndef OB_BITVEC_H
00021 #define OB_BITVEC_H
00022
00023 #include <openbabel/babelconfig.h>
00024
00025 #include <vector>
00026 #include <string>
00027
00028 #ifndef USE_64BIT_INTEGER
00029 // For 32-bit architecture
00030 #define SETWORD 32
00031 // SETWORD = 2 ^ WORDROLL
00032 #define WORDROLL 5
00033 // WORDMASK = SETWORD - 1
00034 #define WORDMASK 31
00035 #else
00036 // For 64-bit architecture
00037 #define SETWORD 64
00038 // SETWORD = 2 ^ WORDROLL
00039 #define WORDROLL 6
00040 // WORDMASK = SETWORD - 1
00041 #define WORDMASK 63
00042 #endif // 64 bit
00043
00044 #define WORDSIZE_OF_BITSIZE( bit_size ) ( ( bit_size >> WORDROLL ) + (( bit_size & WORDMA
00045
00046 #ifndef STARTWORDS
00047 #define STARTWORDS 10
00048 #endif // STARTWORDS
00049
00050 namespace OpenBabel
00051 {
00053
00061 class OBERROR OBBitVec
00062 {
00063 public:

bitvec.h 41
Open Babel: API Documentation
00064 typedef std::vector<unsigned> word_vector;
00065
00066 private:
00068 size_t _size; //was unsigned
00070 word_vector _set;
00071
00072 public:
00074
00077 OBBitVec()
00078 :_set(STARTWORDS, 0)
00079 { _size = _set.size(); }
00081
00086 OBBitVec(unsigned size_in_bits)
00087 :_set(WORDSIZE_OF_BITSIZE(size_in_bits), 0)
00088 { _size = _set.size(); }
00090
00094 OBBitVec(const OBBitVec & bv)
00095 :_size(0)
00096 { (*this) = bv; }
00098 void SetBitOn(unsigned bit_offset);
00100 void SetBitOff(unsigned bit_offset);
00102 void SetRangeOn(unsigned lo_bit_offset, unsigned hi_bit_offset);
00104 void SetRangeOff(unsigned lo_bit_offset, unsigned hi_bit_offset);
00106 void Fold(unsigned new_bit_size);
00108
00112 int FirstBit(unsigned bit_offset = 0) const
00113 {
00114 return (BitIsSet(bit_offset) ? 0 : NextBit(bit_offset));
00115 }
00117 int NextBit(int last_bit_offset) const;
00119 int EndBit() const { return -1; }
00121 unsigned GetSize() const { return(_size); }
00123 unsigned CountBits() const;
00124
00126 bool Empty() const { return(IsEmpty()); }
00128 bool IsEmpty() const;
00130
00134 bool Resize(unsigned size_in_bits)
00135 {
00136 return ResizeWords( WORDSIZE_OF_BITSIZE(size_in_bits) );
00137 }
00139
00143 bool ResizeWords(unsigned size_in_words)
00144 {
00145 if (size_in_words <= _size)
00146 return false;
00147 _set.resize(size_in_words, 0); // increase the vector with zeroed bits
00148 _size = _set.size();
00149 return true;
00150 }
00152
00156 bool BitIsSet(unsigned bit_offset) const
00157 {
00158 bool rtn = false;
00159 unsigned word_offset = bit_offset >> WORDROLL;
00160 if (word_offset < GetSize())
00161 {
00162 bit_offset &= WORDMASK;
00163 rtn = (( _set[word_offset] >> bit_offset ) & 1);
00164 }
00165 return rtn;

bitvec.h 42
Open Babel: API Documentation
00166 }
00168 bool BitIsOn(int bit_offset) const
00169 { return BitIsSet((unsigned)bit_offset); }
00170
00172 void FromVecInt(const std::vector<int> & bit_offsets);
00174 void FromString(const std::string & line, int bits);
00176 void ToVecInt(std::vector<int> & bit_offsets) const;
00178 void Clear();
00180
00184 void Negate()
00185 {
00186 for (word_vector::iterator wx = _set.begin(), wy = _set.end(); wx != wy
00187 * wx = ~(* wx);
00188 }
00190
00194 void GetWords(word_vector & vec)
00195 {
00196 vec.insert(vec.end(), _set.begin(),_set.end());
00197 }
00198
00200 OBBitVec & operator= (const OBBitVec & bv);
00202 OBBitVec & operator&= (const OBBitVec & bv);
00204 OBBitVec & operator|= (const OBBitVec & bv);
00206
00208 OBBitVec & operator|= (int bit_offset)
00209 {
00210 SetBitOn(bit_offset);
00211 return(*this);
00212 }
00214 OBBitVec & operator^= (const OBBitVec & bv);
00216 OBBitVec & operator-= (const OBBitVec & bv);
00218 OBBitVec & operator+= (const OBBitVec & bv);
00220
00224 bool operator[] (int bit_offset) const
00225 { return BitIsSet(bit_offset); }
00226
00228 friend OBERROR OBBitVec operator| (const OBBitVec & bv1, const OBBitVec & bv2);
00230 friend OBERROR OBBitVec operator& (const OBBitVec & bv1,const OBBitVec & bv2);
00232 friend OBERROR OBBitVec operator^ (const OBBitVec & bv1,const OBBitVec & bv2);
00234 friend OBERROR OBBitVec operator- (const OBBitVec & bv1,const OBBitVec & bv2);
00236 friend OBERROR bool operator== (const OBBitVec & bv1,const OBBitVec & bv2);
00238 friend OBERROR bool operator< (const OBBitVec & bv1, const OBBitVec & bv2);
00239
00241 friend OBERROR std::istream& operator>> ( std::istream & is, OBBitVec & bv );
00243 friend OBERROR std::ostream& operator<< ( std::ostream & os, const OBBitVec & bv ) ;
00244 };
00245
00247 OBERROR double Tanimoto(const OBBitVec & bv1, const OBBitVec & bv2);
00248
00249 } // end namespace OpenBabel
00250
00251 #endif // OB_BITVEC_H
00252

bitvec.h 43
Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

bitvec.h 44
bitvec.h File Reference
Fast and efficient bitstring class. More...

#include <openbabel/babelconfig.h>
#include <vector>
#include <string>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBBitVec
A speed-optimized vector of bits. More...

Defines
#define SETWORD 32
#define WORDROLL 5
#define WORDMASK 31
#define WORDSIZE_OF_BITSIZE(bit_size) ( ( bit_size >> WORDROLL ) + (( bit_size &
WORDMASK ) ? 1 : 0) )
#define STARTWORDS 10

bitvec.h File Reference 45


Open Babel: API Documentation

Functions
OBERROR double Tanimoto (const OBBitVec &bv1, const OBBitVec &bv2)

Detailed Description
Fast and efficient bitstring class.

Define Documentation

#define SETWORD 32

Referenced by OpenBabel::operator<<(), OBBitVec::SetRangeOff(), and OBBitVec::SetRangeOn().

#define WORDROLL 5

Referenced by OBBitVec::BitIsSet(), OBBitVec::Fold(), OBBitVec::NextBit(), OBBitVec::SetBitOff(),


OBBitVec::SetBitOn(), OBBitVec::SetRangeOff(), and OBBitVec::SetRangeOn().

#define WORDMASK 31

Referenced by OBBitVec::BitIsSet(), OBBitVec::NextBit(), OBBitVec::SetBitOff(), OBBitVec::SetBitOn(),


OBBitVec::SetRangeOff(), and OBBitVec::SetRangeOn().

#define ( ( bit_size >> WORDROLL ) + (( bit_size &


( bit_size )
WORDSIZE_OF_BITSIZE WORDMASK ) ? 1 : 0) )

Referenced by OBBitVec::Resize().

#define STARTWORDS 10

This file is part of the documentation for Open Babel, version 2.2.0.

Defines 46
Open Babel: API Documentation
Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Define Documentation 47
bond.cpp File Reference
Handle OBBond class. More...

#include <openbabel/babelconfig.h>
#include <openbabel/bond.h>
#include <openbabel/mol.h>

Namespaces
namespace OpenBabel

Detailed Description
Handle OBBond class.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

bond.cpp File Reference 48


bond.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 bond.h - Handle OBBond class.
00003
00004 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
00005 Some portions Copyright (C) 2001-2006 by Geoffrey R. Hutchison
00006 Some portions Copyright (C) 2003 by Michael Banck
00007
00008 This file is part of the Open Babel project.
00009 For more information, see <http://openbabel.sourceforge.net/>
00010
00011 This program is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU General Public License as published by
00013 the Free Software Foundation version 2 of the License.
00014
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018 GNU General Public License for more details.
00019 ***********************************************************************/
00020
00021 #ifndef OB_BOND_H
00022 #define OB_BOND_H
00023
00024 #include <openbabel/babelconfig.h>
00025
00026 #ifndef EXTERN
00027 # define EXTERN extern
00028 #endif
00029
00030 #include <openbabel/base.h>
00031 #include <openbabel/atom.h>
00032
00033 namespace OpenBabel
00034 {
00035
00036 class OBAtom;
00037
00039 typedef OBBond OBEdgeBase;
00040
00041 //BOND Property Macros (flags)
00043 #define OB_AROMATIC_BOND (1<<1)
00045 #define OB_WEDGE_BOND (1<<2)
00047 #define OB_HASH_BOND (1<<3)
00049 #define OB_RING_BOND (1<<4)
00051 #define OB_TORUP_BOND (1<<5)
00053 #define OB_TORDOWN_BOND (1<<6)
00055 #define OB_KSINGLE_BOND (1<<7)
00057 #define OB_KDOUBLE_BOND (1<<8)
00059 #define OB_KTRIPLE_BOND (1<<9)
00061 #define OB_CLOSURE_BOND (1<<10)
00062 // 11-16 currently unused
00063
00064 // class introduction in bond.cpp
00065 class OBAPI OBBond: public OBBase
00066 {

bond.h 49
Open Babel: API Documentation
00067 protected:
00068 unsigned int _idx;
00069 OBMol *_parent;
00070 OBAtom *_bgn;
00071 OBAtom *_end;
00072
00073 char _order;
00074 unsigned short int _flags;
00075
00076 bool HasFlag(int flag) { return((_flags & flag) != 0); }
00077 void SetFlag(int flag) { _flags |= flag; }
00078 void UnsetFlag(int flag) { _flags &= (~(flag)); }
00079
00080 public:
00082
00083 bool Visit;
00084
00086 OBBond();
00088 virtual ~OBBond();
00089
00091
00092
00093
00095 void SetIdx(int idx) { _idx = idx; }
00097
00098 void SetBO(int order);
00100 void SetBondOrder(int order);
00102 void SetBegin(OBAtom *begin){ _bgn = begin; }
00104 void SetEnd(OBAtom *end) { _end = end; }
00106 void SetParent(OBMol *ptr) { _parent= ptr; }
00108 void SetLength(OBAtom *fixed,double length);
00111 void SetLength(double length);
00113 void Set(int index, OBAtom* begin,OBAtom* end,int order,int flags);
00115 void SetKSingle();
00117 void SetKDouble();
00119 void SetKTriple();
00121 void SetAromatic() { SetFlag(OB_AROMATIC_BOND); }
00123 void SetHash() { SetFlag(OB_HASH_BOND); }
00125 void SetWedge() { SetFlag(OB_WEDGE_BOND); }
00127 void SetUp() { SetFlag(OB_TORUP_BOND); UnsetFlag(OB_TORDOWN_BOND); }
00129 void SetDown() { SetFlag(OB_TORDOWN_BOND); UnsetFlag(OB_TORUP_BOND); }
00131 void SetInRing() { SetFlag(OB_RING_BOND); }
00133
00136 void SetClosure() { SetFlag(OB_CLOSURE_BOND); }
00138 void UnsetHash() { UnsetFlag(OB_HASH_BOND); }
00140 void UnsetWedge() { UnsetFlag(OB_WEDGE_BOND); }
00142 void UnsetUp() { UnsetFlag(OB_TORUP_BOND); }
00144 void UnsetDown() { UnsetFlag(OB_TORDOWN_BOND); }
00146 void UnsetAromatic() { UnsetFlag(OB_AROMATIC_BOND);}
00148 void UnsetKekule()
00149 {
00150 _flags &= (~(OB_KSINGLE_BOND|OB_KDOUBLE_BOND|OB_KTRIPLE_BOND));
00151 }
00153
00155
00156
00157 unsigned int GetIdx() const { return(_idx); }
00159
00160 unsigned int GetBO() const { return(_order); }
00162 unsigned int GetBondOrder() const { return(_order); }
00164 unsigned int GetFlags() const { return(_flags); }

bond.h 50
Open Babel: API Documentation
00166 unsigned int GetBeginAtomIdx() const
00167 { return (_bgn ? _bgn->GetIdx() : 0); }
00169 unsigned int GetEndAtomIdx() const
00170 { return (_end ? _end->GetIdx() : 0); }
00172 OBAtom *GetBeginAtom() { return(_bgn); }
00173 const OBAtom *GetBeginAtom() const
00174 { return(_bgn); }
00176 OBAtom *GetEndAtom() { return(_end); }
00177 const OBAtom *GetEndAtom() const
00178 { return(_end); }
00180
00182 OBAtom *GetNbrAtom(OBAtom *ptr)
00183 {
00184 return((ptr != _bgn)? _bgn : _end);
00185 }
00187 OBMol *GetParent() {return(_parent);}
00189
00190 double GetEquibLength() const;
00192 double GetLength() const;
00194
00196 unsigned int GetNbrAtomIdx(OBAtom *ptr)
00197 {
00198 if (ptr!=_bgn)
00199 return (_bgn ? _bgn->GetIdx() : 0);
00200 else
00201 return (_end ? _end->GetIdx() : 0);
00202 }
00204
00206
00207
00208
00209
00210 bool IsAromatic() const;
00212 bool IsInRing() const;
00214
00219 bool IsRotor();
00221 bool IsAmide();
00223 bool IsPrimaryAmide();
00225 bool IsSecondaryAmide();
00227 bool IsEster();
00229 bool IsCarbonyl();
00231 bool IsSingle();
00233 bool IsDouble();
00235 bool IsTriple();
00237 bool IsKSingle();
00239 bool IsKDouble();
00241 bool IsKTriple();
00243 bool IsClosure();
00246 bool IsUp() { return(HasFlag(OB_TORUP_BOND)); }
00249 bool IsDown() { return(HasFlag(OB_TORDOWN_BOND)); }
00252 bool IsWedge() { return(HasFlag(OB_WEDGE_BOND)); }
00255 bool IsHash() { return(HasFlag(OB_HASH_BOND)); }
00257 bool IsDoubleBondGeometry();
00259
00260 }; // class OBBond
00261
00263 typedef std::vector<OBBond*>::iterator OBBondIterator;
00264
00265 }// namespace OpenBabel
00266
00267 #endif // OB_BOND_H

bond.h 51
Open Babel: API Documentation
00268

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

bond.h 52
bond.h File Reference
Handle bonds. More...

#include <openbabel/babelconfig.h>
#include <openbabel/base.h>
#include <openbabel/atom.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBBond
Bond class. More...

Defines
#define OB_AROMATIC_BOND (1<<1)
#define OB_WEDGE_BOND (1<<2)
#define OB_HASH_BOND (1<<3)
#define OB_RING_BOND (1<<4)
#define OB_TORUP_BOND (1<<5)
#define OB_TORDOWN_BOND (1<<6)
#define OB_KSINGLE_BOND (1<<7)
#define OB_KDOUBLE_BOND (1<<8)
#define OB_KTRIPLE_BOND (1<<9)
#define OB_CLOSURE_BOND (1<<10)

bond.h File Reference 53


Open Babel: API Documentation

Typedefs
typedef OBBond OBEdgeBase

Detailed Description
Handle bonds.

Define Documentation

#define OB_AROMATIC_BOND (1<<1)


An aromatic bond (regardless of bond order).

Referenced by OBBond::IsAromatic(), OBBond::IsDouble(), OBBond::IsSingle(), OBBond::IsTriple(),


OBBond::SetAromatic(), and OBBond::UnsetAromatic().

#define OB_WEDGE_BOND (1<<2)


A solid black wedge in 2D representations -- i.e., "up" from the 2D plane.

Referenced by OBBond::IsWedge(), OBBond::SetWedge(), and OBBond::UnsetWedge().

#define OB_HASH_BOND (1<<3)


A dashed "hash" bond in 2D representations -- i.e., "down" from the 2D plane.

Referenced by OBBond::IsHash(), OBBond::SetHash(), and OBBond::UnsetHash().

#define OB_RING_BOND (1<<4)


A bond in a ring.

Referenced by OBBond::IsInRing(), and OBBond::SetInRing().

#define OB_TORUP_BOND (1<<5)


The "upper" bond in a double bond cis/trans isomer (i.e., "/" in SMILES).

Referenced by OBBond::IsUp(), OBBond::SetDown(), OBBond::SetUp(), and OBBond::UnsetUp().

#define OB_TORDOWN_BOND (1<<6)


The "down" bond in a double bond cis/trans isomer (i.e., "\" in SMILES).

Referenced by OBBond::IsDown(), OBBond::SetDown(), OBBond::SetUp(), and OBBond::UnsetDown().

Defines 54
Open Babel: API Documentation

#define OB_KSINGLE_BOND (1<<7)


A Kekule single bond.

Referenced by OBBond::IsKSingle(), OBBond::SetKDouble(), OBBond::SetKSingle(),


OBBond::SetKTriple(), and OBBond::UnsetKekule().

#define OB_KDOUBLE_BOND (1<<8)


A Kekule double bond.

Referenced by OBBond::IsKDouble(), OBBond::SetKDouble(), OBBond::SetKSingle(),


OBBond::SetKTriple(), and OBBond::UnsetKekule().

#define OB_KTRIPLE_BOND (1<<9)


A Kekule triple bond.

Referenced by OBBond::IsKTriple(), OBBond::SetKDouble(), OBBond::SetKSingle(),


OBBond::SetKTriple(), and OBBond::UnsetKekule().

#define OB_CLOSURE_BOND (1<<10)


A bond which "closes" a ring when walking the molecular graph.

Referenced by OBBond::IsClosure(), and OBBond::SetClosure().

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Define Documentation 55
bondtyper.cpp File Reference
Bond typer to perceive connectivity and bond orders/types. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/bondtyper.h>
#include "bondtyp.h"

Namespaces
namespace OpenBabel

Variables
OBBondTyper bondtyper

Detailed Description
Bond typer to perceive connectivity and bond orders/types.

Todo:
Needs to add aromatic ring bond order assignment. Eventually need to migrate
OBMol::PerceiveBondOrders(), OBMol::ConnectTheDots(), and possibly some of the Kekulize
routines

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes

bondtyper.cpp File Reference 56


Open Babel: API Documentation

• Files

Detailed Description 57
bondtyper.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 bondtyper.h - Bond typer to perceive connectivity and bond orders/types.
00003
00004 Copyright (C) 2003-2005 by Geoffrey R. Hutchison
00005
00006 This file is part of the Open Babel project.
00007 For more information, see <http://openbabel.sourceforge.net/>
00008
00009 This program is free software; you can redistribute it and/or modify
00010 it under the terms of the GNU General Public License as published by
00011 the Free Software Foundation version 2 of the License.
00012
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016 GNU General Public License for more details.
00017 ***********************************************************************/
00018
00019 #ifndef OB_BONDTYPER_H
00020 #define OB_BONDTYPER_H
00021
00022 #include <openbabel/parsmart.h>
00023 #include <openbabel/data.h>
00024
00025 namespace OpenBabel
00026 {
00027
00028 // class introduction in bondtyper.cpp
00029 // Used for "perceiving" bonds, e.g. in XYZ or QM files with no bond info.
00030 class OBAPI OBBondTyper : public OBGlobalDataBase
00031 {
00033 std::vector<std::pair<OBSmartsPattern*, std::vector<int> > > _fgbonds;
00034 public:
00035 OBBondTyper();
00036 ~OBBondTyper();
00037
00039
00040 void ParseLine(const char*);
00042 unsigned int GetSize() { return _fgbonds.size();}
00044
00046
00047
00048 void AssignFunctionalGroupBonds(OBMol &mol);
00050 };
00051
00052 }
00053
00054 #endif // OB_BONDTYPER_H
00055

bondtyper.h 58
Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

bondtyper.h 59
bondtyper.h File Reference
Bond typer to perceive connectivity and bond orders/types. More...

#include <openbabel/parsmart.h>
#include <openbabel/data.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBBondTyper
Assigns bond types for file formats without bond information. More...

Detailed Description
Bond typer to perceive connectivity and bond orders/types.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

bondtyper.h File Reference 60


Open Babel: API Documentation
• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Detailed Description 61
builder.cpp File Reference
Handle OBBuilder class. More...

#include <openbabel/babelconfig.h>
#include <openbabel/builder.h>
#include <openbabel/mol.h>
#include <openbabel/atom.h>
#include <openbabel/bond.h>
#include <openbabel/obiter.h>
#include <openbabel/math/matrix3x3.h>
#include <openbabel/rotamer.h>
#include <openbabel/rotor.h>
#include <openbabel/obconversion.h>
#include <openbabel/locale.h>

Namespaces
namespace OpenBabel

Detailed Description
Handle OBBuilder class.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

builder.cpp File Reference 62


builder.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 builder.h - OBBuilder class.
00003
00004 Copyright (C) 2007-2008 by Tim Vandermeersch
00005 <tim.vandermeersch@gmail.com>
00006
00007 This file is part of the Open Babel project.
00008 For more information, see <http://openbabel.sourceforge.net/>
00009
00010 This program is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU General Public License as published by
00012 the Free Software Foundation version 2 of the License.
00013
00014 This program is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017 GNU General Public License for more details.
00018 ***********************************************************************/
00019
00020 #ifndef OB_BUILDER_H
00021 #define OB_BUILDER_H
00022
00023 #include <vector>
00024 #include <string>
00025 #include <map>
00026
00027 #include <list>
00028 #include <set>
00029 #include <openbabel/base.h>
00030 #include <openbabel/mol.h>
00031
00032 namespace OpenBabel
00033 {
00036 class OBAPI OBBuilder {
00037 public:
00038
00040 void LoadFragments();
00041
00046 static vector3 GetNewBondVector(OBAtom *atom);
00047 static vector3 GetNewBondVector(OBAtom *atom, double length);
00053 bool Build(OBMol &mol);
00065 static bool Connect(OBMol &mol, int a, int b, vector3 &newpos, int bondOrder = 1);
00076 static bool Connect(OBMol &mol, int a, int b, int bondOrder = 1);
00104 static bool Swap(OBMol &mol, int a, int b, int c, int d);
00111 //bool Insert(OBMol &mol, int a, int b, std::string smiles, int c, int d);
00114 static void CorrectStereoBonds(OBMol &mol);
00117 static void CorrectStereoAtoms(OBMol &mol);
00122 static OBBitVec GetFragment(OBAtom *atom);
00123 static void AddNbrs(OBBitVec &fragment, OBAtom *atom);
00124
00125 private:
00127 static std::vector<std::pair<OBSmartsPattern*, std::vector<vector3> > > _fragments;
00128 }; // class OBBuilder
00129
00130 }// namespace OpenBabel

builder.h 63
Open Babel: API Documentation
00131
00132 #endif // OB_BUILDER_H
00133

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

builder.h 64
builder.h File Reference
Class to build 3D structures. More...

#include <vector>
#include <string>
#include <map>
#include <list>
#include <set>
#include <openbabel/base.h>
#include <openbabel/mol.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBBuilder
Class to build 3D structures. More...

Detailed Description
Class to build 3D structures.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

builder.h File Reference 65


Open Babel: API Documentation

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Detailed Description 66
canon.cpp File Reference
Canonical numbering of SMILES, molecules and fragments. More...

#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <openbabel/canon.h>

Namespaces
namespace OpenBabel

Defines
#define DEBUG 0
#define CT_MATCH(b1, b2) b1->IsUp() ? b2->SetDown() : (b1->IsDown() ? b2->SetUp() :
(b2->IsUp() ? b1->SetDown() : (b2->IsDown() ? b1->SetUp() : b1->SetDown())))
#define NO_SYMCLASS 0x7FFFFFFF

Functions
static bool CompareUnsigned (const unsigned int &a, const unsigned int &b)
static bool ComparePairFirst (const pair< OBAtom *, unsigned int > &a, const pair< OBAtom *,
unsigned int > &b)
static bool ComparePairSecond (const pair< OBAtom *, unsigned int > &a, const pair< OBAtom *,
unsigned int > &b)
static bool CompareBondPairSecond (const pair< OBBond *, unsigned int > &a, const pair<
OBBond *, unsigned int > &b)
static unsigned int GetValence (OBAtom *atom, OBBitVec &frag_atoms)
static unsigned int GetHvyValence (OBAtom *atom, OBBitVec &frag_atoms)
static unsigned int GetHvyBondSum (OBAtom *atom, OBBitVec &frag_atoms)
static bool GetGTDVector (OBMol *pmol, OBBitVec &frag_atoms, vector< int > &gtd)
static void FindRingAtoms (OBMol *pmol, OBBitVec &frag_atoms, OBBitVec &ring_atoms)
static void GetGIVector (OBMol *pmol, OBBitVec &frag_atoms, vector< unsigned int > &vid)
static void CreateNewClassVector (vector< pair< OBAtom *, unsigned int > > &vp1, vector< pair<
OBAtom *, unsigned int > > &vp2, OBBitVec &frag_atoms, int natoms)
static void CountAndRenumberClasses (vector< pair< OBAtom *, unsigned int > > &vp, unsigned
int &count)
static int ExtendInvarients (vector< pair< OBAtom *, unsigned int > > &symmetry_classes,
OBBitVec &frag_atoms, int nfragatoms, int natoms)
static int CalculateSymmetry (OBMol *pmol, OBBitVec &frag_atoms, vector< pair< OBAtom *,
unsigned int > > &symmetry_classes)
static void BreakChiralTies (OBMol *pmol, OBBitVec &frag_atoms, int nfragatoms, vector< pair<
OBAtom *, unsigned int > > &atom_sym_classes)
static void FindConjugatedEZBonds (OBAtom *atom, OBBitVec &flip_bonds, OBBitVec
&visited_atoms)
static void FixCisTransBonds (OBMol *pmol, OBBitVec &frag_atoms, vector< unsigned int >
&symmetry_classes, vector< unsigned int > &canonical_labels)

canon.cpp File Reference 67


Open Babel: API Documentation

void CanonicalLabels (OBMol *pmol, OBBitVec &frag_atoms, std::vector< unsigned int >
&symmetry_classes, std::vector< unsigned int > &canonical_labels)

Detailed Description
Canonical numbering of SMILES, molecules and fragments.

Define Documentation

#define DEBUG 0

#define
( b1,
CT_MATCH
b1->IsUp() ? b2->SetDown() : (b1->IsDown() ? b2->SetUp() : (b2->IsUp() ?
b2 )
b1->SetDown() : (b2->IsDown() ? b1->SetUp() : b1->SetDown())))

Referenced by OpenBabel::FixCisTransBonds().

#define NO_SYMCLASS 0x7FFFFFFF

Referenced by OpenBabel::CanonicalLabels().

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Functions 68
canon.h
Go to the documentation of this file.

00001 /* -*-C++-*-
00002
00003 **********************************************************************
00004 Copyright (C) 2005-2006, eMolecules, Inc. (www.emolecules.com)
00005
00006 This program is free software; you can redistribute it and/or modify
00007 it under the terms of the GNU General Public License as published by
00008 the Free Software Foundation version 2 of the License.
00009
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013 GNU General Public License for more details.
00014 ***********************************************************************
00015
00016 +======================================================================
00017 | FILE: canon.h
00018 | AUTHOR: Craig A. James
00019 | DESCRIPTION:
00020 | Declarations for canon.cpp
00021 +======================================================================
00022 */
00023
00024 // Return vector is indexed from zero, corresponds to "atom->GetIdx()-1"
00025 namespace OpenBabel {
00026
00027 void OBAPI CanonicalLabels(OBMol *pmol,
00028 OBBitVec &frag_atoms,
00029 std::vector<unsigned int> &symmetry_classes,
00030 std::vector<unsigned int> &canonical_labels);
00031
00032 } // namespace OpenBabel
00033

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page

canon.h 69
Open Babel: API Documentation
• Related Pages
• Namespaces
• Classes
• Files

canon.h 70
canon.h File Reference
Canonical numbering of SMILES, molecules and fragments. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel

Functions
void CanonicalLabels (OBMol *pmol, OBBitVec &frag_atoms, std::vector< unsigned int >
&symmetry_classes, std::vector< unsigned int > &canonical_labels)

Detailed Description
Canonical numbering of SMILES, molecules and fragments.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces

canon.h File Reference 71


Open Babel: API Documentation

• Classes
• Files

Detailed Description 72
chains.cpp File Reference
Parse for macromolecule chains and residues. More...

#include <openbabel/babelconfig.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <map>
#include <openbabel/mol.h>
#include <openbabel/chains.h>

Namespaces
namespace OpenBabel

Defines
#define RESIDMIN 3
#define RESIDMAX 32
#define ATOMMINAMINO 4
#define ATOMMINNUCLEIC 50
#define MAXPEPTIDE 11
#define MAXNUCLEIC 15
#define AMINOMAX 21
#define NUCLEOMAX 6
#define STACKSIZE 20
#define AI_N 0
#define AI_CA 1
#define AI_C 2
#define AI_O 3
#define AI_OXT 37
#define AI_P 38
#define AI_O1P 39
#define AI_O2P 40
#define AI_O5 41
#define AI_C5 42
#define AI_C4 43
#define AI_O4 44
#define AI_C3 45
#define AI_O3 46
#define AI_C2 47
#define AI_O2 48
#define AI_C1 49
#define BitN 0x0001
#define BitNTer 0x0002
#define BitNPro 0x0004

chains.cpp File Reference 73


Open Babel: API Documentation
#define BitNPT 0x0008
#define BitCA 0x0010
#define BitCAGly 0x0020
#define BitC 0x0100
#define BitCTer 0x0200
#define BitCOXT 0x0400
#define BitO 0x1000
#define BitOXT 0x2000
#define BitNAll 0x000F
#define BitCAAll 0x0030
#define BitCAll 0x0700
#define BitOAll 0x3000
#define BitP 0x0001
#define BitPTer 0x0002
#define BitOP 0x0004
#define BitO5 0x0008
#define BitO5Ter 0x0010
#define BitC5 0x0020
#define BitC4 0x0040
#define BitO4 0x0080
#define BitC3 0x0100
#define BitO3 0x0200
#define BitO3Ter 0x0400
#define BitC2RNA 0x0800
#define BitC2DNA 0x1000
#define BitO2 0x2000
#define BitC1 0x4000
#define BitPAll 0x0003
#define Bit05All 0x0018
#define BitO3All 0x0600
#define BitC2All 0x1800
#define BC_ASSIGN 0x01
#define BC_COUNT 0x02
#define BC_ELEM 0x03
#define BC_EVAL 0x04
#define BC_IDENT 0x05
#define BC_LOCAL 0x06
#define BF_SINGLE 0x01
#define BF_DOUBLE 0x02
#define BF_TRIPLE 0x04
#define BF_AROMATIC 0x08
#define ATOMMAX 68

Typedefs
typedef union OpenBabel::_ByteCode ByteCode

Defines 74
Open Babel: API Documentation

Functions
static ByteCode * AllocateByteCode (int type)
static void DeleteByteCode (ByteCode *node)
static void FatalMemoryError (void)
void GenerateByteCodes (ByteCode **node, int resid, int curr, int prev, int
bond)

Variables
static char ChainsResName [RESIDMAX][4]
static Template Peptide [MAXPEPTIDE]
static Template Nucleotide [MAXNUCLEIC]
static char ChainsAtomName [ATOMMAX][4]
static ResidType AminoAcids [AMINOMAX]
static ResidType Nucleotides [NUCLEOMAX]
static MonoAtomType MonoAtom [MaxMonoAtom]
static MonoBondType MonoBond [MaxMonoBond]
static int MonoAtomCount
static int MonoBondCount
static StackType Stack [STACKSIZE]
static int StackPtr
static int AtomIndex
static int BondIndex
static bool StrictFlag = false

Detailed Description
Parse for macromolecule chains and residues.

Define Documentation

#define RESIDMIN 3
The first available index for actual residues 0, 1, 2 reserved for UNK, HOH, LIG

Referenced by OBChainsParser::OBChainsParser().

#define RESIDMAX 32
The maximum number of residue IDs for this code.

#define ATOMMINAMINO 4

Referenced by OpenBabel::GenerateByteCodes().

Functions 75
Open Babel: API Documentation

#define ATOMMINNUCLEIC 50

#define MAXPEPTIDE 11

#define MAXNUCLEIC 15

#define AMINOMAX 21
The number of amino acids recognized by this code Currently: ILE, VAL, ALA, ASN, ASP, ARG, CYS,
GLN, GLU GLY, HIS, HYP, LEU, LYS, MET, PHE, PRO, SER, THR, TRP, TYR

Referenced by OBChainsParser::OBChainsParser().

#define NUCLEOMAX 6
The number of nucleic acids recognized by this code Currently A, C, T, G, U, I

Referenced by OBChainsParser::OBChainsParser().

#define STACKSIZE 20

#define AI_N 0

#define AI_CA 1

#define AI_C 2

#define AI_O 3

#define AI_OXT 37

#define AI_P 38

#define AI_O1P 39

#define AI_O2P 40

Define Documentation 76
Open Babel: API Documentation

#define AI_O5 41

#define AI_C5 42

#define AI_C4 43

#define AI_O4 44

#define AI_C3 45

#define AI_O3 46

#define AI_C2 47

#define AI_O2 48

#define AI_C1 49

#define BitN 0x0001

#define BitNTer 0x0002

#define BitNPro 0x0004

#define BitNPT 0x0008

#define BitCA 0x0010

#define BitCAGly 0x0020

#define BitC 0x0100

Define Documentation 77
Open Babel: API Documentation

#define BitCTer 0x0200

#define BitCOXT 0x0400

#define BitO 0x1000

#define BitOXT 0x2000

#define BitNAll 0x000F

#define BitCAAll 0x0030

#define BitCAll 0x0700

#define BitOAll 0x3000

#define BitP 0x0001

#define BitPTer 0x0002

#define BitOP 0x0004

#define BitO5 0x0008

#define BitO5Ter 0x0010

#define BitC5 0x0020

#define BitC4 0x0040

#define BitO4 0x0080

Define Documentation 78
Open Babel: API Documentation

#define BitC3 0x0100

#define BitO3 0x0200

#define BitO3Ter 0x0400

#define BitC2RNA 0x0800

#define BitC2DNA 0x1000

#define BitO2 0x2000

#define BitC1 0x4000

#define BitPAll 0x0003

#define Bit05All 0x0018

#define BitO3All 0x0600

#define BitC2All 0x1800

#define BC_ASSIGN 0x01

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

#define BC_COUNT 0x02

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

#define BC_ELEM 0x03

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

Define Documentation 79
Open Babel: API Documentation

#define BC_EVAL 0x04

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

#define BC_IDENT 0x05

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

#define BC_LOCAL 0x06

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

#define BF_SINGLE 0x01

#define BF_DOUBLE 0x02

#define BF_TRIPLE 0x04

#define BF_AROMATIC 0x08

#define ATOMMAX 68
The number of PDB atom type names recognized by this code.

Variable Documentation

char ChainsResName[RESIDMAX][4] [static]


Initial value:
{
"UNK",
"HOH",
"LIG"
}

An index of the residue names perceived during a run 0, 1, and 2 reserved for UNK, HOH, LIG

Referenced by OpenBabel::GenerateByteCodes(), and OBChainsParser::OBChainsParser().

Variable Documentation 80
Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Variable Documentation 81
chains.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 chains.h - Parse for macromolecule chains and residues
00003
00004 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
00005 Some portions Copyright (C) 2001-2006 by Geoffrey R. Hutchison
00006
00007 This file is part of the Open Babel project.
00008 For more information, see <http://openbabel.sourceforge.net/>
00009
00010 This program is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU General Public License as published by
00012 the Free Software Foundation version 2 of the License.
00013
00014 This program is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017 GNU General Public License for more details.
00018 ***********************************************************************/
00019
00020 #ifndef OB_CHAINS_H
00021 #define OB_CHAINS_H
00022
00023 #define MaxMonoAtom 20
00024 #define MaxMonoBond 20
00025
00026 namespace OpenBabel
00027 {
00028
00029 class OBAtom;
00030 class OBMol;
00031
00032 // Structure template for atomic patterns in residues for OBChainsParser
00033 // implementation in chains.cpp
00034 typedef struct Template Template;
00035
00038 //
00043 class OBAPI OBChainsParser
00044 {
00045 public:
00046
00047 OBChainsParser(void);
00048 ~OBChainsParser(void);
00049
00054 bool PerceiveChains(OBMol &mol, bool nukeSingleResidue = false);
00055
00056 private: // internal methods
00057
00059 bool DetermineHetAtoms(OBMol &);
00061 bool DetermineConnectedChains(OBMol &);
00063 bool DeterminePeptideBackbone(OBMol &);
00065 bool DeterminePeptideSidechains(OBMol &);
00067 bool DetermineNucleicBackbone(OBMol &);
00069 bool DetermineNucleicSidechains(OBMol &);
00071 bool DetermineHydrogens(OBMol &);
00072

chains.h 82
Open Babel: API Documentation
00074 void SetupMol(OBMol &);
00075 void SetResidueInformation(OBMol &, bool nukeSingleResidue);
00076 void ClearResidueInformation(OBMol &);
00077 void CleanupMol(void);
00078
00079 void AssignResidue(OBMol &, int, int, int);
00080 int IdentifyResidue(void *, OBMol &, int, int); // ByteCode *
00081
00082 void DefineMonomer(void **, int, const char *); // ByteCode **
00083 int IdentifyElement(char *);
00084
00085 bool MatchConstraint(OBAtom *, int);
00086 bool Match2Constraints(Template *, OBAtom *, OBAtom *);
00087 bool Match3Constraints(Template *, OBAtom *, OBAtom *, OBAtom *);
00088 bool Match4Constraints(Template *, OBAtom *, OBAtom *, OBAtom *, OBAtom *);
00089
00090 void ConstrainBackbone(OBMol &, Template *, int);
00091
00092 int RecurseChain(OBMol &, int, int);
00093 void TraceNucleicChain(OBMol &, int, int);
00094 void TracePeptideChain(OBMol &, int, int);
00095
00096 const char *ParseSmiles(const char *, int);
00097
00098 // debugging
00099 void DumpState();
00100
00101 private: // members
00102
00103 void *PDecisionTree; // ByteCode *
00104 void *NDecisionTree; // ByteCode *
00105
00106 int ResMonoAtom[MaxMonoAtom];
00107 int ResMonoBond[MaxMonoBond];
00108
00109 std::vector<unsigned short> bitmasks;
00110 std::vector<bool> visits;
00111 std::vector<unsigned char> resids;
00112 std::vector<unsigned char> flags;
00113 std::vector<bool> hetflags;
00114 std::vector<int> atomids;
00115 std::vector<short> resnos;
00116 std::vector<short> sernos;
00117 std::vector<char> hcounts;
00118 std::vector<char> chains;
00119 };
00120
00121 }
00122 #endif // OB_CHAINS_H
00123

chains.h 83
Open Babel: API Documentation
This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

chains.h 84
chains.h File Reference
Parse for macromolecule chains and residues. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel

Classes
class OBChainsParser
Perceives peptide or nucleotide chains and residues in an OBMol. More...

Defines
#define MaxMonoAtom 20
#define MaxMonoBond 20

Typedefs
typedef struct Template Template

Detailed Description
Parse for macromolecule chains and residues.

chains.h File Reference 85


Open Babel: API Documentation

Define Documentation

#define MaxMonoAtom 20

#define MaxMonoBond 20

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

Define Documentation 86
What's New in Version 2.1
Throughout the API documentation, new classes and methods are indicated with a disclaimer "Since: version
2.1." Documentation, in general should be more thorough and complete.

One major change is that the library uses the same header #include paths as external code. This
documentation attempts to uniformly use the correct style, e.g.: #include <openbabel/mol.h>

Another major change was to increase the indexing of atoms and bonds. Previously only 2^16 atoms or bonds
were possible.

The OBNodeBase, OBEdgeBase, and OBGraphBase classes were deprecated. Typedef declarations provide
backwards compatibility by mapping to OBAtom, OBBond, and OBMol, respectively.

In addition, this page gives a general list of additions to the library.

• obiter.h - Additional iterators, including breadth-first and depth-first iterators for atoms in OBMol,
convenience iterators for rings, angles, torsions, and 1-4 non-bonded atom pair interactions.
• OBGenericData - Generic data is now inherited through OBBase for most types, including OBAtom,
OBBond, OBMol, OBResidue, OBReaction, and OBGrid.
• OBForceField - Generic interface to molecular mechanics force fields, including Ghemical
(Tripos-like) methods, and ultimately others such as MM2, MMFF94, etc.
• pluginiter.h - Generic interface to "plugin" classes, including force fields, and fingerprints.
• vector3 - General cleanup.
• matrix3x3 - General cleanup.
• OBMol - Copy and assignment now copy associated OBGenericData objects.
• OBResidueData - Now available for public use, rather than left as private to PDB format.
• OBSetData - Hierarchical sets of generic data.
• LineEndingExtractor - New class to correct DOS and Classic Mac line endings to UNIX-style
newline characters.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:54 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces

What's New in Version 2.1 87


Open Babel: API Documentation

• Classes
• Files

What's New in Version 2.1 88


What's New in Version 2.2
Throughout the API documentation, new classes and methods are indicated with a disclaimer "Since: version
2.2."

Several new classes have been introduced, notably

• OBPlugin - Cleaner interface to dynamic plugins, including OBFormat OBForceField,


OBFingerprint, and the new OBDescriptor and OBOp.
• SpaceGroup - Handle crystallographic space group symmetry.
• AliasData - Handle atoms which serve as "aliases" for larger fragments for example in drawing
programs - "COOH" vs. four atoms for the carboxylic acid. Currently used for MDL 2D files.
• OBGridData - Store and process numeric grid data involved with orbitals or electrostatic potential.
• OBBuilder - New class to handle generation of 3D coordinates for SMILES, InChI and other formats.
• OBForceField - Revised, improved class, including use of constraints.
• OBMoleculeFormat - Installed by default, to facilitate new format development.
• OBLocale - New class to ensure chemical data is read in the "C" numeric locale.
• OBPhModel - Now accepts pH-dependent transformations.

In addition, a wide variety of plugins are available, including MMFF94 and UFF force fields, SMARTS-based
descriptors for filtering data sets, compound descriptors such as the Lipinsky Rule of Five, and chemical
transformations.

Optional headers include integration with the Boost Graph Library.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:54 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

What's New in Version 2.2 89


chiral.cpp File Reference
Detect chiral atoms and molecules. More...

#include <openbabel/babelconfig.h>
#include <list>
#include <openbabel/mol.h>
#include <openbabel/chiral.h>
#include <openbabel/math/matrix3x3.h>

Namespaces
namespace OpenBabel

Functions
void GetChirality (OBMol &mol, std::vector< int > &chirality)
int GetParity4Ref (std::vector< unsigned int > pref)
bool CorrectChirality (OBMol &mol, OBAtom *atm, atomreftype i=input, atomreftype o=output)
double CalcSignedVolume (OBMol &mol, OBAtom *, bool ReZeroZ=true)
double signed_volume (const vector3 &a, const vector3 &b, const vector3 &c, const vector3 &d)
void GraphPotentials (OBMol &mol, std::vector< double > &pot)
void construct_g_matrix (OBMol &mol, std::vector< std::vector< double > > &m)
void construct_c_matrix (OBMol &mol, std::vector< std::vector< double > > &m)

Detailed Description
Detect chiral atoms and molecules.

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page

chiral.cpp File Reference 90


Open Babel: API Documentation
• Related Pages
• Namespaces
• Classes
• Files

Detailed Description 91
chiral.h
Go to the documentation of this file.

00001 /**********************************************************************
00002 chiral.h - Detect chiral atoms and molecules.
00003
00004 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
00005 Some portions Copyright (C) 2001-2005 by Geoffrey R. Hutchison
00006
00007 This file is part of the Open Babel project.
00008 For more information, see <http://openbabel.sourceforge.net/>
00009
00010 This program is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU General Public License as published by
00012 the Free Software Foundation version 2 of the License.
00013
00014 This program is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017 GNU General Public License for more details.
00018 ***********************************************************************/
00019
00020 #ifndef OB_CHIRAL_H
00021 #define OB_CHIRAL_H
00022
00023 #include <vector>
00024 #include <openbabel/matrix.h>
00025
00026 namespace OpenBabel
00027 {
00028 OBAPI void GraphPotentials(OBMol &mol, std::vector<double> &pot);
00029 OBAPI void construct_g_matrix(OBMol &mol, std::vector<std::vector<double> > &m);
00030 OBAPI void construct_c_matrix(OBMol &mol, std::vector<std::vector<double > > &m);
00031
00033 OBAPI double CalcSignedVolume(OBMol &mol,OBAtom*,bool ReZeroZ=true);
00034
00035 OBAPI double signed_volume(const vector3 &a, const vector3 &b, const vector3 &c, const ve
00036 OBAPI void GetChirality(OBMol &mol, std::vector<int> &chirality);
00037
00039 OBAPI int GetParity4Ref(std::vector<unsigned int> pref);
00040 OBAPI bool CorrectChirality(OBMol &mol, OBAtom *atm, atomreftype i=input, atomreftype o=o
00041 }
00042
00043 #endif // OB_CHIRAL_H
00044

This file is part of the documentation for Open Babel, version 2.2.0.

chiral.h 92
Open Babel: API Documentation
Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:50 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

chiral.h 93
chiral.h File Reference
Detect chiral atoms and molecules. More...

#include <vector>
#include <openbabel/matrix.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces
namespace OpenBabel

Functions
void GraphPotentials (OBMol &mol, std::vector< double > &pot)
void construct_g_matrix (OBMol &mol, std::vector< std::vector< double > > &m)
void construct_c_matrix (OBMol &mol, std::vector< std::vector< double > > &m)
double CalcSignedVolume (OBMol &mol, OBAtom *, bool ReZeroZ=true)
double signed_volume (const vector3 &a, const vector3 &b, const vector3 &c, const vector3 &d)
void GetChirality (OBMol &mol, std::vector< int > &chirality)
int GetParity4Ref (std::vector< unsigned int > pref)
bool CorrectChirality (OBMol &mol, OBAtom *atm, atomreftype i=input, atomreftype o=output)

Detailed Description
Detect chiral atoms and molecules.

This file is part of the documentation for Open Babel, version 2.2.0.

chiral.h File Reference 94


Open Babel: API Documentation

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:52 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Detailed Description 95
DLHandler Member List
This is the complete list of members for DLHandler, including all inherited members.

findFiles(std::vector< std::string > &file_list, const std::string &pattern, const


DLHandler [static]
std::string &path)
findFiles(std::vector< std::string > &file_list, const std::string &filename) DLHandler [static]
getConvDirectory(std::string &convPath) DLHandler [static]
getFormatFilePattern() DLHandler [static]
getSeparator() DLHandler [static]
openLib(const std::string &lib_name) DLHandler [static]
Sleep(int n) DLHandler [static]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

DLHandler Member List 96


DLHandler Class Reference
Interface for dynamic libraries. More...

#include <openbabel/dlhandler.h>

List of all members.

Static Public Member Functions


static bool getConvDirectory (std::string &convPath)
static int findFiles (std::vector< std::string > &file_list, const std::string &pattern, const std::string
&path)
static int findFiles (std::vector< std::string > &file_list, const std::string &filename)
static bool openLib (const std::string &lib_name)
static const char * getFormatFilePattern ()
static char getSeparator ()
static void Sleep (int n)

Detailed Description
Interface for dynamic libraries.

This class defines an interface for finding and opening dynamic loadable libraries on different platforms (e.g.,
modular plugins) via different source code files. It has only what is needed for OpenBabel and is not intended
to be general purpose. Internally, it is used for dynamic loading and unloading OBFormat file translation
modules.

Member Function Documentation

bool getConvDirectory ( std::string & convPath ) [static]


Provides the path from which the conversion dynamic library, (OBConv.dll in Windows) was loaded. This is
the default directory for the format files (*.obf in Windows)

Referenced by OBConversion::LoadFormatFiles().

int findFiles ( std::vector< std::string > & file_list,


const std::string & pattern,
const std::string & path
) [static]
Searches a directory specified by path for files whose name matches a pattern which can include * as a
wildcard. The path name should include a final separator (\ or /). The routine fills a vector of strings with the
matching file names (including path). Note that this is not recursive: it only matches files in the specified path.

DLHandler Class Reference 97


Open Babel: API Documentation

For example, if path = e:\path\to\ and pattern = *.obf it will return vector entries lik e:\path\to\cmlformat.obf

Returns:
the number of valid files.

Referenced by findFiles(), and OBConversion::LoadFormatFiles().

int findFiles ( std::vector< std::string > & file_list,


const std::string & filename
) [static]
Searches for files which match a full filename (including the path) which contains a wildcard. The routine
adds matching file names (including path) to a vector of strings .

Returns:
the number of matching files. If no wildcard in name adds name to vector and returns -1.

bool openLib ( const std::string & lib_name ) [static]


Open a dynamic library with path lib_name.

Referenced by OBConversion::LoadFormatFiles().

const char * getFormatFilePattern ( ) [static]

Returns:
The file extension pattern for Open Babel plugin modules (e.g. *.obf on Windows)

Referenced by OBConversion::LoadFormatFiles(), and matchFiles().

char getSeparator ( ) [static]

Returns:
The system directory separator (i.e. "\" on Windows, "/" on UNIX)

Referenced by findFiles().

void Sleep ( int n ) [static]


Call the system routine to wait (sleep) this process for n seconds.

The documentation for this class was generated from the following files:

• dlhandler.h
• dlhandler_unix.cpp
• dlhandler_win32.cpp

Member Function Documentation 98


Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 99


AliasData Member List
This is the complete list of members for AliasData, including all inherited members.

_alias AliasData [protected]


_attr OBGenericData [protected]
_expandedatoms AliasData [protected]
_source OBGenericData [protected]
_type OBGenericData [protected]
AliasData() AliasData [inline]
[inline,
Clone(OBBase *) const AliasData
virtual]
Expand(OBMol &mol, const unsigned int atomindex) AliasData
GetAlias() const AliasData [inline]
[inline,
GetAttribute() const OBGenericData
virtual]
GetDataType() const OBGenericData [inline]
GetExpandedAtoms() const AliasData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
IsExpanded() const AliasData [inline]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
SetAlias(const std::string &alias) AliasData [inline]
SetAlias(const char *alias) AliasData [inline]
SetAttribute(const std::string &v) OBGenericData [inline]
SetExpandedAtoms(std::vector< unsigned int > &atoms) AliasData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

AliasData Member List 100


Open Babel: API Documentation

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::AliasData

AliasData Member List 101


AliasData Class Reference
Indicate atoms as aliases for larger functional groups. More...

#include <openbabel/alias.h>

Inheritance diagram for AliasData:

[legend]

List of all members.

Public Member Functions


AliasData ()
virtual OBGenericData * Clone (OBBase *) const
void SetAlias (const std::string &alias)
void SetAlias (const char *alias)
std::string GetAlias () const
void SetExpandedAtoms (std::vector< unsigned int > &atoms)
std::vector< unsigned int > GetExpandedAtoms () const
bool IsExpanded () const
bool Expand (OBMol &mol, const unsigned int atomindex)
void SetAttribute (const std::string &v)
void SetOrigin (const DataOrigin s)
virtual const std::string & GetAttribute () const
unsigned int GetDataType () const
virtual const std::string & GetValue () const
virtual DataOrigin GetOrigin () const

Protected Attributes
std::string _alias
std::vector< unsigned int > _expandedatoms
std::string _attr
unsigned int _type
DataOrigin _source

AliasData Class Reference 102


Open Babel: API Documentation

Detailed Description
Indicate atoms as aliases for larger functional groups.

Since:
version 2.2

An object of this class can be attached to an OBAtom if it is considered to be a placeholder for an alias, such
as Ph, Ser, etc.

If the alias has not been interpreted chemically, the element type of the placeholder atom should be set to Xx
so that the molecule is not interpreted incorrectly by formats which do not consider this class.

If the alias has been interpreted chemically, the alias may remain as extra information or as a hint for an
alternative representation, for example to a chemical drawing program. The _expandedatoms vector would
then contains the indices of the atoms to which the alias is an alternative.

Constructor & Destructor Documentation

AliasData ( ) [inline]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

void SetAlias ( const std::string & alias ) [inline]


Add an alias.

void SetAlias ( const char * alias ) [inline]

const
std::string GetAlias ( )
[inline]
Return value of alias.

void SetExpandedAtoms ( std::vector< unsigned int > & atoms ) [inline]


Add the indices of the atoms that could or do replace the alias.

std::vector<unsigned int> GetExpandedAtoms ( ) const [inline]


Return the indices of the atoms that the alias could or does replace.

Detailed Description 103


Open Babel: API Documentation

bool IsExpanded ( ) const [inline]

bool Expand ( OBMol & mol,


const unsigned int atomindex
)

[inline,
void SetAttribute ( const std::string & v )
inherited]
Set the attribute (key), which can be used to retrieve this data.

Referenced by OBGastChrg::AssignPartialCharges(), OBForceField::GetAtomTypes(),


OBMol::GetFormula(), OBForceField::GetPartialCharges(), OBDescriptor::PredictAndSave(), and
OBMol::SetFormula().

[inline,
void SetOrigin ( const DataOrigin s )
inherited]
Set the origin of this data, which can be used to filter the data.

Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(),


OBMol::FindAngles(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(),
OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().

const [inline, virtual,


virtual const std::string& GetAttribute ( )
inherited]

Returns:
The attribute (key), which can be used to retrieve this data

Referenced by OBMoleculeFormat::MakeCombinedMolecule().

unsigned int GetDataType ( ) const [inline, inherited]

Returns:
the data type for this object as defined in OBGenericDataType

virtual const std::string& GetValue ( ) const [inline, virtual, inherited]


Base class returns a default value (the attribute type) but should never be called.

Reimplemented in OBCommentData, and OBPairData.

Referenced by OBDescriptor::FilterCompare(), and OBDescriptor::GetValues().

Member Function Documentation 104


Open Babel: API Documentation

virtual DataOrigin GetOrigin ( ) const [inline, virtual, inherited]

Member Data Documentation

std::string _alias [protected]

Referenced by AliasData::Expand().

std::vector<unsigned int> _expandedatoms [protected]

Referenced by AliasData::Expand().

std::string _attr [protected, inherited]


attribute tag (e.g., "UnitCell", "Comment" or "Author")

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

unsigned int _type [protected, inherited]


attribute type -- declared for each subclass

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

DataOrigin _source [protected, inherited]


source of data for accounting

Referenced by OBChiralData::operator=(), OBTorsionData::operator=(), OBAngleData::operator=(),


OBConformerData::operator=(), and OBSymmetryData::operator=().

The documentation for this class was generated from the following files:

• alias.h
• alias.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Member Data Documentation 105


Open Babel: API Documentation

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 106


FastSearch Member List
This is the complete list of members for FastSearch, including all inherited members.

Find(OBBase *pOb, std::vector< unsigned int > &SeekPositions, unsigned


FastSearch
int MaxCandidates)
FindMatch(OBBase *pOb, std::vector< unsigned int > &SeekPositions,
FastSearch
unsigned int MaxCandidates)
FindSimilar(OBBase *pOb, std::multimap< double, unsigned int >
FastSearch
&SeekposMap, double MinTani)
FindSimilar(OBBase *pOb, std::multimap< double, unsigned int >
FastSearch
&SeekposMap, int nCandidates=0)
GetFingerprint() const FastSearch [inline]
GetIndexHeader() const FastSearch [inline]
ReadIndex(std::istream *pIndexstream) FastSearch
ReadIndexFile(std::string IndexFilename) FastSearch
[inline,
~FastSearch() FastSearch
virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::FastSearch

FastSearch Member List 107


FastSearch Class Reference
Class to search fingerprint index files. More...

#include <openbabel/fingerprint.h>

List of all members.

Public Member Functions


std::string ReadIndexFile (std::string IndexFilename)
std::string ReadIndex (std::istream *pIndexstream)
virtual ~FastSearch ()
bool Find (OBBase *pOb, std::vector< unsigned int > &SeekPositions, unsigned int
MaxCandidates)
bool FindMatch (OBBase *pOb, std::vector< unsigned int > &SeekPositions, unsigned
int MaxCandidates)
bool FindSimilar (OBBase *pOb, std::multimap< double, unsigned int > &SeekposMap,
double MinTani)
bool FindSimilar (OBBase *pOb, std::multimap< double, unsigned int > &SeekposMap,
int nCandidates=0)
OBFingerprint * GetFingerprint () const
const FptIndexHeader & GetIndexHeader () const

Detailed Description
Class to search fingerprint index files.

The FastSearch class searches an index to a datafile containing a list of molecules (or other objects) prepared
by FastSearchIndexer.

OpenBabel can also search files for molecules containing a substructure specified by a SMARTS string, using
OBSmartsPattern or from the command line:

babel datafile.xxx -outfile.yyy -sSMARTS

But when the data file contains more than about 10,000 molecules this becomes rather too slow to be used
interactively. To do it more quickly, an index of the molecules containing their fingerprints (see
OBFingerprint) is prepared using FastSearchIndexer. The indexing process may take a long time but only has
to be done once. The index can be searched very quickly with FastSearch. Because of the nature of
fingerprints a match to a bit does not guarantee the presence of a particular substructure or other molecular
property, so that a definitive answer may require a subsequent search of the (much reduced) list of candidates
by another method (like OBSmartsPattern).

Note that the index files are not portable. They need to be prepared on the computer that will access them.

FastSearch Class Reference 108


Open Babel: API Documentation
Using FastSearch and FastSearchIndexer in a program

The index has two tables:

• an array of fingerprints of the molecules


• an array of the seek positions in the datasource file of all the molecules

To prepare an fastsearch index file:

• Open an ostream to the index file.


• Make a FastSearchIndexer object on the heap or the stack, passing in as parameters:
• the datafile name, the indexfile stream,
• the id of the fingerprint type to be used,
• the number of bits the fingerprint is to be folded down to, If it is to be left unfolded, set fpid to 0 or do
not specify it.

• For each molecule, call Add() with its pointer and its position in the datafile.
Currently the std::streampos value is implicitly cast to unsigned int so that for 32bit machines the
datafile has to be no longer than about 2Gbyte.
• The index file is written when the FastSearchIndexer object is deleted or goes out of scope.

To search in a fastsearch index file

• Open a std::istream to the indexfile (in binary mode on some systems)


• Make a FastSearch object, read the index and open the datafile whose name it provides
ifstream ifs(indexname,ios::binary);
FastSearch fs;
string datafilename = fs.ReadIndex(&ifs);
if(datafilename.empty()
return false;

ifstream datastream(datafilename);
if(!datastream)
return false;

To do a search for molecules which have all the substructure bits the OBMol object, patternMol

vector<unsigned int>& SeekPositions;


if(!fs.Find(patternMol, SeekPositions, MaxCandidates))
for(itr=SeekPositions.begin();itr!=SeekPositions.end();++itr)
{
datastream.seekg(*itr);
... read the candidate molecule
and subject to more rigorous test if necessary
}

To do a similarity search based on the Tanimoto coefficient This is defined as:


Number of bits set in (patternFP & targetFP)/Number of bits in (patternFP | targetFP)
where the boolean operations between the fingerprints are bitwise
The Tanimoto coefficient has no absolute meaning and depends on the design of the fingerprint.

multimap<double, unsigned int> SeekposMap;


// to find n best molecules
fs.FindSimilar(&patternMol, SeekposMap, n);

Using FastSearch and FastSearchIndexer in a program 109


Open Babel: API Documentation
...or
// to find molecules with Tanimoto coefficient > MinTani
fs.FindSimilar(&patternMol, SeekposMap, MinTani);

multimap<double, unsigned int>::reverse_iterator itr;


for(itr=SeekposMap.rbegin();itr!=SeekposMap.rend();++itr)
{
datastream.seekg(itr->second);
// ... read the candidate molecule
double tani = itr->first;
}

The FastSearchFormat class facilitates the use of these routine from the command line or other front end
program. For instance:

Prepare an index:

babel datafile.xxx index.fs

or

babel datafile.xxx -ofs namedindex

With options you can specify:

• which type of fingerprint to be used, e.g. -xfFP2,


• whether it is folded to a specified number of bits, e.g. -xn128 (which should be a power of2)
• whether to pre-select the molecules which are indexed:
• by structure e.g only ethers and esters, -sCOC
• by excluding molecules with bezene rings, -vc1ccccc1
• by position in the datafile e.g. only mols 10 to 90, -f10 -l90

Substructure search in a previously prepared index file

babel index.fs outfile.yyy -sSMILES

The datafile can also be used as the input file, provided the input format is specified as fs

babel datafile.xxx outfile.yyy -sSMILES -ifs

A "slow" search not using fingerprints would be done on the same data by omitting -ifs. A "slow" search can
use SMARTS strings, but the fast search is restricted to the subset which is valid SMILES.

With the -S option, the target can be specified as a molecule in a file of any format

babel datafile.xxx outfile.yyy -Spattern_mol.zzz -ifs

These searches have two stages: a fingerprint search which produces a number of candidate molecules and a
definitive search which selects from these using SMARTS pattern matching. The maximum number of
candidates is 4000 by default but you can change this with an option e.g. -al 8000 (Note that you need the
space between l and the number.) If the fingerprint search reaches the maximum number it will not look
further and will tell you at what stage it stopped.

Using FastSearch and FastSearchIndexer in a program 110


Open Babel: API Documentation

Similarity search in a previously prepared index file


This rather done (rather than a substructure search) if the -at option is used,

babel datafile.xxx outfile.yyy -sSMILES -ifs -at0.7

for instance

• -at0.7 will recover all molecules with Tanimoto greater than 0.7
• -at15 (no decimal point) will recover the 15 molecules with largest coefficients.
• -aa will add the Tanimoto coefficient to the titles of the output molecules.

All stages, the indexing, the interpretation of the SMILES string in the -s option, the file in the -S option and
the final SMARTS filter convert to OBMol and apply ConvertDativeBonds(). This ensures thatforms such
as[N+]([O-])=O and N(=O)=O are recognized as chemically identical.

Constructor & Destructor Documentation

virtual ~FastSearch ( ) [inline, virtual]

Member Function Documentation

string ReadIndexFile ( std::string IndexFilename )


Loads an index from a file and returns the name of the datafile.

string ReadIndex ( std::istream * pIndexstream )

Referenced by FastSearch::ReadIndexFile().

bool Find ( OBBase * pOb,


std::vector< unsigned int > & SeekPositions,
unsigned int MaxCandidates
)
Does substructure search and returns vector of the file positions of matches.

Finds chemical objects in datafilename (which must previously have been indexed) that have all the same bits
set in their fingerprints as in the fingerprint of a pattern object. (Usually a substructure search in molecules.)
The type of fingerprint and its degree of folding does not have to be specified here because the values in the
index file are used. The positions of the candidate matching molecules in the original datafile are returned.

bool FindMatch ( OBBase * pOb,


std::vector< unsigned int > & SeekPositions,
unsigned int MaxCandidates

Constructor & Destructor Documentation 111


Open Babel: API Documentation

)
Similar to Find() but all bits of matching fingerprints have to be the same.

Since:
version 2.1

bool FindSimilar ( OBBase * pOb,


std::multimap< double, unsigned int > & SeekposMap,
double MinTani
)

Returns:
A multimap containing objects whose Tanimoto coefficients with the target is greater than the value
specified.

bool FindSimilar ( OBBase * pOb,


std::multimap< double, unsigned int > & SeekposMap,
int nCandidates = 0
)

Returns:
A multimap containing the nCandidates objects with largest Tanimoto coefficients with the target.

If nCandidates is zero or omitted the original size of the multimap is used

OBFingerprint* GetFingerprint ( ) const [inline]

Returns:
a pointer to the fingerprint type used to constuct the index

const FptIndexHeader& GetIndexHeader ( ) const [inline]

Returns:
a pointer to the index header containing size info etc.

The documentation for this class was generated from the following files:

• fingerprint.h
• fingerprint.cpp

Member Function Documentation 112


Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 113


FastSearchIndexer Member List
This is the complete list of members for FastSearchIndexer, including all inherited members.

Add(OBBase *pOb, std::streampos


FastSearchIndexer
seekpos)
FastSearchIndexer(std::string
&datafilename, std::ostream *os, std::string FastSearchIndexer
&fpid, int FptBits=0)
FastSearchIndexer(FptIndex *pindex,
FastSearchIndexer
std::ostream *os)
~FastSearchIndexer() FastSearchIndexer

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::FastSearchIndexer

FastSearchIndexer Member List 114


FastSearchIndexer Class Reference
Class to prepare fingerprint index files See FastSearch class for details. More...

#include <openbabel/fingerprint.h>

List of all members.

Public Member Functions


FastSearchIndexer (std::string &datafilename, std::ostream *os, std::string &fpid, int FptBits=0)
FastSearchIndexer (FptIndex *pindex, std::ostream *os)
~FastSearchIndexer ()
bool Add (OBBase *pOb, std::streampos seekpos)

Detailed Description
Class to prepare fingerprint index files See FastSearch class for details.

Constructor & Destructor Documentation

FastSearchIndexer ( std::string & datafilename,


std::ostream * os,
std::string & fpid,
int FptBits = 0
)
Constructor with a new index.

Starts indexing process

FastSearchIndexer ( FptIndex * pindex,


std::ostream * os
)
Constructor using existing index.

~FastSearchIndexer ( )

Saves index file

FastSearchIndexer Class Reference 115


Open Babel: API Documentation

Member Function Documentation

bool Add ( OBBase * pOb,


std::streampos seekpos
)
Called for each object.

Adds a fingerprint

The documentation for this class was generated from the following files:

• fingerprint.h
• fingerprint.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 116


FilteringInputStreambuf Member List
This is the complete list of members for FilteringInputStreambuf, including all inherited members.

FilteringInputStreambuf(std::streambuf *source=NULL, bool


FilteringInputStreambuf [inline]
deleteWhenFinished=false)
GetSource() const FilteringInputStreambuf [inline]
[inline,
overflow(int) FilteringInputStreambuf
virtual]
seekoff(std::streamoff off, std::ios_base::seekdir way,
[inline,
std::ios_base::openmode FilteringInputStreambuf
virtual]
which=std::ios_base::in|std::ios_base::out)
seekpos(std::streampos sp, std::ios_base::openmode [inline,
FilteringInputStreambuf
which=std::ios_base::in|std::ios_base::out) virtual]
SetSource(std::streambuf *newsource) FilteringInputStreambuf [inline]
[inline,
sync() FilteringInputStreambuf
virtual]
[inline,
underflow() FilteringInputStreambuf
virtual]
[inline,
~FilteringInputStreambuf() FilteringInputStreambuf
virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

FilteringInputStreambuf Member List 117


Open Babel: API Documentation

OpenBabel::FilteringInputStreambuf

FilteringInputStreambuf Member List 118


FilteringInputStreambuf Class Template Reference
Delivers characters from an istream or streambuf from a source while filtering. More...

#include <openbabel/lineend.h>

List of all members.

Public Member Functions


FilteringInputStreambuf (std::streambuf *source=NULL, bool
deleteWhenFinished=false)
virtual ~FilteringInputStreambuf ()
virtual int overflow (int)
virtual int underflow ()
virtual int sync ()
virtual std::streampos seekoff (std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode
which=std::ios_base::in|std::ios_base::out)
virtual std::streampos seekpos (std::streampos sp, std::ios_base::openmode
which=std::ios_base::in|std::ios_base::out)
std::streambuf * GetSource () const
void SetSource (std::streambuf *newsource)

Detailed Description
template<class Extractor>
class OpenBabel::FilteringInputStreambuf< Extractor >

Delivers characters from an istream or streambuf from a source while filtering.

Based on an article by James Kanze, "Filtering Streambufs" http://kanze.james.neuf.fr/articles/fltrsbf1.html

A FilteringInputStreambuf delivers characters on request to an istream or a destination rdbuf(). It receives


them from a source rdbuf. In doing the transfer it filters them in a way decided by the class specified in
template parameter Extractor.

seekg and tellg requests from the stream are passed through to source rdbuf. This allows return to a position in
the input data that was previously noted. This is adequate to allow OpenBabel's fastsearch indexing, but may
not be good enough for some other applications that use random access.

A class LineEndingExtractor converts DOS and MAC line endings to the UNIX line ending.

This filtering process is potentially extendable, with a chain of FilteringInputStreambufs each carrying out its
filtering task. For instance a decompression streambuf could feed a LineEnding filter, which in tern was read
by an input stream.

FilteringInputStreambuf Class Template Reference 119


Open Babel: API Documentation

Constructor & Destructor Documentation

FilteringInputStreambuf ( std::streambuf * source = NULL,


bool deleteWhenFinished = false
) [inline]

[inline,
virtual ~FilteringInputStreambuf ( )
virtual]

Member Function Documentation

[inline,
virtual int overflow ( int )
virtual]

int underflow ( ) [inline, virtual]

int sync ( ) [inline, virtual]

virtual
std::streampos ( std::streamoff off,
seekoff
std::ios_base::seekdir way,
which =
std::ios_base::openmode
std::ios_base::in | std::ios_base::out
[inline,
)
virtual]

virtual
std::streampos ( std::streampos sp,
seekpos
which =
std::ios_base::openmode
std::ios_base::in | std::ios_base::out
[inline,
)
virtual]

const
std::streambuf* GetSource ( )
[inline]
Returns current source.

Constructor & Destructor Documentation 120


Open Babel: API Documentation

void SetSource ( std::streambuf * newsource ) [inline]


Changes the source.

The documentation for this class was generated from the following file:

• lineend.h

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 121


GasteigerState Member List
This is the complete list of members for GasteigerState, including all inherited members.

a GasteigerState
b GasteigerState
c GasteigerState
chi GasteigerState
denom GasteigerState
GasteigerState() GasteigerState
q GasteigerState
SetValues(double _a, double _b, double _c, double _q) GasteigerState [inline]
~GasteigerState() GasteigerState [inline]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::GasteigerState

GasteigerState Member List 122


GasteigerState Class Reference
Helper class for OBGastChrg which stores the Gasteiger states of a given atom. More...

#include <openbabel/molchrg.h>

List of all members.

Public Member Functions


GasteigerState ()
~GasteigerState ()
void SetValues (double _a, double _b, double _c, double _q)

Public Attributes
double a
double b
double c
double denom
double chi
double q

Detailed Description
Helper class for OBGastChrg which stores the Gasteiger states of a given atom.

Constructor & Destructor Documentation

GasteigerState ( )

~GasteigerState ( ) [inline]

Member Function Documentation

void SetValues ( double _a,


double _b,
double _c,
double _q
) [inline]

GasteigerState Class Reference 123


Open Babel: API Documentation

Member Data Documentation

double a

double b

double c

double denom

Referenced by GasteigerState::GasteigerState().

double chi

Referenced by GasteigerState::GasteigerState().

double q

Referenced by GasteigerState::GasteigerState().

The documentation for this class was generated from the following files:

• molchrg.h
• molchrg.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages

Member Data Documentation 124


Open Babel: API Documentation
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 125


LineEndingExtractor Member List
This is the complete list of members for LineEndingExtractor, including all inherited members.

finalize(std::streambuf &) LineEndingExtractor [inline]


operator()(std::streambuf &src) LineEndingExtractor [inline]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::LineEndingExtractor

LineEndingExtractor Member List 126


LineEndingExtractor Class Reference
Replaces CRLF (DOS) and CR (Mac OS 9) line endings by LF (POSIX). More...

#include <openbabel/lineend.h>

List of all members.

Public Member
Functions
int operator() (std::streambuf &src)
void finalize (std::streambuf &)

Detailed Description
Replaces CRLF (DOS) and CR (Mac OS 9) line endings by LF (POSIX).

Member Function Documentation

std::streambuf
int operator() ( src ) [inline]
&

void finalize ( std::streambuf & ) [inline]

The documentation for this class was generated from the following file:

• lineend.h

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:

LineEndingExtractor Class Reference 127


Open Babel: API Documentation

Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 128


OBAngle Member List
This is the complete list of members for OBAngle, including all inherited members.

_radians OBAngle [protected]


_termini OBAngle [protected]
_vertex OBAngle [protected]
Clear() OBAngle
GetAngle() const OBAngle [inline]
GetAtoms() OBAngle [protected]
OBAngle() OBAngle [protected]
OBAngle(OBAtom *vertex, OBAtom *a, OBAtom *b) OBAngle [protected]
OBAngle(const OBAngle &) OBAngle
OBAngleData class OBAngle [friend]
OBMol class OBAngle [friend]
operator=(const OBAngle &) OBAngle
operator==(const OBAngle &) OBAngle
SetAngle(double angle) OBAngle [inline]
SetAtoms(OBAtom *vertex, OBAtom *a, OBAtom *b) OBAngle
SetAtoms(triple< OBAtom *, OBAtom *, OBAtom * > &atoms) OBAngle
SortByIndex() OBAngle [protected]
~OBAngle() OBAngle [inline]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List

OBAngle Member List 129


Open Babel: API Documentation
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBAngle

OBAngle Member List 130


OBAngle Class Reference
Used to hold the 3 atoms in an angle and the angle itself. More...

#include <openbabel/generic.h>

List of all members.

Public Member Functions


OBAngle (const OBAngle &)
~OBAngle ()
OBAngle & operator= (const OBAngle &)
bool operator== (const OBAngle &)
void Clear ()
double GetAngle () const
void SetAngle (double angle)
void SetAtoms (OBAtom *vertex, OBAtom *a, OBAtom *b)
void SetAtoms (triple< OBAtom *, OBAtom *, OBAtom * > &atoms)

Protected Member Functions


OBAngle ()
OBAngle (OBAtom *vertex, OBAtom *a, OBAtom *b)
triple< OBAtom *, OBAtom
*, OBAtom * > GetAtoms ()
void SortByIndex ()

Protected Attributes
OBAtom * _vertex
std::pair< OBAtom *, OBAtom * > _termini
double _radians

Friends
class OBMol
class OBAngleData

Detailed Description
Used to hold the 3 atoms in an angle and the angle itself.

OBAngle Class Reference 131


Open Babel: API Documentation

Constructor & Destructor Documentation

OBAngle ( ) [protected]
Angle default constructor.

OBAngle ( OBAtom * vertex,


OBAtom * a,
OBAtom * b
) [protected]
Angle constructor.

OBAngle ( const OBAngle & src )


OBAngle copy constructor.

~OBAngle ( ) [inline]

Member Function Documentation

triple< OBAtom *,
OBAtom *,
( ) [protected]
OBAtom * >
GetAtoms
Retrieves the 3 atom pointer for the angle (vertex first).

Returns:
triple of OBAtom pointers

void SortByIndex ( ) [protected]


sorts atoms in angle by order of indices

Referenced by OBAngle::OBAngle(), and OBAngle::SetAtoms().

OBAngle & operator= ( const OBAngle & src )


OBAngle assignment operator.

const
bool operator== ( OBAngle other )
&
OBAngle equality operator, is same angle, NOT same value.

Constructor & Destructor Documentation 132


Open Babel: API Documentation

Returns:
boolean equality

void Clear ( void )


Return OBAngle to its original state.

Referenced by OBMol::FindAngles().

double GetAngle ( ) const [inline]


Gets the OBAngle angle value

Returns:
angle in radians

void SetAngle ( double angle ) [inline]


Sets the OBAngle to radians

Parameters:
angle in radians

void SetAtoms ( OBAtom * vertex,


OBAtom * a,
OBAtom * b
)
Sets the 3 atoms in the angle Parameters are pointers to each OBAtom.

Referenced by OBMol::FindAngles().

void SetAtoms ( triple< OBAtom *, OBAtom *, OBAtom * > & atoms )


Sets the 3 atoms in the angle.

Parameters:
atoms a triple of OBAtom pointers, the first must be the vertex

Friends And Related Function Documentation

friend class OBMol [friend]

friend class OBAngleData [friend]

Member Function Documentation 133


Open Babel: API Documentation

Member Data Documentation

OBAtom* _vertex [protected]

Referenced by OBAngle::Clear(), OBAngle::GetAtoms(), OBAngle::operator=(), OBAngle::operator==(),


and OBAngle::SetAtoms().

std::pair<OBAtom*,OBAtom*> _termini [protected]

Referenced by OBAngle::Clear(), OBAngle::GetAtoms(), OBAngle::operator=(), OBAngle::operator==(),


OBAngle::SetAtoms(), and OBAngle::SortByIndex().

double _radians [protected]

Referenced by OBAngle::Clear(), and OBAngle::operator=().

The documentation for this class was generated from the following files:

• generic.h
• generic.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy

Member Data Documentation 134


Open Babel: API Documentation

• Class Members

Member Data Documentation 135


OBAngleData Member List
This is the complete list of members for OBAngleData, including all inherited members.

_angles OBAngleData [protected]


_attr OBGenericData [protected]
_source OBGenericData [protected]
_type OBGenericData [protected]
Clear() OBAngleData
[inline,
Clone(OBBase *) const OBAngleData
virtual]
FillAngleArray(int **angles, unsigned int &size) OBAngleData
FillAngleArray(std::vector< std::vector< unsigned int > > &angles) OBAngleData
[inline,
GetAttribute() const OBGenericData
virtual]
[inline,
GetData() const OBAngleData
protected]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
GetSize() const OBAngleData [inline]
[inline,
GetValue() const OBGenericData
virtual]
OBAngleData() OBAngleData [protected]
OBAngleData(const OBAngleData &) OBAngleData [protected]
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBMol class OBAngleData [friend]
operator=(const OBAngleData &) OBAngleData
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(OBAngle &) OBAngleData
SetOrigin(const DataOrigin s) OBGenericData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

OBAngleData Member List 136


Open Babel: API Documentation

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBAngleData

OBAngleData Member List 137


OBAngleData Class Reference
Used to hold all angles in a molecule as generic data for OBMol. More...

#include <openbabel/generic.h>

Inheritance diagram for OBAngleData:

[legend]

List of all members.

Public Member Functions


OBAngleData & operator= (const OBAngleData &)
virtual OBGenericData * Clone (OBBase *) const
void Clear ()
unsigned int FillAngleArray (int **angles, unsigned int &size)
bool FillAngleArray (std::vector< std::vector< unsigned int > > &angles)
void SetData (OBAngle &)
unsigned int GetSize () const
void SetAttribute (const std::string &v)
void SetOrigin (const DataOrigin s)
virtual const std::string & GetAttribute () const
unsigned int GetDataType () const
virtual const std::string & GetValue () const
virtual DataOrigin GetOrigin () const

Protected Member Functions


OBAngleData ()
OBAngleData (const OBAngleData &)
std::vector< OBAngle > GetData () const

Protected Attributes
std::vector< OBAngle > _angles
std::string _attr
unsigned int _type
DataOrigin _source

OBAngleData Class Reference 138


Open Babel: API Documentation

Friends
class OBMol

Detailed Description
Used to hold all angles in a molecule as generic data for OBMol.

Constructor & Destructor Documentation

OBAngleData ( ) [protected]
OBAngleData constructor.

OBAngleData ( const OBAngleData & src ) [protected]


OBAngleData copy constructor.

Member Function Documentation

std::vector<OBAngle> GetData ( ) const [inline, protected]


Gets the angle vector data.

Returns:
a vector<OBAngle>

OBAngleData & operator= ( const OBAngleData & src )


OBAngleData assignment operator.

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

void Clear ( void )


sets OBAngleData to its original state

unsigned int FillAngleArray ( int ** angles,


unsigned int & size
)
Fills an array with the indices of the atoms in the angle (vertex first).

Parameters:

Friends 139
Open Babel: API Documentation

angles pointer to the pointer to an array of angles atom indices


size the current number of rows in the array

Returns:
int The number of angles

Referenced by OBMolAngleIter::OBMolAngleIter().

bool FillAngleArray ( std::vector< std::vector< unsigned int > > & angles )
Fills an array with the indices of the atoms in the angle (vertex first).

Parameters:
angles pointer to the pointer to an array of angles atom indices

Returns:
True if successful

void SetData ( OBAngle & angle )


Adds a new angle to OBAngleData.

Referenced by OBMol::FindAngles().

unsigned int GetSize ( ) const [inline]


Gets the number of angles stored

Returns:
integer count of the number of angles

[inline,
void SetAttribute ( const std::string & v )
inherited]
Set the attribute (key), which can be used to retrieve this data.

Referenced by OBGastChrg::AssignPartialCharges(), OBForceField::GetAtomTypes(),


OBMol::GetFormula(), OBForceField::GetPartialCharges(), OBDescriptor::PredictAndSave(), and
OBMol::SetFormula().

[inline,
void SetOrigin ( const DataOrigin s )
inherited]
Set the origin of this data, which can be used to filter the data.

Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(),


OBMol::FindAngles(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(),
OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().

Member Function Documentation 140


Open Babel: API Documentation

const [inline, virtual,


virtual const std::string& GetAttribute ( )
inherited]

Returns:
The attribute (key), which can be used to retrieve this data

Referenced by OBMoleculeFormat::MakeCombinedMolecule().

unsigned int GetDataType ( ) const [inline, inherited]

Returns:
the data type for this object as defined in OBGenericDataType

virtual const std::string& GetValue ( ) const [inline, virtual, inherited]


Base class returns a default value (the attribute type) but should never be called.

Reimplemented in OBCommentData, and OBPairData.

Referenced by OBDescriptor::FilterCompare(), and OBDescriptor::GetValues().

virtual DataOrigin GetOrigin ( ) const [inline, virtual, inherited]

Friends And Related Function Documentation

friend class OBMol [friend]

Member Data Documentation

std::vector<OBAngle> _angles [protected]

Referenced by OBAngleData::Clear(), OBAngleData::FillAngleArray(), OBAngleData::operator=(), and


OBAngleData::SetData().

std::string _attr [protected, inherited]


attribute tag (e.g., "UnitCell", "Comment" or "Author")

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

unsigned int _type [protected, inherited]


attribute type -- declared for each subclass

Friends And Related Function Documentation 141


Open Babel: API Documentation

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

DataOrigin _source [protected, inherited]


source of data for accounting

Referenced by OBChiralData::operator=(), OBTorsionData::operator=(), OBAngleData::operator=(),


OBConformerData::operator=(), and OBSymmetryData::operator=().

The documentation for this class was generated from the following files:

• generic.h
• generic.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 142


OBAromaticTyper Member List
This is the complete list of members for OBAromaticTyper, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
AssignAromaticFlags(OBMol &) OBAromaticTyper
CheckAromaticity(OBAtom *root, int searchDepth) OBAromaticTyper
ExcludeSmallRing(OBMol &) OBAromaticTyper
[inline,
GetSize() OBAromaticTyper
virtual]
Init() OBGlobalDataBase
OBAromaticTyper() OBAromaticTyper
OBGlobalDataBase() OBGlobalDataBase [inline]
ParseLine(const char *) OBAromaticTyper [virtual]
PropagatePotentialAromatic(OBAtom *) OBAromaticTyper
SelectRootAtoms(OBMol &, bool avoidInnerRingAtoms=true) OBAromaticTyper
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
TraverseCycle(OBAtom *root, OBAtom *atom, OBBond *prev,
OBAromaticTyper
std::pair< int, int > &er, int depth)
~OBAromaticTyper() OBAromaticTyper
[inline,
~OBGlobalDataBase() OBGlobalDataBase
virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:58 2008 by 1.5.6.

OBAromaticTyper Member List 143


Open Babel: API Documentation
• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBAromaticTyper

OBAromaticTyper Member List 144


OBAromaticTyper Class Reference
Assigns aromatic typing to atoms and bonds. More...

#include <openbabel/typer.h>

Inheritance diagram for OBAromaticTyper:

[legend]

List of all members.

Public Member Functions


OBAromaticTyper ()
~OBAromaticTyper ()
unsigned int GetSize ()
void ParseLine (const char *)
void AssignAromaticFlags (OBMol &)
void PropagatePotentialAromatic (OBAtom *)
void SelectRootAtoms (OBMol &, bool avoidInnerRingAtoms=true)
void ExcludeSmallRing (OBMol &)
void CheckAromaticity (OBAtom *root, int searchDepth)
bool TraverseCycle (OBAtom *root, OBAtom *atom, OBBond *prev, std::pair< int, int > &er, int
depth)
void Init ()
void SetReadDirectory (char *dir)
void SetEnvironmentVariable (char *var)

Protected Attributes
bool _init
const char * _dataptr
std::string _filename
std::string _dir
std::string _subdir
std::string _envvar

OBAromaticTyper Class Reference 145


Open Babel: API Documentation

Detailed Description
Assigns aromatic typing to atoms and bonds.

The OBAromaticTyper class is designed to read in a list of aromatic perception rules and apply them to
molecules. The code that performs typing is not usually used directly -- it is usually done automatically when
their corresponding values are requested of atoms or bonds.

atom->IsAromatic();
bond->IsAromatic();
bond->IsDouble(); // needs to check aromaticity and define Kekule structures

Constructor & Destructor Documentation

OBAromaticTyper ( )

~OBAromaticTyper ( )

Member Function Documentation

unsigned int GetSize ( ) [inline, virtual]

Returns:
the number of SMARTS patterns

Reimplemented from OBGlobalDataBase.

void ParseLine ( const char * ) [virtual]


Specified by particular table classes (parses an individual data line).

Reimplemented from OBGlobalDataBase.

OBMol
void AssignAromaticFlags ( mol )
&
Assign aromaticity flag to atoms and bonds.

Referenced by OBAtomTyper::AssignHyb(), OBBond::IsAromatic(), OBAtom::IsAromatic(),


OBBond::IsDouble(), OBBond::IsSingle(), and OBBond::IsTriple().

void PropagatePotentialAromatic ( OBAtom * atom )


"Anti-alias" potentially aromatic flags around a molecule (aromatic atoms need to have >= 2 neighboring ring
atoms)

Detailed Description 146


Open Babel: API Documentation

Referenced by OBAromaticTyper::AssignAromaticFlags().

void SelectRootAtoms ( OBMol & mol,


bool avoidInnerRingAtoms = true
)
Select the root atoms for traversing atoms in rings.

Picking only the begin atom of a closure bond can cause difficulties when the selected atom is an inner atom
with three neighbour ring atoms. Why ? Because this atom can get trapped by the other atoms when
determining aromaticity, because a simple visited flag is used in the OBAromaticTyper::TraverseCycle()
method.

Ported from JOELib, copyright Joerg Wegner, 2003 under the GPL version 2

Parameters:
mol the molecule
avoidInnerRingAtoms inner closure ring atoms with more than 2 neighbours will be avoided

Referenced by OBAromaticTyper::AssignAromaticFlags().

OBMol
void ExcludeSmallRing ( mol )
&
Remove 3-member rings from consideration.

Referenced by OBAromaticTyper::AssignAromaticFlags().

void CheckAromaticity ( OBAtom * root,


int searchDepth
)
Check aromaticity starting from the root atom, up to a specified depth.

Referenced by OBAromaticTyper::AssignAromaticFlags().

bool TraverseCycle ( OBAtom * root,


OBAtom * atom,
OBBond * prev,
std::pair< int, int > & er,
int depth
)
Traverse a potentially aromatic cycle starting at root.

Returns:
True if the cycle is likely aromatic

Member Function Documentation 147


Open Babel: API Documentation

Parameters:
root The initial, "root" atom in traversing this ring
atom The current atom to visit and check
prev The bond traversed in moving to this atom
er The min and max number of pi electrons for this ring
depth The maximum number of atoms to visit in a ring (e.g., 6)

This method traverses a potentially aromatic ring, adding up the possible pi electrons for each atom. At the
end (e.g., when atom == root) the Huekel 4n+2 rule is checked to see if there is a possible electronic
configuration which corresponds to aromaticity.

Referenced by OBAromaticTyper::CheckAromaticity().

void Init ( ) [inherited]


Read in the data file, falling back as needed.

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(),


OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(),
OBAtomTyper::AssignImplicitValence(), OBPhModel::AssignSeedPartialCharge(),
OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(), OBAtomTyper::CorrectAromaticNitrogens(),
OBElementTable::CorrectedBondRad(), OBElementTable::CorrectedVdwRad(),
OBPhModel::CorrectForPH(), OBElementTable::GetAllredRochowElectroNeg(),
OBElementTable::GetAtomicNum(), OBElementTable::GetCovalentRad(),
OBElementTable::GetElectronAffinity(), OBElementTable::GetElectroNeg(),
OBIsotopeTable::GetExactMass(), OBTypeTable::GetFromType(), OBElementTable::GetIonization(),
OBElementTable::GetMass(), OBElementTable::GetMaxBonds(), OBElementTable::GetName(),
OBElementTable::GetNumberOfElements(), OBElementTable::GetRGB(),
OBRotorRules::GetRotorIncrements(), OBElementTable::GetSymbol(), OBTypeTable::GetToType(),
OBElementTable::GetVdwRad(), OBTypeTable::SetFromType(), OBResidueData::SetResName(),
OBTypeTable::SetToType(), and OBTypeTable::Translate().

[inline,
void SetReadDirectory ( char * dir )
inherited]
Set the directory before calling Init().

void SetEnvironmentVariable ( char * var ) [inline, inherited]


Set the environment variable to use before calling Init().

Member Data Documentation

bool _init [protected, inherited]


Whether the data been read already.

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(),


OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(),

Member Data Documentation 148


Open Babel: API Documentation

OBAtomTyper::AssignImplicitValence(), OBPhModel::AssignSeedPartialCharge(),
OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(), OBAtomTyper::CorrectAromaticNitrogens(),
OBElementTable::CorrectedBondRad(), OBElementTable::CorrectedVdwRad(),
OBPhModel::CorrectForPH(), OBElementTable::GetAllredRochowElectroNeg(),
OBElementTable::GetAtomicNum(), OBElementTable::GetCovalentRad(),
OBElementTable::GetElectronAffinity(), OBElementTable::GetElectroNeg(),
OBIsotopeTable::GetExactMass(), OBTypeTable::GetFromType(), OBElementTable::GetIonization(),
OBElementTable::GetMass(), OBElementTable::GetMaxBonds(), OBElementTable::GetName(),
OBElementTable::GetNumberOfElements(), OBElementTable::GetRGB(),
OBRotorRules::GetRotorIncrements(), OBElementTable::GetSymbol(), OBTypeTable::GetToType(),
OBElementTable::GetVdwRad(), OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),
OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), OBTypeTable::OBTypeTable(),
OBTypeTable::SetFromType(), OBResidueData::SetResName(), OBTypeTable::SetToType(), and
OBTypeTable::Translate().

const char* _dataptr [protected, inherited]


Default data table if file is unreadable.

Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),


OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _filename [protected, inherited]


File to search for.

Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),


OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _dir [protected, inherited]


Data directory for file if _envvar fails.

Referenced by OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(),


OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(),
OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(),
OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _subdir [protected, inherited]


Subdirectory (if using environment variable).

Referenced by OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(),


OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(),

Member Data Documentation 149


Open Babel: API Documentation

OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(),


OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _envvar [protected, inherited]


Environment variable to check first.

Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),


OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

The documentation for this class was generated from the following files:

• typer.h
• typer.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:58 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 150


OBAtom Member List
This is the complete list of members for OBAtom, including all inherited members.

_c OBAtom [protected]
_cidx OBAtom [protected]
_ele OBAtom [protected]
_fcharge OBAtom [protected]
_flags OBAtom [protected]
_hyb OBAtom [protected]
_idx OBAtom [protected]
_impval OBAtom [protected]
_isotope OBAtom [protected]
_parent OBAtom [protected]
_pcharge OBAtom [protected]
_residue OBAtom [protected]
_spinmultiplicity OBAtom [protected]
_type OBAtom [protected]
_v OBAtom [mutable, protected]
_vbond OBAtom [protected]
_vdata OBBase [protected]
AddBond(OBBond *bond) OBAtom [inline]
AddResidue(OBResidue *res) OBAtom [inline]
AverageBondAngle() OBAtom
BeginBond(OBBondIterator &i) OBAtom
BeginBonds() OBAtom [inline]
BeginData() OBBase [inline]
BeginNbrAtom(OBBondIterator &i) OBAtom
BOSum() const OBAtom
CastAndClear(bool clear=true) OBBase [inline]
ClassDescription() OBBase [inline, static]
Clear() OBAtom [virtual]
ClearBond() OBAtom [inline]
ClearCoordPtr() OBAtom [inline]
CloneData(OBGenericData *d) OBBase
CountBondsOfOrder(unsigned int bo) OBAtom
CountFreeOxygens() const OBAtom
CountRingBonds() const OBAtom
DataSize() const OBBase [inline]
DecrementImplicitValence() OBAtom [inline]
DeleteBond(OBBond *bond) OBAtom
DeleteData(unsigned int type) OBBase

OBAtom Member List 151


Open Babel: API Documentation

DeleteData(OBGenericData *) OBBase
DeleteData(std::vector< OBGenericData * > &) OBBase
DeleteData(const std::string &s) OBBase
DeleteResidue() OBAtom [inline]
DoTransformations(const std::map< std::string, std::string > *) OBBase [inline, virtual]
Duplicate(OBAtom *) OBAtom
EndBonds() OBAtom [inline]
EndData() OBBase [inline]
ExplicitHydrogenCount(bool ExcludeIsotopes=false) const OBAtom
ForceImplH() OBAtom [inline]
ForceNoH() OBAtom [inline]
GetAllData(const unsigned int type) OBBase
GetAngle(int b, int c) OBAtom
GetAngle(OBAtom *b, OBAtom *c) OBAtom
GetAtomicMass() const OBAtom
GetAtomicNum() const OBAtom [inline]
GetBond(OBAtom *) OBAtom
GetCIdx() const OBAtom [inline]
GetCoordinate() OBAtom [inline]
GetCoordinateIdx() const OBAtom [inline]
GetData(const unsigned int type) OBBase
GetData(const std::string &) OBBase
GetData(const char *) OBBase
GetData() OBBase [inline]
GetData(DataOrigin source) OBBase
GetDistance(int index) OBAtom
GetDistance(OBAtom *) OBAtom
GetExactMass() const OBAtom
GetFlag() const OBAtom [inline, protected]
GetFormalCharge() const OBAtom [inline]
GetHeteroValence() const OBAtom
GetHvyValence() const OBAtom
GetHyb() const OBAtom
GetIdx() const OBAtom [inline]
GetImplicitValence() const OBAtom
GetIsotope() const OBAtom [inline]
GetNewBondVector(vector3 &v, double length) OBAtom
GetNextAtom() OBAtom
GetParent() OBAtom [inline]
GetPartialCharge() OBAtom
GetResidue() OBAtom
GetResidue(bool perception) OBAtom

OBAtom Member List 152


Open Babel: API Documentation

GetSpinMultiplicity() const OBAtom [inline]


GetType() OBAtom
GetValence() const OBAtom [inline]
GetVector() OBAtom
GetVector() const OBAtom
GetX() const OBAtom [inline]
GetY() const OBAtom [inline]
GetZ() const OBAtom [inline]
HasAlphaBetaUnsat(bool includePandS=true) OBAtom
HasAromaticBond() OBAtom [inline]
HasBondOfOrder(unsigned int bo) OBAtom
HasChiralitySpecified() OBAtom [inline]
HasChiralVolume() OBAtom [inline]
HasData(const std::string &) OBBase
HasData(const char *) OBBase
HasData(const unsigned int type) OBBase
HasDoubleBond() OBAtom [inline]
HasFlag(int flag) OBAtom [inline, protected]
HasImplHForced() OBAtom [inline]
HasNoHForced() OBAtom [inline]
HasNonSingleBond() OBAtom
HasResidue() OBAtom [inline]
HasSingleBond() OBAtom [inline]
HtoMethyl() OBAtom
ImplicitHydrogenCount() const OBAtom
IncrementImplicitValence() OBAtom [inline]
InsertBond(OBBondIterator &i, OBBond *bond) OBAtom [inline]
IsAmideNitrogen() OBAtom
IsAntiClockwise() OBAtom [inline]
IsAromatic() const OBAtom
IsAromaticNOxide() OBAtom
IsAxial() OBAtom
IsCarbon() OBAtom [inline]
IsCarboxylOxygen() OBAtom
IsChiral() OBAtom
IsClockwise() OBAtom [inline]
IsConnected(OBAtom *) OBAtom
IsHbondAcceptor() OBAtom
IsHbondDonor() OBAtom
IsHbondDonorH() OBAtom
IsHeteroatom() OBAtom
IsHydrogen() OBAtom [inline]

OBAtom Member List 153


Open Babel: API Documentation

IsInRing() const OBAtom


IsInRingSize(int) const OBAtom
IsNegativeStereo() OBAtom [inline]
IsNitrogen() OBAtom [inline]
IsNitroOxygen() OBAtom
IsNonPolarHydrogen() OBAtom
IsNotCorH() OBAtom
IsOneFour(OBAtom *) OBAtom
IsOneThree(OBAtom *) OBAtom
IsOxygen() OBAtom [inline]
IsPhosphateOxygen() OBAtom
IsPhosphorus() OBAtom [inline]
IsPolarHydrogen() OBAtom
IsPositiveStereo() OBAtom [inline]
IsSulfateOxygen() OBAtom
IsSulfur() OBAtom [inline]
KBOSum() const OBAtom
MatchesSMARTS(const char *) OBAtom
MemberOfRingCount() const OBAtom
MemberOfRingSize() const OBAtom
NewResidue() OBAtom [inline]
NextBond(OBBondIterator &i) OBAtom
NextNbrAtom(OBBondIterator &i) OBAtom
OBAtom() OBAtom
operator=(OBAtom &) OBAtom
SetAntiClockwiseStereo() OBAtom [inline]
SetAromatic() OBAtom [inline]
SetAtomicNum(int atomicnum) OBAtom [inline]
SetChiral() OBAtom [inline]
SetClockwiseStereo() OBAtom [inline]
SetCoordPtr(double **c) OBAtom [inline]
SetData(OBGenericData *d) OBBase [inline]
SetFlag(int flag) OBAtom [inline, protected]
SetFormalCharge(int fcharge) OBAtom [inline]
SetHyb(int hyb) OBAtom [inline]
SetHybAndGeom(int) OBAtom
SetIdx(int idx) OBAtom [inline]
SetImplicitValence(int val) OBAtom [inline]
SetInRing() OBAtom [inline]
SetIsotope(unsigned int iso) OBAtom
SetNegativeStereo() OBAtom [inline]
SetParent(OBMol *ptr) OBAtom [inline]

OBAtom Member List 154


Open Babel: API Documentation

SetPartialCharge(double pcharge) OBAtom [inline]


SetPositiveStereo() OBAtom [inline]
SetResidue(OBResidue *res) OBAtom [inline]
SetSpinMultiplicity(short spin) OBAtom [inline]
SetType(const char *type) OBAtom
SetType(const std::string &type) OBAtom
SetVector(const vector3 &v) OBAtom
SetVector(const double x, const double y, const double z) OBAtom
SetVector() OBAtom
SmallestBondAngle() OBAtom
UnsetAromatic() OBAtom [inline]
UnsetStereo() OBAtom [inline]
Visit OBAtom
x() const OBAtom [inline]
y() const OBAtom [inline]
z() const OBAtom [inline]
~OBAtom() OBAtom [virtual]
~OBBase() OBBase [inline, virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBAtom

OBAtom Member List 155


OBAtom Class Reference
Atom class. More...

#include <openbabel/atom.h>

Inheritance diagram for OBAtom:

[legend]

List of all members.

Public Member Functions


OBAtom ()
virtual ~OBAtom ()
OBAtom & operator= (OBAtom &)
void Duplicate (OBAtom *)
bool Clear ()
double GetDistance (int index)
double GetDistance (OBAtom *)
double GetAngle (int b, int c)
double GetAngle (OBAtom *b, OBAtom *c)
virtual OBBase * DoTransformations (const std::map< std::string, std::string > *)
template<class T>
T * CastAndClear (bool clear=true)
Methods to set atomic information
void SetIdx (int idx)
void SetHyb (int hyb)
void SetAtomicNum (int atomicnum)
void SetIsotope (unsigned int iso)
void SetImplicitValence (int val)
void IncrementImplicitValence ()
void DecrementImplicitValence ()
void SetFormalCharge (int fcharge)
void SetSpinMultiplicity (short spin)
void SetType (const char *type)
void SetType (const std::string &type)
void SetPartialCharge (double pcharge)
void SetVector (const vector3 &v)
void SetVector (const double x, const double y, const double z)
void SetCoordPtr (double **c)
void SetVector ()

OBAtom Class Reference 156


Open Babel: API Documentation
void SetResidue (OBResidue *res)
void SetParent (OBMol *ptr)
void SetAromatic ()
void UnsetAromatic ()
void SetClockwiseStereo ()
void SetAntiClockwiseStereo ()
void SetPositiveStereo ()
void SetNegativeStereo ()
void UnsetStereo ()
void SetInRing ()
void SetChiral ()
void ClearCoordPtr ()
Methods to retrieve atomic information
int GetFormalCharge () const
unsigned int GetAtomicNum () const
unsigned short int GetIsotope () const
int GetSpinMultiplicity () const
double GetAtomicMass () const
double GetExactMass () const
unsigned int GetIdx () const
unsigned int GetCoordinateIdx () const
unsigned int GetCIdx () const
unsigned int GetValence () const
unsigned int GetHyb () const
unsigned int GetImplicitValence () const
unsigned int GetHvyValence () const
unsigned int GetHeteroValence () const
char * GetType ()
double GetX () const
double GetY () const
double GetZ () const
double x () const
double y () const
double z () const
double * GetCoordinate ()
vector3 & GetVector ()
const vector3 & GetVector () const
double GetPartialCharge ()
OBResidue * GetResidue ()
OBResidue * GetResidue (bool perception)
OBMol * GetParent ()
bool GetNewBondVector (vector3 &v, double length)
OBBond * GetBond (OBAtom *)
OBAtom * GetNextAtom ()
Iterator methods
OBBondIterator BeginBonds ()
OBBondIterator EndBonds ()
OBBond * BeginBond (OBBondIterator &i)
OBBond * NextBond (OBBondIterator &i)
OBAtom * BeginNbrAtom (OBBondIterator &i)
OBAtom * NextNbrAtom (OBBondIterator &i)

Public Member Functions 157


Open Babel: API Documentation
Addition of residue/bond info. for an atom
void NewResidue ()
void AddResidue (OBResidue *res)
void DeleteResidue ()
void AddBond (OBBond *bond)
void InsertBond (OBBondIterator &i, OBBond *bond)
bool DeleteBond (OBBond *bond)
void ClearBond ()
Builder utilities
bool HtoMethyl ()
bool SetHybAndGeom (int)
void ForceNoH ()
bool HasNoHForced ()
void ForceImplH ()
bool HasImplHForced ()
Property information
unsigned int CountFreeOxygens () const
unsigned int ImplicitHydrogenCount () const
unsigned int ExplicitHydrogenCount (bool ExcludeIsotopes=false) const
unsigned int MemberOfRingCount () const
unsigned int MemberOfRingSize () const
unsigned int CountRingBonds () const
double SmallestBondAngle ()
double AverageBondAngle ()
unsigned int BOSum () const
unsigned int KBOSum () const
bool HasResidue ()
bool IsHydrogen ()
bool IsCarbon ()
bool IsNitrogen ()
bool IsOxygen ()
bool IsSulfur ()
bool IsPhosphorus ()
bool IsAromatic () const
bool IsInRing () const
bool IsInRingSize (int) const
bool IsHeteroatom ()
bool IsNotCorH ()
bool IsConnected (OBAtom *)
bool IsOneThree (OBAtom *)
bool IsOneFour (OBAtom *)
bool IsCarboxylOxygen ()
bool IsPhosphateOxygen ()
bool IsSulfateOxygen ()
bool IsNitroOxygen ()
bool IsAmideNitrogen ()
bool IsPolarHydrogen ()
bool IsNonPolarHydrogen ()
bool IsAromaticNOxide ()
bool IsChiral ()
bool IsAxial ()

Public Member Functions 158


Open Babel: API Documentation
bool IsClockwise ()
bool IsAntiClockwise ()
bool IsPositiveStereo ()
bool IsNegativeStereo ()
bool HasChiralitySpecified ()
bool HasChiralVolume ()
bool IsHbondAcceptor ()
bool IsHbondDonor ()
bool IsHbondDonorH ()
bool HasAlphaBetaUnsat (bool includePandS=true)
bool HasBondOfOrder (unsigned int bo)
int CountBondsOfOrder (unsigned int bo)
bool HasNonSingleBond ()
bool HasSingleBond ()
bool HasDoubleBond ()
bool HasAromaticBond ()
bool MatchesSMARTS (const char *)
Generic data handling methods (via OBGenericData)
bool HasData (const std::string &)
bool HasData (const char *)
bool HasData (const unsigned int type)
void DeleteData (unsigned int type)
void DeleteData (OBGenericData *)
void DeleteData (std::vector< OBGenericData * > &)
bool DeleteData (const std::string &s)
void SetData (OBGenericData *d)
void CloneData (OBGenericData *d)
unsigned int DataSize () const
OBGenericData * GetData (const unsigned int type)
OBGenericData * GetData (const std::string &)
OBGenericData * GetData (const char *)
std::vector< OBGenericData * > & GetData ()
std::vector< OBGenericData * > GetData (DataOrigin source)
std::vector< OBGenericData * > GetAllData (const unsigned int type)
OBDataIterator BeginData ()
OBDataIterator EndData ()

Static Public Member Functions


static const char * ClassDescription ()

Public Attributes
bool Visit

Protected Member Functions


int GetFlag () const
void SetFlag (int flag)

Static Public Member Functions 159


Open Babel: API Documentation
bool HasFlag (int flag)

Protected Attributes
char _ele
char _impval
char _type [6]
short _fcharge
unsigned short _isotope
short _spinmultiplicity
unsigned int _idx
OBMol * _parent
std::vector< OBBond * > _vbond
unsigned int _cidx
unsigned short _hyb
unsigned short _flags
double _pcharge
double ** _c
vector3 _v
OBResidue * _residue
std::vector< OBGenericData * > _vdata

Detailed Description
Atom class.

To understand the OBAtom class it is important to state a key decision on which the design was based. The
OBAtom class not only holds data, but facilitates extraction of data perceived from both the atom and the
molecule. This prevents the OBMol class from becoming overly large and complicated.

A number of data extraction methods perform what is called `Lazy Evaluation,' which is essentially on-the-fly
evaluation. For example, when an atom is queried as to whether it is cyclic or what it's hybridization state is
the information is perceived automatically. The perception of a particular trait is actually performed on the
entire molecule the first time it is requested of an atom or bond, and stored for subsequent requests for the
same trait of additional atoms or bonds.The OBAtom class is similar to OBMol and the whole of Open Babel
in that data access and modification is done through Get and Set methods.

The following code demonstrates how to print out the atom numbers, element numbers, and coordinates of a
molecule:

OBMol mol;

FOR_ATOMS_OF_MOL(atom, mol)
{
cout << atom->GetIdx() << ` `;
cout << atom->GetAtomicNum() << ` `;
cout << atom->GetVector() << endl;
}

Protected Member Functions 160


Open Babel: API Documentation

A number of the property member functions indicate that atoms have some knowledge of their covalently
attached neighbor atoms. Bonding information is partly redundant within a molecule in that an OBMol has a
complete list of bonds in a molecule, and an OBAtom has a list bonds of which it is a member. The following
code demonstrates how an OBAtom uses its bond information to loop over atoms attached to itself:

OBMol mol;
OBAtom *atom;

atom = mol.GetAtom(1);
FOR_NBORS_OF_ATOM(nbr, atom)
{
cout << "atom #" << atom->GetIdx() << " is attached to atom #"
<< nbr->GetIdx() << endl;
}

should produce an output like

atom #1 is attached to atom #2

Constructor & Destructor Documentation

OBAtom ( )
Constructor.

~OBAtom ( ) [virtual]
Destructor.

Member Function Documentation

int GetFlag ( ) const [inline, protected]

Returns:
All flags

Referenced by OBAtom::Duplicate().

void SetFlag ( int flag ) [inline, protected]


Sets the bitwise flag.

bool HasFlag ( int flag ) [inline, protected]

Returns:
True of the atom has the flag

Detailed Description 161


Open Babel: API Documentation

Referenced by OBAtom::IsAromatic(), OBAtom::IsChiral(), OBAtom::IsInRing(), and


OBAtom::IsInRingSize().

OBAtom
OBAtom & operator= ( src )
&
Assignment.

void Duplicate ( OBAtom * src )


Duplicate another atom. Copies all information with the exception of index

Since:
version 2.2

Referenced by OBUnitCell::FillUnitCell(), and OBAtom::operator=().

bool Clear ( void ) [virtual]


Clear all data. Calls OBBase::Clear() to handle any generic data.

Returns:
True if successful.

Reimplemented from OBBase.

Referenced by OBAtom::OBAtom().

void SetIdx ( int idx ) [inline]


Set atom index (i.e., in an OBMol).

Referenced by OBMol::AddAtom(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(),


OBMol::EndModify(), and OBMol::NewAtom().

void SetHyb ( int hyb ) [inline]


Set atom hybridization (i.e., 1 = sp, 2 = sp2, 3 = sp3 ...).

Referenced by OBResidueData::AssignBonds(), OBAtomTyper::AssignHyb(), OBAtom::HtoMethyl(),


OBMol::PerceiveBondOrders(), and OBAtom::SetHybAndGeom().

void SetAtomicNum ( int atomicnum ) [inline]


Set atomic number.

Referenced by OBMol::AddHydrogens(), OBChemTsfm::Apply(), AliasData::Expand(),


OBAtom::HtoMethyl(), and OBAtom::SetHybAndGeom().

Member Function Documentation 162


Open Babel: API Documentation

void SetIsotope ( unsigned int iso )


Set isotope number (actual atomic weight is tabulated automatically, 0 = most abundant).

Referenced by AliasData::Expand().

void SetImplicitValence ( int val ) [inline]


Set the implicit valence to val.

Referenced by OBAtomTyper::AssignImplicitValence().

void IncrementImplicitValence ( ) [inline]


Increase the implicit valence by one.

Referenced by OpenBabel::ExpandKekule().

void DecrementImplicitValence ( ) [inline]


Decrease the implicit valence by one.

Referenced by OpenBabel::ExpandKekule().

void SetFormalCharge ( int fcharge ) [inline]


Set the formal charge of the atom to fcharge.

Referenced by OBChemTsfm::Apply(), OBResidueData::AssignBonds(), OBMol::ConvertDativeBonds(),


AliasData::Expand(), OpenBabel::ExpandKekule(), and OBMol::NewPerceiveKekuleBonds().

void SetSpinMultiplicity ( short spin ) [inline]


Set the atomic spin to spin. See _spinmultiplicity.

Referenced by OBMol::AssignSpinMultiplicity().

void SetType ( const char * type )


Set the atomic type symbol (see OBTypeTable and OBAtomTyper for more).

Referenced by OBMol::AddHydrogens(), OBResidueData::AssignBonds(), OBAtomTyper::AssignTypes(),


OBForceField::GetGrid(), OBAtom::HtoMethyl(), OBAtom::SetHybAndGeom(), and OBAtom::SetIsotope().

void SetType ( const std::string & type )


Set the atomic type symbol (see OBTypeTable and OBAtomTyper for more).

void SetPartialCharge ( double pcharge ) [inline]

Member Function Documentation 163


Open Babel: API Documentation

Set the partial charge to pcharge.

Referenced by OBGastChrg::AssignPartialCharges(), OBPhModel::AssignSeedPartialCharge(),


OBForceField::GetGrid(), and OBAtom::GetPartialCharge().

void SetVector ( const vector3 & v )


Set the coordinate vector for this atom to v as a vector3.

Referenced by OBMol::Align(), OpenBabel::ApplyRotMatToBond(), OBMol::BeginModify(),


OBBuilder::Build(), OpenBabel::CalcSignedVolume(), OBMol::Center(), OBBuilder::Connect(),
OBUnitCell::FillUnitCell(), OBForceField::GetCoordinates(), OBAtom::GetNewBondVector(),
OBAtom::HtoMethyl(), OpenBabel::InternalToCartesian(), OBForceField::LineSearch(),
OBForceField::NumericalDerivative(), OBForceField::NumericalSecondDerivative(),
OBForceField::SetConformers(), OBForceField::SetCoordinates(), OBAtom::SetHybAndGeom(),
OBBond::SetLength(), OBForceField::ValidateConjugateGradients(), OBForceField::ValidateLineSearch(),
and OBForceField::ValidateSteepestDescent().

void SetVector ( const double x,


const double y,
const double z
)
Set the coordinate vector for this atom based on x y & z.

double
void SetCoordPtr ( c ) [inline]
**
Set the position of this atom from a pointer-driven array of coordinates.

Referenced by OBMol::AddHydrogens(), OBMol::ConnectTheDots(), OBMol::EndModify(), and


OBMol::SetCoordinates().

void SetVector ( )
Set the position of this atom based on the internal pointer array (i.e. from SetCoordPtr() ).

void SetResidue ( OBResidue * res ) [inline]


Attach an OBResidue res as containing this atom.

Referenced by OBResidue::AddAtom(), OBMol::AddHydrogens(), and OBResidue::RemoveAtom().

void SetParent ( OBMol * ptr ) [inline]


Attach an OBMol ptr as the parent container for this atom.

Referenced by OBMol::AddAtom(), and OBMol::NewAtom().

Member Function Documentation 164


Open Babel: API Documentation

void SetAromatic ( ) [inline]


Mark atom as being aromatic.

Referenced by OBMol::AddBond(), OBAromaticTyper::CheckAromaticity(), OBBond::SetBondOrder(), and


OBAromaticTyper::TraverseCycle().

void UnsetAromatic ( ) [inline]


Clear aromatic information from the atom.

Referenced by OBAromaticTyper::AssignAromaticFlags().

void SetClockwiseStereo ( ) [inline]


Mark atom as having SMILES clockwise stereochemistry (i.e., "@@").

Referenced by OpenBabel::CorrectChirality().

void SetAntiClockwiseStereo ( ) [inline]


Mark atom as having SMILES anticlockwise stereochemistry (i.e., "@").

Referenced by OpenBabel::CorrectChirality().

void SetPositiveStereo ( ) [inline]


Mark an atom as having + chiral volume.

void SetNegativeStereo ( ) [inline]


Mark an atom as having - chiral volume.

void UnsetStereo ( ) [inline]


Clear all stereochemistry information.

Referenced by OpenBabel::CorrectChirality().

void SetInRing ( ) [inline]


Mark an atom as belonging to at least one ring.

void SetChiral ( ) [inline]


Mark an atom as being chiral with unknown stereochemistry.

Referenced by OBMol::FindChiralCenters().

Member Function Documentation 165


Open Babel: API Documentation

void ClearCoordPtr ( ) [inline]


Clear the internal coordinate pointer.

Referenced by OBMol::BeginModify(), and OBMol::ConnectTheDots().

int GetFormalCharge ( ) const [inline]

Returns:
the formal charge for this atom

Referenced by OBMol::ConvertDativeBonds(), OBAtom::Duplicate(), OpenBabel::EvalAtomExpr(),


AliasData::Expand(), OpenBabel::ExpandKekule(), OpenBabel::GetGIVector(), OBMol::getorden(),
OBMol::GetTotalCharge(), OBMol::NewPerceiveKekuleBonds(), and OBMol::PerceiveKekuleBonds().

const
unsigned int GetAtomicNum ( )
[inline]

Returns:
the atomic number for this atom

Referenced by OBMol::AddHydrogens(), OBAromaticTyper::AssignAromaticFlags(),


OpenBabel::CalculateSymmetry(), OBMol::ConnectTheDots(), OpenBabel::construct_g_matrix(),
OBAtom::Duplicate(), OpenBabel::EvalAtomExpr(), OBBond::GetEquibLength(), OBMol::GetGIVector(),
OpenBabel::GetGIVector(), OpenBabel::GetHvyBondSum(), OBMol::getorden(), OBAtom::GetType(),
OBAtom::HtoMethyl(), OpenBabel::InternalToCartesian(), OBBond::IsAmide(),
OBAtom::IsAmideNitrogen(), OBBond::IsCarbonyl(), OBBond::IsEster(), OBAtom::IsHeteroatom(),
OBAtom::IsNonPolarHydrogen(), OBAtom::IsNotCorH(), OBAtom::IsPolarHydrogen(),
OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(), OBMol::PerceiveBondOrders(),
OBMol::PerceiveKekuleBonds(), and OBAtom::SetHybAndGeom().

const
unsigned short int GetIsotope ( )
[inline]

Returns:
the isotope for this atom, if specified, or 0 for unspecified

Referenced by OBAtom::Duplicate(), OpenBabel::EvalAtomExpr(), and OBAtom::ExplicitHydrogenCount().

int GetSpinMultiplicity ( ) const [inline]

Returns:
the atomic spin, e.g., 0 (default) for normal atoms - note that this value is a convention, 2 for radical 1
or 3 for carbene

Referenced by OBMol::AddHydrogens(), OBAtom::Duplicate(), OBMol::GetTotalSpinMultiplicity(), and


OBAtom::ImplicitHydrogenCount().

Member Function Documentation 166


Open Babel: API Documentation

double GetAtomicMass ( ) const

Returns:
the atomic mass of this atom given by standard IUPAC average molar mass

Referenced by OBMol::GetMolWt(), and OBMol::ToInertialFrame().

double GetExactMass ( ) const

Returns:
the atomic mass of given by the isotope (default of 0 gives the most abundant isotope)

Referenced by OBMol::GetExactMass().

unsigned int GetIdx ( ) const [inline]

Returns:
the internal atom index (e.g., inside an OBMol)

Referenced by OBMol::AddAtom(), OBMol::AddHydrogens(), OBMol::Align(),


OpenBabel::ApplyRotMatToBond(), OBAromaticTyper::AssignAromaticFlags(),
OBResidueData::AssignBonds(), OBGastChrg::AssignPartialCharges(), OpenBabel::BreakChiralTies(),
OBBuilder::Build(), OpenBabel::BuildOBRTreeVector(), OpenBabel::CalcSignedVolume(),
OpenBabel::CalculateSymmetry(), OpenBabel::CartesianToInternal(),
OBAromaticTyper::CheckAromaticity(), OBMol::ConnectTheDots(), OBMol::ContigFragList(),
OBBuilder::CorrectStereoAtoms(), OpenBabel::CreateNewClassVector(),
OBMolAtomBFSIter::CurrentDepth(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(),
OpenBabel::EvalAtomExpr(), OBAromaticTyper::ExcludeSmallRing(), OBMol::expand_kekulize(),
OBMol::expandcycle(), OpenBabel::ExpandKekule(), OpenBabel::FastSingleMatch(),
OBMol::FindChildren(), OBMol::FindChiralCenters(), OpenBabel::FindConjugatedEZBonds(),
OBMol::FindLargestFragment(), OpenBabel::FixCisTransBonds(), OBRTree::GetAtomIdx(),
OpenBabel::GetDFFVector(), OBBuilder::GetFragment(), OpenBabel::GetGIVector(),
OBForceField::GetGradient(), OBForceField::GetGrid(), OBMol::GetGTDVector(),
OpenBabel::GetGTDVector(), OpenBabel::GetHvyBondSum(), OpenBabel::GetHvyValence(),
OBAtom::GetNextAtom(), OBRotorRules::GetRotorIncrements(), OpenBabel::GetValence(),
OBAtom::HtoMethyl(), OBGrid::Init(), OpenBabel::InternalToCartesian(), OBBond::IsClosure(),
OBRotorList::IsFixedBond(), OBAtom::IsInRingSize(), OBForceField::IsInSameRing(),
OBRing::IsMember(), OpenBabel::KekulePropagate(), OBSSMatch::Match(), OBAtom::MatchesSMARTS(),
OBAtom::MemberOfRingCount(), OBAtom::MemberOfRingSize(), OBMol::NewAtom(),
OBMolAtomBFSIter::OBMolAtomBFSIter(), OBMolAtomDFSIter::OBMolAtomDFSIter(),
OBMolPairIter::OBMolPairIter(), OBMolPairIter::operator++(), OBMolAtomBFSIter::operator++(),
OBMolAtomDFSIter::operator++(), OBMol::operator=(), OBAtom::operator=(),
OBMol::PerceiveKekuleBonds(), OBAromaticTyper::PropagatePotentialAromatic(),
OBMol::RenumberAtoms(), OBAromaticTyper::SelectRootAtoms(), OBRotorList::SetEvalAtoms(),
OBAtom::SetHybAndGeom(), OBBond::SetLength(), OBMol::SetTorsion(), OBProxGrid::Setup(),
OpenBabel::SetupAtomMatchTable(), OBMol::start_kekulize(), and OBAromaticTyper::TraverseCycle().

Member Function Documentation 167


Open Babel: API Documentation

const
unsigned int GetCoordinateIdx ( )
[inline]

Returns:
the index into a pointer-driven array as used by GetCoordPtr() or SetCoordPtr()

const
unsigned int GetCIdx ( )
[inline]

Deprecated:
Use GetCoordinateIdx() instead

Referenced by OBMol::DeleteHydrogen(), OpenBabel::SetRotorToAngle(), and OBMol::SetTorsion().

const
unsigned int GetValence ( )
[inline]

Returns:
The current number of explicit connections

Referenced by OBMol::AddBond(), OBMol::AddHydrogens(), OBResidueData::AssignBonds(),


OBAtomTyper::AssignImplicitValence(), OBMol::ConnectTheDots(), OpenBabel::construct_c_matrix(),
OpenBabel::construct_g_matrix(), OpenBabel::EvalAtomExpr(), OBBuilder::GetNewBondVector(),
OBAtom::GetNewBondVector(), OBMol::getorden(), OBRing::GetRootAtom(),
OBAtom::ImplicitHydrogenCount(), OBBond::IsDoubleBondGeometry(), OBAtom::IsHbondAcceptor(),
OBMol::PerceiveBondOrders(), and OBAtom::SetHybAndGeom().

unsigned int GetHyb ( ) const

Returns:
The hybridization of this atom (i.e. 1 for sp, 2 for sp2, 3 for sp3)

Referenced by OBMol::AddHydrogens(), OBAromaticTyper::AssignAromaticFlags(),


OpenBabel::construct_g_matrix(), OBAtom::Duplicate(), OpenBabel::EvalAtomExpr(),
OBMol::FindChiralCenters(), OBBond::GetEquibLength(), OBBuilder::GetNewBondVector(),
OBAtom::GetNewBondVector(), OBRotorRules::GetRotorIncrements(), OBAtom::HtoMethyl(),
OBAtom::IsAxial(), OBBond::IsDoubleBondGeometry(), OBAtom::IsHbondAcceptor(), OBBond::IsRotor(),
OBMol::PerceiveBondOrders(), and OBAtom::SetHybAndGeom().

unsigned int GetImplicitValence ( ) const

Returns:
The implicit valence of this atom type (i.e. maximum number of connections expected)

Referenced by OBMol::AddHydrogens(), OBAromaticTyper::AssignAromaticFlags(),


OBAtomTyper::AssignImplicitValence(), OBMol::AssignSpinMultiplicity(), OpenBabel::EvalAtomExpr(),

Member Function Documentation 168


Open Babel: API Documentation

OpenBabel::ExpandKekule(), OpenBabel::GetCurrentValence(), OBMol::GetGIVector(),


OpenBabel::GetHvyBondSum(), OBAtom::KBOSum(), and OpenBabel::ValenceSum().

unsigned int GetHvyValence ( ) const

Returns:
The number of non-hydrogens connected to this atom

Referenced by OBMol::AssignSpinMultiplicity(), OpenBabel::CalcSignedVolume(),


OBAtom::CountFreeOxygens(), OpenBabel::ExpandKekule(), OBMol::FindChiralCenters(),
OBMol::GetGIVector(), OBAtom::IsCarboxylOxygen(), OBMol::IsChiral(), OBAtom::IsNitroOxygen(),
OBAtom::IsPhosphateOxygen(), OBBond::IsPrimaryAmide(), OBBond::IsRotor(),
OBBond::IsSecondaryAmide(), OBAtom::IsSulfateOxygen(), and OBAtom::SetHybAndGeom().

unsigned int GetHeteroValence ( ) const

Returns:
The number of heteroatoms connected to an atom

char * GetType ( )

Returns:
the atomic type (e.g., for molecular mechanics)

Referenced by OBAtomTyper::AssignTypes(), and OBAtom::Duplicate().

double GetX ( ) const [inline]

Returns:
the x coordinate

Referenced by OBBond::GetLength(), and OBGrid::Init().

double GetY ( ) const [inline]

Returns:
the y coordinate

Referenced by OBBond::GetLength(), and OBGrid::Init().

double GetZ ( ) const [inline]

Returns:

Member Function Documentation 169


Open Babel: API Documentation

the z coordinate

Referenced by OBBond::GetLength(), and OBGrid::Init().

double x ( ) const [inline]

Returns:
the x coordinate

Referenced by OBMol::Center(), OBMol::Has2D(), OBMol::Has3D(), OBMol::ToInertialFrame(),


OBForceField::ValidateConjugateGradients(), OBForceField::ValidateLineSearch(), and
OBForceField::ValidateSteepestDescent().

double y ( ) const [inline]

Returns:
the y coordinate

Referenced by OBMol::Center(), OBMol::Has2D(), OBMol::Has3D(), OBMol::ToInertialFrame(),


OBForceField::ValidateConjugateGradients(), OBForceField::ValidateLineSearch(), and
OBForceField::ValidateSteepestDescent().

double z ( ) const [inline]

Returns:
the z coordinate

Referenced by OBMol::Center(), OBMol::Has3D(), OBMol::ToInertialFrame(), and


OBForceField::ValidateConjugateGradients().

double* GetCoordinate ( ) [inline]

Returns:
the coordinates as a double* or NULL if none.

See SetCoordPtr() for more. If no coordinate pointer is used (e.g., only vector3), NULL will be returned.

Referenced by OBForceField::GetGrid(), and OBForceField::UpdatePairsSimple().

vector3 & GetVector ( )

Returns:
the coordinates as a vector3 object

Member Function Documentation 170


Open Babel: API Documentation

Referenced by OBMol::Align(), OpenBabel::ApplyRotMatToBond(), OBAtom::AverageBondAngle(),


OpenBabel::CalcSignedVolume(), OpenBabel::CartesianToInternal(), OBMol::Center(),
OBBuilder::Connect(), OBMol::ConnectTheDots(), OBAtom::Duplicate(), OBMol::EndModify(),
OBAtom::GetAngle(), OBAtom::GetDistance(), OBBuilder::GetNewBondVector(),
OBAtom::GetNewBondVector(), OBMol::GetTorsion(), OBMol::HasNonZeroCoords(),
OBBond::IsDoubleBondGeometry(), OBForceField::LineSearch(), OpenBabel::match(),
OBForceField::NumericalDerivative(), OBForceField::NumericalSecondDerivative(),
OBAtom::SetHybAndGeom(), OBBond::SetLength(), OBAtom::SmallestBondAngle(), OBBuilder::Swap(),
and OBForceField::ValidateLineSearch().

const vector3 & GetVector ( ) const

Returns:
the coordinates as a vector3 object

double GetPartialCharge ( )

Returns:
the partial charge of this atom, calculating a Gasteiger charge if needed

Referenced by OBGastChrg::AssignPartialCharges(), and OBAtom::Duplicate().

OBResidue * GetResidue ( )

Returns:
the residue which contains this atom, or NULL if none exists

Referenced by OBMol::AddHydrogens(), OBResidueData::AssignBonds(), and OBResidue::GetBonds().

OBResidue * GetResidue ( bool perception )

Parameters:
perception implies whether chain perception should occur

Returns:
the residue which contains this atom, or NULL if none exists

OBMol* GetParent ( ) [inline]

Returns:
the molecule which contains this atom, or NULL if none exists

Referenced by OpenBabel::BuildOBRTreeVector(), OpenBabel::EvalAtomExpr(), OBAtom::GetAngle(),


OBAtom::GetDistance(), OBAtom::GetHyb(), OBAtom::GetImplicitValence(), OBAtom::GetNextAtom(),
OBAtom::GetPartialCharge(), OBAtom::GetResidue(), OBAtom::GetType(), OBAtom::HtoMethyl(),

Member Function Documentation 171


Open Babel: API Documentation

OBAtom::ImplicitHydrogenCount(), OBAtom::IsAromatic(), OBAtom::IsAxial(), OBAtom::IsChiral(),


OBAtom::IsInRing(), OBAtom::IsInRingSize(), OBAtom::MatchesSMARTS(),
OBAtom::MemberOfRingCount(), OBAtom::MemberOfRingSize(), OBAtom::SetHybAndGeom(), and
OBBond::SetLength().

bool GetNewBondVector ( vector3 & v,


double length
)
Create a vector for a new bond from this atom, with length given by the supplied parameter

Returns:
success or failure

Referenced by OBAtom::HtoMethyl(), and OBAtom::SetHybAndGeom().

OBBond * GetBond ( OBAtom * nbr )

Returns:
the OBBond object between this atom and that supplied, or NULL if the two atoms are not bonded

Referenced by OBBondTyper::AssignFunctionalGroupBonds(), OBBuilder::Build(),


OpenBabel::CorrectBadResonanceForm(), OBBuilder::CorrectStereoBonds(), OBMol::expand_kekulize(),
and OBMol::PerceiveBondOrders().

OBAtom * GetNextAtom ( )

Returns:
a pointer to the "next" atom (by atom index) in the parent OBMol, or NULL if no such atom exists.

Deprecated:
Use any of the other iterator methods. This method will be removed in the future.

OBBondIterator BeginBonds ( ) [inline]

Returns:
An iterator to the beginning of the bonds to this atom

Referenced by OBResidueData::AssignBonds().

OBBondIterator EndBonds ( ) [inline]

Returns:
An iterator to the end of the bonds to this atom

Member Function Documentation 172


Open Babel: API Documentation

OBBond * BeginBond ( OBBondIterator & i )


Set the iterator i to the beginning of the bonds

Returns:
The first bond to this atom (or NULL if none exist)

Referenced by OBAtom::BOSum(), OpenBabel::CalcSignedVolume(), OBMol::ConnectTheDots(),


OBMol::ContigFragList(), OBMol::ConvertDativeBonds(), OBAtom::CountBondsOfOrder(),
OBAtom::CountFreeOxygens(), OBAtom::CountRingBonds(), OpenBabel::ExpandKekule(),
OBMol::FindLargestFragment(), OpenBabel::FindRings(), OBAtom::GetBond(), OBResidue::GetBonds(),
OpenBabel::GetCurrentValence(), OpenBabel::GetDFFVector(), OBMol::GetGTDVector(),
OpenBabel::GetGTDVector(), OBAtom::GetHeteroValence(), OpenBabel::GetHvyBondSum(),
OpenBabel::GetHvyValence(), OBAtom::GetHvyValence(), OpenBabel::GetValence(),
OBAtom::HasBondOfOrder(), OBAtom::HasNonSingleBond(), OBBond::IsAmide(),
OBAtom::IsAmideNitrogen(), OBAtom::IsCarboxylOxygen(), OBAtom::IsConnected(), OBBond::IsEster(),
OBAtom::IsHbondDonorH(), OBAtom::IsNitroOxygen(), OBAtom::IsNonPolarHydrogen(),
OBAtom::IsOneFour(), OBAtom::IsOneThree(), OBAtom::IsPhosphateOxygen(),
OBAtom::IsPolarHydrogen(), OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(),
OBAtom::IsSulfateOxygen(), OBAtom::KBOSum(), OpenBabel::KekulePropagate(),
OBMol::NewPerceiveKekuleBonds(), OBAtomBondIter::OBAtomBondIter(), and
OpenBabel::ValenceSum().

OBBond * NextBond ( OBBondIterator & i )


Increment the iterator i

Returns:
The next bond to this atom (or NULL if none exist)

Referenced by OpenBabel::CalcSignedVolume(), OBMol::ConnectTheDots(), OBMol::ContigFragList(),


OBMol::ConvertDativeBonds(), OBAtom::CountBondsOfOrder(), OpenBabel::ExpandKekule(),
OBMol::FindLargestFragment(), OpenBabel::FindRings(), OBAtom::GetBond(), OBResidue::GetBonds(),
OpenBabel::GetCurrentValence(), OpenBabel::GetDFFVector(), OBMol::GetGTDVector(),
OpenBabel::GetGTDVector(), OpenBabel::GetHvyBondSum(), OpenBabel::GetHvyValence(),
OpenBabel::GetValence(), OBAtom::HasBondOfOrder(), OBAtom::HasNonSingleBond(),
OBBond::IsAmide(), OBAtom::IsAmideNitrogen(), OBAtom::IsCarboxylOxygen(), OBAtom::IsConnected(),
OBBond::IsEster(), OBAtom::IsHbondDonorH(), OBAtom::IsNitroOxygen(),
OBAtom::IsNonPolarHydrogen(), OBAtom::IsOneFour(), OBAtom::IsOneThree(),
OBAtom::IsPhosphateOxygen(), OBAtom::IsPolarHydrogen(), OBBond::IsPrimaryAmide(),
OBBond::IsSecondaryAmide(), OBAtom::IsSulfateOxygen(), OpenBabel::KekulePropagate(),
OBMol::NewPerceiveKekuleBonds(), OBAtomBondIter::operator++(), and OpenBabel::ValenceSum().

OBAtom * BeginNbrAtom ( OBBondIterator & i )


Set the iterator i to the beginning of the bonds

Returns:
The first neighboring atom (or NULL if none exist)

Member Function Documentation 173


Open Babel: API Documentation

Referenced by OBMol::AddBond(), OBAtomTyper::AssignTypes(), OBAtom::AverageBondAngle(),


OpenBabel::BuildOBRTreeVector(), OpenBabel::CalcSignedVolume(),
OBAromaticTyper::CheckAromaticity(), OpenBabel::CreateNewClassVector(), OBMol::DeleteAtom(),
OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(), OBAromaticTyper::ExcludeSmallRing(),
OBMol::expand_kekulize(), OBMol::expandcycle(), OpenBabel::ExpandKekule(),
OBAtom::ExplicitHydrogenCount(), OpenBabel::FastSingleMatch(), OBMol::FindChildren(),
OBMol::FindChiralCenters(), OBMol::FindTorsions(), OBMol::GetBond(), OBAtom::GetNewBondVector(),
OBRotorRules::GetRotorIncrements(), OBAtom::HasAlphaBetaUnsat(), OBAtom::HtoMethyl(),
OBAtom::IsAromaticNOxide(), OBAtom::IsAxial(), OBBond::IsClosure(),
OBBond::IsDoubleBondGeometry(), OBRotorList::IsFixedBond(), OBAtom::IsHbondDonor(),
OpenBabel::KekulePropagate(), OBSSMatch::Match(), OBAtomAtomIter::OBAtomAtomIter(),
OBMolAtomBFSIter::OBMolAtomBFSIter(), OBMolAtomDFSIter::OBMolAtomDFSIter(),
OBMolAtomBFSIter::operator++(), OBMolAtomDFSIter::operator++(), OBMol::PerceiveBondOrders(),
OBMol::PerceiveKekuleBonds(), OBAromaticTyper::PropagatePotentialAromatic(),
OBAromaticTyper::SelectRootAtoms(), OBRotorList::SetEvalAtoms(), OBAtom::SetHybAndGeom(),
OBAtom::SmallestBondAngle(), OBMol::start_kekulize(), and OBAromaticTyper::TraverseCycle().

OBAtom * NextNbrAtom ( OBBondIterator & i )


Increment the iterator i

Returns:
The next neighboring atom (or NULL if none exist)

Referenced by OBAtomTyper::AssignTypes(), OBAtom::AverageBondAngle(),


OpenBabel::BuildOBRTreeVector(), OpenBabel::CalcSignedVolume(),
OBAromaticTyper::CheckAromaticity(), OpenBabel::CreateNewClassVector(), OBMol::DeleteAtom(),
OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(), OBAromaticTyper::ExcludeSmallRing(),
OBMol::expand_kekulize(), OBMol::expandcycle(), OpenBabel::ExpandKekule(),
OBAtom::ExplicitHydrogenCount(), OpenBabel::FastSingleMatch(), OBMol::FindChildren(),
OBMol::FindChiralCenters(), OBMol::FindTorsions(), OBMol::GetBond(), OBAtom::GetNewBondVector(),
OBRotorRules::GetRotorIncrements(), OBAtom::HasAlphaBetaUnsat(), OBAtom::IsAromaticNOxide(),
OBAtom::IsAxial(), OBBond::IsClosure(), OBRotorList::IsFixedBond(), OBAtom::IsHbondDonor(),
OpenBabel::KekulePropagate(), OBSSMatch::Match(), OBMolAtomBFSIter::OBMolAtomBFSIter(),
OBMolAtomDFSIter::OBMolAtomDFSIter(), OBAtomAtomIter::operator++(),
OBMolAtomBFSIter::operator++(), OBMolAtomDFSIter::operator++(), OBMol::PerceiveBondOrders(),
OBMol::PerceiveKekuleBonds(), OBAromaticTyper::PropagatePotentialAromatic(),
OBAromaticTyper::SelectRootAtoms(), OBRotorList::SetEvalAtoms(), OBAtom::SetHybAndGeom(),
OBAtom::SmallestBondAngle(), OBMol::start_kekulize(), and OBAromaticTyper::TraverseCycle().

double GetDistance ( int index )

Returns:
the distance to the atom defined by OBMol::GetAtom()

Referenced by OBBondTyper::AssignFunctionalGroupBonds().

double GetDistance ( OBAtom * b )

Member Function Documentation 174


Open Babel: API Documentation

Returns:
the distance to the supplied OBAtom

double GetAngle ( int b,


int c
)

Returns:
the angle defined by this atom -> b (vertex) -> c

Referenced by OBMol::GetAngle().

double GetAngle ( OBAtom * b,


OBAtom * c
)

Returns:
the angle defined by this atom -> b (vertex) -> c

void NewResidue ( ) [inline]


If no residue has been set for this atom, create a new one.

void AddResidue ( OBResidue * res ) [inline]


Add (set) the residue for this atom.

void DeleteResidue ( ) [inline]


Delete any residue associated with this atom.

void AddBond ( OBBond * bond ) [inline]


Add a bond to the internal list. Does not update the bond.

Referenced by OBMol::AddBond(), and OBBuilder::Connect().

OBBondIterator
void InsertBond ( i,
&
OBBond * bond
) [inline]
Insert bond into the internal list at the position from i Does not modify the bond.

Referenced by OBMol::AddBond().

Member Function Documentation 175


Open Babel: API Documentation

bool DeleteBond ( OBBond * bond )


Find bond and remove it from the internal list. Does not update the bond.

void ClearBond ( ) [inline]


Clear all bonding information in this atom (does not delete them).

bool HtoMethyl ( )
If this is a hydrogen atom, transform into a methyl group.

Returns:
success or failure

bool SetHybAndGeom ( int hyb )


Change the hybridization of this atom and modify the geometry accordingly

Returns:
success or failure

void ForceNoH ( ) [inline]


Mark that atom has no hydrogens attached.

bool HasNoHForced ( ) [inline]

Returns:
if atom has been marked as having no hydrogens attached

Referenced by OBMol::AssignSpinMultiplicity().

void ForceImplH ( ) [inline]


Mark that atom is not hydrogen deficient (For SMILES input)

Since:
version 2.2

bool HasImplHForced ( ) [inline]

Returns:
if atom has been marked as having no hydrogens attached

Since:
version 2.2

Member Function Documentation 176


Open Babel: API Documentation

Referenced by OBMol::AssignSpinMultiplicity().

unsigned int CountFreeOxygens ( ) const

Returns:
The number of oxygen atoms connected that only have one heavy valence

Referenced by OBAtom::IsCarboxylOxygen(), OBAtom::IsNitroOxygen(), OBAtom::IsPhosphateOxygen(),


and OBAtom::IsSulfateOxygen().

unsigned int ImplicitHydrogenCount ( ) const

Returns:
The number of hydrogens needed to fill the implicit valence of this atom

Referenced by OpenBabel::EvalAtomExpr(), OBMol::GetExactMass(), and OBMol::GetMolWt().

unsigned int ExplicitHydrogenCount ( bool ExcludeIsotopes = false ) const

Returns:
The number of hydrogens explicitly bound to this atom, optionally excluding D,T and isotope
explicitly set to 1

Referenced by OBMol::AssignSpinMultiplicity(), and OpenBabel::EvalAtomExpr().

unsigned int MemberOfRingCount ( ) const

Returns:
The number of rings that contain this atom

Referenced by OpenBabel::EvalAtomExpr().

unsigned int MemberOfRingSize ( ) const

Returns:
The size of the smallest ring that contains this atom (0 if not in a ring)

Referenced by OBAtom::SetHybAndGeom().

unsigned int CountRingBonds ( ) const

Returns:
The number of explicit ring connections to this atom

Member Function Documentation 177


Open Babel: API Documentation

Referenced by OpenBabel::EvalAtomExpr().

double SmallestBondAngle ( )

Returns:
The smallest angle of bonds to this atom

Referenced by OBMol::ConnectTheDots().

double AverageBondAngle ( )

Returns:
The average angle of bonds to this atom

Referenced by OBBondTyper::AssignFunctionalGroupBonds(), and OBMol::PerceiveBondOrders().

unsigned int BOSum ( ) const

Returns:
The sum of the bond orders of the bonds to the atom (i.e. double bond = 2...)

Referenced by OBMol::ConnectTheDots(), OBRing::GetRootAtom(), and OBMol::PerceiveBondOrders().

unsigned int KBOSum ( ) const

Returns:
The sum of the bond orders of bonds to the atom, considering only KDouble, KTriple bonds

Deprecated:
Use BOSum() instead

Referenced by OpenBabel::EvalAtomExpr().

bool HasResidue ( ) [inline]

Returns:
Is there any residue information?

Referenced by OBMol::AddHydrogens().

bool IsHydrogen ( ) [inline]

Returns:

Member Function Documentation 178


Open Babel: API Documentation

Is the atom hydrogen?

Referenced by OBMol::AddHydrogens(), OBResidueData::AssignBonds(),


OBGastChrg::AssignPartialCharges(), OBMol::AssignSpinMultiplicity(), OBMol::ConnectTheDots(),
OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(),
OBAtom::ExplicitHydrogenCount(), OBMol::FindTorsions(), OBMol::GetExactMass(),
OpenBabel::GetHvyBondSum(), OpenBabel::GetHvyValence(), OBAtom::GetHvyValence(),
OBMol::GetMolWt(), OBRotorRules::GetRotorIncrements(), OBAtom::HtoMethyl(),
OBAtom::IsHbondDonor(), OBAtom::IsHbondDonorH(), OBAtom::IsNonPolarHydrogen(),
OBAtom::IsPolarHydrogen(), OBMol::NumHvyAtoms(), OBAromaticTyper::SelectRootAtoms(), and
OBAtom::SetHybAndGeom().

bool IsCarbon ( ) [inline]

Returns:
Is the atom carbon?

Referenced by OBMol::getorden(), OBAtom::IsCarboxylOxygen(), OBMol::IsChiral(), and


OBMol::PerceiveKekuleBonds().

bool IsNitrogen ( ) [inline]

Returns:
Is the atom nitrogen?

Referenced by OBMol::AddHydrogens(), OpenBabel::ExpandKekule(), OBMol::getorden(),


OBRing::GetRootAtom(), OBAtom::IsAmideNitrogen(), OBAtom::IsAromaticNOxide(), OBMol::IsChiral(),
OBAtom::IsNitroOxygen(), OBMol::NewPerceiveKekuleBonds(), and OBMol::PerceiveKekuleBonds().

bool IsOxygen ( ) [inline]

Returns:
Is the atom oxygen?

Referenced by OBMol::AddHydrogens(), OBResidueData::AssignBonds(),


OBBondTyper::AssignFunctionalGroupBonds(), OBAtom::CountFreeOxygens(),
OpenBabel::ExpandKekule(), OBAtom::GetNewBondVector(), OBMol::getorden(),
OBRing::GetRootAtom(), OBAtom::IsAromaticNOxide(), OBAtom::IsCarboxylOxygen(),
OBAtom::IsNitroOxygen(), OBAtom::IsPhosphateOxygen(), OBAtom::IsSulfateOxygen(),
OBMol::NewPerceiveKekuleBonds(), and OBMol::PerceiveKekuleBonds().

bool IsSulfur ( ) [inline]

Returns:
Is the atom sulfur?

Member Function Documentation 179


Open Babel: API Documentation

Referenced by OBMol::AddHydrogens(), OpenBabel::ExpandKekule(), OBMol::getorden(),


OBRing::GetRootAtom(), OBAtom::HasAlphaBetaUnsat(), OBAtom::IsSulfateOxygen(),
OBMol::PerceiveKekuleBonds(), and OBMol::start_kekulize().

bool IsPhosphorus ( ) [inline]

Returns:
Is the atom phosphorus?

Referenced by OBMol::AddHydrogens(), OBAtom::HasAlphaBetaUnsat(), and


OBAtom::IsPhosphateOxygen().

bool IsAromatic ( ) const

Returns:
Is the atom aromatic?

Referenced by OpenBabel::EvalAtomExpr(), OBMol::GetGIVector(), OpenBabel::GetGIVector(),


OpenBabel::GetHvyBondSum(), OBAtom::IsAromaticNOxide(), and OpenBabel::KekulePropagate().

bool IsInRing ( ) const

Returns:
Is the atom in a ring?

Referenced by OpenBabel::EvalAtomExpr(), OBAromaticTyper::ExcludeSmallRing(),


OBMol::GetGIVector(), OBAtom::IsAxial(), OBAtom::MemberOfRingCount(),
OBAtom::MemberOfRingSize(), OBMol::PerceiveBondOrders(), OBAromaticTyper::SelectRootAtoms(),
and OBAtom::SetHybAndGeom().

bool IsInRingSize ( int size ) const

Returns:
Is the atom in a ring of a given size?

Referenced by OpenBabel::EvalAtomExpr(), and OBMol::getorden().

bool IsHeteroatom ( )

Returns:
Is this atom an element in the 15th or 16th main groups (i.e., N, O, P, S ...) ?

Referenced by OBAtom::GetHeteroValence().

Member Function Documentation 180


Open Babel: API Documentation

bool IsNotCorH ( )

Returns:
Is this atom any element except carbon or hydrogen?

bool IsConnected ( OBAtom * a1 )

Returns:
Is this atom directly connected to the supplied OBAtom?

Referenced by OBMol::ConnectTheDots(), OpenBabel::construct_g_matrix(),


OBAromaticTyper::ExcludeSmallRing(), OBAtom::IsOneFour(), OBMolPairIter::OBMolPairIter(), and
OBMolPairIter::operator++().

bool IsOneThree ( OBAtom * a1 )

Returns:
Is this atom related to the supplied OBAtom in a 1,3 bonding pattern?

Referenced by OBMolPairIter::OBMolPairIter(), and OBMolPairIter::operator++().

bool IsOneFour ( OBAtom * a1 )

Returns:
Is this atom related to the supplied OBAtom in a 1,4 bonding pattern?

bool IsCarboxylOxygen ( )

Returns:
Is this atom an oxygen in a carboxyl (-CO2 or CO2H) group?

bool IsPhosphateOxygen ( )

Returns:
Is this atom an oxygen in a phosphate (R-PO3) group?

bool IsSulfateOxygen ( )

Returns:
Is this atom an oxygen in a sulfate (-SO3) group?

bool IsNitroOxygen ( )

Member Function Documentation 181


Open Babel: API Documentation

Returns:
Is this atom an oxygen in a nitro (-NO2) group?

bool IsAmideNitrogen ( )
Returns true if nitrogen is part of an amide.

Returns:
Is this atom a nitrogen in an amide (-C(=O)NR2) group?

Referenced by OBMol::getorden().

bool IsPolarHydrogen ( )

Returns:
Is this atom a hydrogen connected to a polar atom (i.e., N, O, P, S)

bool IsNonPolarHydrogen ( )

Returns:
Is this atom a hydrogen connected to a non-polar atom (i.e., C)

Referenced by OBMol::DeleteNonPolarHydrogens().

bool IsAromaticNOxide ( )

Returns:
Is this atom an aromatic nitrogen with at least one double bond to an oxygen atom

bool IsChiral ( )

Returns:
Is this atom chiral?

Referenced by OpenBabel::EvalAtomExpr(), OBMol::FindChiralCenters(), and OBMol::IsChiral().

bool IsAxial ( )

Returns:
Is this atom an axial atom in a ring

bool IsClockwise ( ) [inline]

Member Function Documentation 182


Open Babel: API Documentation

Returns:
Does this atom have SMILES-specified clockwise "@@" stereochemistry?

Referenced by OpenBabel::CorrectChirality(), and OpenBabel::EvalAtomExpr().

bool IsAntiClockwise ( ) [inline]

Returns:
Does this atom have SMILES-specified anticlockwise "@" stereochemistry?

Referenced by OpenBabel::CorrectChirality(), and OpenBabel::EvalAtomExpr().

bool IsPositiveStereo ( ) [inline]

Returns:
Does this atom have a positive chiral volume?

bool IsNegativeStereo ( ) [inline]

Returns:
Does this atom have a negative chiral volume?

bool HasChiralitySpecified ( ) [inline]

Returns:
Does this atom have SMILES-specified stereochemistry?

Referenced by OpenBabel::CorrectChirality(), and OpenBabel::EvalAtomExpr().

bool HasChiralVolume ( ) [inline]

Returns:
Does this atom have a specified chiral volume?

bool IsHbondAcceptor ( )

Returns:
Is this atom a hydrogen-bond acceptor (receptor)?

bool IsHbondDonor ( )

Returns:

Member Function Documentation 183


Open Babel: API Documentation

Is this atom a hydrogen-bond donor?

Referenced by OBAtom::IsHbondDonorH().

bool IsHbondDonorH ( )

Returns:
Is this a hydrogen atom attached to a hydrogen-bond donor?

bool HasAlphaBetaUnsat ( bool includePandS = true )

Returns:
Whether a neighboring atom (alpha) has an unsaturated bond to a third atom (beta).

Parameters:
includePandS Whether to include phosphorus and sulfur neighbors in this determination (or to
exclude them)

This can be sketched as follows

'*'
\
a=b

where a and b are the 'apha' and 'beta' atoms, respectively and '*' indicates the current atom.

Referenced by OBAtom::GetNewBondVector().

bool HasBondOfOrder ( unsigned int bo )

Returns:
Whether this atom is connected to any bond with order == bo

Referenced by OBMol::PerceiveBondOrders().

int CountBondsOfOrder ( unsigned int bo )

Returns:
The count of bonds connected to this atom with order == bo

bool HasNonSingleBond ( )

Returns:
Whether this atom is connected to any bond with order >1

Member Function Documentation 184


Open Babel: API Documentation

Referenced by OBMol::PerceiveBondOrders().

bool HasSingleBond ( ) [inline]

Returns:
Does this atom have a single bond

bool HasDoubleBond ( ) [inline]

Returns:
Does this atom have a double bond

Referenced by OBBondTyper::AssignFunctionalGroupBonds(), and OpenBabel::FindConjugatedEZBonds().

bool HasAromaticBond ( ) [inline]

Returns:
Does this atom have an aromatic bond

Referenced by OBMol::NewPerceiveKekuleBonds().

bool MatchesSMARTS ( const char * pattern )

Returns:
Whether this atom matches the first atom in a given SMARTS pattern

[inline,
virtual OBBase* const std::map< std::string,
( ) virtual,
DoTransformations std::string > *
inherited]
Perform a set of transformations specified by the user

Typically these are program options to filter or modify an object For example, see
OBMol::DoTransformations() and OBMol::ClassDescription()

Reimplemented in OBMol.

static const char* ClassDescription ( ) [inline, static, inherited]

Returns:
A list of descriptions of command-line options for DoTransformations()

Reimplemented in OBMol, and OBReaction.

Member Function Documentation 185


Open Babel: API Documentation

T* CastAndClear ( bool clear = true ) [inline, inherited]


By default clears the object. Called from ReadMolecule of most format classes.

bool HasData ( const std::string & s ) [inherited]

Returns:
whether the generic attribute/value pair exists

Referenced by OBMol::AddAtom(), OBMol::FindAngles(), OBMol::FindSSSR(), OBMol::FindTorsions(),


OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(),
OBMol::GetEnergy(), OBMol::GetSSSR(), OBBase::HasData(), OBDescriptor::MatchPairData(),
OBMol::NewAtom(), OBMol::operator=(), and OBMol::SetEnergies().

const
bool HasData ( char s ) [inherited]
*

Returns:
whether the generic attribute/value pair exists

bool HasData ( const unsigned int type ) [inherited]

Returns:
whether the generic attribute/value pair exists, for a given OBGenericDataType

void DeleteData ( unsigned int type ) [inherited]


Delete any data matching the given OBGenericDataType.

Referenced by OBMol::AddAtom(), OBMol::BeginModify(), OBBuilder::CorrectStereoBonds(),


OBDescriptor::DeleteProperties(), OBMol::FindSSSR(), OBMol::NewAtom(), and OBForceField::Setup().

void DeleteData ( OBGenericData * gd ) [inherited]


Delete the given generic data from this object.

void DeleteData ( std::vector< OBGenericData * > & vg ) [inherited]


Delete all of the given generic data from this object.

const
bool DeleteData ( std::string s ) [inherited]
&
Deletes the generic data with the specified attribute, returning false if not found.

Member Function Documentation 186


Open Babel: API Documentation

[inline,
void SetData ( OBGenericData * d )
inherited]
Adds a data object; does nothing if d==NULL.

Referenced by OBMol::AddBond(), OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(),


OBMol::DoTransformations(), OBAtom::Duplicate(), OBMol::FindAngles(), OBMol::FindSSSR(),
OBMol::FindTorsions(), OBForceField::GetConformers(), OBForceField::GetCoordinates(),
OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(), OBMol::GetNextFragment(),
OBMol::GetSSSR(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::operator=(),
OBDescriptor::PredictAndSave(), OBMol::SetEnergies(), and OBMol::SetFormula().

void CloneData ( OBGenericData * d ) [inherited]


Adds a copy of a data object; does nothing if d == NULL

Since:
version 2.2

unsigned int DataSize ( ) const [inline, inherited]

Returns:
the number of OBGenericData items attached to this molecule.

OBGenericData * GetData ( const unsigned int type ) [inherited]

Returns:
the first matching data for a given type from OBGenericDataType or NULL if nothing matches

Referenced by OpenBabel::CalcSignedVolume(), OpenBabel::CorrectChirality(),


OBDescriptor::FilterCompare(), OBForceField::GetConformers(), OBForceField::GetCoordinates(),
OBMol::GetNextFragment(), OBDescriptor::GetValues(), OBMoleculeFormat::MakeCombinedMolecule(),
OBMolAngleIter::OBMolAngleIter(), OBMolRingIter::OBMolRingIter(),
OBMolTorsionIter::OBMolTorsionIter(), OBMol::operator=(), and OBDescriptor::PredictAndSave().

const
OBGenericData * GetData ( std::string s ) [inherited]
&

Returns:
any data matching the given attribute name or NULL if nothing matches

the value given an attribute name

OBGenericData * GetData ( const char * s ) [inherited]

Member Function Documentation 187


Open Babel: API Documentation

Returns:
any data matching the given attribute name or NULL if nothing matches

the value given an attribute name

[inline,
std::vector<OBGenericData*>& GetData ( )
inherited]

Returns:
all data, suitable for iterating

Referenced by OBMol::BeginModify(), OBMol::DoTransformations(), OBMol::FindSSSR(),


OBBase::GetData(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(),
OBMol::GetSSSR(), OBMol::SetEnergies(), and OBMol::SetFormula().

std::vector< OBGenericData * > GetData ( DataOrigin source ) [inherited]

Returns:
all data with a specific origin, suitable for iterating

std::vector< OBGenericData * > GetAllData ( const unsigned int type ) [inherited]

Returns:
the all matching data for a given type from OBGenericDataType or an empty vector if nothing
matches

Since:
version 2.2

OBDataIterator BeginData ( ) [inline, inherited]

Returns:
An iterator pointing to the beginning of the data

Referenced by OBMol::AddAtom(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(),


OBMol::NewAtom(), and OBMol::operator=().

[inline,
OBDataIterator EndData ( )
inherited]

Returns:
An iterator pointing to the end of the data

Referenced by OBMol::AddAtom(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(),


OBMol::NewAtom(), and OBMol::operator=().

Member Function Documentation 188


Open Babel: API Documentation

Member Data Documentation

char _ele [protected]


atomic number (type char to minimize space -- allows for 0..255 elements)

Referenced by OBAtom::Clear(), OBAtom::Duplicate(), OBAtom::GetAtomicMass(),


OBAtom::GetExactMass(), OBAtom::GetType(), OBAtom::IsHbondAcceptor(), OBAtom::IsHbondDonor(),
OBAtom::SetIsotope(), and OBAtom::SetType().

char _impval [protected]


implicit valence

Referenced by OBAtom::Clear(), OBAtom::GetImplicitValence(), and OBAtom::ImplicitHydrogenCount().

char _type[6] [protected]


atomic type

Referenced by OBAtom::Clear(), OBAtom::Duplicate(), OBAtom::GetType(), and OBAtom::SetType().

short _fcharge [protected]


formal charge

Referenced by OBAtom::Clear(), and OBAtom::Duplicate().

unsigned short _isotope [protected]


isotope (0 = most abundant)

Referenced by OBAtom::Clear(), OBAtom::Duplicate(), OBAtom::GetAtomicMass(),


OBAtom::GetExactMass(), OBAtom::GetType(), OBAtom::SetIsotope(), and OBAtom::SetType().

short _spinmultiplicity [protected]


atomic spin, e.g., 2 for radical 1 or 3 for carbene

Referenced by OBAtom::Clear(), and OBAtom::Duplicate().

unsigned int _idx [protected]


unique node index (GetIdx(), SetIdx())

Referenced by OBAtom::Clear(), and OBAtom::operator=().

Member Data Documentation 189


Open Babel: API Documentation

OBMol* _parent [protected]


parent molecule (if any)

Referenced by OBAtom::OBAtom().

std::vector<OBBond*> _vbond [protected]


bonds to this atom -- assumed to be one of the endpoints

Referenced by OBAtom::BeginBond(), OBAtom::BeginNbrAtom(), OBAtom::Clear(),


OBAtom::DeleteBond(), OBAtom::NextBond(), and OBAtom::NextNbrAtom().

unsigned int _cidx [protected]


index into coordinate array

Referenced by OBAtom::Clear(), OBAtom::GetVector(), and OBAtom::SetVector().

unsigned short _hyb [protected]


hybridization

Referenced by OBAtom::Clear(), OBAtom::Duplicate(), and OBAtom::GetHyb().

unsigned short _flags [protected]


bitwise flags (e.g. aromaticity)

Referenced by OBAtom::Clear(), and OBAtom::Duplicate().

double _pcharge [protected]


partial charge

Referenced by OBAtom::Clear(), OBAtom::Duplicate(), and OBAtom::GetPartialCharge().

double** _c [protected]
coordinate array in double*

Referenced by OpenBabel::CartesianToInternal(), OBAtom::Clear(), OBAtom::GetVector(), and


OBAtom::SetVector().

vector3 _v [mutable, protected]


coordinate vector

Referenced by OBAtom::Duplicate(), OBAtom::GetVector(), and OBAtom::SetVector().

Member Data Documentation 190


Open Babel: API Documentation

OBResidue* _residue [protected]


parent residue (if applicable)

Referenced by OBAtom::Clear(), OBAtom::Duplicate(), OBAtom::GetResidue(), and OBAtom::~OBAtom().

bool Visit
Used internally by graph traversal algorithms.

std::vector<OBGenericData*> _vdata [protected, inherited]


Custom data.

Referenced by OBBase::Clear(), OBBase::CloneData(), OBBase::DeleteData(), OBAtom::Duplicate(),


OBBase::GetAllData(), OBBase::GetData(), OBBase::HasData(), OBBond::OBBond(), OBMol::OBMol(),
and OBResidue::OBResidue().

The documentation for this class was generated from the following files:

• atom.h
• atom.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 191


OBAtomAtomIter Member List
This is the complete list of members for OBAtomAtomIter, including all inherited members.

OBAtomAtomIter() OBAtomAtomIter [inline]


OBAtomAtomIter(OBAtom *atm) OBAtomAtomIter
OBAtomAtomIter(OBAtom &atm) OBAtomAtomIter
OBAtomAtomIter(const OBAtomAtomIter &ai) OBAtomAtomIter
operator bool() const OBAtomAtomIter [inline]
operator*() const OBAtomAtomIter [inline]
operator++() OBAtomAtomIter
operator++(int) OBAtomAtomIter
operator->() const OBAtomAtomIter [inline]
operator=(const OBAtomAtomIter &ai) OBAtomAtomIter
~OBAtomAtomIter() OBAtomAtomIter [inline]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBAtomAtomIter

OBAtomAtomIter Member List 192


OBAtomAtomIter Class Reference
Iterate over all neighboring atoms to an OBAtom. More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBAtomAtomIter ()
OBAtomAtomIter (OBAtom *atm)
OBAtomAtomIter (OBAtom &atm)
OBAtomAtomIter (const OBAtomAtomIter &ai)
~OBAtomAtomIter ()
OBAtomAtomIter & operator= (const OBAtomAtomIter &ai)
operator bool () const
OBAtomAtomIter & operator++ ()
OBAtomAtomIter operator++ (int)
OBAtom * operator-> () const
OBAtom & operator* () const

Detailed Description
Iterate over all neighboring atoms to an OBAtom.

To facilitate iteration through all neighbors of an atom, without resorting to bond indexes (which may change
in the future), a variety of iterator classes and methods are provided.

This has been made significantly easier by a series of macros in the obiter.h header file:

\#define FOR_NBORS_OF_ATOM(a,p) for( OBAtomAtomIter a(p); a; ++a )

Here is an example:

#include <openbabel/obiter.h>
#include <openbabel/mol.h>

OBMol mol;
FOR_ATOMS_OF_MOL(a, mol)
{
// The variable a behaves like OBAtom* when used with -> and * but
// but needs to be explicitly converted when appearing as a parameter
// in a function call - use &*a
FOR_NBORS_OF_ATOM(b, &*a)
{
...
}
}

OBAtomAtomIter Class Reference 193


Open Babel: API Documentation

Constructor & Destructor Documentation

OBAtomAtomIter ( ) [inline]

OBAtomAtomIter ( OBAtom * atm )

OBAtomAtomIter ( OBAtom & atm )

OBAtomAtomIter ( const OBAtomAtomIter & ai )

~OBAtomAtomIter ( ) [inline]

Member Function Documentation

const
OBAtomAtomIter & operator= ( OBAtomAtomIter ai )
&

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more neighbors)

OBAtomAtomIter & operator++ ( )


Preincrement -- advance to the next neighbor and return.

Referenced by OBAtomAtomIter::operator++().

OBAtomAtomIter operator++ ( int )


Postincrement -- return the current neighbor and advance to the next.

const
OBAtom* operator-> ( )
[inline]

Returns:
a pointer to the current atom

Detailed Description 194


Open Babel: API Documentation

const
OBAtom& operator* ( )
[inline]

Returns:
a reference to the current atom

The documentation for this class was generated from the following files:

• obiter.h
• obiter.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 195


OBAtomBondIter Member List
This is the complete list of members for OBAtomBondIter, including all inherited members.

OBAtomBondIter() OBAtomBondIter [inline]


OBAtomBondIter(OBAtom *atm) OBAtomBondIter
OBAtomBondIter(OBAtom &atm) OBAtomBondIter
OBAtomBondIter(const OBAtomBondIter &bi) OBAtomBondIter
operator bool() const OBAtomBondIter [inline]
operator*() const OBAtomBondIter [inline]
operator++() OBAtomBondIter
operator++(int) OBAtomBondIter
operator->() const OBAtomBondIter [inline]
operator=(const OBAtomBondIter &bi) OBAtomBondIter
~OBAtomBondIter() OBAtomBondIter [inline]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBAtomBondIter

OBAtomBondIter Member List 196


OBAtomBondIter Class Reference
Iterate over all bonds on an OBAtom. More...

#include <openbabel/obiter.h>

List of all members.

Public Member Functions


OBAtomBondIter ()
OBAtomBondIter (OBAtom *atm)
OBAtomBondIter (OBAtom &atm)
OBAtomBondIter (const OBAtomBondIter &bi)
~OBAtomBondIter ()
OBAtomBondIter & operator= (const OBAtomBondIter &bi)
operator bool () const
OBAtomBondIter & operator++ ()
OBAtomBondIter operator++ (int)
OBBond * operator-> () const
OBBond & operator* () const

Detailed Description
Iterate over all bonds on an OBAtom.

To facilitate iteration through all bonds on an atom, without resorting to bond indexes (which may change in
the future) a variety of iterator classes and methods are provided.

This has been made significantly easier by a series of macros in the obiter.h header file:

\#define FOR_BONDS_OF_ATOM(b,p) for( OBAtomBondIter b(p); b; ++b )

Here is an example:

#include <openbabel/obiter.h>
#include <openbabel/mol.h>

OBAtom atom;
unsigned int tripleBondCount;
FOR_BONDS_OF_ATOM(b, atom)
{
// The variable b behaves like OBBond* when used with -> and * but
// but needs to be explicitly converted when appearing as a parameter
// in a function call - use &*b
if (b->GetBO() == 3)
tripleBondCount++;
}

OBAtomBondIter Class Reference 197


Open Babel: API Documentation

Constructor & Destructor Documentation

OBAtomBondIter ( ) [inline]

OBAtomBondIter ( OBAtom * atm )

OBAtomBondIter ( OBAtom & atm )

OBAtomBondIter ( const OBAtomBondIter & bi )

~OBAtomBondIter ( ) [inline]

Member Function Documentation

const
OBAtomBondIter & operator= ( OBAtomBondIter bi )
&

operator bool ( ) const [inline]

Returns:
Whether the iterator can still advance (i.e., visit more bonds)

OBAtomBondIter & operator++ ( )


Preincrement -- advance to the next bond and return.

Referenced by OBAtomBondIter::operator++().

OBAtomBondIter operator++ ( int )


Postincrement -- return the current state and advance to the next bond.

const
OBBond* operator-> ( )
[inline]

Returns:
a pointer to the current bond

Constructor & Destructor Documentation 198


Open Babel: API Documentation

const
OBBond& operator* ( )
[inline]

Returns:
a reference to the current bond

The documentation for this class was generated from the following files:

• obiter.h
• obiter.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 199


OBAtomClassData Member List
This is the complete list of members for OBAtomClassData, including all inherited members.

_attr OBGenericData [protected]


_map OBAtomClassData [protected]
_source OBGenericData [protected]
_type OBGenericData [protected]
Add(int indx, int cl) OBAtomClassData [inline]
Clear() OBAtomClassData [inline]
[inline,
Clone(OBBase *) const OBAtomClassData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetClass(int indx) const OBAtomClassData [inline]
GetClassString(int indx) OBAtomClassData [inline]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
HasClass(int indx) const OBAtomClassData [inline]
OBAtomClassData() OBAtomClassData [inline]
OBGenericData(const std::string attr="undefined", const unsigned
int type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
SetAttribute(const std::string &v) OBGenericData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
size() OBAtomClassData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:

OBAtomClassData Member List 200


Open Babel: API Documentation

Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBAtomClassData

OBAtomClassData Member List 201


OBAtomClassData Class Reference
Handle atom classes in reaction SMILES/SMIRKS. More...

#include <openbabel/atomclass.h>

Inheritance diagram for OBAtomClassData:

[legend]

List of all members.

Public Member Functions


OBAtomClassData ()
virtual OBGenericData * Clone (OBBase *) const
void Clear ()
void Add (int indx, int cl)
bool HasClass (int indx) const
int GetClass (int indx) const
std::string GetClassString (int indx)
int size ()
void SetAttribute (const std::string &v)
void SetOrigin (const DataOrigin s)
virtual const std::string & GetAttribute () const
unsigned int GetDataType () const
virtual const std::string & GetValue () const
virtual DataOrigin GetOrigin () const

Protected Attributes
std::map< int, int > _map
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Handle atom classes in reaction SMILES/SMIRKS.

Since:

OBAtomClassData Class Reference 202


Open Babel: API Documentation

version 2.2

Class for attaching to OBMol to hold the info from SMILES like [C:2] Useful for reaction SMILES
(SMIRKS). It influences the atom id attribute in CML. Not all atoms need have an atom class. The atom class
can be any positive or negative integer.

Constructor & Destructor Documentation

OBAtomClassData ( ) [inline]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

void Clear ( void ) [inline]


Erase contents.

void Add ( int indx,


int cl
) [inline]
Add an individual value.

const
bool HasClass ( int indx )
[inline]

Returns:
true if there is an entry for atom index

int GetClass ( int indx ) const [inline]

Returns:
value of class index (Test with HasClass first)

std::string GetClassString ( int indx ) [inline]


If there is an entry for indx, return ":n" where n is the atomclass value; otherwise return an empty string

int size ( ) [inline]

Detailed Description 203


Open Babel: API Documentation

[inline,
void SetAttribute ( const std::string & v )
inherited]
Set the attribute (key), which can be used to retrieve this data.

Referenced by OBGastChrg::AssignPartialCharges(), OBForceField::GetAtomTypes(),


OBMol::GetFormula(), OBForceField::GetPartialCharges(), OBDescriptor::PredictAndSave(), and
OBMol::SetFormula().

[inline,
void SetOrigin ( const DataOrigin s )
inherited]
Set the origin of this data, which can be used to filter the data.

Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(),


OBMol::FindAngles(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(),
OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().

const [inline, virtual,


virtual const std::string& GetAttribute ( )
inherited]

Returns:
The attribute (key), which can be used to retrieve this data

Referenced by OBMoleculeFormat::MakeCombinedMolecule().

unsigned int GetDataType ( ) const [inline, inherited]

Returns:
the data type for this object as defined in OBGenericDataType

virtual const std::string& GetValue ( ) const [inline, virtual, inherited]


Base class returns a default value (the attribute type) but should never be called.

Reimplemented in OBCommentData, and OBPairData.

Referenced by OBDescriptor::FilterCompare(), and OBDescriptor::GetValues().

virtual DataOrigin GetOrigin ( ) const [inline, virtual, inherited]

Member Data Documentation

std::map<int,int> _map [protected]

Member Function Documentation 204


Open Babel: API Documentation

std::string _attr [protected, inherited]


attribute tag (e.g., "UnitCell", "Comment" or "Author")

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

unsigned int _type [protected, inherited]


attribute type -- declared for each subclass

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

DataOrigin _source [protected, inherited]


source of data for accounting

Referenced by OBChiralData::operator=(), OBTorsionData::operator=(), OBAngleData::operator=(),


OBConformerData::operator=(), and OBSymmetryData::operator=().

The documentation for this class was generated from the following file:

• atomclass.h

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 205


OBAtomTyper Member List
This is the complete list of members for OBAtomTyper, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
AssignHyb(OBMol &) OBAtomTyper
AssignImplicitValence(OBMol &) OBAtomTyper
AssignTypes(OBMol &) OBAtomTyper
CorrectAromaticNitrogens(OBMol &) OBAtomTyper
GetSize() OBAtomTyper [inline, virtual]
Init() OBGlobalDataBase
OBAtomTyper() OBAtomTyper
OBGlobalDataBase() OBGlobalDataBase [inline]
ParseLine(const char *) OBAtomTyper [virtual]
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
~OBAtomTyper() OBAtomTyper
~OBGlobalDataBase() OBGlobalDataBase [inline, virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:58 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

OBAtomTyper Member List 206


Open Babel: API Documentation
• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBAtomTyper

OBAtomTyper Member List 207


OBAtomTyper Class Reference
Assigns atom types, hybridization, implicit valence and formal charges. More...

#include <openbabel/typer.h>

Inheritance diagram for OBAtomTyper:

[legend]

List of all members.

Public Member Functions


OBAtomTyper ()
~OBAtomTyper ()
void ParseLine (const char *)
unsigned int GetSize ()
void AssignHyb (OBMol &)
void AssignTypes (OBMol &)
void AssignImplicitValence (OBMol &)
void CorrectAromaticNitrogens (OBMol &)
void Init ()
void SetReadDirectory (char *dir)
void SetEnvironmentVariable (char *var)

Protected Attributes
bool _init
const char * _dataptr
std::string _filename
std::string _dir
std::string _subdir
std::string _envvar

Detailed Description
Assigns atom types, hybridization, implicit valence and formal charges.

The OBAtomTyper class is designed to read in a list of atom typing rules and apply them to molecules. The
code that performs atom typing is not usually used directly as atom typing, hybridization assignment, implicit

OBAtomTyper Class Reference 208


Open Babel: API Documentation

valence assignment and charge are all done automatically when their corresponding values are requested of
atoms:

atom->GetType();
atom->GetFormalCharge();
atom->GetHyb();

Constructor & Destructor Documentation

OBAtomTyper ( )

~OBAtomTyper ( )

Member Function Documentation

void ParseLine ( const char * ) [virtual]


Specified by particular table classes (parses an individual data line).

Reimplemented from OBGlobalDataBase.

unsigned int GetSize ( ) [inline, virtual]

Returns:
the number of implicit valence rules

Reimplemented from OBGlobalDataBase.

OBMol
void AssignHyb ( mol )
&
Assign atomic hybridization (1 = sp, 2 = sp2, 3 = sp3...).

Referenced by OBAtom::GetHyb().

OBMol
void AssignTypes ( mol )
&
Assign external atomic types (i.e., EXTTYP lines in atomtyp.txt).

Referenced by OBAtom::GetType().

OBMol
void AssignImplicitValence ( mol )
&
Assign implicit valence (i.e., given an atomic type, what is the expected number of bonds to this atom

Detailed Description 209


Open Babel: API Documentation

Referenced by OBAtom::GetImplicitValence(), and OBAtom::ImplicitHydrogenCount().

void CorrectAromaticNitrogens ( OBMol & mol )


Correct typing, valence, and hybridization for aromatic nitrogen atoms.

Currently sets OBMol::SetAromaticCorrected and returns.

Deprecated:
Currently unused for anything significant.

Referenced by OBAtomTyper::AssignImplicitValence(), and OBPhModel::CorrectForPH().

void Init ( ) [inherited]


Read in the data file, falling back as needed.

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(),


OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(),
OBAtomTyper::AssignImplicitValence(), OBPhModel::AssignSeedPartialCharge(),
OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(), OBAtomTyper::CorrectAromaticNitrogens(),
OBElementTable::CorrectedBondRad(), OBElementTable::CorrectedVdwRad(),
OBPhModel::CorrectForPH(), OBElementTable::GetAllredRochowElectroNeg(),
OBElementTable::GetAtomicNum(), OBElementTable::GetCovalentRad(),
OBElementTable::GetElectronAffinity(), OBElementTable::GetElectroNeg(),
OBIsotopeTable::GetExactMass(), OBTypeTable::GetFromType(), OBElementTable::GetIonization(),
OBElementTable::GetMass(), OBElementTable::GetMaxBonds(), OBElementTable::GetName(),
OBElementTable::GetNumberOfElements(), OBElementTable::GetRGB(),
OBRotorRules::GetRotorIncrements(), OBElementTable::GetSymbol(), OBTypeTable::GetToType(),
OBElementTable::GetVdwRad(), OBTypeTable::SetFromType(), OBResidueData::SetResName(),
OBTypeTable::SetToType(), and OBTypeTable::Translate().

[inline,
void SetReadDirectory ( char * dir )
inherited]
Set the directory before calling Init().

void SetEnvironmentVariable ( char * var ) [inline, inherited]


Set the environment variable to use before calling Init().

Member Data Documentation

bool _init [protected, inherited]


Whether the data been read already.

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(),


OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(),

Member Function Documentation 210


Open Babel: API Documentation

OBAtomTyper::AssignImplicitValence(), OBPhModel::AssignSeedPartialCharge(),
OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(), OBAtomTyper::CorrectAromaticNitrogens(),
OBElementTable::CorrectedBondRad(), OBElementTable::CorrectedVdwRad(),
OBPhModel::CorrectForPH(), OBElementTable::GetAllredRochowElectroNeg(),
OBElementTable::GetAtomicNum(), OBElementTable::GetCovalentRad(),
OBElementTable::GetElectronAffinity(), OBElementTable::GetElectroNeg(),
OBIsotopeTable::GetExactMass(), OBTypeTable::GetFromType(), OBElementTable::GetIonization(),
OBElementTable::GetMass(), OBElementTable::GetMaxBonds(), OBElementTable::GetName(),
OBElementTable::GetNumberOfElements(), OBElementTable::GetRGB(),
OBRotorRules::GetRotorIncrements(), OBElementTable::GetSymbol(), OBTypeTable::GetToType(),
OBElementTable::GetVdwRad(), OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),
OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), OBTypeTable::OBTypeTable(),
OBTypeTable::SetFromType(), OBResidueData::SetResName(), OBTypeTable::SetToType(), and
OBTypeTable::Translate().

const char* _dataptr [protected, inherited]


Default data table if file is unreadable.

Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),


OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _filename [protected, inherited]


File to search for.

Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),


OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _dir [protected, inherited]


Data directory for file if _envvar fails.

Referenced by OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(),


OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(),
OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(),
OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _subdir [protected, inherited]


Subdirectory (if using environment variable).

Referenced by OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(),


OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(),

Member Data Documentation 211


Open Babel: API Documentation

OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(),


OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _envvar [protected, inherited]


Environment variable to check first.

Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),


OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

The documentation for this class was generated from the following files:

• typer.h
• typer.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:58 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 212


OBBase Member List
This is the complete list of members for OBBase, including all inherited members.

_vdata OBBase [protected]


BeginData() OBBase [inline]
CastAndClear(bool clear=true) OBBase [inline]
[inline,
ClassDescription() OBBase
static]
Clear() OBBase [virtual]
CloneData(OBGenericData *d) OBBase
DataSize() const OBBase [inline]
DeleteData(unsigned int type) OBBase
DeleteData(OBGenericData *) OBBase
DeleteData(std::vector< OBGenericData * > &) OBBase
DeleteData(const std::string &s) OBBase
[inline,
DoTransformations(const std::map< std::string, std::string > *) OBBase
virtual]
EndData() OBBase [inline]
GetAllData(const unsigned int type) OBBase
GetData(const unsigned int type) OBBase
GetData(const std::string &) OBBase
GetData(const char *) OBBase
GetData() OBBase [inline]
GetData(DataOrigin source) OBBase
HasData(const std::string &) OBBase
HasData(const char *) OBBase
HasData(const unsigned int type) OBBase
SetData(OBGenericData *d) OBBase [inline]
[inline,
~OBBase() OBBase
virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:

OBBase Member List 213


Open Babel: API Documentation

Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBBase

OBBase Member List 214


OBBase Class Reference
Base Class. More...

#include <openbabel/base.h>

Inheritance diagram for OBBase:

[legend]

List of all members.

Public Member Functions


virtual ~OBBase ()
virtual bool Clear ()
virtual OBBase * DoTransformations (const std::map< std::string, std::string > *)
template<class T>
T * CastAndClear (bool clear=true)
Generic data handling methods (via OBGenericData)
bool HasData (const std::string &)
bool HasData (const char *)
bool HasData (const unsigned int type)
void DeleteData (unsigned int type)
void DeleteData (OBGenericData *)
void DeleteData (std::vector< OBGenericData * > &)
bool DeleteData (const std::string &s)
void SetData (OBGenericData *d)
void CloneData (OBGenericData *d)
unsigned int DataSize () const
OBGenericData * GetData (const unsigned int type)
OBGenericData * GetData (const std::string &)
OBGenericData * GetData (const char *)
std::vector< OBGenericData * > GetAllData (const unsigned int type)
std::vector< OBGenericData * > & GetData ()
std::vector< OBGenericData * > GetData (DataOrigin source)
OBDataIterator BeginData ()
OBDataIterator EndData ()

OBBase Class Reference 215


Open Babel: API Documentation

Static Public Member Functions


static const char * ClassDescription ()

Protected Attributes
std::vector< OBGenericData * > _vdata

Detailed Description
Base Class.

The various classes (Atom, Bond, Molecule) inherit from base classes-- OBBase is largely a placeholder class.
It also allows adding, deleting, and retrieving OBGenericData objects, which are ways to store arbitrary data
for any atom, bond, molecule, or residue.

For example, a graphics program may want to allow users to add labels to individual atoms:

string atomLabel; // e.g., from the user adding annotation to an atom


if (!atom.HasData("UserLabel")) // stored textual data as an OBPairData
{
OBPairData *label = new OBPairData;
label->SetAttribute("UserLabel");
label->SetValue(atomLabel);
label->SetOrigin(userInput); // set by user, not by Open Babel

atom.SetData(label);
}

This class is also important in the OBConversion class. Any derived class of OBBase can be supported in
reading or writing data. While most OBFormat "translators" are designed around reading molecular data, the
OBConversion framework can support any base object. For example OBReaction supports reading and
writing reaction files, OBGrid supports reading and writing 2D or 3D "grids" of numeric data.

Therefore if you want to expand the range of input or output via the OBConversion and OBFormat classes,
you will also need to make sure you define an appropriate derived class from OBBase.

Constructor & Destructor Documentation

[inline,
virtual ~OBBase ( )
virtual]

Member Function Documentation

bool Clear ( void ) [virtual]

Public Member Functions 216


Open Babel: API Documentation

Clear any and all data associated with this object.

This method can be called by OBConversion::Read() before reading data. Derived classes should be sure to
call OBBase::Clear() to remove inherited generic data.

Returns:
Whether the call was successful.

Since:
version 2.1.

Reimplemented in OBAtom, OBMol, and OBResidue.

Referenced by OBResidue::Clear(), OBMol::Clear(), and OBAtom::Clear().

[inline,
virtual OBBase* DoTransformations ( const std::map< std::string, std::string > * )
virtual]
Perform a set of transformations specified by the user

Typically these are program options to filter or modify an object For example, see
OBMol::DoTransformations() and OBMol::ClassDescription()

Reimplemented in OBMol.

static const char* ClassDescription ( ) [inline, static]

Returns:
A list of descriptions of command-line options for DoTransformations()

Reimplemented in OBMol, and OBReaction.

clear =
T* CastAndClear ( bool ) [inline]
true
By default clears the object. Called from ReadMolecule of most format classes.

bool HasData ( const std::string & s )

Returns:
whether the generic attribute/value pair exists

Referenced by OBMol::AddAtom(), OBMol::FindAngles(), OBMol::FindSSSR(), OBMol::FindTorsions(),


OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(),
OBMol::GetEnergy(), OBMol::GetSSSR(), OBBase::HasData(), OBDescriptor::MatchPairData(),
OBMol::NewAtom(), OBMol::operator=(), and OBMol::SetEnergies().

Member Function Documentation 217


Open Babel: API Documentation

bool HasData ( const char * s )

Returns:
whether the generic attribute/value pair exists

bool HasData ( const unsigned int type )

Returns:
whether the generic attribute/value pair exists, for a given OBGenericDataType

void DeleteData ( unsigned int type )


Delete any data matching the given OBGenericDataType.

Referenced by OBMol::AddAtom(), OBMol::BeginModify(), OBBuilder::CorrectStereoBonds(),


OBDescriptor::DeleteProperties(), OBMol::FindSSSR(), OBMol::NewAtom(), and OBForceField::Setup().

void DeleteData ( OBGenericData * gd )


Delete the given generic data from this object.

void DeleteData ( std::vector< OBGenericData * > & vg )


Delete all of the given generic data from this object.

const
bool DeleteData ( std::string s )
&
Deletes the generic data with the specified attribute, returning false if not found.

void SetData ( OBGenericData * d ) [inline]


Adds a data object; does nothing if d==NULL.

Referenced by OBMol::AddBond(), OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(),


OBMol::DoTransformations(), OBAtom::Duplicate(), OBMol::FindAngles(), OBMol::FindSSSR(),
OBMol::FindTorsions(), OBForceField::GetConformers(), OBForceField::GetCoordinates(),
OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(), OBMol::GetNextFragment(),
OBMol::GetSSSR(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::operator=(),
OBDescriptor::PredictAndSave(), OBMol::SetEnergies(), and OBMol::SetFormula().

void CloneData ( OBGenericData * d )


Adds a copy of a data object; does nothing if d == NULL

Since:
version 2.2

Member Function Documentation 218


Open Babel: API Documentation

unsigned int DataSize ( ) const [inline]

Returns:
the number of OBGenericData items attached to this molecule.

OBGenericData * GetData ( const unsigned int type )

Returns:
the first matching data for a given type from OBGenericDataType or NULL if nothing matches

Referenced by OpenBabel::CalcSignedVolume(), OpenBabel::CorrectChirality(),


OBDescriptor::FilterCompare(), OBForceField::GetConformers(), OBForceField::GetCoordinates(),
OBMol::GetNextFragment(), OBDescriptor::GetValues(), OBMoleculeFormat::MakeCombinedMolecule(),
OBMolAngleIter::OBMolAngleIter(), OBMolRingIter::OBMolRingIter(),
OBMolTorsionIter::OBMolTorsionIter(), OBMol::operator=(), and OBDescriptor::PredictAndSave().

OBGenericData * GetData ( const std::string & s )

Returns:
any data matching the given attribute name or NULL if nothing matches

the value given an attribute name

OBGenericData * GetData ( const char * s )

Returns:
any data matching the given attribute name or NULL if nothing matches

the value given an attribute name

std::vector< OBGenericData * > GetAllData ( const unsigned int type )

Returns:
the all matching data for a given type from OBGenericDataType or an empty vector if nothing
matches

Since:
version 2.2

std::vector<OBGenericData*>& GetData ( ) [inline]

Returns:
all data, suitable for iterating

Member Function Documentation 219


Open Babel: API Documentation

Referenced by OBMol::BeginModify(), OBMol::DoTransformations(), OBMol::FindSSSR(),


OBBase::GetData(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(),
OBMol::GetSSSR(), OBMol::SetEnergies(), and OBMol::SetFormula().

std::vector< OBGenericData * > GetData ( DataOrigin source )

Returns:
all data with a specific origin, suitable for iterating

OBDataIterator BeginData ( ) [inline]

Returns:
An iterator pointing to the beginning of the data

Referenced by OBMol::AddAtom(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(),


OBMol::NewAtom(), and OBMol::operator=().

OBDataIterator EndData ( ) [inline]

Returns:
An iterator pointing to the end of the data

Referenced by OBMol::AddAtom(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(),


OBMol::NewAtom(), and OBMol::operator=().

Member Data Documentation

std::vector<OBGenericData*> _vdata [protected]


Custom data.

Referenced by OBBase::Clear(), OBBase::CloneData(), OBBase::DeleteData(), OBAtom::Duplicate(),


OBBase::GetAllData(), OBBase::GetData(), OBBase::HasData(), OBBond::OBBond(), OBMol::OBMol(),
and OBResidue::OBResidue().

The documentation for this class was generated from the following files:

• base.h
• base.cpp

Member Data Documentation 220


Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 221


OBBitVec Member List
This is the complete list of members for OBBitVec, including all inherited members.

BitIsOn(int bit_offset) const OBBitVec [inline]


BitIsSet(unsigned bit_offset) const OBBitVec [inline]
Clear() OBBitVec
CountBits() const OBBitVec
Empty() const OBBitVec [inline]
EndBit() const OBBitVec [inline]
FirstBit(unsigned bit_offset=0) const OBBitVec [inline]
Fold(unsigned new_bit_size) OBBitVec
FromString(const std::string &line, int bits) OBBitVec
FromVecInt(const std::vector< int > &bit_offsets) OBBitVec
GetSize() const OBBitVec [inline]
GetWords(word_vector &vec) OBBitVec [inline]
IsEmpty() const OBBitVec
Negate() OBBitVec [inline]
NextBit(int last_bit_offset) const OBBitVec
OBBitVec() OBBitVec [inline]
OBBitVec(unsigned size_in_bits) OBBitVec [inline]
OBBitVec(const OBBitVec &bv) OBBitVec [inline]
operator &(const OBBitVec &bv1, const OBBitVec &bv2) OBBitVec [friend]
operator &=(const OBBitVec &bv) OBBitVec
operator+=(const OBBitVec &bv) OBBitVec
operator-(const OBBitVec &bv1, const OBBitVec &bv2) OBBitVec [friend]
operator-=(const OBBitVec &bv) OBBitVec
operator<(const OBBitVec &bv1, const OBBitVec &bv2) OBBitVec [friend]
operator<<(std::ostream &os, const OBBitVec &bv) OBBitVec [friend]
operator=(const OBBitVec &bv) OBBitVec
operator==(const OBBitVec &bv1, const OBBitVec &bv2) OBBitVec [friend]
operator>>(std::istream &is, OBBitVec &bv) OBBitVec [friend]
operator[](int bit_offset) const OBBitVec [inline]
operator^(const OBBitVec &bv1, const OBBitVec &bv2) OBBitVec [friend]
operator^=(const OBBitVec &bv) OBBitVec
operator|(const OBBitVec &bv1, const OBBitVec &bv2) OBBitVec [friend]
operator|=(const OBBitVec &bv) OBBitVec
operator|=(int bit_offset) OBBitVec [inline]
Resize(unsigned size_in_bits) OBBitVec [inline]
ResizeWords(unsigned size_in_words) OBBitVec [inline]
SetBitOff(unsigned bit_offset) OBBitVec
SetBitOn(unsigned bit_offset) OBBitVec

OBBitVec Member List 222


Open Babel: API Documentation

SetRangeOff(unsigned lo_bit_offset, unsigned hi_bit_offset) OBBitVec


SetRangeOn(unsigned lo_bit_offset, unsigned hi_bit_offset) OBBitVec
ToVecInt(std::vector< int > &bit_offsets) const OBBitVec
word_vector typedef OBBitVec

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBBitVec

OBBitVec Member List 223


OBBitVec Class Reference
A speed-optimized vector of bits. More...

#include <openbabel/bitvec.h>

List of all members.

Public Types
typedef std::vector< unsigned > word_vector

Public Member Functions


OBBitVec ()
OBBitVec (unsigned size_in_bits)
OBBitVec (const OBBitVec &bv)
void SetBitOn (unsigned bit_offset)
void SetBitOff (unsigned bit_offset)
void SetRangeOn (unsigned lo_bit_offset, unsigned hi_bit_offset)
void SetRangeOff (unsigned lo_bit_offset, unsigned hi_bit_offset)
void Fold (unsigned new_bit_size)
int FirstBit (unsigned bit_offset=0) const
int NextBit (int last_bit_offset) const
int EndBit () const
unsigned GetSize () const
unsigned CountBits () const
bool Empty () const
bool IsEmpty () const
bool Resize (unsigned size_in_bits)
bool ResizeWords (unsigned size_in_words)
bool BitIsSet (unsigned bit_offset) const
bool BitIsOn (int bit_offset) const
void FromVecInt (const std::vector< int > &bit_offsets)
void FromString (const std::string &line, int bits)
void ToVecInt (std::vector< int > &bit_offsets) const
void Clear ()
void Negate ()
void GetWords (word_vector &vec)
OBBitVec & operator= (const OBBitVec &bv)
OBBitVec & operator &= (const OBBitVec &bv)
OBBitVec & operator|= (const OBBitVec &bv)
OBBitVec & operator|= (int bit_offset)
OBBitVec & operator^= (const OBBitVec &bv)
OBBitVec & operator-= (const OBBitVec &bv)
OBBitVec & operator+= (const OBBitVec &bv)
bool operator[] (int bit_offset) const

OBBitVec Class Reference 224


Open Babel: API Documentation

Friends
OBERROR OBBitVec operator| (const OBBitVec &bv1, const OBBitVec &bv2)
OBERROR OBBitVec operator & (const OBBitVec &bv1, const OBBitVec &bv2)
OBERROR OBBitVec operator^ (const OBBitVec &bv1, const OBBitVec &bv2)
OBERROR OBBitVec operator- (const OBBitVec &bv1, const OBBitVec &bv2)
OBERROR bool operator== (const OBBitVec &bv1, const OBBitVec &bv2)
OBERROR bool operator< (const OBBitVec &bv1, const OBBitVec &bv2)
OBERROR std::istream & operator>> (std::istream &is, OBBitVec &bv)
OBERROR std::ostream & operator<< (std::ostream &os, const OBBitVec &bv)

Detailed Description
A speed-optimized vector of bits.

Fast and efficient bitstring class.

This class implements a fast vector of bits using internally a vector of processor native unsigned words. Any
bits which are out of reach of the current size are considered to be zero. Streamlined, corrected and
documented by kshepherd1@users.sourceforge.net

The OBBitVec class is a fast and efficient bitstring class that is handy to use as a truth table. Truth tables are
an easy way to store whether a list of items has a particular property. Instances of OBBitVec can be
dynamically resized, and have a number of overloaded operators that make code simple and readable. The
following examples demonstrate uses of the OBBitVec class:

OBBitVec bv1,bv2,bv3;
bv1.SetBitOn(5);
bv2.SetBitOff(200);
bv1 |= bv2;
bv1 = bv1 & bv2;
if (bv1.IsEmpty()) // IsEmpty() returns true if no bits are set on
{
std::cout << "bv1 = " << bv1 << std::endl;
}

int bit;
for (bit = bv1.NextBit(0);bit != bv1.EndBit();bit = bv1.NextBit(bit))
{
cout << "the next bit turned on is " << bit << endl;
}

Member Typedef Documentation

typedef std::vector<unsigned> word_vector

Friends 225
Open Babel: API Documentation

Constructor & Destructor Documentation

OBBitVec ( ) [inline]
Construct a bit vector of the default size.

Construct a bit vector of STARTWORDS size, cleared to all zero bits.

OBBitVec ( unsigned size_in_bits ) [inline]


Construct a bit vector of maxbits bits.

Construct a bit vector with a size in bits of size_in_bits rounded up to the nearest word and cleared to all
zero bits.

Parameters:
[in] size_in_bits The number of bits for which to reserve space

OBBitVec ( const OBBitVec & bv ) [inline]


Copy constructor (result has same number of bits).

Construct a bit vector which is an exact duplicate of bv.

Parameters:
[in] bv The other bit vector to copy to this

Member Function Documentation

void SetBitOn ( unsigned bit_offset )


Set the bit_offset 'th bit to 1.

Set the bit_offset 'th bit to 1 Increases the size of this bit vector if necessary

Parameters:
[in] bit_offset a zero based offset into the bit vector

Referenced by OBFFConstraints::AddAtomConstraint(), OBFFConstraints::AddAtomXConstraint(),


OBFFConstraints::AddAtomYConstraint(), OBFFConstraints::AddAtomZConstraint(),
OBFFConstraints::AddIgnore(), OBBuilder::AddNbrs(), OBRingSearch::AddRingFromClosure(),
OpenBabel::BreakChiralTies(), OBBuilder::Build(), OBMol::ContigFragList(), OBMol::expandcycle(),
OBMol::FindChildren(), OpenBabel::FindConjugatedEZBonds(), OBMol::FindLargestFragment(),
OpenBabel::FindRings(), OBBitVec::FromString(), OBBitVec::FromVecInt(), OBResidue::GetBonds(),
OpenBabel::GetDFFVector(), OBBuilder::GetFragment(), OBMol::GetGTDVector(),
OpenBabel::GetGTDVector(), OpenBabel::MarkGrowBonds(), OpenBabel::MinimumPairRMS(),
OBMol::NewPerceiveKekuleBonds(), OpenBabel::operator>>(), OBRingSearch::SaveUniqueRing(),
OBRotorList::SetEvalAtoms(), OBBitVec::SetRangeOn(), and OBForceField::UpdatePairsSimple().

Constructor & Destructor Documentation 226


Open Babel: API Documentation

void SetBitOff ( unsigned bit_offset )


Set the bit_offset 'th bit to 0.

Set the bit_offset 'th bit to 0

Parameters:
[in] bit_offset a zero based offset into the bit vector

Referenced by OBFFConstraints::DeleteConstraint(), OBMol::FindChildren(),


OBMolAtomBFSIter::OBMolAtomBFSIter(), OBMolAtomDFSIter::OBMolAtomDFSIter(),
OBMolAtomBFSIter::operator++(), OBMolAtomDFSIter::operator++(), OBBitVec::SetRangeOff(), and
OBForceField::UpdatePairsSimple().

void SetRangeOn ( unsigned lo_bit_offset,


unsigned hi_bit_offset
)
Set the range of bits from lo_bit_offset to hi_bit_offset to 1.

Set the range of bits from lo_bit_offset to hi_bit_offset to 1 Increases the size of this bit vector if
necessary

Parameters:
[in] lo_bit_offset a zero based offset into the bit vector
[in] hi_bit_offset a zero based offset into the bit vector

void SetRangeOff ( unsigned lo_bit_offset,


unsigned hi_bit_offset
)
Set the range of bits from lo_bit_offset to hi_bit_offset to 0.

Set the range of bits from lo_bit_offset to hi_bit_offset to 0

Parameters:
[in] lo_bit_offset a zero based offset into the bit vector
[in] hi_bit_offset a zero based offset into the bit vector

void Fold ( unsigned new_bit_size )


Reduce the size of the vector by or-ing the excess bits over the start.

Reduce the size of the vector to new_bit_size by or-ing the excess bits over the start of the vector

Parameters:
[in] new_bit_size the size of the resultant vector, in bits

int FirstBit ( unsigned bit_offset = 0 )

Member Function Documentation 227


Open Babel: API Documentation

const
[inline]
Find the first true bit at or after bit_offset.

Searches the vector for the first true value, starting at the bit_offset 'th bit

Parameters:
[in] bit_offset the first bit to consider

Returns:
the bit offset of the first true bit at or after bit_offset, or -1 if there is none

Referenced by OBMolAtomBFSIter::operator++(), and OBMolAtomDFSIter::operator++().

int NextBit ( int last_bit_offset ) const


Find the next true bit after last_bit_offset.

Searches the vector for the first true value, starting at the last_bit_offset 'th bit

Parameters:
[in] last_bit_offset the bit before the first to
consider

Returns:
the bit offset of the first true bit after last_bit_offset, or -1 if there is none

Referenced by OpenBabel::BuildOBRTreeVector(), OBMol::ContigFragList(), OBMol::FindChildren(),


OBMol::FindLargestFragment(), OpenBabel::GetDFFVector(), OBMol::GetGTDVector(),
OpenBabel::GetGTDVector(), OpenBabel::operator<(), OBRotorList::SetEvalAtoms(), and
OBBitVec::ToVecInt().

const
int EndBit ( )
[inline]
Return the bit offset of the last bit (for iterating) i.e. -1.

Referenced by OpenBabel::BuildOBRTreeVector(), OBMol::ContigFragList(), OBMol::FindChildren(),


OBMol::FindLargestFragment(), OpenBabel::GetDFFVector(), OBMol::GetGTDVector(),
OpenBabel::GetGTDVector(), OBMolAtomBFSIter::operator++(), OBMolAtomDFSIter::operator++(), and
OBRotorList::SetEvalAtoms().

unsigned GetSize ( ) const [inline]


Return the number of words ( NOT the number of bits ).

Referenced by OBBitVec::NextBit(), OBBitVec::operator &=(), OBBitVec::operator-=(),


OpenBabel::operator==(), OBBitVec::operator^=(), OBBitVec::operator|=(), OBBitVec::SetBitOff(),
OBBitVec::SetBitOn(), OBBitVec::SetRangeOff(), and OBBitVec::SetRangeOn().

Member Function Documentation 228


Open Babel: API Documentation

unsigned CountBits ( ) const


Return the number of bits which are set to 1 in the vector.

Count the number of bits which are set in this vector

Returns:
the bit count

Referenced by OpenBabel::CalculateSymmetry(), OpenBabel::CanonicalLabels(), OBMol::ContigFragList(),


OBMol::FindLargestFragment(), OBBond::IsClosure(), OpenBabel::Tanimoto(), and OBBitVec::ToVecInt().

bool Empty ( ) const [inline]

Deprecated:
Use IsEmpty() instead.

Referenced by OpenBabel::BuildOBRTreeVector(), OBMol::FindChildren(),


OBMol::FindLargestFragment(), and OBRotorList::SetEvalAtoms().

bool IsEmpty ( ) const


Are there no bits set to 1 in this vector?

Are there no bits set to 1 in this vector?

Returns:
true for "is empty", false if not empty

Referenced by OBMol::ContigFragList(), OBMol::FindChildren(), OBMol::FindLargestFragment(),


OpenBabel::GetDFFVector(), OBMol::GetGTDVector(), and OpenBabel::GetGTDVector().

bool Resize ( unsigned size_in_bits ) [inline]


Reserve space for size_in_bits bits.

Reserve space for size_in_bits bits rounded up

Parameters:
[in] size_in_bits the number of bits

Returns:
true if enlargement was necessary, false otherwise

Referenced by OpenBabel::BreakChiralTies(), OBMol::ContigFragList(), OpenBabel::FindRingAtoms(),


OBMol::FindRingAtomsAndBonds(), OBBitVec::FromString(), OBBond::IsClosure(),
OBMol::NewPerceiveKekuleBonds(), OBMolAtomBFSIter::OBMolAtomBFSIter(),
OBMolAtomDFSIter::OBMolAtomDFSIter(), and OBRing::OBRing().

Member Function Documentation 229


Open Babel: API Documentation

bool ResizeWords ( unsigned size_in_words ) [inline]


Reserve space for size_in_words words.

Reserve space for size_in_words words

Parameters:
[in] size_in_words the number of words

Returns:
true if enlargement was necessary, false otherwise

Referenced by OBBitVec::Fold(), OBBitVec::operator-=(), OBBitVec::operator^=(), OBBitVec::operator|=(),


OBBitVec::SetBitOn(), and OBBitVec::SetRangeOn().

bool BitIsSet ( unsigned bit_offset ) const [inline]


Asks if the bit_offset 'th bit is set.

Is the bit_offset 'th bit set ?

Parameters:
[in] bit_offset a zero based offset into the bit vector

Returns:
true if it is set, false otherwise

Referenced by OBBuilder::AddNbrs(), OBBuilder::Build(), OBBuilder::Connect(),


OpenBabel::GetHvyBondSum(), OpenBabel::GetHvyValence(), OpenBabel::GetValence(),
OBFFConstraints::IsFixed(), OBFFConstraints::IsIgnored(), OBFFConstraints::IsXFixed(),
OBFFConstraints::IsYFixed(), and OBFFConstraints::IsZFixed().

const
bool BitIsOn ( int bit_offset )
[inline]

Deprecated:
Use BitIsSet(unsigned bit_offset) instead.

Referenced by OpenBabel::CalculateSymmetry(), OpenBabel::CanonicalLabels(), OBMol::ContigFragList(),


OpenBabel::CreateNewClassVector(), OpenBabel::DetermineFRJ(), OBMol::FindChildren(),
OBMol::FindLargestFragment(), OBResidue::GetBonds(), OpenBabel::GetDFFVector(),
OpenBabel::GetGIVector(), OBMol::GetGTDVector(), OpenBabel::GetGTDVector(), and
OBRing::IsMember().

void FromVecInt ( const std::vector< int > & bit_offsets )


Sets the bits listed as bit offsets.

Sets bits on, listed as bit offsets

Member Function Documentation 230


Open Babel: API Documentation

Parameters:
[in] bit_offsets A list of bit offsets

Referenced by OpenBabel::DetermineFRJ(), OBSmartsPattern::GetUMapList(), and OBRing::OBRing().

void FromString ( const std::string & line,


int new_bit_size
)
Sets the bits listed as a string of integers.

Sets bits on, listed as a string of character-represented integers This bit vector is first cleared. The format is "[
n0 n1 n2 n3 ... ]". The square brackets are optional. The whitespace can be SPACE, NEWLINE or HTAB For
example "[ 1 5 6 9 ]"

Parameters:
[in] line A string containing positive integers
[in] new_bit_size The size that the vector should become

std::vector<
void ToVecInt ( bit_offsets ) const
int > &
List the offsets of the bits which are set.

Retrieve a list of bit offsets The bit_offsets vector is first cleared.

Parameters:
[out] bit_offsets A list of bit offsets, in ascending order

Referenced by OBMol::ContigFragList(), and OBMol::FindChildren().

void Clear ( void )


Set all bits to zero.

Set all the bits in this vector to zero Does not currently change the size of the vector.

Referenced by OpenBabel::BreakChiralTies(), OpenBabel::BuildOBRTreeVector(),


OBFFConstraints::Clear(), OBMol::ContigFragList(), OpenBabel::DetermineFRJ(), OBMol::FindChildren(),
OBMol::FindLargestFragment(), OpenBabel::FindRingAtoms(), OBBitVec::FromString(),
OpenBabel::GetDFFVector(), OBMol::GetGTDVector(), OpenBabel::GetGTDVector(),
OBSmartsPattern::GetUMapList(), OBMol::NewPerceiveKekuleBonds(),
OBRingSearch::RemoveRedundant(), OBRotorList::SetEvalAtoms(), and
OBForceField::UpdatePairsSimple().

void Negate ( ) [inline]


Inverts every bit in the vector.

Member Function Documentation 231


Open Babel: API Documentation

Inverts the entire vector. Note that this may give unexpected results, as the vector can be considered to end in
an arbitrary number of zero bits.

Referenced by OBMolAtomBFSIter::OBMolAtomBFSIter(), and


OBMolAtomDFSIter::OBMolAtomDFSIter().

void GetWords ( word_vector & vec ) [inline]


Return a copy of the internal vector of words, at the end of vec.

Copy the internal word vector. The copy is appended to vec.

Parameters:
[out] vec a vector of words to which to append the data

OBBitVec & operator= ( const OBBitVec & bv )


Assignment operator.

Assign this vector to be a copy of bv

Parameters:
[in] bv A bit vector

Returns:
A reference to this

OBBitVec & operator &= ( const OBBitVec & bv )


And-equals operator.

Assign this vector to the result of And-ing it with bv

Parameters:
[in] bv A bit vector

Returns:
A reference to this

OBBitVec & operator|= ( const OBBitVec & bv )


Or-equals operator.

Assign this vector to the result of Or-ing it with bv

Parameters:
[in] bv A bit vector

Returns:
A reference to this

Member Function Documentation 232


Open Babel: API Documentation

OBBitVec& operator|= ( int bit_offset ) [inline]


Or-equals operator for integer.

Or the bit at offset bit_offset with 1

const
OBBitVec & operator^= ( OBBitVec bv )
&
Exclusive-or-equals operator.

Assign this vector to the result of Exclusive-or-ing it with bv

Parameters:
[in] bv A bit vector

Returns:
A reference to this

const
OBBitVec & operator-= ( OBBitVec bv )
&
Minus-equals operator.

Unset bits in this vector which are set in bv

Parameters:
[in] bv A bit vector

Returns:
A reference to this

OBBitVec & operator+= ( const OBBitVec & bv )


Plus-equals operator.

Append vector bv to the end if this vector

Parameters:
[in] bv A bit vector

Returns:
A reference to this

const
bool operator[] ( int bit_offset )
[inline]
Asks if the bit_offset 'th bit is set.

Member Function Documentation 233


Open Babel: API Documentation

Is the bit_offset 'th bit set ?

Parameters:
[in] bit_offset a zero based offset into the bit vector

Returns:
true if it is set, false otherwise

Friends And Related Function Documentation

OBERROR OBBitVec operator| ( const OBBitVec & bv1,


const OBBitVec & bv2
) [friend]
Or operator.

Return a bit vector of the results of Or-ing each bit in bv1 with the corresponding bit in bv2

Parameters:
[in] bv1 A bit vector
[in] bv2 Another bit vector

Returns:
A bit vector

OBERROR OBBitVec operator & ( const OBBitVec & bv1,


const OBBitVec & bv2
) [friend]
And operator.

Return a bit vector of the results of And-ing each bit in bv1 with the corresponding bit in bv2

Parameters:
[in] bv1 A bit vector
[in] bv2 Another bit vector

Returns:
A bit vector

OBERROR OBBitVec operator^ ( const OBBitVec & bv1,


const OBBitVec & bv2
) [friend]
Exclusive-or operator.

Return a bit vector of the results of Exclusive-or-ing each bit in bv1 with the corresponding bit in bv2

Friends And Related Function Documentation 234


Open Babel: API Documentation

Parameters:
[in] bv1 A bit vector
[in] bv2 Another bit vector

Returns:
A bit vector

OBERROR OBBitVec operator- ( const OBBitVec & bv1,


const OBBitVec & bv2
) [friend]
Minus operator.

Return a bit vector of the results of clearing each bit in bv1 which is set in bv2

Parameters:
[in] bv1 A bit vector
[in] bv2 Another bit vector

Returns:
A bit vector

OBERROR bool operator== ( const OBBitVec & bv1,


const OBBitVec & bv2
) [friend]
Equivalency operator.

Return true if bv1 and bv2 are equivalent Not that they may be of different size, and still equivalent provided
that the extra bits are all zero.

Parameters:
[in] bv1 A bit vector
[in] bv2 Another bit vector

Returns:
true if equal, false otherwise

OBERROR bool operator< ( const OBBitVec & bv1,


const OBBitVec & bv2
) [friend]
Smaller-than operator.

Return true if bv1 i less than bv2 Lexicographical order, with bit vectors written LSB first.

Parameters:
[in] bv1 A bit vector

Friends And Related Function Documentation 235


Open Babel: API Documentation

[in] bv2 Another bit vector

Returns:
true if equal, false otherwise

std::istream
OBERROR std::istream& operator>> ( is,
&
OBBitVec
bv
&
) [friend]
Input from a stream.

Sets bits on, listed as a string of character-represented integers in a stream Only reads one line of input The
format is "[ n0 n1 n2 n3 ... ]". The square brackets are optional. The whitespace can be SPACE or HTAB For
example "[ 1 5 6 9 ]"

Parameters:
[in,out] is The input stream
[out] bv The bit vector to contain the result

OBERROR std::ostream& operator<< ( std::ostream & os,


const OBBitVec & bv
) [friend]
Output to a stream.

Output this bit vector to a stream The format is "[ n0 n1 n2 n3 ... ]". The whitespace is SPACE For example "[
1 5 6 9 ]"

Parameters:
[out] os The output stream
[in] bv The bit vector to be output

The documentation for this class was generated from the following files:

• bitvec.h
• bitvec.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Friends And Related Function Documentation 236


Open Babel: API Documentation

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Friends And Related Function Documentation 237


OBBond Member List
This is the complete list of members for OBBond, including all inherited members.

_bgn OBBond [protected]


_end OBBond [protected]
_flags OBBond [protected]
_idx OBBond [protected]
_order OBBond [protected]
_parent OBBond [protected]
_vdata OBBase [protected]
BeginData() OBBase [inline]
CastAndClear(bool clear=true) OBBase [inline]
[inline,
ClassDescription() OBBase
static]
Clear() OBBase [virtual]
CloneData(OBGenericData *d) OBBase
DataSize() const OBBase [inline]
DeleteData(unsigned int type) OBBase
DeleteData(OBGenericData *) OBBase
DeleteData(std::vector< OBGenericData * > &) OBBase
DeleteData(const std::string &s) OBBase
[inline,
DoTransformations(const std::map< std::string, std::string > *) OBBase
virtual]
EndData() OBBase [inline]
GetAllData(const unsigned int type) OBBase
GetBeginAtom() OBBond [inline]
GetBeginAtom() const OBBond [inline]
GetBeginAtomIdx() const OBBond [inline]
GetBO() const OBBond [inline]
GetBondOrder() const OBBond [inline]
GetData(const unsigned int type) OBBase
GetData(const std::string &) OBBase
GetData(const char *) OBBase
GetData() OBBase [inline]
GetData(DataOrigin source) OBBase
GetEndAtom() OBBond [inline]
GetEndAtom() const OBBond [inline]
GetEndAtomIdx() const OBBond [inline]
GetEquibLength() const OBBond
GetFlags() const OBBond [inline]
GetIdx() const OBBond [inline]

OBBond Member List 238


Open Babel: API Documentation

GetLength() const OBBond


GetNbrAtom(OBAtom *ptr) OBBond [inline]
GetNbrAtomIdx(OBAtom *ptr) OBBond [inline]
GetParent() OBBond [inline]
HasData(const std::string &) OBBase
HasData(const char *) OBBase
HasData(const unsigned int type) OBBase
[inline,
HasFlag(int flag) OBBond
protected]
IsAmide() OBBond
IsAromatic() const OBBond
IsCarbonyl() OBBond
IsClosure() OBBond
IsDouble() OBBond
IsDoubleBondGeometry() OBBond
IsDown() OBBond [inline]
IsEster() OBBond
IsHash() OBBond [inline]
IsInRing() const OBBond
IsKDouble() OBBond
IsKSingle() OBBond
IsKTriple() OBBond
IsPrimaryAmide() OBBond
IsRotor() OBBond
IsSecondaryAmide() OBBond
IsSingle() OBBond
IsTriple() OBBond
IsUp() OBBond [inline]
IsWedge() OBBond [inline]
OBBond() OBBond
Set(int index, OBAtom *begin, OBAtom *end, int order, int flags) OBBond
SetAromatic() OBBond [inline]
SetBegin(OBAtom *begin) OBBond [inline]
SetBO(int order) OBBond
SetBondOrder(int order) OBBond
SetClosure() OBBond [inline]
SetData(OBGenericData *d) OBBase [inline]
SetDown() OBBond [inline]
SetEnd(OBAtom *end) OBBond [inline]
[inline,
SetFlag(int flag) OBBond
protected]
SetHash() OBBond [inline]

OBBond Member List 239


Open Babel: API Documentation

SetIdx(int idx) OBBond [inline]


SetInRing() OBBond [inline]
SetKDouble() OBBond
SetKSingle() OBBond
SetKTriple() OBBond
SetLength(OBAtom *fixed, double length) OBBond
SetLength(double length) OBBond
SetParent(OBMol *ptr) OBBond [inline]
SetUp() OBBond [inline]
SetWedge() OBBond [inline]
UnsetAromatic() OBBond [inline]
UnsetDown() OBBond [inline]
[inline,
UnsetFlag(int flag) OBBond
protected]
UnsetHash() OBBond [inline]
UnsetKekule() OBBond [inline]
UnsetUp() OBBond [inline]
UnsetWedge() OBBond [inline]
Visit OBBond
[inline,
~OBBase() OBBase
virtual]
~OBBond() OBBond [virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List

OBBond Member List 240


Open Babel: API Documentation
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBBond

OBBond Member List 241


OBBond Class Reference
Bond class. More...

#include <openbabel/bond.h>

Inheritance diagram for OBBond:

[legend]

List of all members.

Public Member Functions


OBBond ()
virtual ~OBBond ()
virtual bool Clear ()
virtual OBBase * DoTransformations (const std::map< std::string, std::string > *)
template<class T>
T * CastAndClear (bool clear=true)
Bond modification methods
void SetIdx (int idx)
void SetBO (int order)
void SetBondOrder (int order)
void SetBegin (OBAtom *begin)
void SetEnd (OBAtom *end)
void SetParent (OBMol *ptr)
void SetLength (OBAtom *fixed, double length)
void SetLength (double length)
void Set (int index, OBAtom *begin, OBAtom *end, int order, int flags)
void SetKSingle ()
void SetKDouble ()
void SetKTriple ()
void SetAromatic ()
void SetHash ()
void SetWedge ()
void SetUp ()
void SetDown ()
void SetInRing ()
void SetClosure ()
void UnsetHash ()
void UnsetWedge ()
void UnsetUp ()

OBBond Class Reference 242


Open Babel: API Documentation
void UnsetDown ()
void UnsetAromatic ()
void UnsetKekule ()
Bond data request methods
unsigned int GetIdx () const
unsigned int GetBO () const
unsigned int GetBondOrder () const
unsigned int GetFlags () const
unsigned int GetBeginAtomIdx () const
unsigned int GetEndAtomIdx () const
OBAtom * GetBeginAtom ()
const OBAtom * GetBeginAtom () const
OBAtom * GetEndAtom ()
const OBAtom * GetEndAtom () const
OBAtom * GetNbrAtom (OBAtom *ptr)
OBMol * GetParent ()
double GetEquibLength () const
double GetLength () const
unsigned int GetNbrAtomIdx (OBAtom *ptr)
property request methods
bool IsAromatic () const
bool IsInRing () const
bool IsRotor ()
bool IsAmide ()
bool IsPrimaryAmide ()
bool IsSecondaryAmide ()
bool IsEster ()
bool IsCarbonyl ()
bool IsSingle ()
bool IsDouble ()
bool IsTriple ()
bool IsKSingle ()
bool IsKDouble ()
bool IsKTriple ()
bool IsClosure ()
bool IsUp ()
bool IsDown ()
bool IsWedge ()
bool IsHash ()
bool IsDoubleBondGeometry ()
Generic data handling methods (via OBGenericData)
bool HasData (const std::string &)
bool HasData (const char *)
bool HasData (const unsigned int type)
void DeleteData (unsigned int type)
void DeleteData (OBGenericData *)
void DeleteData (std::vector< OBGenericData * > &)
bool DeleteData (const std::string &s)
void SetData (OBGenericData *d)
void CloneData (OBGenericData *d)
unsigned int DataSize () const

Public Member Functions 243


Open Babel: API Documentation
OBGenericData * GetData (const unsigned int type)
OBGenericData * GetData (const std::string &)
OBGenericData * GetData (const char *)
std::vector< OBGenericData * > & GetData ()
std::vector< OBGenericData * > GetData (DataOrigin source)
std::vector< OBGenericData * > GetAllData (const unsigned int type)
OBDataIterator BeginData ()
OBDataIterator EndData ()

Static Public Member Functions


static const char * ClassDescription ()

Public Attributes
bool Visit

Protected Member Functions


bool HasFlag (int flag)
void SetFlag (int flag)
void UnsetFlag (int flag)

Protected Attributes
unsigned int _idx
OBMol * _parent
OBAtom * _bgn
OBAtom * _end
char _order
unsigned short int _flags
std::vector< OBGenericData * > _vdata

Detailed Description
Bond class.

The OBBond class is straightforward in its data access and modification methods. OBBonds store pointers to
the atoms on each end of the bond. In storing pointers to atoms instead of integer indices, the necessity of
having to reorder bonds when atoms are shuffled, added, or delete is obviated.

While methods indicate "begin" and "end" atoms in the bond, all methods are designed to be independent of
atom ordering, with the exception of stereochemically aware properties such as IsUp(), IsDown(), IsWedge, or
IsHash().

Static Public Member Functions 244


Open Babel: API Documentation

Constructor & Destructor Documentation

OBBond ( )
Constructor.

~OBBond ( ) [virtual]
Destructor.

Member Function Documentation

bool HasFlag ( int flag ) [inline, protected]

Referenced by OBBond::IsAromatic(), OBBond::IsClosure(), OBBond::IsDouble(), OBBond::IsInRing(),


OBBond::IsSingle(), and OBBond::IsTriple().

void SetFlag ( int flag ) [inline, protected]

Referenced by OBBond::Set().

void UnsetFlag ( int flag ) [inline, protected]

void SetIdx ( int idx ) [inline]


Set the internal bond index.

Warning:
This will not update the index in the parent OBMol. Intended mainly for internal use. Use with care.

Referenced by OBMol::DeleteBond(), OBMol::NewBond(), and OBBond::Set().

void SetBO ( int order )


Set the bond order to order (i.e., 1 = single, 2 = double, 5 = aromatic).

Deprecated:
Use SetBondOrder() instead.

Referenced by OBChemTsfm::Apply(), OBBondTyper::AssignFunctionalGroupBonds(),


OBMol::ConvertDativeBonds(), OBMol::Kekulize(), OBMol::NewPerceiveKekuleBonds(), and
OBMol::start_kekulize().

void SetBondOrder ( int order )

Constructor & Destructor Documentation 245


Open Babel: API Documentation

Set the bond order to order (i.e., 1 = single, 2 = double, 5 = aromatic).

Referenced by OBBuilder::Connect(), OBBond::Set(), and OBBond::SetBO().

void SetBegin ( OBAtom * begin ) [inline]


Set the beginning atom of this bond to begin. Does not update begin.

Referenced by OBBuilder::Connect(), and OBBond::Set().

void SetEnd ( OBAtom * end ) [inline]


Set the ending atom of this bond to end. Does not update end.

Referenced by OBBuilder::Connect(), and OBBond::Set().

void SetParent ( OBMol * ptr ) [inline]


Set the parent molecule to ptr. Does not update parent.

Referenced by OBMol::AddBond(), and OBMol::NewBond().

void SetLength ( OBAtom * fixed,


double length
)
Change the bond length to length, while keeping fixed stationary.

Referenced by OBAtom::HtoMethyl(), and OBBond::SetLength().

void SetLength ( double length )


Change the bond length to length, moving both atoms halfway

Since:
version 2.2

void Set ( int idx,


OBAtom * begin,
OBAtom * end,
int order,
int flags
)
Set the main bond information (i.e., when creating a bond).

Mark the main information for a bond

Member Function Documentation 246


Open Babel: API Documentation

Parameters:
idx The unique bond index for this bond (inside an OBMol)
begin The 'beginning' atom for the bond
end The 'end' atom for the bond
order The bond order (i.e., 1 = single, 2 = double... 5 = aromatic)
flags Any initial property flags

Referenced by OBMol::AddBond().

void SetKSingle ( )

Deprecated:
Use SetBondOrder() instead

Referenced by OpenBabel::CorrectBadResonanceForm(), OBMol::NewPerceiveKekuleBonds(),


OBMol::PerceiveKekuleBonds(), and OBBond::SetBondOrder().

void SetKDouble ( )

Deprecated:
Use SetBondOrder() instead

Referenced by OpenBabel::CorrectBadResonanceForm(), OBMol::NewPerceiveKekuleBonds(),


OBMol::PerceiveKekuleBonds(), OBBond::SetBondOrder(), and OBMol::start_kekulize().

void SetKTriple ( )

Deprecated:
Use SetBondOrder() instead

Referenced by OBMol::NewPerceiveKekuleBonds(), OBMol::PerceiveKekuleBonds(), and


OBBond::SetBondOrder().

void SetAromatic ( ) [inline]


Mark that this bond is aromatic. Does not update atoms or validate.

Referenced by OBMol::AddBond(), and OBBond::SetBondOrder().

void SetHash ( ) [inline]


Mark that this bond has 2D "hash" notation (i.e., goes in a negative Z direction from the beginning to end
atoms).

void SetWedge ( ) [inline]

Member Function Documentation 247


Open Babel: API Documentation

Mark that this bond has 2D "wedge" notation (i.e., goes in a positive Z direction from the beginning to end
atoms).

void SetUp ( ) [inline]


Mark that this bond has an "up" torsion for double-bond stereochem (i.e., "/" in SMILES notation.

Referenced by OpenBabel::FixCisTransBonds().

void SetDown ( ) [inline]


Mark that this bond has an "down" torsion for double-bond stereochem (i.e., "\" in SMILES notation.

Referenced by OpenBabel::FixCisTransBonds().

void SetInRing ( ) [inline]


Mark that this bond is in a ring. Primarily for internal use.

Referenced by OpenBabel::FindRings().

void SetClosure ( ) [inline]


Mark that this bond indicates a ring closure when walking the molecule.

Warning:
This is for internal use only. All closure bonds are marked automatically by lazy evaluation when
requesting OBBond::IsClosure()

Referenced by OBBond::IsClosure().

void UnsetHash ( ) [inline]


Clear any indication of 2D "hash" notation from SetHash().

void UnsetWedge ( ) [inline]


Clear any indication of 2D "wedge" notation from SetWedge().

void UnsetUp ( ) [inline]


Clear any indication of "/" double bond stereochemistry from SetUp().

Referenced by OpenBabel::FixCisTransBonds().

void UnsetDown ( ) [inline]


Clear any indication of "\" double bond stereochemistry from SetDown().

Member Function Documentation 248


Open Babel: API Documentation

Referenced by OpenBabel::FixCisTransBonds().

void UnsetAromatic ( ) [inline]


Clear all aromaticity information for the bond.

Referenced by OBAromaticTyper::AssignAromaticFlags(), and OBBond::SetBondOrder().

void UnsetKekule ( ) [inline]


Clear all Kekule information for the bond.

unsigned int GetIdx ( ) const [inline]

Returns:
The unique bond index in a molecule.

Referenced by OBBuilder::CorrectStereoBonds(), OBMol::DeleteBond(), OBMol::expand_kekulize(),


OpenBabel::FindConjugatedEZBonds(), OpenBabel::FindRings(), OpenBabel::FixCisTransBonds(),
OBResidue::GetBonds(), OBBond::IsClosure(), and OpenBabel::KekulePropagate().

unsigned int GetBO ( ) const [inline]

Returns:
The bond order for the bond

Deprecated:
Use GetBondOrder() as this method may be removed.

Referenced by OBMol::AddBond(), OBResidueData::AssignBonds(), OBAtom::BOSum(),


OBMol::ConvertDativeBonds(), OBAtom::CountBondsOfOrder(), OpenBabel::EvalBondExpr(),
OpenBabel::ExpandKekule(), OBBond::GetEquibLength(), OBAtom::HasBondOfOrder(),
OBAtom::HasNonSingleBond(), OBBond::IsAmide(), OBAtom::IsAmideNitrogen(), OBBond::IsCarbonyl(),
OBBond::IsEster(), OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(),
OBMol::NewPerceiveKekuleBonds(), OBMol::operator+=(), OBMol::PerceiveKekuleBonds(), and
OBMol::start_kekulize().

unsigned int GetBondOrder ( ) const [inline]

Returns:
The bond order for the bond

Referenced by OBBuilder::Build(), OBBond::IsDouble(), OBBond::IsSingle(), OBBond::IsTriple(), and


OBBuilder::Swap().

Member Function Documentation 249


Open Babel: API Documentation

const
unsigned int GetFlags ( )
[inline]

Returns:
The set of property flags defined for this bond.

Referenced by OBMol::AddBond(), and OBMol::operator+=().

const
unsigned int GetBeginAtomIdx ( )
[inline]

Returns:
The atom index for the end atom in this bond (from OBAtom::GetIdx()

Referenced by OBMol::AddBond(), OBRingSearch::AddRingFromClosure(), OpenBabel::DetermineFRJ(),


OpenBabel::FindRings(), OBRotorList::FindRotors(), OBRotorRules::GetRotorIncrements(),
OBRing::IsMember(), OBMol::operator+=(), OBMol::PerceiveKekuleBonds(),
OBRotorList::RemoveSymVals(), OBAromaticTyper::SelectRootAtoms(), and
OBRotorList::SetEvalAtoms().

const
unsigned int GetEndAtomIdx ( )
[inline]

Returns:
The atom index for the end atom in this bond (from OBAtom::GetIdx()

Referenced by OBMol::AddBond(), OBRingSearch::AddRingFromClosure(), OpenBabel::DetermineFRJ(),


OBRotorList::FindRotors(), OBRotorRules::GetRotorIncrements(), OBRing::IsMember(),
OBMol::operator+=(), OBMol::PerceiveKekuleBonds(), OBRotorList::RemoveSymVals(), and
OBRotorList::SetEvalAtoms().

OBAtom* GetBeginAtom ( ) [inline]

Returns:
The "beginning" atom for this bond

Referenced by OBRingSearch::AddRingFromClosure(), OBGastChrg::AssignPartialCharges(),


OpenBabel::CalcSignedVolume(), OBMol::DeleteBond(), OBMol::FindChiralCenters(),
OpenBabel::FindRings(), OBMol::FindTorsions(), OpenBabel::FixCisTransBonds(),
OBBond::GetEquibLength(), OBBond::GetLength(), OBRotorRules::GetRotorIncrements(),
OBAtom::IsConnected(), OBRotorList::IsFixedBond(), OBBond::SetLength(), and OBMol::start_kekulize().

const OBAtom* GetBeginAtom ( ) const [inline]

Member Function Documentation 250


Open Babel: API Documentation

OBAtom* GetEndAtom ( ) [inline]

Returns:
The "end" atom for this bond

Referenced by OBRingSearch::AddRingFromClosure(), OBGastChrg::AssignPartialCharges(),


OpenBabel::CalcSignedVolume(), OBMol::DeleteBond(), OpenBabel::FindRings(), OBMol::FindTorsions(),
OpenBabel::FixCisTransBonds(), OBBond::GetEquibLength(), OBBond::GetLength(),
OBRotorRules::GetRotorIncrements(), OBAtom::IsConnected(), OBRotorList::IsFixedBond(),
OBBond::SetLength(), and OBMol::start_kekulize().

const
const OBAtom* GetEndAtom ( )
[inline]

OBAtom* GetNbrAtom ( OBAtom * ptr ) [inline]

Returns:
The neighboring atom to ptr (i.e., the end if ptr is the start)

Warning:
If ptr is not part of the bond, the beginning atom will always be returned

Referenced by OBMol::ConvertDativeBonds(), OBAtom::CountFreeOxygens(),


OpenBabel::FindConjugatedEZBonds(), OpenBabel::FixCisTransBonds(), OBAtom::GetBond(),
OBResidue::GetBonds(), OpenBabel::GetDFFVector(), OBMol::GetGTDVector(),
OpenBabel::GetGTDVector(), OBAtom::GetHeteroValence(), OpenBabel::GetHvyBondSum(),
OpenBabel::GetHvyValence(), OBAtom::GetHvyValence(), OpenBabel::GetValence(),
OBAtom::IsAmideNitrogen(), OBAtom::IsCarboxylOxygen(), OBAtom::IsHbondDonorH(),
OBAtom::IsNitroOxygen(), OBAtom::IsNonPolarHydrogen(), OBAtom::IsOneFour(),
OBAtom::IsOneThree(), OBAtom::IsPhosphateOxygen(), OBAtom::IsPolarHydrogen(),
OBAtom::IsSulfateOxygen(), OBMol::NewPerceiveKekuleBonds(), and OBBond::SetLength().

OBMol* GetParent ( ) [inline]

Returns:
The enclosing OBMol for this bond, or NULL if none is defined.

Referenced by OBBond::IsAromatic(), OBBond::IsClosure(), OBBond::IsDouble(), OBBond::IsInRing(),


OBBond::IsKDouble(), OBBond::IsKSingle(), OBBond::IsKTriple(), OBBond::IsSingle(), and
OBBond::IsTriple().

double GetEquibLength ( ) const

Returns:
The expected "equilibrium" length based on the covalent radii and bond order Length is given in
Angstroms

Member Function Documentation 251


Open Babel: API Documentation

double GetLength ( ) const

Returns:
The current length of this bond in Angstroms

Referenced by OBMol::ConnectTheDots(), and OBBond::SetLength().

unsigned int GetNbrAtomIdx ( OBAtom * ptr ) [inline]

Returns:
The index to the neighboring atom of ptr (i.e., the end if ptr is the start)

Warning:
If ptr is not part of the bond, the beginning atom index will always be returned

Referenced by OBMol::ContigFragList(), OBMol::FindLargestFragment(), OpenBabel::FindRings(),


OpenBabel::GetDFFVector(), OBMol::GetGTDVector(), and OpenBabel::GetGTDVector().

bool IsAromatic ( ) const

Returns:
Is the bond aromatic? (Note that the two atoms of the bond may be aromatic, but not the bond)

Referenced by OBBuilder::CorrectStereoBonds(), OpenBabel::EvalBondExpr(),


OpenBabel::FixCisTransBonds(), OBBond::GetEquibLength(), and OpenBabel::GetHvyBondSum().

bool IsInRing ( ) const

Returns:
Is the bond part of a ring?

Referenced by OBAtom::CountRingBonds(), OpenBabel::EvalBondExpr(), OBBond::IsRotor(),


OBMol::PerceiveKekuleBonds(), OBBuilder::Swap(), and OBAromaticTyper::TraverseCycle().

bool IsRotor ( )

Returns:
Is the bond a rotatable bond? Currently, this function classifies any bond with at least one heavy atom,
no sp-hybrid atoms (e.g., a triple bond somewhere) not in a ring as a potential rotor. No other bond
typing is attempted. For more detailed rotor detection, check the OBRotorList and OBRotorRules
classes

Referenced by OBRotorList::FindRotors(), and OBMol::NumRotors().

Member Function Documentation 252


Open Babel: API Documentation

bool IsAmide ( )

Returns:
Is the bond an amide link (i.e., between a carbonyl C and a N)

bool IsPrimaryAmide ( )

Returns:
Is the bond an amide (i.e., between carbonyl C and a NH group)

bool IsSecondaryAmide ( )

Returns:
Is the bond an amide between a carbonyl C and a N with no hydrogens

bool IsEster ( )

Returns:
Is the bond an ester link (i.e., between a carbonyl C and an O)

bool IsCarbonyl ( )

Returns:
Is the bond a carbonyl C=O?

Referenced by OBBond::IsAmide(), OBBond::IsEster(), OBBond::IsPrimaryAmide(), and


OBBond::IsSecondaryAmide().

bool IsSingle ( )

Returns:
Is the bond a single bond?

Referenced by OpenBabel::FindConjugatedEZBonds(), OpenBabel::FixCisTransBonds(), and


OpenBabel::GetHvyBondSum().

bool IsDouble ( )

Returns:
Is the bond is a double bond?

Referenced by OBBuilder::CorrectStereoBonds(), OpenBabel::FixCisTransBonds(),


OpenBabel::GetHvyBondSum(), and OBMol::NewPerceiveKekuleBonds().

Member Function Documentation 253


Open Babel: API Documentation

bool IsTriple ( )

Returns:
Is the bond is a triple bond?

Referenced by OpenBabel::GetHvyBondSum().

bool IsKSingle ( )

Deprecated:
Use IsSingle() instead

Referenced by OBMol::Kekulize().

bool IsKDouble ( )

Deprecated:
Use IsDouble() instead

Referenced by OpenBabel::GetCurrentValence(), OBAtom::KBOSum(), OBMol::Kekulize(), and


OpenBabel::ValenceSum().

bool IsKTriple ( )

Deprecated:
Use IsTriple() instead

Referenced by OpenBabel::GetCurrentValence(), OBAtom::KBOSum(), and OBMol::Kekulize().

bool IsClosure ( )

Returns:
Does this bond "close" a ring when walking the molecular graph?

Referenced by OBMol::FindSSSR(), and OBAromaticTyper::SelectRootAtoms().

bool IsUp ( ) [inline]

Returns:
Whether this is the "upper" bond in a double bond cis/trans isomer (i.e., "/" in SMILES)

Referenced by OBBuilder::CorrectStereoBonds(), OpenBabel::EvalBondExpr(),


OpenBabel::FindConjugatedEZBonds(), and OpenBabel::FixCisTransBonds().

Member Function Documentation 254


Open Babel: API Documentation

bool IsDown ( ) [inline]

Returns:
Whether this is the "lower" bond in a double bond cis/trans isomer (i.e., "\" in SMILES)

Referenced by OBBuilder::CorrectStereoBonds(), OpenBabel::EvalBondExpr(),


OpenBabel::FindConjugatedEZBonds(), and OpenBabel::FixCisTransBonds().

bool IsWedge ( ) [inline]

Returns:
Whether this bond is a "wedge" in 2D representations (i.e., goes in a positive Z direction from the
beginning to end atoms)

Referenced by OpenBabel::CalcSignedVolume(), and OBMol::FindChiralCenters().

bool IsHash ( ) [inline]

Returns:
Whether this bond is a "hash" in 2D representations (i.e., goes in a negative Z direction from the
beginning to end atoms)

Referenced by OpenBabel::CalcSignedVolume(), and OBMol::FindChiralCenters().

bool IsDoubleBondGeometry ( )

Returns:
whether the geometry around this bond "looks" unsaturated

This method checks if the geometry around this bond looks unsaturated by measuring the torsion angles
formed by all connected atoms X-start=end-Y and checking that they are close to 0 or 180 degrees

bool Clear ( void ) [virtual, inherited]


Clear any and all data associated with this object.

This method can be called by OBConversion::Read() before reading data. Derived classes should be sure to
call OBBase::Clear() to remove inherited generic data.

Returns:
Whether the call was successful.

Since:
version 2.1.

Reimplemented in OBAtom, OBMol, and OBResidue.

Member Function Documentation 255


Open Babel: API Documentation

Referenced by OBResidue::Clear(), OBMol::Clear(), and OBAtom::Clear().

[inline,
virtual OBBase* const std::map< std::string,
( ) virtual,
DoTransformations std::string > *
inherited]
Perform a set of transformations specified by the user

Typically these are program options to filter or modify an object For example, see
OBMol::DoTransformations() and OBMol::ClassDescription()

Reimplemented in OBMol.

static const char* ClassDescription ( ) [inline, static, inherited]

Returns:
A list of descriptions of command-line options for DoTransformations()

Reimplemented in OBMol, and OBReaction.

T* CastAndClear ( bool clear = true ) [inline, inherited]


By default clears the object. Called from ReadMolecule of most format classes.

bool HasData ( const std::string & s ) [inherited]

Returns:
whether the generic attribute/value pair exists

Referenced by OBMol::AddAtom(), OBMol::FindAngles(), OBMol::FindSSSR(), OBMol::FindTorsions(),


OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(),
OBMol::GetEnergy(), OBMol::GetSSSR(), OBBase::HasData(), OBDescriptor::MatchPairData(),
OBMol::NewAtom(), OBMol::operator=(), and OBMol::SetEnergies().

const
bool HasData ( char s ) [inherited]
*

Returns:
whether the generic attribute/value pair exists

bool HasData ( const unsigned int type ) [inherited]

Returns:
whether the generic attribute/value pair exists, for a given OBGenericDataType

Member Function Documentation 256


Open Babel: API Documentation

void DeleteData ( unsigned int type ) [inherited]


Delete any data matching the given OBGenericDataType.

Referenced by OBMol::AddAtom(), OBMol::BeginModify(), OBBuilder::CorrectStereoBonds(),


OBDescriptor::DeleteProperties(), OBMol::FindSSSR(), OBMol::NewAtom(), and OBForceField::Setup().

void DeleteData ( OBGenericData * gd ) [inherited]


Delete the given generic data from this object.

void DeleteData ( std::vector< OBGenericData * > & vg ) [inherited]


Delete all of the given generic data from this object.

const
bool DeleteData ( std::string s ) [inherited]
&
Deletes the generic data with the specified attribute, returning false if not found.

[inline,
void SetData ( OBGenericData * d )
inherited]
Adds a data object; does nothing if d==NULL.

Referenced by OBMol::AddBond(), OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(),


OBMol::DoTransformations(), OBAtom::Duplicate(), OBMol::FindAngles(), OBMol::FindSSSR(),
OBMol::FindTorsions(), OBForceField::GetConformers(), OBForceField::GetCoordinates(),
OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(), OBMol::GetNextFragment(),
OBMol::GetSSSR(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::operator=(),
OBDescriptor::PredictAndSave(), OBMol::SetEnergies(), and OBMol::SetFormula().

void CloneData ( OBGenericData * d ) [inherited]


Adds a copy of a data object; does nothing if d == NULL

Since:
version 2.2

unsigned int DataSize ( ) const [inline, inherited]

Returns:
the number of OBGenericData items attached to this molecule.

OBGenericData * GetData ( const unsigned int type ) [inherited]

Returns:

Member Function Documentation 257


Open Babel: API Documentation

the first matching data for a given type from OBGenericDataType or NULL if nothing matches

Referenced by OpenBabel::CalcSignedVolume(), OpenBabel::CorrectChirality(),


OBDescriptor::FilterCompare(), OBForceField::GetConformers(), OBForceField::GetCoordinates(),
OBMol::GetNextFragment(), OBDescriptor::GetValues(), OBMoleculeFormat::MakeCombinedMolecule(),
OBMolAngleIter::OBMolAngleIter(), OBMolRingIter::OBMolRingIter(),
OBMolTorsionIter::OBMolTorsionIter(), OBMol::operator=(), and OBDescriptor::PredictAndSave().

const
OBGenericData * GetData ( std::string s ) [inherited]
&

Returns:
any data matching the given attribute name or NULL if nothing matches

the value given an attribute name

OBGenericData * GetData ( const char * s ) [inherited]

Returns:
any data matching the given attribute name or NULL if nothing matches

the value given an attribute name

[inline,
std::vector<OBGenericData*>& GetData ( )
inherited]

Returns:
all data, suitable for iterating

Referenced by OBMol::BeginModify(), OBMol::DoTransformations(), OBMol::FindSSSR(),


OBBase::GetData(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(),
OBMol::GetSSSR(), OBMol::SetEnergies(), and OBMol::SetFormula().

std::vector< OBGenericData * > GetData ( DataOrigin source ) [inherited]

Returns:
all data with a specific origin, suitable for iterating

std::vector< OBGenericData * > GetAllData ( const unsigned int type ) [inherited]

Returns:
the all matching data for a given type from OBGenericDataType or an empty vector if nothing
matches

Member Function Documentation 258


Open Babel: API Documentation

Since:
version 2.2

OBDataIterator BeginData ( ) [inline, inherited]

Returns:
An iterator pointing to the beginning of the data

Referenced by OBMol::AddAtom(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(),


OBMol::NewAtom(), and OBMol::operator=().

[inline,
OBDataIterator EndData ( )
inherited]

Returns:
An iterator pointing to the end of the data

Referenced by OBMol::AddAtom(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(),


OBMol::NewAtom(), and OBMol::operator=().

Member Data Documentation

unsigned int _idx [protected]


Unique edge index used by GetIdx() and SetIdx().

Referenced by OBBond::OBBond().

OBMol* _parent [protected]


The molecule which contains me (if any).

OBAtom* _bgn [protected]


I connect one node.

Referenced by OBBond::IsAmide(), OBBond::IsCarbonyl(), OBBond::IsDoubleBondGeometry(),


OBBond::IsEster(), OBBond::IsPrimaryAmide(), OBBond::IsRotor(), OBBond::IsSecondaryAmide(),
OBBond::OBBond(), and OBBond::SetBondOrder().

OBAtom* _end [protected]


to another node

Referenced by OBBond::IsAmide(), OBBond::IsCarbonyl(), OBBond::IsDoubleBondGeometry(),


OBBond::IsEster(), OBBond::IsPrimaryAmide(), OBBond::IsRotor(), OBBond::IsSecondaryAmide(),
OBBond::OBBond(), and OBBond::SetBondOrder().

Member Data Documentation 259


Open Babel: API Documentation

char _order [protected]


Bond order (1, 2, 3, 5=aromatic).

Referenced by OBBond::IsRotor(), OBBond::OBBond(), and OBBond::SetBondOrder().

unsigned short int _flags [protected]


Any flags for this bond.

Referenced by OBBond::IsKDouble(), OBBond::IsKSingle(), OBBond::IsKTriple(), OBBond::OBBond(),


OBBond::SetKDouble(), OBBond::SetKSingle(), and OBBond::SetKTriple().

bool Visit
Whether this bond has been visited by a graph algorithm.

Deprecated:
Use OBBitVec objects instead to be fully thread-safe.

std::vector<OBGenericData*> _vdata [protected, inherited]


Custom data.

Referenced by OBBase::Clear(), OBBase::CloneData(), OBBase::DeleteData(), OBAtom::Duplicate(),


OBBase::GetAllData(), OBBase::GetData(), OBBase::HasData(), OBBond::OBBond(), OBMol::OBMol(),
and OBResidue::OBResidue().

The documentation for this class was generated from the following files:

• bond.h
• bond.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages

Member Data Documentation 260


Open Babel: API Documentation
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 261


OBBondTyper Member List
This is the complete list of members for OBBondTyper, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
AssignFunctionalGroupBonds(OBMol &mol) OBBondTyper
GetSize() OBBondTyper [inline, virtual]
Init() OBGlobalDataBase
OBBondTyper() OBBondTyper
OBGlobalDataBase() OBGlobalDataBase [inline]
ParseLine(const char *) OBBondTyper [virtual]
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
~OBBondTyper() OBBondTyper
~OBGlobalDataBase() OBGlobalDataBase [inline, virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy

OBBondTyper Member List 262


Open Babel: API Documentation

• Class Members

OpenBabel::OBBondTyper

OBBondTyper Member List 263


OBBondTyper Class Reference
Assigns bond types for file formats without bond information. More...

#include <openbabel/bondtyper.cpp>

Inheritance diagram for OBBondTyper:

[legend]

List of all members.

Public Member Functions


OBBondTyper ()
~OBBondTyper ()
void Init ()
void SetReadDirectory (char *dir)
void SetEnvironmentVariable (char *var)
OBBondTyper Database Utilities
void ParseLine (const char *)
unsigned int GetSize ()
Bond Perception Routines
void AssignFunctionalGroupBonds (OBMol &mol)

Protected Attributes
bool _init
const char * _dataptr
std::string _filename
std::string _dir
std::string _subdir
std::string _envvar

Detailed Description
Assigns bond types for file formats without bond information.

The OBBondTyper class is designed to read in a list of bond typing rules and apply them to molecules. It is
called from the OBMol::PerceiveBondOrders() method.

OBBondTyper Class Reference 264


Open Babel: API Documentation

Constructor & Destructor Documentation

OBBondTyper ( )

~OBBondTyper ( )

Member Function Documentation

void ParseLine ( const char * ) [virtual]


Specified by particular table classes (parses an individual data line).

Reimplemented from OBGlobalDataBase.

unsigned int GetSize ( ) [inline, virtual]

Returns:
the size of the database (for error checking)

Reimplemented from OBGlobalDataBase.

void AssignFunctionalGroupBonds ( OBMol & mol )


Assign bonds to functional groups based on the bond typer database.

Referenced by OBMol::PerceiveBondOrders().

void Init ( ) [inherited]


Read in the data file, falling back as needed.

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(),


OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(),
OBAtomTyper::AssignImplicitValence(), OBPhModel::AssignSeedPartialCharge(),
OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(), OBAtomTyper::CorrectAromaticNitrogens(),
OBElementTable::CorrectedBondRad(), OBElementTable::CorrectedVdwRad(),
OBPhModel::CorrectForPH(), OBElementTable::GetAllredRochowElectroNeg(),
OBElementTable::GetAtomicNum(), OBElementTable::GetCovalentRad(),
OBElementTable::GetElectronAffinity(), OBElementTable::GetElectroNeg(),
OBIsotopeTable::GetExactMass(), OBTypeTable::GetFromType(), OBElementTable::GetIonization(),
OBElementTable::GetMass(), OBElementTable::GetMaxBonds(), OBElementTable::GetName(),
OBElementTable::GetNumberOfElements(), OBElementTable::GetRGB(),
OBRotorRules::GetRotorIncrements(), OBElementTable::GetSymbol(), OBTypeTable::GetToType(),
OBElementTable::GetVdwRad(), OBTypeTable::SetFromType(), OBResidueData::SetResName(),

Detailed Description 265


Open Babel: API Documentation

OBTypeTable::SetToType(), and OBTypeTable::Translate().

[inline,
void SetReadDirectory ( char * dir )
inherited]
Set the directory before calling Init().

void SetEnvironmentVariable ( char * var ) [inline, inherited]


Set the environment variable to use before calling Init().

Member Data Documentation

bool _init [protected, inherited]


Whether the data been read already.

Referenced by OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(),


OBBondTyper::AssignFunctionalGroupBonds(), OBAtomTyper::AssignHyb(),
OBAtomTyper::AssignImplicitValence(), OBPhModel::AssignSeedPartialCharge(),
OBRingTyper::AssignTypes(), OBAtomTyper::AssignTypes(), OBAtomTyper::CorrectAromaticNitrogens(),
OBElementTable::CorrectedBondRad(), OBElementTable::CorrectedVdwRad(),
OBPhModel::CorrectForPH(), OBElementTable::GetAllredRochowElectroNeg(),
OBElementTable::GetAtomicNum(), OBElementTable::GetCovalentRad(),
OBElementTable::GetElectronAffinity(), OBElementTable::GetElectroNeg(),
OBIsotopeTable::GetExactMass(), OBTypeTable::GetFromType(), OBElementTable::GetIonization(),
OBElementTable::GetMass(), OBElementTable::GetMaxBonds(), OBElementTable::GetName(),
OBElementTable::GetNumberOfElements(), OBElementTable::GetRGB(),
OBRotorRules::GetRotorIncrements(), OBElementTable::GetSymbol(), OBTypeTable::GetToType(),
OBElementTable::GetVdwRad(), OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),
OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), OBTypeTable::OBTypeTable(),
OBTypeTable::SetFromType(), OBResidueData::SetResName(), OBTypeTable::SetToType(), and
OBTypeTable::Translate().

const char* _dataptr [protected, inherited]


Default data table if file is unreadable.

Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),


OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _filename [protected, inherited]


File to search for.

Member Function Documentation 266


Open Babel: API Documentation

Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),


OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _dir [protected, inherited]


Data directory for file if _envvar fails.

Referenced by OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(),


OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(),
OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(),
OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _subdir [protected, inherited]


Subdirectory (if using environment variable).

Referenced by OBAromaticTyper::OBAromaticTyper(), OBAtomTyper::OBAtomTyper(),


OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(), OBIsotopeTable::OBIsotopeTable(),
OBPhModel::OBPhModel(), OBResidueData::OBResidueData(), OBRingTyper::OBRingTyper(),
OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

std::string _envvar [protected, inherited]


Environment variable to check first.

Referenced by OBGlobalDataBase::Init(), OBAromaticTyper::OBAromaticTyper(),


OBAtomTyper::OBAtomTyper(), OBBondTyper::OBBondTyper(), OBElementTable::OBElementTable(),
OBIsotopeTable::OBIsotopeTable(), OBPhModel::OBPhModel(), OBResidueData::OBResidueData(),
OBRingTyper::OBRingTyper(), OBRotorRules::OBRotorRules(), and OBTypeTable::OBTypeTable().

The documentation for this class was generated from the following files:

• bondtyper.h
• bondtyper.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:

Member Data Documentation 267


Open Babel: API Documentation

Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 268


OBBuilder Member List
This is the complete list of members for OBBuilder, including all inherited members.

AddNbrs(OBBitVec &fragment, OBAtom *atom) OBBuilder [static]


Build(OBMol &mol) OBBuilder
Connect(OBMol &mol, int a, int b, vector3 &newpos, int bondOrder=1) OBBuilder [static]
Connect(OBMol &mol, int a, int b, int bondOrder=1) OBBuilder [static]
CorrectStereoAtoms(OBMol &mol) OBBuilder [static]
CorrectStereoBonds(OBMol &mol) OBBuilder [static]
GetFragment(OBAtom *atom) OBBuilder [static]
GetNewBondVector(OBAtom *atom) OBBuilder [static]
GetNewBondVector(OBAtom *atom, double length) OBBuilder [static]
LoadFragments() OBBuilder
Swap(OBMol &mol, int a, int b, int c, int d) OBBuilder [static]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBBuilder

OBBuilder Member List 269


OBBuilder Class Reference
Class to build 3D structures. More...

#include <openbabel/builder.h>

List of all members.

Public Member Functions


void LoadFragments ()
bool Build (OBMol &mol)

Static Public Member Functions


static vector3 GetNewBondVector (OBAtom *atom)
static vector3 GetNewBondVector (OBAtom *atom, double length)
static bool Connect (OBMol &mol, int a, int b, vector3 &newpos, int bondOrder=1)
static bool Connect (OBMol &mol, int a, int b, int bondOrder=1)
static bool Swap (OBMol &mol, int a, int b, int c, int d)
static void CorrectStereoBonds (OBMol &mol)
static void CorrectStereoAtoms (OBMol &mol)
static OBBitVec GetFragment (OBAtom *atom)
static void AddNbrs (OBBitVec &fragment, OBAtom *atom)

Detailed Description
Class to build 3D structures.

Class for 3D structure generation.

Since:
version 2.2

The OBBuilder class is used for generating 3D structures.

Below is and example which explain the basics.

//
// code to read molecule from smiles goes here...
//
OBBuilder builder;
builder.Build(mol);
//
// code to write molecule to 3D file format goes here...
//

OBBuilder Class Reference 270


Open Babel: API Documentation

Member Function Documentation

void LoadFragments ( )
Load fragment info from file, if is it has not already been done.

Referenced by OBBuilder::Build().

vector3 GetNewBondVector ( OBAtom * atom ) [static]


Get the position for a new neighbour on atom.

Parameters:
atom Atom for which we want a new neighbour location.

Returns:
The position for the new atom.

Referenced by OBMol::AddHydrogens(), OBBuilder::Build(), and OBBuilder::Connect().

vector3 GetNewBondVector ( OBAtom * atom,


double length
) [static]

bool Build ( OBMol & mol )


The mol object contains all connectivity information (atomic numbers, bonds, bond orders, ..) but no 3D
coordinates. Build generates these coordinates and assigns them.

Parameters:
mol Molecule with the connectivity (from smiles for example). The coordinates are also changed in
this mol.

bool Connect ( OBMol & mol,


int a,
int b,
vector3 & newpos,
int bondOrder = 1
) [static]
Atoms a and b are part of two fragments that are not connected in mol. Connect will translate and rotate the
fragment that contains b so that a and b are seperated by a bond. This bond is also added.

Parameters:
mol The molecule to be modified
a Index for atom in fragment that should not be rotated.

Member Function Documentation 271


Open Babel: API Documentation

b Index for atom in fragment that should be rotated.


newpos Direction for new bond between a and b
bondOrder Bond order of the new bond between a and b.

Returns:
true if succesful or fails when failed (most likely cause for failing: a and b are in the same fragment,
they are connected)

Referenced by OBBuilder::Build(), OBBuilder::Connect(), and OBBuilder::Swap().

bool Connect ( OBMol & mol,


int a,
int b,
int bondOrder = 1
) [static]
Atoms a and b are part of two fragments that are not connected in mol. Connect will translate and rotate the
fragment that contains b so that a and b are seperated by a bond. This bond is also added.

Parameters:
mol The molecule to be modified
a Index for atom in fragment that should not be rotated.
b Index for atom in fragment that should be rotated.
bondOrder Bond order of the new bond bewtween a and b.

Returns:
true if succesfull or fails when failed (most likely cause for failing: a and b are in the same fragment,
they are connected)

OBMol
bool Swap ( mol,
&
int a,
int b,
int c,
int d
) [static]
Swap group b, bonded to a with group d, bonded to c. The bonds a-b and b-c cannot be part of a ring. Atoms a
and b will not be moved. Atoms b, d and their connected atoms (after deleting bonds ab and cd) will be
translated/rotated.

Example:

\ / /
b d
\ / Swap(a,b,c,d) \ /
a---x ----> a---x
/ \ / / \ /
x c---d x c---b

Member Function Documentation 272


Open Babel: API Documentation
\

This function can also be used to invert chiral centers if a and c are the same atom.

Example

1 3
| Swap(C,1,C,3) |
2>-C-<3 -----> 2>-C-<1
| |
4 4

Referenced by OBBuilder::CorrectStereoAtoms().

OBMol
void CorrectStereoBonds ( mol ) [static]
&
Atoms a and b must be bonded and this bond cannot be part of a ring. The bond will be broken and the smiles
fragment will be inserted bewteen the two remaining fragments. The fragment that contains a will not be
translated or rotated. Parameters c and d are the index in the smiles to which atoms a and b will be connected
respectivly.

Currently only corrects double bond chemistry comming from smiles. (OBBond::IsUp() /
OBBond::IsDown())

Referenced by OBBuilder::Build().

OBMol
void CorrectStereoAtoms ( mol ) [static]
&
Currently only corrects atom chirality comming from smiles. (OBAtom::IsClockwize() /
OBBond::IsAntiClockwise())

Referenced by OBBuilder::Build().

OBBitVec GetFragment ( OBAtom * atom ) [static]


Get the fragment to which this atom belongs.

Parameters:
atom Atom in the fragment.

Returns:
The OBBitVec defining the fragment to which a belongs.

Referenced by OBBuilder::Build(), and OBBuilder::Connect().

void AddNbrs ( OBBitVec & fragment,


OBAtom * atom

Member Function Documentation 273


Open Babel: API Documentation

) [static]

Referenced by OBBuilder::GetFragment().

The documentation for this class was generated from the following files:

• builder.h
• builder.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 274


OBChainsParser Member List
This is the complete list of members for OBChainsParser, including all inherited members.

OBChainsParser(void) OBChainsParser
PerceiveChains(OBMol &mol, bool nukeSingleResidue=false) OBChainsParser
~OBChainsParser(void) OBChainsParser

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBChainsParser

OBChainsParser Member List 275


OBChainsParser Class Reference
Perceives peptide or nucleotide chains and residues in an OBMol. More...

#include <openbabel/chains.h>

List of all members.

Public Member Functions


OBChainsParser (void)
~OBChainsParser (void)
bool PerceiveChains (OBMol &mol, bool nukeSingleResidue=false)

Detailed Description
Perceives peptide or nucleotide chains and residues in an OBMol.

Perceive peptide or nucleotide chains and residues from atom connectivity. Based on original RasMol code by
Roger Sayle and modified by Joe Corkery. For more on Roger's original talk, see:
http://www.daylight.com/meetings/mug96/sayle/sayle.html

Constructor & Destructor Documentation

OBChainsParser ( void )

~OBChainsParser ( void )

Member Function Documentation

bool PerceiveChains ( OBMol & mol,


bool nukeSingleResidue = false
)
Perceive macromolecular (peptide and nucleotide) residues and chains

Parameters:
mol - the molecule to parse and update
nukeSingleResidue - if only one residue is found, clear information default = false -- single residue
files should still be recognized.

Referenced by OBAtom::GetResidue().

OBChainsParser Class Reference 276


Open Babel: API Documentation

The documentation for this class was generated from the following files:

• chains.h
• chains.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 277


OBChemTsfm Member List
This is the complete list of members for OBChemTsfm, including all inherited members.

Apply(OBMol &) OBChemTsfm


Init(std::string &start, std::string &end) OBChemTsfm
IsAcid() OBChemTsfm
IsBase() OBChemTsfm
OBChemTsfm() OBChemTsfm [inline]
~OBChemTsfm() OBChemTsfm [inline]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:58 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBChemTsfm

OBChemTsfm Member List 278


OBChemTsfm Class Reference
SMARTS based structural modification (chemical transformation). More...

#include <openbabel/phmodel.h>

List of all members.

Public Member Functions


OBChemTsfm ()
~OBChemTsfm ()
bool Init (std::string &start, std::string &end)
bool Apply (OBMol &)
bool IsAcid ()
bool IsBase ()

Detailed Description
SMARTS based structural modification (chemical transformation).

Transformation of chemical structures can be used for pH value correction (i.e. via OBPhModel and
OBMol::CorrectForPH()). The OBChemTsfm class defines SMARTS based TRANSFORM patterns to delete
atoms, change atom types, atom formal charges, and bond types.

For storing and converting chemical reaction files, use the OBReaction class.

Constructor & Destructor Documentation

OBChemTsfm ( ) [inline]

~OBChemTsfm ( ) [inline]

Member Function Documentation

std::string
bool Init ( start,
&
std::string
end
&
)
Initialize this transformation with the supplied SMARTS patterns.

OBChemTsfm Class Reference 279


Open Babel: API Documentation

Referenced by OBPhModel::ParseLine().

bool Apply ( OBMol & mol )


Apply this transformation to all matches in the supplied OBMol.

bool IsAcid ( )
Is this transformation an acid dissociation?
Ka
HA ----> A(-) (the H(+) will be deleted)

IsAcid() will check the charge in the end SMARTS pattern.

Returns:
true if the charge is less than 0 (-1).

bool IsBase ( )
Is this a transformation to the conjugated acid from a base?
Ka
HA ----> A(-) (the H(+) will be deleted)

IsBase() will check the charge in the end SMARTS pattern.

Returns:
true if the charge is higher than 0 (+1).

The documentation for this class was generated from the following files:

• phmodel.h
• phmodel.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:58 2008 by 1.5.6.

• Main Page
• Related Pages

Member Function Documentation 280


Open Babel: API Documentation
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Function Documentation 281


OBChiralData Member List
This is the complete list of members for OBChiralData, including all inherited members.

_atom4refc OBChiralData [protected]


_atom4refo OBChiralData [protected]
_atom4refs OBChiralData [protected]
_attr OBGenericData [protected]
_source OBGenericData [protected]
_type OBGenericData [protected]
AddAtomRef(unsigned int atomref, atomreftype t) OBChiralData
Clear() OBChiralData
[inline,
Clone(OBBase *) const OBChiralData
virtual]
GetAtom4Refs(atomreftype t) const OBChiralData
GetAtomRef(int a, atomreftype t) OBChiralData
[inline,
GetAttribute() const OBGenericData
virtual]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
GetSize(atomreftype t) const OBChiralData
[inline,
GetValue() const OBGenericData
virtual]
OBAtom class OBChiralData [friend]
OBChiralData() OBChiralData
OBChiralData(const OBChiralData &src) OBChiralData
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
OBMol class OBChiralData [friend]
operator=(const OBChiralData &) OBChiralData
parity OBChiralData [protected]
SetAtom4Refs(std::vector< unsigned int > atom4refs, atomreftype t) OBChiralData
SetAttribute(const std::string &v) OBGenericData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
~OBChiralData() OBChiralData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]

OBChiralData Member List 282


Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBChiralData

OBChiralData Member List 283


OBChiralData Class Reference
Used to hold chiral inforamtion about the atom as OBGenericData. More...

#include <openbabel/generic.h>

Inheritance diagram for OBChiralData:

[legend]

List of all members.

Public Member Functions


OBChiralData ()
OBChiralData (const OBChiralData &src)
virtual OBGenericData * Clone (OBBase *) const
OBChiralData & operator= (const OBChiralData &)
~OBChiralData ()
void Clear ()
std::vector< unsigned int > GetAtom4Refs (atomreftype t) const
unsigned int GetAtomRef (int a, atomreftype t)
bool SetAtom4Refs (std::vector< unsigned int > atom4refs, atomreftype t)
int AddAtomRef (unsigned int atomref, atomreftype t)
unsigned int GetSize (atomreftype t) const
void SetAttribute (const std::string &v)
void SetOrigin (const DataOrigin s)
virtual const std::string & GetAttribute () const
unsigned int GetDataType () const
virtual const std::string & GetValue () const
virtual DataOrigin GetOrigin () const

Protected Attributes
std::vector< unsigned int > _atom4refs
std::vector< unsigned int > _atom4refo
std::vector< unsigned int > _atom4refc
int parity
std::string _attr
unsigned int _type
DataOrigin _source

OBChiralData Class Reference 284


Open Babel: API Documentation

Friends
class OBMol
class OBAtom

Detailed Description
Used to hold chiral inforamtion about the atom as OBGenericData.

Constructor & Destructor Documentation

OBChiralData ( )

OBChiralData ( const OBChiralData & src )

~OBChiralData ( ) [inline]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

Referenced by OBMol::operator=().

OBChiralData & operator= ( const OBChiralData & src )

void Clear ( void )

std::vector< unsigned int > GetAtom4Refs ( atomreftype t ) const

Returns:
a vector of all 4 atom references of type t

Referenced by OpenBabel::CorrectChirality(), and OBBuilder::CorrectStereoAtoms().

unsigned int GetAtomRef ( int a,


atomreftype t

Friends 285
Open Babel: API Documentation

Returns:
the atom reference specified by a of type t

Referenced by OBMol::GetNextFragment().

bool SetAtom4Refs ( std::vector< unsigned int > atom4refs,


atomreftype t
)

Referenced by OpenBabel::CalcSignedVolume().

int AddAtomRef ( unsigned int atomref,


atomreftype t
)

Referenced by OBMol::GetNextFragment().

unsigned int GetSize ( atomreftype t ) const

Returns:
the size of the atom references of a given type t

Referenced by OBMol::GetNextFragment().

[inline,
void SetAttribute ( const std::string & v )
inherited]
Set the attribute (key), which can be used to retrieve this data.

Referenced by OBGastChrg::AssignPartialCharges(), OBForceField::GetAtomTypes(),


OBMol::GetFormula(), OBForceField::GetPartialCharges(), OBDescriptor::PredictAndSave(), and
OBMol::SetFormula().

[inline,
void SetOrigin ( const DataOrigin s )
inherited]
Set the origin of this data, which can be used to filter the data.

Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(),


OBMol::FindAngles(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(),
OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().

Member Function Documentation 286


Open Babel: API Documentation

const [inline, virtual,


virtual const std::string& GetAttribute ( )
inherited]

Returns:
The attribute (key), which can be used to retrieve this data

Referenced by OBMoleculeFormat::MakeCombinedMolecule().

unsigned int GetDataType ( ) const [inline, inherited]

Returns:
the data type for this object as defined in OBGenericDataType

virtual const std::string& GetValue ( ) const [inline, virtual, inherited]


Base class returns a default value (the attribute type) but should never be called.

Reimplemented in OBCommentData, and OBPairData.

Referenced by OBDescriptor::FilterCompare(), and OBDescriptor::GetValues().

virtual DataOrigin GetOrigin ( ) const [inline, virtual, inherited]

Friends And Related Function Documentation

friend class OBMol [friend]

friend class OBAtom [friend]

Member Data Documentation

std::vector<unsigned int> _atom4refs [protected]


input atom references

Referenced by OBChiralData::AddAtomRef(), OBChiralData::Clear(), OBChiralData::GetAtom4Refs(),


OBChiralData::GetAtomRef(), OBChiralData::GetSize(), OBChiralData::OBChiralData(),
OBChiralData::operator=(), and OBChiralData::SetAtom4Refs().

std::vector<unsigned int> _atom4refo [protected]


output atom references

Friends And Related Function Documentation 287


Open Babel: API Documentation

Referenced by OBChiralData::AddAtomRef(), OBChiralData::Clear(), OBChiralData::GetAtom4Refs(),


OBChiralData::GetAtomRef(), OBChiralData::GetSize(), OBChiralData::OBChiralData(),
OBChiralData::operator=(), and OBChiralData::SetAtom4Refs().

std::vector<unsigned int> _atom4refc [protected]


calcvolume references

Referenced by OBChiralData::AddAtomRef(), OBChiralData::Clear(), OBChiralData::GetAtom4Refs(),


OBChiralData::GetAtomRef(), OBChiralData::GetSize(), OBChiralData::OBChiralData(),
OBChiralData::operator=(), and OBChiralData::SetAtom4Refs().

int parity [protected]


The parity of the vector (of length 4) 1234 returns 0, 1243 returns 1

Referenced by OBChiralData::Clear(), OBChiralData::OBChiralData(), and OBChiralData::operator=().

std::string _attr [protected, inherited]


attribute tag (e.g., "UnitCell", "Comment" or "Author")

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

unsigned int _type [protected, inherited]


attribute type -- declared for each subclass

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

DataOrigin _source [protected, inherited]


source of data for accounting

Referenced by OBChiralData::operator=(), OBTorsionData::operator=(), OBAngleData::operator=(),


OBConformerData::operator=(), and OBSymmetryData::operator=().

The documentation for this class was generated from the following files:

• generic.h
• generic.cpp

Member Data Documentation 288


Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 289


OBCommentData Member List
This is the complete list of members for OBCommentData, including all inherited members.

_attr OBGenericData [protected]


_data OBCommentData [protected]
_source OBGenericData [protected]
_type OBGenericData [protected]
[inline,
Clone(OBBase *) const OBCommentData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetData() const OBCommentData [inline]
GetDataType() const OBGenericData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBCommentData
virtual]
OBCommentData() OBCommentData
OBCommentData(const OBCommentData &) OBCommentData
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
operator=(const OBCommentData &src) OBCommentData
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(const std::string &data) OBCommentData [inline]
SetData(const char *d) OBCommentData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
[inline,
~OBGenericData() OBGenericData
virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

OBCommentData Member List 290


Open Babel: API Documentation
• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBCommentData

OBCommentData Member List 291


OBCommentData Class Reference
Used to store a comment string (can be multiple lines long). More...

#include <openbabel/generic.h>

Inheritance diagram for OBCommentData:

[legend]

List of all members.

Public Member Functions


OBCommentData ()
OBCommentData (const OBCommentData &)
virtual OBGenericData * Clone (OBBase *) const
OBCommentData & operator= (const OBCommentData &src)
void SetData (const std::string &data)
void SetData (const char *d)
const std::string & GetData () const
virtual const std::string & GetValue () const
void SetAttribute (const std::string &v)
void SetOrigin (const DataOrigin s)
virtual const std::string & GetAttribute () const
unsigned int GetDataType () const
virtual DataOrigin GetOrigin () const

Protected Attributes
std::string _data
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Used to store a comment string (can be multiple lines long).

OBCommentData Class Reference 292


Open Babel: API Documentation

Constructor & Destructor Documentation

OBCommentData ( )

OBCommentData ( const OBCommentData & src )

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

OBCommentData& operator= ( const OBCommentData & src )

void SetData ( const std::string & data ) [inline]

void SetData ( const char * d ) [inline]

const std::string& GetData ( ) const [inline]

virtual const std::string& GetValue ( ) const [inline, virtual]


Base class returns a default value (the attribute type) but should never be called.

Reimplemented from OBGenericData.

[inline,
void SetAttribute ( const std::string & v )
inherited]
Set the attribute (key), which can be used to retrieve this data.

Referenced by OBGastChrg::AssignPartialCharges(), OBForceField::GetAtomTypes(),


OBMol::GetFormula(), OBForceField::GetPartialCharges(), OBDescriptor::PredictAndSave(), and
OBMol::SetFormula().

[inline,
void SetOrigin ( const DataOrigin s )
inherited]
Set the origin of this data, which can be used to filter the data.

Constructor & Destructor Documentation 293


Open Babel: API Documentation

Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(),


OBMol::FindAngles(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(),
OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().

const [inline, virtual,


virtual const std::string& GetAttribute ( )
inherited]

Returns:
The attribute (key), which can be used to retrieve this data

Referenced by OBMoleculeFormat::MakeCombinedMolecule().

unsigned int GetDataType ( ) const [inline, inherited]

Returns:
the data type for this object as defined in OBGenericDataType

virtual DataOrigin GetOrigin ( ) const [inline, virtual, inherited]

Member Data Documentation

std::string _data [protected]

std::string _attr [protected, inherited]


attribute tag (e.g., "UnitCell", "Comment" or "Author")

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

unsigned int _type [protected, inherited]


attribute type -- declared for each subclass

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

DataOrigin _source [protected, inherited]


source of data for accounting

Referenced by OBChiralData::operator=(), OBTorsionData::operator=(), OBAngleData::operator=(),


OBConformerData::operator=(), and OBSymmetryData::operator=().

The documentation for this class was generated from the following files:

Member Function Documentation 294


Open Babel: API Documentation

• generic.h
• generic.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 295


OBConformerData Member List
This is the complete list of members for OBConformerData, including all inherited members.

_attr OBGenericData [protected]


_source OBGenericData [protected]
_type OBGenericData [protected]
_vData OBConformerData [protected]
_vDimension OBConformerData [protected]
_vDisplace OBConformerData [protected]
_vEnergies OBConformerData [protected]
_vForces OBConformerData [protected]
_vVelocity OBConformerData [protected]
[inline,
Clone(OBBase *) const OBConformerData
virtual]
[inline,
GetAttribute() const OBGenericData
virtual]
GetData() OBConformerData [inline]
GetDataType() const OBGenericData [inline]
GetDimension() OBConformerData [inline]
GetDisplacements() OBConformerData [inline]
GetEnergies() OBConformerData [inline]
GetForces() OBConformerData [inline]
[inline,
GetOrigin() const OBGenericData
virtual]
[inline,
GetValue() const OBGenericData
virtual]
GetVelocities() OBConformerData [inline]
OBConformerData() OBConformerData
OBConformerData(const OBConformerData &) OBConformerData
OBGenericData(const std::string attr="undefined", const unsigned int
type=OBGenericDataType::UndefinedData, const DataOrigin OBGenericData
source=any)
operator=(const OBConformerData &) OBConformerData
SetAttribute(const std::string &v) OBGenericData [inline]
SetData(std::vector< std::string > vdat) OBConformerData [inline]
SetDimension(std::vector< unsigned short > vd) OBConformerData [inline]
SetDisplacements(std::vector< std::vector< vector3 > > vd) OBConformerData [inline]
SetEnergies(std::vector< double > ve) OBConformerData [inline]
SetForces(std::vector< std::vector< vector3 > > vf) OBConformerData [inline]
SetOrigin(const DataOrigin s) OBGenericData [inline]
SetVelocities(std::vector< std::vector< vector3 > > vv) OBConformerData [inline]
~OBConformerData() OBConformerData [inline]

OBConformerData Member List 296


Open Babel: API Documentation

[inline,
~OBGenericData() OBGenericData
virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBConformerData

OBConformerData Member List 297


OBConformerData Class Reference
Used to hold data on conformers or geometry optimization steps. More...

#include <openbabel/generic.h>

Inheritance diagram for OBConformerData:

[legend]

List of all members.

Public Member Functions


OBConformerData ()
OBConformerData (const OBConformerData &)
virtual OBGenericData * Clone (OBBase *) const
~OBConformerData ()
OBConformerData & operator= (const OBConformerData &)
void SetDimension (std::vector< unsigned short > vd)
void SetEnergies (std::vector< double > ve)
void SetForces (std::vector< std::vector< vector3 > > vf)
void SetVelocities (std::vector< std::vector< vector3 > > vv)
void SetDisplacements (std::vector< std::vector< vector3 > > vd)
void SetData (std::vector< std::string > vdat)
std::vector< unsigned short > GetDimension ()
std::vector< double > GetEnergies ()
std::vector< std::vector
< vector3 > > GetForces ()
std::vector< std::vector
< vector3 > > GetVelocities ()
std::vector< std::vector
< vector3 > > GetDisplacements ()
std::vector< std::string > GetData ()
void SetAttribute (const std::string &v)
void SetOrigin (const DataOrigin s)
virtual const std::string & GetAttribute () const
unsigned int GetDataType () const
virtual const std::string & GetValue () const
virtual DataOrigin GetOrigin () const

OBConformerData Class Reference 298


Open Babel: API Documentation

Protected Attributes
std::vector< unsigned short > _vDimension
std::vector< double > _vEnergies
std::vector< std::vector
< vector3 > > _vForces
std::vector< std::vector
< vector3 > > _vVelocity
std::vector< std::vector
< vector3 > > _vDisplace
std::vector< std::string > _vData
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description
Used to hold data on conformers or geometry optimization steps.

Supplements the support for multiple coordinate sets in OBMol, e.g., OBMol::GetConformer()

Constructor & Destructor Documentation

OBConformerData ( )

OBConformerData ( const OBConformerData & src )

~OBConformerData ( ) [inline]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase * ) const [inline, virtual]

Reimplemented from OBGenericData.

OBConformerData & operator= ( const OBConformerData & src )

void SetDimension ( std::vector< unsigned short > vd ) [inline]

void SetEnergies ( std::vector< double > ve ) [inline]

Protected Attributes 299


Open Babel: API Documentation
Referenced by OBForceField::GetConformers(), OBForceField::GetCoordinates(), and
OBMol::SetEnergies().

void SetForces ( std::vector< std::vector< vector3 > > vf ) [inline]

Referenced by OBForceField::GetCoordinates().

std::vector<
void SetVelocities ( std::vector< vv ) [inline]
vector3 > >

void SetDisplacements ( std::vector< std::vector< vector3 > > vd ) [inline]

void SetData ( std::vector< std::string > vdat ) [inline]

std::vector<unsigned short> GetDimension ( ) [inline]

std::vector<double> GetEnergies ( ) [inline]

Referenced by OBMol::GetEnergies(), and OBMol::GetEnergy().

std::vector< std::vector< vector3 > > GetForces ( ) [inline]

std::vector< std::vector< vector3 > > GetVelocities ( ) [inline]

std::vector< std::vector< vector3 > > GetDisplacements ( ) [inline]

std::vector<std::string> GetData ( ) [inline]

[inline,
void SetAttribute ( const std::string & v )
inherited]
Set the attribute (key), which can be used to retrieve this data.

Referenced by OBGastChrg::AssignPartialCharges(), OBForceField::GetAtomTypes(),


OBMol::GetFormula(), OBForceField::GetPartialCharges(), OBDescriptor::PredictAndSave(), and
OBMol::SetFormula().

Member Function Documentation 300


Open Babel: API Documentation

[inline,
void SetOrigin ( const DataOrigin s )
inherited]
Set the origin of this data, which can be used to filter the data.

Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(),


OBMol::FindAngles(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(),
OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().

const [inline, virtual,


virtual const std::string& GetAttribute ( )
inherited]

Returns:
The attribute (key), which can be used to retrieve this data

Referenced by OBMoleculeFormat::MakeCombinedMolecule().

unsigned int GetDataType ( ) const [inline, inherited]

Returns:
the data type for this object as defined in OBGenericDataType

virtual const std::string& GetValue ( ) const [inline, virtual, inherited]


Base class returns a default value (the attribute type) but should never be called.

Reimplemented in OBCommentData, and OBPairData.

Referenced by OBDescriptor::FilterCompare(), and OBDescriptor::GetValues().

virtual DataOrigin GetOrigin ( ) const [inline, virtual, inherited]

Member Data Documentation

std::vector<unsigned short> _vDimension [protected]


Dimensionalities of conformers.

Referenced by OBConformerData::operator=().

std::vector<double> _vEnergies [protected]


Relative energies of conformers (preferably in kJ/mol).

Referenced by OBConformerData::operator=().

Member Data Documentation 301


Open Babel: API Documentation

std::vector< std::vector< vector3 > > _vForces [protected]


Atomic forces for each conformer.

Referenced by OBConformerData::operator=().

std::vector< std::vector< vector3 > > _vVelocity [protected]


Atomic velocities for each conformer (e.g., trajectories).

Referenced by OBConformerData::operator=().

std::vector< std::vector< vector3 > > _vDisplace [protected]


Atomic displacements for each conformer (e.g., RMS distances).

Referenced by OBConformerData::operator=().

std::vector<std::string> _vData [protected]


Additional data (as strings).

Referenced by OBConformerData::operator=().

std::string _attr [protected, inherited]


attribute tag (e.g., "UnitCell", "Comment" or "Author")

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

unsigned int _type [protected, inherited]


attribute type -- declared for each subclass

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

DataOrigin _source [protected, inherited]


source of data for accounting

Referenced by OBChiralData::operator=(), OBTorsionData::operator=(), OBAngleData::operator=(),


OBConformerData::operator=(), and OBSymmetryData::operator=().

The documentation for this class was generated from the following files:

• generic.h
• generic.cpp

Member Data Documentation 302


Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 303


OBConversion Member List
This is the complete list of members for OBConversion, including all inherited members.

AddChemObject(OBBase *pOb) OBConversion


AddOption(const char *opt, Option_type opttyp=OUTOPTIONS, const
OBConversion
char *txt=NULL)
ALL enum value OBConversion
[protected,
BatchFileName(std::string &BaseName, std::string &InFile) OBConversion
static]
CheckedForGzip OBConversion [protected]
CheckForUnintendedBatch(const std::string &infile, const std::string [protected,
OBConversion
&outfile) static]
CloseOutFile() OBConversion
Convert(std::istream *is, std::ostream *os) OBConversion
Convert() OBConversion
CopyOptions(OBConversion *pSourceConv, Option_type typ=ALL) OBConversion
Count OBConversion [protected]
Description() OBConversion [static]
EndNumber OBConversion [protected]
FindFormat(const char *ID) OBConversion [static]
[protected,
FormatFilesLoaded OBConversion
static]
FormatFromExt(const char *filename) OBConversion [static]
FormatFromMIME(const char *MIME) OBConversion [static]
FullConvert(std::vector< std::string > &FileList, std::string
OBConversion
&OutputFileName, std::vector< std::string > &OutputFileList)
GENOPTIONS enum value OBConversion
GetAuxConv() const OBConversion [inline]
GetChemObject() OBConversion
[inline,
GetDefaultFormat() OBConversion
static]
GetInFilename() const OBConversion [inline]
GetInFormat() const OBConversion [inline]
GetInLen() const OBConversion [inline]
GetInPos() const OBConversion [inline]
GetInStream() const OBConversion [inline]
GetNextFormat(Formatpos &itr, const char *&str, OBFormat
OBConversion [static]
*&pFormat)
GetOptionParams(std::string name, Option_type typ) OBConversion [static]
GetOptions(Option_type opttyp) OBConversion [inline]
GetOutFormat() const OBConversion [inline]
GetOutputIndex() const OBConversion

OBConversion Member List 304


Open Babel: API Documentation

GetOutStream() const OBConversion [inline]


GetSupportedInputFormat() OBConversion
GetSupportedOutputFormat() OBConversion
GetTitle() const OBConversion
[protected,
IncrementedFileName(std::string &BaseName, const int Count) OBConversion
static]
Index OBConversion [protected]
InFilename OBConversion [protected]
INOPTIONS enum value OBConversion
InstallStreamFilter() OBConversion [protected]
IsFirstInput() OBConversion
IsLast() OBConversion
IsLastFile() OBConversion [inline]
IsOption(const char *opt, Option_type opttyp=OUTOPTIONS) OBConversion
LErdbuf typedef OBConversion [protected]
[protected,
LoadFormatFiles() OBConversion
static]
m_IsFirstInput OBConversion [protected]
m_IsLast OBConversion [protected]
MoreFilesToCome OBConversion [protected]
NeedToFreeInStream OBConversion [protected]
NeedToFreeOutStream OBConversion [protected]
OBConversion(std::istream *is=NULL, std::ostream *os=NULL) OBConversion
OBConversion(const OBConversion &o) OBConversion
OneObjectOnly OBConversion [protected]
OPAMapType typedef OBConversion [protected]
OpenAndSetFormat(bool SetFormat, std::ifstream *is) OBConversion [protected]
OpenInAndOutFiles(std::string infilepath, std::string outfilepath) OBConversion
Option_type enum name OBConversion
[protected,
OptionParamArray(Option_type typ) OBConversion
static]
OptionsArray OBConversion [protected]
OUTOPTIONS enum value OBConversion
pAuxConv OBConversion [protected]
[protected,
pDefaultFormat OBConversion
static]
pInFormat OBConversion [protected]
pInStream OBConversion [protected]
pLineEndBuf OBConversion [protected]
pOb1 OBConversion [protected]
pOutFormat OBConversion [protected]
pOutStream OBConversion [protected]

OBConversion Member List 305


Open Babel: API Documentation

Read(OBBase *pOb, std::istream *pin=NULL) OBConversion


ReadFile(OBBase *pOb, std::string filePath) OBConversion
ReadString(OBBase *pOb, std::string input) OBConversion
ReadyToInput OBConversion [protected]
RegisterFormat(const char *ID, OBFormat *pFormat, const char
OBConversion [static]
*MIME=NULL)
RegisterOptionParam(std::string name, OBFormat *pFormat, int
OBConversion [static]
numberParams=0, Option_type typ=OUTOPTIONS)
RemoveOption(const char *opt, Option_type optype) OBConversion
ReportNumberConverted(int count, OBFormat *pFormat=NULL) OBConversion
rInlen OBConversion [protected]
rInpos OBConversion [protected]
SetAuxConv(OBConversion *pConv) OBConversion [inline]
SetFirstInput(bool b=true) OBConversion
SetInAndOutFormats(const char *inID, const char *outID) OBConversion
SetInAndOutFormats(OBFormat *pIn, OBFormat *pOut) OBConversion
SetInFormat(const char *inID) OBConversion
SetInFormat(OBFormat *pIn) OBConversion
SetInStream(std::istream *pIn) OBConversion [inline]
SetLast(bool b) OBConversion [inline]
SetMoreFilesToCome() OBConversion
SetOneObjectOnly(bool b=true) OBConversion
SetOptions(const char *options, Option_type opttyp) OBConversion
SetOutFormat(const char *outID) OBConversion
SetOutFormat(OBFormat *pOut) OBConversion
SetOutputIndex(int indx) OBConversion
SetOutStream(std::ostream *pOut) OBConversion [inline]
SetStartAndEnd() OBConversion [protected]
StartNumber OBConversion [protected]
SupportedInputFormat OBConversion [protected]
SupportedOutputFormat OBConversion [protected]
wInlen OBConversion [protected]
wInpos OBConversion [protected]
Write(OBBase *pOb, std::ostream *pout=NULL) OBConversion
WriteFile(OBBase *pOb, std::string filePath) OBConversion
WriteString(OBBase *pOb, bool trimWhitespace=false) OBConversion
~OBConversion() OBConversion [virtual]

OBConversion Member List 306


Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBConversion

OBConversion Member List 307


OBConversion Class Reference
Class to convert from one format to another. More...

#include <openbabel/obconversion.h>

Inheritance diagram for OBConversion:

[legend]

List of all members.

Option handling
enum Option_type { INOPTIONS, OUTOPTIONS, GENOPTIONS, ALL }
const char * IsOption (const char *opt, Option_type opttyp=OUTOPTIONS)
const std::map< std::string,
std::string > * GetOptions (Option_type opttyp)
void AddOption (const char *opt, Option_type opttyp=OUTOPTIONS, const char
*txt=NULL)
bool RemoveOption (const char *opt, Option_type optype)
void SetOptions (const char *options, Option_type opttyp)
static void RegisterOptionParam (std::string name, OBFormat *pFormat, int
numberParams=0, Option_type typ=OUTOPTIONS)
static int GetOptionParams (std::string name, Option_type typ)

Convenience functions
bool Write (OBBase *pOb, std::ostream *pout=NULL)
std::string WriteString (OBBase *pOb, bool trimWhitespace=false)
bool WriteFile (OBBase *pOb, std::string filePath)
void CloseOutFile ()
bool Read (OBBase *pOb, std::istream *pin=NULL)
bool ReadString (OBBase *pOb, std::string input)
bool ReadFile (OBBase *pOb, std::string filePath)
bool OpenInAndOutFiles (std::string infilepath, std::string outfilepath)
void ReportNumberConverted (int count, OBFormat *pFormat=NULL)
static OBFormat * GetDefaultFormat ()
static std::string BatchFileName (std::string &BaseName, std::string &InFile)
static std::string IncrementedFileName (std::string &BaseName, const int Count)
static bool CheckForUnintendedBatch (const std::string &infile, const std::string &outfile)
void InstallStreamFilter ()

OBConversion Class Reference 308


Open Babel: API Documentation

Public Member Functions


void CopyOptions (OBConversion *pSourceConv, Option_type typ=ALL)
Construction

OBConversion (std::istream *is=NULL, std::ostream *os=NULL)


OBConversion (const OBConversion &o)
virtual ~OBConversion ()
Parameter get and set
std::istream * GetInStream () const
std::ostream * GetOutStream () const
void SetInStream (std::istream *pIn)
void SetOutStream (std::ostream *pOut)
bool SetInAndOutFormats (const char *inID, const char *outID)
bool SetInAndOutFormats (OBFormat *pIn, OBFormat *pOut)
bool SetInFormat (const char *inID)
bool SetInFormat (OBFormat *pIn)
bool SetOutFormat (const char *outID)
bool SetOutFormat (OBFormat *pOut)
OBFormat * GetInFormat () const
OBFormat * GetOutFormat () const
std::string GetInFilename () const
std::streampos GetInPos () const
size_t GetInLen () const
const char * GetTitle () const
OBConversion * GetAuxConv () const
void SetAuxConv (OBConversion *pConv)
Supported file format
std::vector< std::string > GetSupportedInputFormat ()
std::vector< std::string > GetSupportedOutputFormat ()
Conversion
int Convert (std::istream *is, std::ostream *os)
int Convert ()
int FullConvert (std::vector< std::string > &FileList, std::string &OutputFileName,
std::vector< std::string > &OutputFileList)
Conversion loop control
int AddChemObject (OBBase *pOb)
OBBase * GetChemObject ()
bool IsLast ()
bool IsFirstInput ()
void SetFirstInput (bool b=true)
int GetOutputIndex () const
void SetOutputIndex (int indx)
void SetMoreFilesToCome ()
void SetOneObjectOnly (bool b=true)
void SetLast (bool b)
bool IsLastFile ()

Convenience functions 309


Open Babel: API Documentation

Static Public Member Functions


Collection of formats
static int RegisterFormat (const char *ID, OBFormat *pFormat, const char
*MIME=NULL)
static OBFormat * FindFormat (const char *ID)
static OBFormat * FormatFromExt (const char *filename)
static OBFormat * FormatFromMIME (const char *MIME)
static bool GetNextFormat (Formatpos &itr, const char *&str, OBFormat *&pFormat)
Information
static const char * Description ()

Protected Types
typedef std::map< std::string,
int > OPAMapType
typedef
FilteringInputStreambuf
< LineEndingExtractor > LErdbuf

Protected Member Functions


bool SetStartAndEnd ()
bool OpenAndSetFormat (bool SetFormat, std::ifstream *is)

Static Protected Member Functions


static OPAMapType & OptionParamArray (Option_type typ)
static int LoadFormatFiles ()

Protected Attributes
std::string InFilename
std::istream * pInStream
std::ostream * pOutStream
OBFormat * pInFormat
OBFormat * pOutFormat
std::map< std::string,
std::string > OptionsArray [3]
int Index
unsigned int StartNumber
unsigned int EndNumber
int Count
bool m_IsFirstInput
bool m_IsLast
bool MoreFilesToCome
bool OneObjectOnly
bool ReadyToInput
bool CheckedForGzip
bool NeedToFreeInStream

Static Public Member Functions 310


Open Babel: API Documentation
bool NeedToFreeOutStream
LErdbuf * pLineEndBuf
OBBase * pOb1
std::streampos wInpos
std::streampos rInpos
size_t wInlen
size_t rInlen
OBConversion * pAuxConv
std::vector< std::string > SupportedInputFormat
std::vector< std::string > SupportedOutputFormat

Static Protected Attributes


static OBFormat * pDefaultFormat
static int FormatFilesLoaded = 0

Detailed Description
Class to convert from one format to another.

OBConversion maintains a list of the available formats, provides information on them, and controls the
conversion process.

A conversion is carried out by the calling routine, usually in a user interface or an application program,
making an instance of OBConversion. It is loaded with the in and out formats, any options and (usually) the
default streams for input and output. Then either the Convert() function is called, which allows a single input
file to be converted, or the extended functionality of FullConvert() is used. This allows multiple input and
output files, allowing:

• aggregation - the contents of many input files converted and sent to one output file;
• splitting - the molecules from one input file sent to separate output files;
• batch conversion - each input file converted to an output file.

These procedures constitute the "Convert" interface. OBConversion and the user interface or application
program do not need to be aware of any other part of OpenBabel - mol.h is not #included. This allows any
chemical object derived from OBBase to be converted; the type of object is decided by the input format class.
However,currently, almost all the conversions are for molecules of class OBMol. / OBConversion can also be
used with an "API" interface called from programs which manipulate chemical objects. Input/output is done
with the Read() and Write() functions which work with any chemical object, but need to have its type
specified. (The ReadMolecule() and WriteMolecule() functions of the format classes can also be used
directly.)

Example code using OBConversion

To read in a molecule, manipulate it and write it out.

Set up an istream and an ostream, to and from files or elsewhere. (cin and cout are used in the example).
Specify the file formats.

Protected Attributes 311


Open Babel: API Documentation
OBConversion conv(&cin,&cout);
if(conv.SetInAndOutFormats("SMI","MOL"))
{
OBMol mol;
if(conv.Read(&mol))
// ...manipulate molecule

conv->Write(&mol);
}

A two stage construction is used to allow error handling if the format ID is not recognized. This is necessary
now that the formats are dynamic and errors are not caught at compile time. OBConversion::Read() is a
templated function so that objects derived from OBBase can also be handled, in addition to OBMol, if the
format routines are written appropriately.

To make a molecule from a SMILES string.

std::string SmilesString;
OBMol mol;
stringstream ss(SmilesString)
OBConversion conv(&ss);
if(conv.SetInFormat("smi") && conv.Read(&mol))
// ...

To do a file conversion without manipulating the molecule.

#include <openbabel/obconversion.h> //mol.h is not needed


...set up an istream is and an ostream os
OBConversion conv(&is,&os);
if(conv.SetInAndOutFormats("SMI","MOL"))
{
conv.AddOption("h",OBConversion::GENOPTIONS); //Optional; (h adds expicit hydrogens)
conv.Convert();
}

To add automatic format conversion to an existing program.

The existing program inputs from the file identified by the const char* filename into the istream is. The file is
assumed to have a format ORIG, but other formats, identified by their file extensions, can now be used.

ifstream ifs(filename); //Original code

OBConversion conv;
OBFormat* inFormat = conv.FormatFromExt(filename);
OBFormat* outFormat = conv.GetFormat("ORIG");
istream* pIn = &ifs;
stringstream newstream;
if(inFormat && outFormat)
{
conv.SetInAndOutFormats(inFormat,outFormat);
conv.Convert(pIn,&newstream);
pIn=&newstream;
}
//else error; new features not available; fallback to original functionality

...Carry on with original code using pIn

Detailed Description 312


Open Babel: API Documentation

In certain Windows builds, a degree of independence from OpenBabel can be achieved using DLLs. This code
would be linked with obconv.lib. At runtime the following DLLs would be in the executable directory:
obconv.dll, obdll.dll, one or more *.obf format files.

Member Typedef Documentation

typedef std::map<std::string,int> OPAMapType [protected]

typedef FilteringInputStreambuf< LineEndingExtractor > LErdbuf [protected]

Member Enumeration Documentation

enum Option_type
Three types of options set on the the command line by -a? , -x? , or -?

Enumerator:
INOPTIONS
OUTOPTIONS
GENOPTIONS
ALL

Constructor & Destructor Documentation

OBConversion ( std::istream * is = NULL,


std::ostream * os = NULL
)

OBConversion ( const OBConversion & o )


Copy constructor.

~OBConversion ( ) [virtual]

Member Function Documentation

int RegisterFormat ( const char * ID,


OBFormat * pFormat,
MIME =
const char *
NULL

Member Typedef Documentation 313


Open Babel: API Documentation

) [static]
Called once by each format class.

Class information on formats is collected by making an instance of the class derived from OBFormat(only one
is usually required). RegisterFormat() is called from its constructor.

If the compiled format is stored separately, like in a DLL or shared library, the initialization code makes an
instance of the imported OBFormat class.

OBFormat * FindFormat ( const char * ID ) [static]


Searches registered formats.

Referenced by OBConversion::FormatFromExt(), OBConversion::SetInFormat(), and


OBConversion::SetOutFormat().

OBFormat * FormatFromExt ( const char * filename ) [static]


Searches registered formats for an ID the same as the file extension.

Referenced by OBConversion::OpenAndSetFormat().

OBFormat * FormatFromMIME ( const char * MIME ) [static]


Searches registered formats for a MIME the same as the chemical MIME type passed.

Formatpos
bool GetNextFormat ( itr,
&
const char
str,
*&
OBFormat
pFormat
*&
) [static]
Deprecated!.Repeatedly called to recover available Formats.

const char * Description ( ) [static]

const
std::istream* GetInStream ( )
[inline]

Referenced by OBMoleculeFormat::DeferMolOutput(), and OBMoleculeFormat::ReadChemObjectImpl().

const
std::ostream* GetOutStream ( )
[inline]

Member Function Documentation 314


Open Babel: API Documentation

void SetInStream ( std::istream * pIn ) [inline]

Referenced by OBConversion::FullConvert().

void SetOutStream ( std::ostream * pOut ) [inline]

Referenced by OBConversion::FullConvert().

bool SetInAndOutFormats ( const char * inID,


const char * outID
)
Sets the formats from their ids, e g CML.

Sets the formats from their ids, e g CML. If inID is NULL, the input format is left unchanged. Similarly for
outID Returns true if both formats have been successfully set at sometime

bool SetInAndOutFormats ( OBFormat * pIn,


OBFormat * pOut
)

bool SetInFormat ( const char * inID )


Sets the input format from an id e.g. CML.

Referenced by OBMoleculeFormat::ReadNameIndex(), and OBConversion::SetInAndOutFormats().

bool SetInFormat ( OBFormat * pIn )

bool SetOutFormat ( const char * outID )


Sets the output format from an id e.g. CML.

Referenced by OBConversion::SetInAndOutFormats().

bool SetOutFormat ( OBFormat * pOut )

OBFormat* GetInFormat ( ) const [inline]

OBFormat* GetOutFormat ( ) const [inline]

Referenced by OBMoleculeFormat::OutputDeferredMols().

Member Function Documentation 315


Open Babel: API Documentation

std::string GetInFilename ( ) const [inline]

const
std::streampos GetInPos ( )
[inline]
Get the position in the input stream of the object being read.

size_t GetInLen ( ) const [inline]


Get the length in the input stream of the object being read.

const char * GetTitle ( ) const

Returns:
a default title which is the filename

OBConversion* GetAuxConv ( ) const [inline]


Extension method: deleted in ~OBConversion().

void SetAuxConv ( OBConversion * pConv ) [inline]

const char * IsOption ( const char * opt,


Option_type opttyp = OUTOPTIONS
)
Determine whether an option is set.

Returns:
NULL if option not and a pointer to the associated text if it is

Referenced by OBConversion::Convert(), OBConversion::FullConvert(),


OBMoleculeFormat::ReadChemObjectImpl(), OBConversion::SetStartAndEnd(), OBConversion::Write(),
and OBMoleculeFormat::WriteChemObjectImpl().

const std::map<std::string,std::string>* GetOptions ( Option_type opttyp ) [inline]


Access the map with option name as key and any associated text as value.

Referenced by OBMoleculeFormat::OutputDeferredMols(), and


OBMoleculeFormat::ReadChemObjectImpl().

void AddOption ( const char * opt,


Option_type opttyp = OUTOPTIONS,
const char * txt = NULL

Member Function Documentation 316


Open Babel: API Documentation

)
Set an option of specified type, with optional text.

bool RemoveOption ( const char * opt,


Option_type optype
)

void SetOptions ( const char * options,


Option_type opttyp
)
Set several single character options of specified type from string like ab"btext"c"ctext".

void RegisterOptionParam ( std::string name,


OBFormat * pFormat,
int numberParams = 0,
Option_type typ = OUTOPTIONS
) [static]
For example -h takes 0 parameters; -f takes 1. Call in a format constructor.

Referenced by OBConversion::OBConversion(), and OBMoleculeFormat::OBMoleculeFormat().

int GetOptionParams ( std::string name,


Option_type typ
) [static]

Returns:
the number of parameters registered for the option, or 0 if not found

void CopyOptions ( OBConversion * pSourceConv,


Option_type typ = ALL
)
Copies the options (by default of all types) from one OBConversion Object to another.

std::vector< std::string > GetSupportedInputFormat ( )


Returns the list of supported input format

std::vector< std::string > GetSupportedOutputFormat ( )


Returns the list of supported output format

Member Function Documentation 317


Open Babel: API Documentation

int Convert ( std::istream * is,


std::ostream * os
)
Conversion for single input and output stream.

int Convert ( )
Conversion with existing streams.

Actions the "convert" interface. Calls the OBFormat class's ReadMolecule() which

• makes a new chemical object of its chosen type (e.g. OBMol)


• reads an object from the input file
• subjects the chemical object to 'transformations' as specified by the Options
• calls AddChemObject to add it to a buffer. The previous object is first output via the output Format's
WriteMolecule(). During the output process calling IsFirst() and GetIndex() (the number of objects
including the current one already output. allows more control, for instance writing <cml> and </cml>
tags for multiple molecule outputs only.

AddChemObject does not save the object passed to it if it is NULL (as a result of a DoTransformation()) or if
the number of the object is outside the range defined by StartNumber and EndNumber.This means the start
and end counts apply to all chemical objects found whether or not they are output.

If ReadMolecule returns false the input conversion loop is exited.

Referenced by OBConversion::Convert(), and OBConversion::FullConvert().

std::vector<
int FullConvert ( FileList,
std::string > &
std::string & OutputFileName,
std::vector<
OutputFileList
std::string > &
)
Conversion with multiple input/output files: makes input and output streams, and carries out normal, batch,
aggregation, and splitting conversion.

Makes input and output streams, and carries out normal, batch, aggregation, and splitting conversion.

Normal Done if FileList contains a single file name and OutputFileName does not contain a *.

Aggregation Done if FileList has more than one file name and OutputFileName does not contain * . All the
chemical objects are converted and sent to the single output file.

Splitting Done if FileList contains a single file name and OutputFileName contains a * . Each chemical object
in the input file is converted and sent to a separate file whose name is OutputFileName with the replaced by 1,
2, 3, etc. OutputFileName must have at least one character other than the * before the extension. For example,
if OutputFileName is NEW*.smi then the output files are NEW1.smi, NEW2.smi, etc.

Member Function Documentation 318


Open Babel: API Documentation

Batch Conversion Done if FileList has more than one file name and contains a * . Each input file is converted
to an output file whose name is OutputFileName with the * replaced by the inputfile name without its path
and extension. So if the input files were inpath/First.cml, inpath/Second.cml and OutputFileName was
NEW*.mol, the output files would be NEWFirst.mol, NEWSecond.mol.

If FileList is empty, the input stream that has already been set (usually in the constructor) is used. If
OutputFileName is empty, the output stream already set is used.

On exit, OutputFileList contains the names of the output files.

Returns the number of Chemical objects converted.

int AddChemObject ( OBBase * pOb )


Adds to internal array during input.

Called by ReadMolecule() to deliver an object it has read from an input stream. Used in two modes:

• When Count is negative it is left negative and the routine is just a store for an OBBase object. The
negative value returned tells the calling routine that no more objects are required.
• When count is >=0, probably set by Convert(), it acts as a queue of 2: writing the currently stored
value before accepting the supplied one. This delay allows output routines to respond differently
when the written object is the last. Count is incremented with each call, even if pOb=NULL. Objects
are not added to the queue if the count is outside the range StartNumber to EndNumber. There is no
upper limit if EndNumber is zero. The return value is Count ((>0) or 0 if WriteChemObject returned
false.

Referenced by OBMoleculeFormat::ReadChemObjectImpl().

OBBase * GetChemObject ( )
Retrieve from internal array during output.

Retrieves an object stored by AddChemObject() during output

Referenced by OBMoleculeFormat::WriteChemObjectImpl().

bool IsLast ( )
True if no more objects to be output.

Reimplemented in XMLConversion.

Referenced by XMLConversion::IsLast(), and OBMoleculeFormat::WriteChemObjectImpl().

bool IsFirstInput ( )
True if the first input object is being processed.

Referenced by OBMoleculeFormat::DeferMolOutput(), and OBMoleculeFormat::ReadChemObjectImpl().

Member Function Documentation 319


Open Babel: API Documentation

b=
void SetFirstInput ( bool )
true
Setwhether or not is the first input.

Referenced by OBConversion::Convert(), and OBConversion::FullConvert().

int GetOutputIndex ( ) const


Retrieves number of ChemObjects that have been actually output.

Returns the number of objects which have been output or are currently being output. The outputindex is
incremented when an object for output is fetched by GetChemObject(). So the function will return 1 if called
from WriteMolecule() during output of the first object.

Referenced by XMLConversion::GetOutputIndex().

void SetOutputIndex ( int indx )


Sets ouput index (maybe to control whether seen as first object).

Referenced by OBConversion::FullConvert(), OBMoleculeFormat::OutputDeferredMols(), and


OBMoleculeFormat::WriteChemObjectImpl().

void SetMoreFilesToCome ( )
Used with multiple input files. Off by default.

Referenced by OBConversion::FullConvert().

void SetOneObjectOnly ( bool b = true )


Used with multiple input files. Off by default.

Referenced by OBConversion::FullConvert(), OBMoleculeFormat::OutputDeferredMols(), and


OBConversion::Write().

void SetLast ( bool b ) [inline]


Synonym for SetOneObjectOnly().

bool IsLastFile ( ) [inline]


True if no more files to be read.

static OBFormat* GetDefaultFormat ( ) [inline, static]


The default format is set in a single OBFormat class (generally it is OBMol).

Member Function Documentation 320


Open Babel: API Documentation

bool Write ( OBBase * pOb,


std::ostream * pout = NULL
)
Outputs an object of a class derived from OBBase.

Part of "API" interface. The output stream can be specified and the change is retained in the OBConversion
instance

Writes the object pOb but does not delete it afterwards. The output stream is lastingly changed if pos is not
NULL Returns true if successful.

Referenced by OBConversion::WriteFile(), and OBConversion::WriteString().

std::string WriteString ( OBBase * pOb,


trimWhitespace =
bool
false
)
Outputs an object of a class derived from OBBase as a string.

Part of "API" interface. The output stream is temporarily changed to the string and then restored This method
is primarily intended for scripting languages without "stream" classes The optional "trimWhitespace"
parameter allows trailing whitespace to be removed (e.g., in a SMILES string or InChI, etc.)

Writes the object pOb but does not delete it afterwards. The output stream not changed (since we cannot write
to this string later) Returns true if successful.

bool WriteFile ( OBBase * pOb,


std::string filePath
)
Outputs an object of a class derived from OBBase as a file (with the supplied path).

Part of "API" interface. The output stream is changed to the supplied file and the change is retained in the
OBConversion instance. This method is primarily intended for scripting languages without "stream" classes

Writes the object pOb but does not delete it afterwards. The output stream is lastingly changed to point to the
file Returns true if successful.

void CloseOutFile ( )
Manually closes and deletes the output stream The file is closed anyway when in the OBConversion
destructor or when WriteFile is called again.

Since:
version 2.1

Member Function Documentation 321


Open Babel: API Documentation

bool Read ( OBBase * pOb,


std::istream * pin = NULL
)
Reads an object of a class derived from OBBase into pOb.

Part of "API" interface. The input stream can be specified and the change is retained in the OBConversion
instance

Returns:
false and pOb=NULL on error

Referenced by OBConversion::ReadFile(), OBMoleculeFormat::ReadNameIndex(), and


OBConversion::ReadString().

bool ReadString ( OBBase * pOb,


std::string input
)
Reads an object of a class derived from OBBase into pOb from the supplied string.

Part of "API" interface. The input stream can be specified and the change is retained in the OBConversion
instance

Returns:
NULL on error Part of "API" interface.

false and pOb=NULL on error This method is primarily intended for scripting languages without
"stream" classes

bool ReadFile ( OBBase * pOb,


std::string filePath
)
Reads an object of a class derived from OBBase into pOb from the file specified.

Part of "API" interface. The output stream is changed to the supplied file and the change is retained in the
OBConversion instance.

Returns:
false and pOb=NULL on error This method is primarily intended for scripting languages without
"stream" classes

bool OpenInAndOutFiles ( std::string infilepath,


std::string outfilepath
)
Part of the "Convert" interface Open the files and update the streams in the OBConversion object. This
method is primarily intended for scripting languages without "stream" classes and will usually followed by a

Member Function Documentation 322


Open Babel: API Documentation

call to Convert()

Returns:
false if unsucessful.

void ReportNumberConverted ( int count,


pFormat =
OBFormat *
NULL
)
Sends a message like "2 molecules converted" to clog The type of object is taken from the
TargetClassDescription of the specified class (or the output format if not specified)and is appropriately
singular or plural.

string BatchFileName ( std::string & BaseName,


std::string & InFile
) [static, protected]
Replaces * in BaseName by InFile without extension and path.

Referenced by OBConversion::FullConvert().

string IncrementedFileName ( std::string & BaseName,


const int Count
) [static, protected]
Replaces * in BaseName by Count.

Referenced by OBConversion::FullConvert().

bool CheckForUnintendedBatch ( const std::string & infile,


const std::string & outfile
) [static, protected]
Checks for misunderstandings when using the -m option.

Referenced by OBConversion::FullConvert().

void InstallStreamFilter ( ) [protected]


Adds a filtering rdbuffer to handle line endings if not already installed and not a binary or xml format.

Referenced by OBConversion::Convert(), and OBConversion::Read().

bool SetStartAndEnd ( ) [protected]

Referenced by OBConversion::Convert().

Member Function Documentation 323


Open Babel: API Documentation

OBConversion::OPAMapType & OptionParamArray ( Option_type typ ) [static, protected]

Referenced by OBConversion::GetOptionParams(), and OBConversion::RegisterOptionParam().

int LoadFormatFiles ( ) [static, protected]

Referenced by OBConversion::OBConversion().

bool OpenAndSetFormat ( bool SetFormat,


std::ifstream * is
) [protected]

Referenced by OBConversion::FullConvert().

Member Data Documentation

std::string InFilename [protected]

Referenced by OBConversion::FullConvert(), OBConversion::GetTitle(), OBConversion::OBConversion(),


OBConversion::OpenAndSetFormat(), OBConversion::OpenInAndOutFiles(), and
OBConversion::ReadFile().

std::istream* pInStream [protected]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(),


OBConversion::InstallStreamFilter(), OBConversion::OBConversion(),
OBConversion::OpenInAndOutFiles(), OBConversion::Read(), OBConversion::ReadFile(),
OBConversion::ReadString(), and OBConversion::~OBConversion().

std::ostream* pOutStream [protected]

Referenced by OBConversion::CloseOutFile(), OBConversion::Convert(), OBConversion::OBConversion(),


OBConversion::OpenInAndOutFiles(), OBConversion::Write(), OBConversion::WriteFile(),
OBConversion::WriteString(), and OBConversion::~OBConversion().

OBFormat* pDefaultFormat [static, protected]

OBFormat* pInFormat [protected]

Referenced by OBConversion::Convert(), OBConversion::FullConvert(),


OBConversion::InstallStreamFilter(), OBConversion::OBConversion(),

Member Data Documentation 324


Open Babel: API Documentation

OBConversion::OpenAndSetFormat(), OBConversion::Read(), OBConversion::ReadFile(),


OBConversion::SetInFormat(), and OBConversion::SetStartAndEnd().

OBFormat* pOutFormat [protected]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), OBConversion::FullConvert(),


OBConversion::OBConversion(), OBConversion::ReportNumberConverted(),
OBConversion::SetOutFormat(), OBConversion::Write(), OBConversion::WriteFile(), and
OBConversion::WriteString().

std::map<std::string,std::string> OptionsArray[3] [protected]

Referenced by OBConversion::AddOption(), OBConversion::CopyOptions(), OBConversion::IsOption(),


OBConversion::OBConversion(), OBConversion::RemoveOption(), and OBConversion::SetOptions().

int Index [protected]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(),


OBConversion::GetChemObject(), OBConversion::GetOutputIndex(), OBConversion::OBConversion(), and
OBConversion::SetOutputIndex().

unsigned int StartNumber [protected]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(),


OBConversion::OBConversion(), and OBConversion::SetStartAndEnd().

unsigned int EndNumber [protected]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(),


OBConversion::OBConversion(), and OBConversion::SetStartAndEnd().

int Count [protected]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), OBConversion::FullConvert(),


OBConversion::OBConversion(), and OBConversion::SetStartAndEnd().

bool m_IsFirstInput [protected]

Referenced by OBConversion::IsFirstInput(), OBConversion::OBConversion(), and


OBConversion::SetFirstInput().

Member Data Documentation 325


Open Babel: API Documentation

bool m_IsLast [protected]

Referenced by OBConversion::Convert(), OBConversion::IsLast(), OBConversion::OBConversion(), and


OBConversion::SetOneObjectOnly().

bool MoreFilesToCome [protected]

Referenced by OBConversion::Convert(), OBConversion::OBConversion(), and


OBConversion::SetMoreFilesToCome().

bool OneObjectOnly [protected]

Referenced by OBConversion::Convert(), OBConversion::OBConversion(), and


OBConversion::SetOneObjectOnly().

bool ReadyToInput [protected]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), and


OBConversion::OBConversion().

bool CheckedForGzip [protected]


input stream is gzip-encoded

Referenced by OBConversion::Convert(), OBConversion::FullConvert(), OBConversion::OBConversion(),


and OBConversion::Read().

bool NeedToFreeInStream [protected]

Referenced by OBConversion::OBConversion(), OBConversion::OpenInAndOutFiles(),


OBConversion::ReadFile(), OBConversion::ReadString(), and OBConversion::~OBConversion().

bool NeedToFreeOutStream [protected]

Referenced by OBConversion::CloseOutFile(), OBConversion::OBConversion(),


OBConversion::OpenInAndOutFiles(), OBConversion::WriteFile(), and OBConversion::~OBConversion().

LErdbuf* pLineEndBuf [protected]

Referenced by OBConversion::InstallStreamFilter(), and OBConversion::OBConversion().

int FormatFilesLoaded = 0 [static, protected]

Member Data Documentation 326


Open Babel: API Documentation

Referenced by OBConversion::OBConversion().

OBBase* pOb1 [protected]

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(),


OBConversion::GetChemObject(), and OBConversion::OBConversion().

std::streampos wInpos [protected]


position in the input stream of the object being written

Referenced by OBConversion::AddChemObject(), and OBConversion::OBConversion().

std::streampos rInpos [protected]


position in the input stream of the object being read

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), and


OBConversion::OBConversion().

size_t wInlen [protected]


length in the input stream of the object being written

Referenced by OBConversion::AddChemObject(), OBConversion::Convert(), and


OBConversion::OBConversion().

size_t rInlen [protected]


length in the input stream of the object being read

Referenced by OBConversion::AddChemObject(), and OBConversion::OBConversion().

OBConversion* pAuxConv [protected]


Way to extend OBConversion.

Referenced by OBConversion::OBConversion(), and OBConversion::~OBConversion().

std::vector<std::string> SupportedInputFormat [protected]


list of supported input format

std::vector<std::string> SupportedOutputFormat [protected]


list of supported output format

The documentation for this class was generated from the following files:

Member Data Documentation 327


Open Babel: API Documentation

• obconversion.h
• obconversion.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:57 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 328


OBDescriptor Member List
This is the complete list of members for OBDescriptor, including all inherited members.

_id OBPlugin [protected]


AddProperties(OBBase *pOb, const std::string &DescrList) OBDescriptor [static]
[inline, protected,
BaseFindType(PluginMapType &Map, const char *ID) OBPlugin
static]
Begin(const char *PluginID) OBPlugin [inline, static]
Compare(OBBase *pOb, std::istream &ss, bool noEval) OBDescriptor [virtual]
CompareStringWithFilter(std::istream &optionText, std::string
OBDescriptor [protected, static]
&s, bool noEval, bool NoCompOK=false)
DeleteProperties(OBBase *pOb, const std::string &DescrList) OBDescriptor [static]
Description() OBPlugin [inline, virtual]
Display(std::string &txt, const char *param, const char
OBDescriptor [virtual]
*ID=NULL)
End(const char *PluginID) OBPlugin [inline, static]
FilterCompare(OBBase *pOb, std::istream &ss, bool noEval) OBDescriptor [static]
FirstLine(const char *txt) OBPlugin [static]
GetID() const OBPlugin [inline]
GetIdentifier(std::istream &optionText) OBDescriptor [protected, static]
GetMap() const =0 OBPlugin [pure virtual]
GetPlugin(const char *Type, const char *ID) OBPlugin [inline, static]
GetStringValue(OBBase *pOb, std::string &svalue) OBDescriptor [virtual]
GetTypeMap(const char *PluginID) OBPlugin [protected, static]
GetValues(OBBase *pOb, const std::string &DescrList) OBDescriptor [static]
[inline, protected,
ispunctU(char ch) OBDescriptor
static]
List(const char *PluginID, const char *param=NULL,
OBPlugin [static]
std::ostream *os=&std::cout)
ListAsString(const char *PluginID, const char *param=NULL) OBPlugin [static]
ListAsVector(const char *PluginID, const char *param,
OBPlugin [static]
std::vector< std::string > &vlist)
MakeInstance(const std::vector< std::string > &) OBPlugin [inline, virtual]
MatchPairData(OBBase *pOb, std::string &s) OBDescriptor [protected, static]
ParsePredicate(std::istream &optionText, char &ch1, char &ch2,
OBDescriptor [protected, static]
std::string &svalue)
PluginIterator typedef OBPlugin
[inline, protected,
PluginMap() OBPlugin
static]
PluginMapType typedef OBPlugin
Predict(OBBase *pOb) OBDescriptor [inline, virtual]
PredictAndSave(OBBase *pOb) OBDescriptor

OBDescriptor Member List 329


Open Babel: API Documentation

ReadStringFromFilter(std::istream &ss, std::string &result) OBDescriptor [protected, static]


TypeID() OBDescriptor [inline]
~OBPlugin() OBPlugin [inline, virtual]

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBDescriptor

OBDescriptor Member List 330


OBDescriptor Class Reference
Base class for molecular properties, descriptors or features. More...

#include <openbabel/descriptor.h>

Inheritance diagram for OBDescriptor:

[legend]

List of all members.

Public Types
typedef std::map< const char
*, OBPlugin *, CharPtrLess > PluginMapType
typedef
PluginMapType::const_iterator PluginIterator

Public Member Functions


const char * TypeID ()
virtual double Predict (OBBase *pOb)
double PredictAndSave (OBBase *pOb)
virtual double GetStringValue (OBBase *pOb, std::string &svalue)
virtual bool Compare (OBBase *pOb, std::istream &ss, bool noEval)
virtual bool Display (std::string &txt, const char *param, const char *ID=NULL)
virtual const char * Description ()
virtual OBPlugin * MakeInstance (const std::vector< std::string > &)
const char * GetID () const
virtual PluginMapType & GetMap () const =0

Static Public Member Functions


static bool FilterCompare (OBBase *pOb, std::istream &ss, bool noEval)
static void AddProperties (OBBase *pOb, const std::string &DescrList)
static void DeleteProperties (OBBase *pOb, const std::string &DescrList)
static std::string GetValues (OBBase *pOb, const std::string &DescrList)

OBDescriptor Class Reference 331


Open Babel: API Documentation
static OBPlugin * GetPlugin (const char *Type, const char *ID)
static bool ListAsVector (const char *PluginID, const char *param, std::vector<
std::string > &vlist)
static void List (const char *PluginID, const char *param=NULL, std::ostream
*os=&std::cout)
static std::string ListAsString (const char *PluginID, const char *param=NULL)
static std::string FirstLine (const char *txt)
static PluginIterator Begin (const char *PluginID)
static PluginIterator End (const char *PluginID)

Static Protected Member Functions


static std::string GetIdentifier (std::istream &optionText)
static double ParsePredicate (std::istream &optionText, char &ch1, char &ch2, std::string
&svalue)
static bool ReadStringFromFilter (std::istream &ss, std::string &result)
static bool CompareStringWithFilter (std::istream &optionText, std::string &s, bool
noEval, bool NoCompOK=false)
static bool ispunctU (char ch)
static bool MatchPairData (OBBase *pOb, std::string &s)
static PluginMapType & PluginMap ()
static PluginMapType & GetTypeMap (const char *PluginID)
static OBPlugin * BaseFindType (PluginMapType &Map, const char *ID)

Protected Attributes
const char * _id

Detailed Description
Base class for molecular properties, descriptors or features.

Since:
version 2.2

OBDescriptor and Filtering

On the command line, using the option --filter filter-string converts only those molecules which meet the
criteria specified in the filter-string. This is useful to select particular molecules from a set. It is used like:
babel dataset.sdf outfile.smi --filter "MW>200 SMARTS!=c1ccccc1
PUBCHEM_CACTVS_ROTATABLE_BOND<5"

The identifier , "PUBCHEM_CACTVS_ROTATABLE_BOND" is the name of an attribute of an OBPairData


which has probably been imported from a property in a SDF or CML file. The identifier names are (currently)
case dependent. A comparison is made with the value in the OBPairData. This is a numeric comparison if
both operands can be converted to numbers (as in the example). If the 5 had been enclosed in single or double
quotes the comparison would have been a string comparison, which gives a different result in some cases.
OBPairData is searched first to match an identifier.

Static Public Member Functions 332


Open Babel: API Documentation
If there are no OBPair attributes that match, the identifier is taken to be the ID of an OBDescriptor class
object. The class OBDescriptor is the base class for classes that wrap molecular properties, descriptors or
features. In the example "MW" and "SMARTS" are OBDescriptor IDs and are case independent. They are
plugin classes, like fingerprints, forcefields and formats, so that new molecular features can be added or old
ones removed (to prevent code bloat) without altering old code. A list of available descriptors is available
from the commandline: babel -L descriptors or from the functions OBPlugin::List, OBPlugin::ListAsString
and OBPlugin::ListAsVector.

The filter-string is interpreted by a static function of OBDescriptor, FilterCompare(). This identifies the
descriptor IDs and then calls a virtual function, Compare(), of each OBDescriptor class to interpret the rest of
relational expression, for example, ">200", or "=c1ccccc1". The default version of Compare() is suitable for
descriptors, like MW or logP, which return a double from their Predict() method. Classes like SMARTS
which need different semantics provide their own.

By default, as in the example, OBDescriptor::FilterCompare() would AND each comparison so that all the
comparisons must be true for the test to succeed. However filter-string could also be a full boolean expression,
with &, |, !, and parenthases allowing any combination of features to be selected. FilterCompareAs calls itself
recursively to give AND precidence over OR and evaluation is not carried out if not needed.

The aim has been to make interpretation of the filter-string as liberal as possible, so that AND can be &&,
there can be spaces or commas in places that are reasonable.

The base class, OBDescriptor, uses pointers to OBBase in its functions, like OBFormat, to improve
extendability - reactions could have features too. It does mean that a dynamic_cast is needed at the start of the
Predict(OBBase* pOb) functions.

To use a particular descriptor, like logP, when programming with the API, use code like the following:

OBDescriptor* pDescr = OBDecriptor::FindType("logP");


if(pDescr)
double val = pDescr->Predict(mol);

To add the descriptor ID and the predicted data to OBPairData attached to the object, use PredictAndSave().

This facility can be called from the command line.Use the option --add "descriptor list", which will add the
requested descriptors to the molecule. They are then visible as properties in SDF and CML formats. The IDs
in the list can be separated by spaces or punctuation characters. All Descriptors will provide an output value
as a string through a virtual function GetStringValue((OBBase* pOb, string& svalue)) which assigns the
value of a string descriptor(like inchi) to svalue or a string representation of a numerical property like logP.

The classes MWFilter and TitleFilter illustrate the code that has to be provided for numerical and
non-numerical descriptors.

Member Typedef Documentation

typedef std::map<const char*, OBPlugin*, CharPtrLess> PluginMapType [inherited]

typedef PluginMapType::const_iterator PluginIterator [inherited]

Detailed Description 333


Open Babel: API Documentation

Member Function Documentation

const char* TypeID ( ) [inline]

[inline,
virtual double Predict ( OBBase * pOb )
virtual]

Returns:
the value of a numeric descriptor

Reimplemented in OBGroupContrib.

Referenced by OBDescriptor::Compare(), and OBDescriptor::GetStringValue().

double PredictAndSave ( OBBase * pOb )

Returns:
the value of the descriptor and adds it to the object's OBPairData

Referenced by OBDescriptor::AddProperties().

double GetStringValue ( OBBase * pOb,


std::string & svalue
) [virtual]
Provides a string value for non-numeric descriptors and returns NaN, or a string representation and returns a
numeric value.

This default version provides a string representation of the numeric value.

Referenced by OBDescriptor::GetValues(), and OBDescriptor::PredictAndSave().

bool Compare ( OBBase * pOb,


std::istream & ss,
bool noEval
) [virtual]
Parses the filter stream for a relational expression and returns its result when applied to the chemical object.

Compare() is a virtual function and can be overridden to allow different comparison behaviour. The default
implementation here is suitable for OBDescriptor classes which return a double value. The stringstream is
parsed to retrieve a comparison operator, one of > < >= <= = == != , and a numerical value. The function
compares this the value returned by Predict() and returns the result. The stringstream is left after the number,
and its state reflects whether any errors have occurred. If noEval is true, the parsing is as normal but Predict is

Member Typedef Documentation 334


Open Babel: API Documentation

not called and the function returns false.

Referenced by OBDescriptor::FilterCompare().

bool Display ( std::string & txt,


const char * param,
const char * ID = NULL
) [virtual]
Write information on a plugin class to the string txt. If the parameter is a descriptor ID, displays the verbose
description for that descriptor only e.g. babel -L descriptors HBA1

Reimplemented from OBPlugin.

bool FilterCompare ( OBBase * pOb,


std::istream & optionText,
bool noEval
) [static]
Interprets the --filter option string and returns the combined result of all the comparisons it contains.

The string has the form: PropertyID1 predicate1 [booleanOp] PropertyID2 predicate2 ... The propertyIDs are
the ID of instances of a OBDescriptor class or the Attributes of OBPairData, and contain only letters, numbers
and underscores. The predicates must start with a punctuation character and are interpreted by the Compare
function of the OBDescriptor class. The default implementation expects a comparison operator and a number,
e.g. >=1.3 Whitespace is optional and is ignored. Each predicate and this OBBase object (usually OBMol) is
passed to the Compare function of a OBDescriptor. The result of each comparison is combined in a boolean
expression (which can include parentheses) in the normal way. The AND operator can be & or &&, the OR
operator can be | or ||, and a unitary NOT is ! The expected operator precedence is achieved using recursive
calls of the function. If there is no boolean Op, all the tests have to return true for the function to return true,
i.e. the default is AND. If the first operand of an AND is 0, or of an OR is 1, the parsing of the second operand
continues but no comparisons are done since the result does not matter.

Referenced by OBMol::DoTransformations().

void AddProperties ( OBBase * pOb,


const std::string & DescrList
) [static]
Reads list of descriptor IDs and calls PredictAndSave() for each.

Referenced by OBMol::DoTransformations().

void DeleteProperties ( OBBase * pOb,


const std::string & DescrList
) [static]
Deletes all the OBPairDatas whose attribute names are in the list (if they exist).

Member Function Documentation 335


Open Babel: API Documentation

Referenced by OBMol::DoTransformations().

string GetValues ( OBBase * pOb,


const std::string & DescrList
) [static]
Reads list of descriptor IDs and OBPairData names and returns a list of values, each precede by a space or the
first character in the list if it is whitespace or punctuation.

Referenced by OBMol::DoTransformations().

string GetIdentifier ( std::istream & optionText ) [static, protected]


Read an identifier from the filter string.

Referenced by OBDescriptor::FilterCompare().

double ParsePredicate ( std::istream & optionText,


char & ch1,
char & ch2,
std::string & svalue
[static,
)
protected]
Reads comparison operator and the following string. Return its value if possible else NaN.

Referenced by OBDescriptor::CompareStringWithFilter(), and OBDescriptor::FilterCompare().

bool ReadStringFromFilter ( std::istream & ss,


std::string & result
[static,
)
protected]
Reads a string from the filter string optionally preceded by = or !=.

Reads a string from the filter stream, optionally preceded by = or !=

Returns:
false if != operator found, and true otherwise.

On entry the stringstream position should be just after the ID. On exit it is after the string. If there is an error,
the stringstream badbit is set. Returns false if != found, to indicate negation. Can be of any of the following
forms: mystring =mystring ==mystring [must be terminated by a space or tab] "mystring" 'mystring'
="mystring" ='mystring' [mystring can contain spaces or tabs] !=mystring !="mystring" [Returns false
indicating negate] There can be spaces or tabs after the operator = == !=

Referenced by OBDescriptor::ParsePredicate().

Member Function Documentation 336


Open Babel: API Documentation

bool CompareStringWithFilter ( std::istream & optionText,


std::string & s,
bool noEval,
bool NoCompOK = false
[static,
)
protected]
Makes a comparison using the operator and a string read from the filter stream with a provided string.

Returns:
the result of the comparison and true if NoCompOK==true and there is no comparison operator.

Referenced by OBDescriptor::FilterCompare().

static bool ispunctU ( char ch ) [inline, static, protected]

Referenced by OBDescriptor::Compare(), OBDescriptor::FilterCompare(), OBDescriptor::GetIdentifier(), and


OBDescriptor::GetValues().

bool MatchPairData ( OBBase * pOb,


std::string & s
[static,
)
protected]

Returns:
true if s (with or without _ replaced by spaces) is a PairData attribute. On return s is the form which
matches.

Referenced by OBDescriptor::DeleteProperties(), OBDescriptor::FilterCompare(), and


OBDescriptor::GetValues().

virtual const char* Description ( ) [inline, virtual, inherited]


Required description of a sub-type.

Reimplemented in OBFormat, OBGroupContrib, and OpTransform.

Referenced by OBPlugin::Display(), and OBOp::OpOptions().

virtual OBPlugin* const std::vector< std::string > [inline, virtual,


( )
MakeInstance & inherited]
Make a new instance of the class. See OpTransform, OBGroupContrib, SmartsDescriptor classes for derived
versions. Usually, the first parameter is the classname, the next three are parameters(ID, filename, description)
for a constructor, and the rest data.

Reimplemented in OBGroupContrib, and OpTransform.

Member Function Documentation 337


Open Babel: API Documentation

Referenced by OBConversion::LoadFormatFiles().

static OBPlugin* GetPlugin ( const char * Type,


const char * ID
[inline, static,
)
inherited]
Get a pointer to a plugin from its type and ID. Return NULL if not found. Not cast to Type*.

Referenced by OBConversion::LoadFormatFiles().

const char* GetID ( ) const [inline, inherited]


Return the ID of the sub-type instance.

Referenced by OBPlugin::Display(), OBFormat::Display(), and OBDescriptor::PredictAndSave().

bool ListAsVector ( const char * PluginID,


const char * param,
std::vector< std::string > & vlist
[static,
)
inherited]
Output a list of sub-type classes of the the type PluginID, or, if PluginID is "plugins" or empty, a list of the
base types. If PluginID is not recognized or is NULL, the base types are output and the return is false.

Referenced by OBConversion::GetSupportedInputFormat(), OBConversion::GetSupportedOutputFormat(),


and OBPlugin::List().

void List ( const char * PluginID,


const char * param = NULL,
std::ostream * os = &std::cout
[static,
)
inherited]
As ListAsVector but sent to an ostream with a default of cout if not specified.

Referenced by OBPlugin::ListAsString().

string ListAsString ( const char * PluginID,


const char * param = NULL
[static,
)
inherited]
As ListAsVector but returns a string containing the list.

Member Function Documentation 338


Open Babel: API Documentation

string FirstLine ( const char * txt ) [static, inherited]


Utility function to return only the first line of a string.

Referenced by OBPlugin::Display(), OBFormat::Display(), and OBOp::OpOptions().

[inline, static,
static PluginIterator Begin ( const char * PluginID )
inherited]
Return an iterator at the start of the map of the plugin types PluginID or, if there is no such map, the end of the
top level plugin map.

Referenced by OBConversion::GetNextFormat(), and OBOp::OpOptions().

static PluginIterator End ( const char * PluginID ) [inline, static, inherited]

Referenced by OBConversion::GetNextFormat(), and OBOp::OpOptions().

virtual PluginMapType& GetMap ( ) const [pure virtual, inherited]


Returns the map of the subtypes.

Referenced by OBFormat::RegisterFormat().

[inline, static, protected,


static PluginMapType& PluginMap ( )
inherited]
Returns a reference to the map of the plugin types. Is a function rather than a static member variable to avoid
initialization problems.

Referenced by OBPlugin::GetTypeMap(), OBPlugin::ListAsVector(), and OBFormat::RegisterFormat().

OBPlugin::PluginMapType & const char [static, protected,


( PluginID )
GetTypeMap * inherited]
Returns the map of a particular plugin type, e.g. GetMapType("fingerprints").

static OBPlugin* PluginMapType


( Map,
BaseFindType &
const char * ID
[inline, static, protected,
)
inherited]
Returns the type with the specified ID, or NULL if not found. Will be cast to the appropriate class in the
calling routine.

Member Function Documentation 339


Open Babel: API Documentation

Member Data Documentation

const char* _id [protected, inherited]

Referenced by OBFormat::RegisterFormat().

The documentation for this class was generated from the following files:

• descriptor.h
• descriptor.cpp

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:56 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

Member Data Documentation 340


OBElement Member List
This is the complete list of members for OBElement, including all inherited members.

GetAllredRochowElectroNeg() OBElement [inline]


GetAtomicNum() OBElement [inline]
GetBlue() OBElement [inline]
GetCovalentRad() OBElement [inline]
GetElectronAffinity() OBElement [inline]
GetElectroNeg() OBElement [inline]
GetGreen() OBElement [inline]
GetIonization() OBElement [inline]
GetMass() OBElement [inline]
GetMaxBonds() OBElement [inline]
GetName() OBElement [inline]
GetRed() OBElement [inline]
GetSymbol() OBElement [inline]
GetVdwRad() OBElement [inline]
OBElement() OBElement [inline]
OBElement(int num, const char *sym, double ARENeg, double rcov, double rvdw,
int maxbo, double mass, double elNeg, double ionize, double elAffin, double red, OBElement [inline]
double green, double blue, std::string name)

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List

OBElement Member List 341


Open Babel: API Documentation
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBElement

OBElement Member List 342


OBElement Class Reference
Individual element data type. More...

#include <openbabel/data.h>

List of all members.

Public Member Functions


OBElement ()
OBElement (int num, const char *sym, double ARENeg, double rcov, double rvdw,
int maxbo, double mass, double elNeg, double ionize, double elAffin, double red,
double green, double blue, std::string name)
int GetAtomicNum ()
char * GetSymbol ()
double GetCovalentRad ()
double GetVdwRad ()
double GetMass ()
int GetMaxBonds ()
double GetElectroNeg ()
double GetAllredRochowElectroNeg ()
double GetIonization ()
double GetElectronAffinity ()
std::string GetName ()
double GetRed ()
double GetGreen ()
double GetBlue ()

Detailed Description
Individual element data type.

Stores a variety of data about an individual element. Used mainly by OBElementTable.

Constructor & Destructor Documentation

OBElement ( ) [inline]

Deprecated:
Not used. Instead, initialize element properties

OBElement ( int num,


const char * sym,

OBElement Class Reference 343


Open Babel: API Documentation

double ARENeg,
double rcov,
double rvdw,
int maxbo,
double mass,
double elNeg,
double ionize,
double elAffin,
double red,
double green,
double blue,
std::string name
) [inline]
Constructor

Parameters:
num Atomic number
sym Elemental symbol (maximum 3 characters)
ARENeg Allred-Rochow electronegativity
rcov Covalent radius (in Angstrom)
rvdw van der Waals radius (in Angstrom)
maxbo Maximum bonding valence
mass Atomic mass (in amu)
elNeg Electronegativity (in Pauling units)
ionize Ionization potential (in eV)
elAffin Electron affinity (in eV)
red RGB value for a suggest visualization color (0 .. 1)
green RGB value for a suggest visualization color (0 .. 1)
blue RGB value for a suggest visualization color (0 .. 1)
name Full IUPAC name

Member Function Documentation

int GetAtomicNum ( ) [inline]

Returns:
the atomic number of this element

char* GetSymbol ( ) [inline]

Returns:
the atomic symbol for this element

Constructor & Destructor Documentation 344


Open Babel: API Documentation

double GetCovalentRad ( ) [inline]

Returns:
the covalent radius of this element

double GetVdwRad ( ) [inline]

Returns:
the van der Waals radius of this element

double GetMass ( ) [inline]

Returns:
the standard atomic mass for this element (in amu)

int GetMaxBonds ( ) [inline]

Returns:
the maximum expected number of bonds to this element

double GetElectroNeg ( ) [inline]

Returns:
the Pauling electronegativity for this element

double GetAllredRochowElectroNeg ( ) [inline]

Returns:
the Allred-Rochow electronegativity for this element

double GetIonization ( ) [inline]

Returns:
the ionization potential (in eV) of this element

double GetElectronAffinity ( ) [inline]

Returns:
the electron affinity (in eV) of this element

std::string GetName ( ) [inline]

Member Function Documentation 345


Open Babel: API Documentation

Returns:
the name of this element (in English)

double GetRed ( ) [inline]

Returns:
the red component of this element's default visualization color

double GetGreen ( ) [inline]

Returns:
the green component of this element's default color

double GetBlue ( ) [inline]

Returns:
the blue component of this element's default color

The documentation for this class was generated from the following file:

• data.h

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy

Member Function Documentation 346


Open Babel: API Documentation

• Class Members

Member Function Documentation 347


OBElementTable Member List
This is the complete list of members for OBElementTable, including all inherited members.

_dataptr OBGlobalDataBase [protected]


_dir OBGlobalDataBase [protected]
_envvar OBGlobalDataBase [protected]
_filename OBGlobalDataBase [protected]
_init OBGlobalDataBase [protected]
_subdir OBGlobalDataBase [protected]
CorrectedBondRad(int, int=3) OBElementTable
CorrectedVdwRad(int, int=3) OBElementTable
GetAllredRochowElectroNeg(int) OBElementTable
GetAtomicNum(const char *) OBElementTable
GetAtomicNum(const char *, int &iso) OBElementTable
GetCovalentRad(int) OBElementTable
GetElectronAffinity(int) OBElementTable
GetElectroNeg(int) OBElementTable
GetIonization(int) OBElementTable
GetMass(int) OBElementTable
GetMaxBonds(int) OBElementTable
GetName(int) OBElementTable
GetNumberOfElements() OBElementTable
GetRGB(int) OBElementTable
GetSize() OBElementTable [inline, virtual]
GetSymbol(int) OBElementTable
GetVdwRad(int) OBElementTable
Init() OBGlobalDataBase
OBElementTable(void) OBElementTable
OBGlobalDataBase() OBGlobalDataBase [inline]
ParseLine(const char *) OBElementTable [virtual]
SetEnvironmentVariable(char *var) OBGlobalDataBase [inline]
SetReadDirectory(char *dir) OBGlobalDataBase [inline]
~OBElementTable() OBElementTable
~OBGlobalDataBase() OBGlobalDataBase [inline, virtual]

OBElementTable Member List 348


Open Babel: API Documentation

This file is part of the documentation for Open Babel, version 2.2.0.

Documentation copyright © 1998-2007, the Open Babel Developers.

Open Babel is hosted by:


Generated on Thu Jul 3 15:26:55 2008 by 1.5.6.

• Main Page
• Related Pages
• Namespaces
• Classes
• Files

• Alphabetical List
• Class List
• Class Hierarchy
• Class Members

OpenBabel::OBElementTable

OBElementTable Member List 349


OBElementTable Class Reference
Periodic Table of the Elements. More...

#include <openbabel/data.h>

Inheritance diagram for OBElementTable:

[legend]

List of all members.

Public Member Functions


OBElementTable (void)
~OBElementTable ()
void ParseLine (const char *)
unsigned int GetNumberOfElements ()
unsigned int GetSize ()
int GetAtomicNum (const char *)
int GetAtomicNum (const char *, int &iso)
const char * GetSymbol (int)
double GetVdwRad (int)
double GetCovalentRad (int)
double GetMass (int)
double CorrectedBondRad (int, int=3)
double CorrectedVdwRad (int, int=3)
int GetMaxBonds (int)
double GetElectroNeg (int)
double GetAllredRochowElectroNeg (int)
double GetIonization (int)
double GetElectronAffinity (int)
std::vector< double > GetRGB (int)
std::string GetName (int)
void Init ()
void SetReadDirectory (char *dir)
void SetEnvironmentVariable (char *var)

Protected Attributes
bool _init
const char * _dataptr

OBElementTable Class Reference 350


Open Babel: API D